File tree Expand file tree Collapse file tree 6 files changed +11
-19
lines changed Expand file tree Collapse file tree 6 files changed +11
-19
lines changed Original file line number Diff line number Diff line change 1
- using CommunityToolkit . Aspire . Hosting . Azure . StaticWebApps ;
2
-
3
1
var builder = DistributedApplication . CreateBuilder ( args ) ;
4
2
5
3
var api = builder . AddProject < Projects . CommunityToolkit_Aspire_StaticWebApps_ApiApp > ( "api" ) ;
Original file line number Diff line number Diff line change 1
- using Aspire . Hosting . ApplicationModel ;
2
-
3
- namespace CommunityToolkit . Aspire . Hosting . Azure . StaticWebApps ;
1
+ namespace Aspire . Hosting . ApplicationModel ;
4
2
5
3
public class SwaApiEndpointAnnotation ( IResourceBuilder < IResourceWithEndpoints > resource ) : IResourceAnnotation
6
4
{
Original file line number Diff line number Diff line change 1
- using Aspire . Hosting . ApplicationModel ;
2
-
3
- namespace CommunityToolkit . Aspire . Hosting . Azure . StaticWebApps ;
1
+ namespace Aspire . Hosting . ApplicationModel ;
4
2
5
3
public class SwaAppEndpointAnnotation ( IResourceBuilder < IResourceWithEndpoints > resource ) : IResourceAnnotation
6
4
{
Original file line number Diff line number Diff line change 1
- using Aspire . Hosting ;
2
1
using Aspire . Hosting . ApplicationModel ;
3
2
4
- namespace CommunityToolkit . Aspire . Hosting . Azure . StaticWebApps ;
3
+ namespace Aspire . Hosting ;
5
4
6
5
public static class SwaAppHostingExtension
7
6
{
@@ -71,9 +70,3 @@ public static IResourceBuilder<SwaResource> WithAppResource(this IResourceBuilde
71
70
public static IResourceBuilder < SwaResource > WithApiResource ( this IResourceBuilder < SwaResource > builder , IResourceBuilder < IResourceWithEndpoints > apiResource ) =>
72
71
builder . WithAnnotation < SwaApiEndpointAnnotation > ( new ( apiResource ) , ResourceAnnotationMutationBehavior . Replace ) ;
73
72
}
74
-
75
- public class SwaResourceOptions
76
- {
77
- public int Port { get ; set ; } = 4280 ;
78
- public int DevServerTimeout { get ; set ; } = 60 ;
79
- }
Original file line number Diff line number Diff line change 1
- using Aspire . Hosting . ApplicationModel ;
2
-
3
- namespace CommunityToolkit . Aspire . Hosting . Azure . StaticWebApps ;
1
+ namespace Aspire . Hosting . ApplicationModel ;
4
2
5
3
public class SwaResource ( string name , string workingDirectory ) : ExecutableResource ( name , "swa" , workingDirectory )
6
4
{
Original file line number Diff line number Diff line change
1
+ namespace Aspire . Hosting ;
2
+
3
+ public class SwaResourceOptions
4
+ {
5
+ public int Port { get ; set ; } = 4280 ;
6
+ public int DevServerTimeout { get ; set ; } = 60 ;
7
+ }
You can’t perform that action at this time.
0 commit comments