Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up namespaces #44691

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions eng/pipelines/templates/jobs/sdk-job-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ parameters:
runTestsAsTool: true
# This job uses the build step for testing, so the extra test step is not necessary.
runTests: false
- categoryName: TemplateEngine
testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj
publishXunitResults: true
# Turn off template engine runs on Windows temporarily until agent images are updated
#- categoryName: TemplateEngine
# testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj
# publishXunitResults: true
- categoryName: AoT
runAoTTests: true
### LINUX ###
Expand Down
7 changes: 1 addition & 6 deletions src/BuiltInTools/AspireService/AspireServerService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Immutable;
using System.Net;
using System.Net.WebSockets;
using System.Security.Cryptography;
Expand All @@ -13,13 +12,9 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.WebTools.AspireServer.Contracts;
using Microsoft.WebTools.AspireServer.Helpers;
using Microsoft.WebTools.AspireServer.Models;
using Microsoft.WebTools.AspireService.Helpers;
using IAsyncDisposable = System.IAsyncDisposable;

namespace Microsoft.WebTools.AspireServer;
namespace Aspire.Tools.Service;

/// <summary>
/// Implementation of the AspireServerService. A new instance of this service will be created for each
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.WebTools.AspireServer.Contracts;
namespace Aspire.Tools.Service;

internal interface IAspireServerEvents
{
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/AspireService/Helpers/CertGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;

namespace Microsoft.WebTools.AspireServer;
namespace Aspire.Tools.Service;

internal static class CertGenerator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;

namespace Microsoft.WebTools.AspireServer.Helpers;
namespace Aspire.Tools.Service;

internal static class ExceptionExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.WebTools.AspireServer.Contracts;
using Microsoft.WebTools.AspireServer.Models;

namespace Microsoft.WebTools.AspireServer.Helpers;
namespace Aspire.Tools.Service;

internal static class HttpContextExtensions
{
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/AspireService/Helpers/LoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Microsoft.Extensions.Logging;

namespace Microsoft.WebTools.AspireService.Helpers;
namespace Aspire.Tools.Service;

internal sealed class LoggerProvider(Action<string> reporter) : ILoggerProvider
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Threading;
using System.Threading.Tasks;

namespace Microsoft.WebTools.AspireServer;
namespace Aspire.Tools.Service;

/// <summary>
/// Manages the set of active socket connections. Since it registers to be notified when a socket has gone bad,
Expand Down
5 changes: 1 addition & 4 deletions src/BuiltInTools/AspireService/Helpers/SocketUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;

namespace Microsoft.WebTools.AspireServer.Helpers;
namespace Aspire.Tools.Service;

internal class SocketUtilities
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;

namespace Microsoft.WebTools.AspireServer;
namespace Aspire.Tools.Service;

/// <summary>
/// Used by the SocketConnectionManager to track one socket connection. It needs to be disposed when done with it
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/AspireService/Models/ErrorResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Text.Json.Serialization;

namespace Microsoft.WebTools.AspireServer.Models;
namespace Aspire.Tools.Service;

/// <summary>
/// Detailed error information serialized into the body of the response
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/AspireService/Models/InfoResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Text.Json.Serialization;

namespace Microsoft.WebTools.AspireServer.Models;
namespace Aspire.Tools.Service;

/// <summary>
/// Response when asked for /info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Linq;
using System.Text.Json.Serialization;
using Microsoft.WebTools.AspireServer.Contracts;

namespace Microsoft.WebTools.AspireServer.Models;
namespace Aspire.Tools.Service;

internal class EnvVar
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace Microsoft.WebTools.AspireServer.Models;
namespace Aspire.Tools.Service;

internal static class NotificationType
{
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/DotNetDeltaApplier/AgentReporter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.Extensions.HotReload;
namespace Microsoft.DotNet.Watch;

internal sealed class AgentReporter
{
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Diagnostics;
using System.Reflection;

namespace Microsoft.Extensions.HotReload;
namespace Microsoft.DotNet.Watch;

#if NET
[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Hot reload is only expected to work when trimming is disabled.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Reflection;

namespace Microsoft.Extensions.HotReload;
namespace Microsoft.DotNet.Watch;

/// <summary>
/// Finds and invokes metadata update handlers.
Expand Down
7 changes: 4 additions & 3 deletions src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.IO.Pipes;
using Microsoft.DotNet.Watcher;
using Microsoft.Extensions.HotReload;
using Microsoft.DotNet.Watch;

/// <summary>
/// The runtime startup hook looks for top-level type named "StartupHook".
/// </summary>
internal sealed class StartupHook
{
private static readonly bool s_logToStandardOutput = Environment.GetEnvironmentVariable(EnvironmentVariables.Names.HotReloadDeltaClientLogMessages) == "1";
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/DotNetWatchTasks/FileSetSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Diagnostics;
using System.Runtime.Serialization.Json;
using Microsoft.Build.Framework;
using Microsoft.DotNet.Watcher.Internal;
using Microsoft.DotNet.Watch;
using Task = Microsoft.Build.Utilities.Task;

namespace DotNetWatchTasks
Expand Down
8 changes: 2 additions & 6 deletions src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
using System.Diagnostics;
using System.Globalization;
using System.Threading.Channels;
using Aspire.Tools.Service;
using Microsoft.Build.Graph;
using Microsoft.DotNet.Watcher.Internal;
using Microsoft.DotNet.Watcher.Tools;
using Microsoft.Extensions.Tools.Internal;
using Microsoft.WebTools.AspireServer;
using Microsoft.WebTools.AspireServer.Contracts;

namespace Microsoft.DotNet.Watcher;
namespace Microsoft.DotNet.Watch;

internal class AspireServiceFactory : IRuntimeProcessLauncherFactory
{
Expand Down
3 changes: 1 addition & 2 deletions src/BuiltInTools/dotnet-watch/Browser/BrowserConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

using System.Buffers;
using System.Net.WebSockets;
using Microsoft.Extensions.Tools.Internal;

namespace Microsoft.DotNet.Watcher.Tools;
namespace Microsoft.DotNet.Watch;

internal readonly struct BrowserConnection : IAsyncDisposable
{
Expand Down
4 changes: 1 addition & 3 deletions src/BuiltInTools/dotnet-watch/Browser/BrowserConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
using System.Diagnostics.CodeAnalysis;
using System.Text.RegularExpressions;
using Microsoft.Build.Graph;
using Microsoft.DotNet.Watcher.Internal;
using Microsoft.Extensions.Tools.Internal;

namespace Microsoft.DotNet.Watcher.Tools
namespace Microsoft.DotNet.Watch
{
internal sealed partial class BrowserConnector(DotNetWatchContext context) : IAsyncDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Tools.Internal;

namespace Microsoft.DotNet.Watcher.Tools
namespace Microsoft.DotNet.Watch
{
/// <summary>
/// Communicates with aspnetcore-browser-refresh.js loaded in the browser.
Expand Down
4 changes: 1 addition & 3 deletions src/BuiltInTools/dotnet-watch/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
using System.Diagnostics;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Tools.Run;
using Microsoft.DotNet.Watcher.Tools;
using Microsoft.Extensions.Tools.Internal;
using NuGet.Common;

namespace Microsoft.DotNet.Watcher;
namespace Microsoft.DotNet.Watch;

internal sealed class CommandLineOptions
{
Expand Down
3 changes: 1 addition & 2 deletions src/BuiltInTools/dotnet-watch/DotNetWatchContext.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.Extensions.Tools.Internal;

namespace Microsoft.DotNet.Watcher.Tools
namespace Microsoft.DotNet.Watch
{
internal sealed class DotNetWatchContext
{
Expand Down
5 changes: 1 addition & 4 deletions src/BuiltInTools/dotnet-watch/DotNetWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
using System.Diagnostics;
using System.Globalization;
using Microsoft.Build.Graph;
using Microsoft.DotNet.Watcher.Internal;
using Microsoft.DotNet.Watcher.Tools;
using Microsoft.Extensions.Tools.Internal;

namespace Microsoft.DotNet.Watcher
namespace Microsoft.DotNet.Watch
{
internal sealed class DotNetWatcher(DotNetWatchContext context, MSBuildFileSetFactory fileSetFactory) : Watcher(context, fileSetFactory)
{
Expand Down
3 changes: 1 addition & 2 deletions src/BuiltInTools/dotnet-watch/EnvironmentOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics;
using Microsoft.Extensions.Tools.Internal;

namespace Microsoft.DotNet.Watcher
namespace Microsoft.DotNet.Watch
{
[Flags]
internal enum TestFlags
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/dotnet-watch/EnvironmentVariables.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.DotNet.Watcher;
namespace Microsoft.DotNet.Watch;

internal static partial class EnvironmentVariables
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Diagnostics;

namespace Microsoft.DotNet.Watcher
namespace Microsoft.DotNet.Watch
{
internal sealed class EnvironmentVariablesBuilder
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.DotNet.Watcher;
namespace Microsoft.DotNet.Watch;

internal static partial class EnvironmentVariables
{
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/dotnet-watch/EvaluationResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Microsoft.Build.Graph;

namespace Microsoft.DotNet.Watcher;
namespace Microsoft.DotNet.Watch;

internal sealed class EvaluationResult(IReadOnlyDictionary<string, FileItem> files, ProjectGraph? projectGraph)
{
Expand Down
3 changes: 1 addition & 2 deletions src/BuiltInTools/dotnet-watch/FileItem.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.DotNet.Watcher.Internal;

namespace Microsoft.DotNet.Watcher
namespace Microsoft.DotNet.Watch
{
internal readonly record struct FileItem
{
Expand Down
4 changes: 1 addition & 3 deletions src/BuiltInTools/dotnet-watch/Filters/BuildEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@


using System.Diagnostics;
using Microsoft.DotNet.Watcher.Internal;
using Microsoft.Extensions.Tools.Internal;

namespace Microsoft.DotNet.Watcher.Tools
namespace Microsoft.DotNet.Watch
{
internal class BuildEvaluator(DotNetWatchContext context, MSBuildFileSetFactory rootProjectFileSetFactory)
{
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltInTools/dotnet-watch/GlobalOptions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.DotNet.Watcher;
namespace Microsoft.DotNet.Watch;

internal sealed class GlobalOptions
{
Expand Down
Loading
Loading