From 8c61fa36f91d7f0600f57a0dd24b8c701b0c779c Mon Sep 17 00:00:00 2001 From: m-nash <64171366+m-nash@users.noreply.github.com> Date: Wed, 22 May 2024 10:10:35 -0700 Subject: [PATCH] fix a couple straggler namespaces (#3417) Few namespaces that weren't correct --- .../src/ClientModelPlugin.cs | 1 - .../Microsoft.Generator.CSharp/src/CodeModelPlugin.cs | 1 - .../src/OutputTypes/ExpressionPropertyBody.cs | 4 ++-- .../src/OutputTypes/MethodPropertyBody.cs | 4 ++-- .../src/SourceInput/ClientSourceInput.cs | 2 +- .../Microsoft.Generator.CSharp/src/Writers/CodeWriter.cs | 9 ++++----- .../src/Writers/TypeProviderWriter.cs | 2 +- .../Microsoft.Generator.CSharp/test/CodeWriterTests.cs | 5 ++--- .../test/Writers/ExpressionTypeProviderWriterTests.cs | 1 - 9 files changed, 12 insertions(+), 17 deletions(-) diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/ClientModelPlugin.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/ClientModelPlugin.cs index ae60ddbf62..959e89ac8f 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/ClientModelPlugin.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/ClientModelPlugin.cs @@ -6,7 +6,6 @@ using System.ComponentModel.Composition; using Microsoft.Generator.CSharp.ClientModel.Expressions; using Microsoft.Generator.CSharp.Expressions; -using Microsoft.Generator.CSharp.Writers; namespace Microsoft.Generator.CSharp.ClientModel { diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/CodeModelPlugin.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/CodeModelPlugin.cs index 8f0ab7cb23..b9fa186b25 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/CodeModelPlugin.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/CodeModelPlugin.cs @@ -6,7 +6,6 @@ using System.ComponentModel.Composition; using Microsoft.Generator.CSharp.Expressions; using Microsoft.Generator.CSharp.Input; -using Microsoft.Generator.CSharp.Writers; namespace Microsoft.Generator.CSharp { diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/OutputTypes/ExpressionPropertyBody.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/OutputTypes/ExpressionPropertyBody.cs index c650423adf..0aa884c7be 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/OutputTypes/ExpressionPropertyBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/OutputTypes/ExpressionPropertyBody.cs @@ -1,9 +1,9 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Microsoft.Generator.CSharp.Expressions; -namespace Microsoft.Generator.CSharp.Models +namespace Microsoft.Generator.CSharp { internal record ExpressionPropertyBody(ValueExpression Getter) : PropertyBody; } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/OutputTypes/MethodPropertyBody.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/OutputTypes/MethodPropertyBody.cs index f8784e1612..aae45abf46 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/OutputTypes/MethodPropertyBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/OutputTypes/MethodPropertyBody.cs @@ -1,9 +1,9 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Microsoft.Generator.CSharp.Expressions; -namespace Microsoft.Generator.CSharp.Models +namespace Microsoft.Generator.CSharp { internal record MethodPropertyBody(MethodBodyStatement Getter, MethodBodyStatement? Setter = null, MethodSignatureModifiers SetterModifiers = MethodSignatureModifiers.None) : PropertyBody; } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/SourceInput/ClientSourceInput.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/SourceInput/ClientSourceInput.cs index 93750e5342..f81e9360d2 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/SourceInput/ClientSourceInput.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/SourceInput/ClientSourceInput.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis; -namespace Microsoft.Generator.CSharp.Input +namespace Microsoft.Generator.CSharp { internal record ClientSourceInput(INamedTypeSymbol? ParentClientType); } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Writers/CodeWriter.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Writers/CodeWriter.cs index 24b5de12b0..5c9b4de447 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Writers/CodeWriter.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Writers/CodeWriter.cs @@ -5,15 +5,14 @@ using System.Buffers; using System.Collections.Generic; using System.Diagnostics; -using Microsoft.CodeAnalysis.CSharp; using System.Linq; -using System.Text; using System.Runtime.CompilerServices; -using static Microsoft.Generator.CSharp.ValidationType; -using Microsoft.Generator.CSharp.Expressions; +using System.Text; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.Generator.CSharp.Expressions; using static Microsoft.Generator.CSharp.Expressions.Snippets; -using Microsoft.Generator.CSharp.Models; +using static Microsoft.Generator.CSharp.ValidationType; namespace Microsoft.Generator.CSharp { diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Writers/TypeProviderWriter.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Writers/TypeProviderWriter.cs index 6c9285980c..ac8c6fbe7c 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Writers/TypeProviderWriter.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Writers/TypeProviderWriter.cs @@ -3,7 +3,7 @@ using System.Linq; -namespace Microsoft.Generator.CSharp.Writers +namespace Microsoft.Generator.CSharp { public class TypeProviderWriter { diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/CodeWriterTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/CodeWriterTests.cs index e90da77824..feb17a4624 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/CodeWriterTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/CodeWriterTests.cs @@ -3,12 +3,11 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; -using NUnit.Framework; using Microsoft.Generator.CSharp.Expressions; -using System.IO; -using Microsoft.Generator.CSharp.Models; +using NUnit.Framework; using static Microsoft.Generator.CSharp.Expressions.Snippets; namespace Microsoft.Generator.CSharp.Tests diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/Writers/ExpressionTypeProviderWriterTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/Writers/ExpressionTypeProviderWriterTests.cs index bce172e029..28def86f42 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/Writers/ExpressionTypeProviderWriterTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/Writers/ExpressionTypeProviderWriterTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using Microsoft.Generator.CSharp.Writers; using Moq; using NUnit.Framework;