Skip to content

Commit

Permalink
Merge pull request #25 from CommunityToolkit/namespace-fix
Browse files Browse the repository at this point in the history
namespace fix
  • Loading branch information
aaronpowell authored Sep 17, 2024
2 parents ebe006d + 9367190 commit db67da9
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 41 deletions.
2 changes: 0 additions & 2 deletions examples/java/CommunityToolkit.Aspire.Java.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using CommunityToolkit.Aspire.Hosting.Java;

var builder = DistributedApplication.CreateBuilder(args);

var apiapp = builder.AddProject<Projects.CommunityToolkit_Aspire_Java_ApiApp>("apiapp");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;

var builder = DistributedApplication.CreateBuilder(args);

builder.AddViteApp("vite-demo")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;

var builder = DistributedApplication.CreateBuilder(args);

var api = builder.AddProject<Projects.CommunityToolkit_Aspire_StaticWebApps_ApiApp>("api");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;
namespace Aspire.Hosting.ApplicationModel;

public class SwaApiEndpointAnnotation(IResourceBuilder<IResourceWithEndpoints> resource) : IResourceAnnotation
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;
namespace Aspire.Hosting.ApplicationModel;

public class SwaAppEndpointAnnotation(IResourceBuilder<IResourceWithEndpoints> resource) : IResourceAnnotation
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;
namespace Aspire.Hosting;

public static class SwaAppHostingExtension
{
Expand Down Expand Up @@ -71,9 +70,3 @@ public static IResourceBuilder<SwaResource> WithAppResource(this IResourceBuilde
public static IResourceBuilder<SwaResource> WithApiResource(this IResourceBuilder<SwaResource> builder, IResourceBuilder<IResourceWithEndpoints> apiResource) =>
builder.WithAnnotation<SwaApiEndpointAnnotation>(new(apiResource), ResourceAnnotationMutationBehavior.Replace);
}

public class SwaResourceOptions
{
public int Port { get; set; } = 4280;
public int DevServerTimeout { get; set; } = 60;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;
namespace Aspire.Hosting.ApplicationModel;

public class SwaResource(string name, string workingDirectory) : ExecutableResource(name, "swa", workingDirectory)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Aspire.Hosting;

public class SwaResourceOptions
{
public int Port { get; set; } = 4280;
public int DevServerTimeout { get; set; } = 60;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// A resource that represents a Java application.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// This represents the options entity for configuring a Java application running in a container.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// A resource that represents a Java application.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// This represents the options entity for configuring an executable Java application.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System.Globalization;

using CommunityToolkit.Aspire.Hosting.Java.Utils;
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting;

/// <summary>
/// Provides extension methods for adding Java applications to an <see cref="IDistributedApplicationBuilder"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Lifecycle;
using Aspire.Hosting.Utils;
using CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;
using Microsoft.Extensions.Hosting;

namespace CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;
namespace Aspire.Hosting;

public static class NodeJSHostingExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@

namespace CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;


/// <summary>
/// Represents a Node package installer.
/// </summary>
/// <param name="packageManager">The package manager to use.</param>
/// <param name="loggerService">The logger service to use.</param>
/// <param name="notificationService">The notification service to use.</param>
class NodePackageInstaller(string packageManager, ResourceLoggerService loggerService, ResourceNotificationService notificationService)
internal class NodePackageInstaller(string packageManager, ResourceLoggerService loggerService, ResourceNotificationService notificationService)
{
/// <summary>
/// Finds the Node.js resources using the specified package manager and installs the packages.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;
namespace Aspire.Hosting.Utils;

// Copied from https://github.com/dotnet/aspire/blob/50ca9fa670af5c70782dc75d2961956b06f1a403/src/Shared/PathNormalizer.cs
internal static class PathNormalizer
Expand Down

0 comments on commit db67da9

Please sign in to comment.