diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/DnnDeprecatedGeneratorTests.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/GeneratorTests.cs similarity index 56% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/DnnDeprecatedGeneratorTests.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/GeneratorTests.cs index 7e23ad4839c..5adb74083f2 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/DnnDeprecatedGeneratorTests.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/GeneratorTests.cs @@ -4,17 +4,17 @@ namespace DotNetNuke.Tests.SourceGenerators; [TestFixture] -public class DnnDeprecatedGeneratorTests +public class GeneratorTests { [Test] - public async Task NotDeprecatedClass_DoesNotGenerateAnything() + public async Task NoAttribute_GenerateNothing() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -public partial class PagesController +public partial class D { } @@ -22,15 +22,15 @@ public partial class PagesController } [Test] - public async Task DeprecatedNonPartialClass_ReportsAnErrorDiagnostic() + public async Task NotPartial_ReportsError() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -[DnnDeprecated(10, 0, 0, "Please resolve IPagesController via dependency injection.")] -public class PagesController +[DnnDeprecated(10, 0, 0, "Please resolve B via dependency injection.")] +public class D { } @@ -38,15 +38,15 @@ public class PagesController } [Test] - public async Task DeprecatedPartialClass_AddsPartialWithObsoleteAttribute() + public async Task Class() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -[DnnDeprecated(10, 0, 0, "Please resolve IPagesController via dependency injection.")] -public partial class PagesController +[DnnDeprecated(10, 0, 0, "Please resolve B via dependency injection.")] +public partial class D { } @@ -54,15 +54,15 @@ public partial class PagesController } [Test] - public async Task DeprecatedGenericPartialClass_AddsPartialWithObsoleteAttribute() + public async Task GenericClass() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -[DnnDeprecated(10, 0, 0, "Please resolve IPagesController via dependency injection.")] -public partial class PagesController +[DnnDeprecated(10, 0, 0, "Please resolve B via dependency injection.")] +public partial class D { } @@ -70,17 +70,17 @@ public partial class PagesController } [Test] - public async Task DeprecatedNestedGenericPartialClass_AddsPartialWithObsoleteAttribute() + public async Task NestedGeneric() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -public partial class PagesController +public partial class D { [DnnDeprecated(10, 0, 0, "Please use outer class.")] - public partial class Inner + public partial class C { } } @@ -89,15 +89,15 @@ public partial class Inner } [Test] - public async Task DeprecatedPartialInterface_AddsPartialWithObsoleteAttribute() + public async Task Interface() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -[DnnDeprecated(10, 0, 0, "Please use the other IPagesController.")] -public partial interface IPagesController +[DnnDeprecated(10, 0, 0, "Please use the other B.")] +public partial interface B { } @@ -105,15 +105,15 @@ public partial interface IPagesController } [Test] - public async Task DeprecatedPartialGenericInterface_AddsPartialWithObsoleteAttribute() + public async Task GenericInterface() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -[DnnDeprecated(10, 0, 0, "Please use the other IPagesController.")] -public partial interface IPagesController +[DnnDeprecated(10, 0, 0, "Please use the other B.")] +public partial interface B { } @@ -121,15 +121,15 @@ public partial interface IPagesController } [Test] - public async Task DeprecatedPartialStruct_AddsPartialWithObsoleteAttribute() + public async Task Struct() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; [DnnDeprecated(10, 0, 0, "Please use PageInfo.")] -public partial struct Page +public partial struct A { } @@ -137,15 +137,15 @@ public partial struct Page } [Test] - public async Task DeprecatedPartialRecord_AddsPartialWithObsoleteAttribute() + public async Task Record() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; [DnnDeprecated(10, 0, 0, "Please use PageInfo.")] -public partial record Page +public partial record A { } @@ -153,17 +153,17 @@ public partial record Page } [Test] - public async Task DeprecatedNestedPartialRecord_AddsPartialWithObsoleteAttribute() + public async Task NestedRecord() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -public partial class Page +public partial class A { [DnnDeprecated(9, 1, 2, "Please use InnerPageInfo.")] - public partial record InnerPage + public partial record H { } } @@ -172,23 +172,23 @@ public partial record InnerPage } [Test] - public async Task DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute() + public async Task SpecialCharacters() { await Verify("""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; [DnnDeprecated(9, 1, 2, @"Use PageMaker.MakePage(""PageType0"")")] -public partial class Page +public partial class A { [DnnDeprecated(9, 2, 2, "Use PageMaker.MakePage(\"\n\tPageType1\t\n\")")] - public static partial void MakePage() + public static partial void I() { } [DnnDeprecated(9, 2, 2, """ Use PageMaker.MakePage("PageType2") """)] - public static partial void MakePage2() + public static partial void J() { } } @@ -197,28 +197,28 @@ public static partial void MakePage2() } [Test] - public async Task DeprecatedMethods_AddsPartialWithObsoleteAttribute() + public async Task Methods() { await Verify(""" -namespace Example.Test; +namespace G; using System; using System.Collections.Generic; using DotNetNuke.Internal.SourceGenerators; -internal partial class Page +internal partial class A { - internal partial static class StaticWrapper + internal partial static class K { [DnnDeprecated(8, 4, 4, "Use overload taking IServiceProvider.")] - public static partial void DoAThing(ref IEnumerable i) + public static partial void L(ref IEnumerable i) where T : class, new() { return; } [DnnDeprecated(9, 4, 4, "Use overload taking IApplicationStatusInfo.")] - public static partial int?[] GetTheseThings(int? a = null, int b = -1) + public static partial int?[] M(int? a = null, int b = -1) { return new[] { a, b, }; } @@ -227,14 +227,14 @@ public static partial void DoAThing(ref IEnumerable i) internal partial class Wrapper { [DnnDeprecated(8, 4, 4, "Use overload taking IApplicationStatusInfo.")] - internal partial (decimal, Int32) GetThemBoth(decimal x, bool addOne = true) + internal partial (decimal, Int32) N(decimal x, bool addOne = true) { var theInt = addOne ? 1 : 2; return (x + theInt, theInt); } [DnnDeprecated(9, 4, 4, "Use overload taking IServiceProvider.")] - public static partial System.Text.StringBuilder CombineThings(string y, out String z) + public static partial System.Text.StringBuilder O(string y, out String z) { z = nameof(CombineThings); return new StringBuilder(y + z); @@ -246,17 +246,17 @@ public static partial System.Text.StringBuilder CombineThings(string y, out Stri } [Test] - public async Task DeprecatedMethodWithParamsParameter_AddsPartialWithObsoleteAttribute() + public async Task ParamsParameter() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -partial class Page +partial class A { [DnnDeprecated(9, 9, 1, "Use overload taking IEnumerable.")] - partial void WithParams(params int[] numbers) + partial void P(params int[] numbers) { } } @@ -265,10 +265,10 @@ partial void WithParams(params int[] numbers) } [Test] - public async Task DeprecatedMethodWithOptionalParameters_AddsPartialWithObsoleteAttribute() + public async Task OptionalParameters() { await Verify(""" -namespace Example.Test; +namespace G; using System.Collections; using System.IO; @@ -276,10 +276,10 @@ namespace Example.Test; using DotNetNuke.Internal.SourceGenerators; -partial class Page +partial class A { [DnnDeprecated(7, 0, 0, "No replacement", RemovalVersion = 11)] - public static partial ArrayList GetFileList( + public static partial ArrayList Q( DirectoryInfo currentDirectory, [Optional, DefaultParameterValue("")] // ERROR: Optional parameters aren't supported in C# string strExtensions, @@ -294,17 +294,17 @@ public static partial ArrayList GetFileList( } [Test] - public async Task DeprecatedExtensionMethod_AddsPartialWithObsoleteAttribute() + public async Task ExtensionMethod() { await Verify(""" -namespace Example.Test; +namespace G; using DotNetNuke.Internal.SourceGenerators; -partial class Page +partial class A { [DnnDeprecated(9, 9, 1, "Use overload taking IEnumerable.")] - partial void AnExtension(this int[] numbers, string another) + partial void R(this int[] numbers, string another) { } } diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedGenericPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController`2.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedGenericPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController`2.verified.cs deleted file mode 100644 index 07c0732e60f..00000000000 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedGenericPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController`2.verified.cs +++ /dev/null @@ -1,9 +0,0 @@ -//HintName: Example.Test.PagesController`2.cs -// -namespace Example.Test; - -[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please resolve IPagesController via dependency injection. Scheduled for removal in v12.0.0.")] -partial class PagesController -{ -} - diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController.verified.cs deleted file mode 100644 index e82f31d10bf..00000000000 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController.verified.cs +++ /dev/null @@ -1,9 +0,0 @@ -//HintName: Example.Test.PagesController.cs -// -namespace Example.Test; - -[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please resolve IPagesController via dependency injection. Scheduled for removal in v12.0.0.")] -partial class PagesController -{ -} - diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialGenericInterface_AddsPartialWithObsoleteAttribute#Example.Test.IPagesController`1.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialGenericInterface_AddsPartialWithObsoleteAttribute#Example.Test.IPagesController`1.verified.cs deleted file mode 100644 index bd984690c83..00000000000 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialGenericInterface_AddsPartialWithObsoleteAttribute#Example.Test.IPagesController`1.verified.cs +++ /dev/null @@ -1,9 +0,0 @@ -//HintName: Example.Test.IPagesController`1.cs -// -namespace Example.Test; - -[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use the other IPagesController. Scheduled for removal in v12.0.0.")] -partial interface IPagesController -{ -} - diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialInterface_AddsPartialWithObsoleteAttribute#Example.Test.IPagesController.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialInterface_AddsPartialWithObsoleteAttribute#Example.Test.IPagesController.verified.cs deleted file mode 100644 index 8ba93a51b51..00000000000 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialInterface_AddsPartialWithObsoleteAttribute#Example.Test.IPagesController.verified.cs +++ /dev/null @@ -1,9 +0,0 @@ -//HintName: Example.Test.IPagesController.cs -// -namespace Example.Test; - -[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use the other IPagesController. Scheduled for removal in v12.0.0.")] -partial interface IPagesController -{ -} - diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Class#G.D.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Class#G.D.verified.cs new file mode 100644 index 00000000000..2fade96de5a --- /dev/null +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Class#G.D.verified.cs @@ -0,0 +1,9 @@ +//HintName: G.D.cs +// +namespace G; + +[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please resolve B via dependency injection. Scheduled for removal in v12.0.0.")] +partial class D +{ +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedExtensionMethod_AddsPartialWithObsoleteAttribute#Example.Test.Page.AnExtension(int[],string).verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.ExtensionMethod#G.A.R(int[],string).verified.cs similarity index 59% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedExtensionMethod_AddsPartialWithObsoleteAttribute#Example.Test.Page.AnExtension(int[],string).verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.ExtensionMethod#G.A.R(int[],string).verified.cs index 05a69eb3f3a..9f511477ff7 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedExtensionMethod_AddsPartialWithObsoleteAttribute#Example.Test.Page.AnExtension(int[],string).verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.ExtensionMethod#G.A.R(int[],string).verified.cs @@ -1,11 +1,11 @@ -//HintName: Example.Test.Page.AnExtension(int[],string).cs +//HintName: G.A.R(int[],string).cs // -namespace Example.Test; +namespace G; -partial class Page +partial class A { [global::System.Obsolete(@"Deprecated in DotNetNuke 9.9.1. Use overload taking IEnumerable. Scheduled for removal in v11.0.0.")] - partial void AnExtension( + partial void R( this int[] numbers, string another); } diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.GenericClass#G.D`2.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.GenericClass#G.D`2.verified.cs new file mode 100644 index 00000000000..83d2792e697 --- /dev/null +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.GenericClass#G.D`2.verified.cs @@ -0,0 +1,9 @@ +//HintName: G.D`2.cs +// +namespace G; + +[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please resolve B via dependency injection. Scheduled for removal in v12.0.0.")] +partial class D +{ +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.GenericInterface#G.B`1.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.GenericInterface#G.B`1.verified.cs new file mode 100644 index 00000000000..f078d9a9d92 --- /dev/null +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.GenericInterface#G.B`1.verified.cs @@ -0,0 +1,9 @@ +//HintName: G.B`1.cs +// +namespace G; + +[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use the other B. Scheduled for removal in v12.0.0.")] +partial interface B +{ +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Interface#G.B.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Interface#G.B.verified.cs new file mode 100644 index 00000000000..aff62a2c8f5 --- /dev/null +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Interface#G.B.verified.cs @@ -0,0 +1,9 @@ +//HintName: G.B.cs +// +namespace G; + +[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use the other B. Scheduled for removal in v12.0.0.")] +partial interface B +{ +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.StaticWrapper.DoAThing`1(ref IEnumerable__T__).verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.K.L`1(ref IEnumerable__T__).verified.cs similarity index 56% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.StaticWrapper.DoAThing`1(ref IEnumerable__T__).verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.K.L`1(ref IEnumerable__T__).verified.cs index 59eab312c7f..6bc07dbec43 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.StaticWrapper.DoAThing`1(ref IEnumerable__T__).verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.K.L`1(ref IEnumerable__T__).verified.cs @@ -1,15 +1,15 @@ -//HintName: Example.Test.Page.StaticWrapper.DoAThing`1(ref IEnumerable__T__).cs -// -namespace Example.Test; - -partial class Page -{ - partial class StaticWrapper - { - [global::System.Obsolete(@"Deprecated in DotNetNuke 8.4.4. Use overload taking IServiceProvider. Scheduled for removal in v10.0.0.")] - public static partial void DoAThing( - ref global::System.Collections.Generic.IEnumerable i) - where T : class,new(); - } -} - +//HintName: G.A.K.L`1(ref IEnumerable__T__).cs +// +namespace G; + +partial class A +{ + partial class K + { + [global::System.Obsolete(@"Deprecated in DotNetNuke 8.4.4. Use overload taking IServiceProvider. Scheduled for removal in v10.0.0.")] + public static partial void L( + ref global::System.Collections.Generic.IEnumerable i) + where T : class,new(); + } +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.StaticWrapper.GetTheseThings(int_NULLABLE_,int).verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.K.M(int_NULLABLE_,int).verified.cs similarity index 51% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.StaticWrapper.GetTheseThings(int_NULLABLE_,int).verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.K.M(int_NULLABLE_,int).verified.cs index 7c26e2ad7e0..7cd68b84078 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.StaticWrapper.GetTheseThings(int_NULLABLE_,int).verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.K.M(int_NULLABLE_,int).verified.cs @@ -1,15 +1,15 @@ -//HintName: Example.Test.Page.StaticWrapper.GetTheseThings(int_NULLABLE_,int).cs -// -namespace Example.Test; - -partial class Page -{ - partial class StaticWrapper - { - [global::System.Obsolete(@"Deprecated in DotNetNuke 9.4.4. Use overload taking IApplicationStatusInfo. Scheduled for removal in v11.0.0.")] - public static partial int?[] GetTheseThings( - int? a = null, - int b = -1); - } -} - +//HintName: G.A.K.M(int_NULLABLE_,int).cs +// +namespace G; + +partial class A +{ + partial class K + { + [global::System.Obsolete(@"Deprecated in DotNetNuke 9.4.4. Use overload taking IApplicationStatusInfo. Scheduled for removal in v11.0.0.")] + public static partial int?[] M( + int? a = null, + int b = -1); + } +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.Wrapper`1.GetThemBoth(decimal,bool).verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.Wrapper`1.N(decimal,bool).verified.cs similarity index 59% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.Wrapper`1.GetThemBoth(decimal,bool).verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.Wrapper`1.N(decimal,bool).verified.cs index 89396115508..bb8f810687b 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.Wrapper`1.GetThemBoth(decimal,bool).verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.Wrapper`1.N(decimal,bool).verified.cs @@ -1,15 +1,15 @@ -//HintName: Example.Test.Page.Wrapper`1.GetThemBoth(decimal,bool).cs -// -namespace Example.Test; - -partial class Page -{ - partial class Wrapper - { - [global::System.Obsolete(@"Deprecated in DotNetNuke 8.4.4. Use overload taking IApplicationStatusInfo. Scheduled for removal in v10.0.0.")] - internal partial (decimal, int) GetThemBoth( - decimal x, - bool addOne = true); - } -} - +//HintName: G.A.Wrapper`1.N(decimal,bool).cs +// +namespace G; + +partial class A +{ + partial class Wrapper + { + [global::System.Obsolete(@"Deprecated in DotNetNuke 8.4.4. Use overload taking IApplicationStatusInfo. Scheduled for removal in v10.0.0.")] + internal partial (decimal, int) N( + decimal x, + bool addOne = true); + } +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.Wrapper`1.CombineThings(string,out string).verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.Wrapper`1.O(string,out string).verified.cs similarity index 68% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.Wrapper`1.CombineThings(string,out string).verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.Wrapper`1.O(string,out string).verified.cs index bff4ef589e5..246a5e8ba06 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethods_AddsPartialWithObsoleteAttribute#Example.Test.Page.Wrapper`1.CombineThings(string,out string).verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Methods#G.A.Wrapper`1.O(string,out string).verified.cs @@ -1,15 +1,15 @@ -//HintName: Example.Test.Page.Wrapper`1.CombineThings(string,out string).cs -// -namespace Example.Test; - -partial class Page -{ - partial class Wrapper - { - [global::System.Obsolete(@"Deprecated in DotNetNuke 9.4.4. Use overload taking IServiceProvider. Scheduled for removal in v11.0.0.")] - public static partial global::System.Text.StringBuilder CombineThings( - string y, - out string z); - } -} - +//HintName: G.A.Wrapper`1.O(string,out string).cs +// +namespace G; + +partial class A +{ + partial class Wrapper + { + [global::System.Obsolete(@"Deprecated in DotNetNuke 9.4.4. Use overload taking IServiceProvider. Scheduled for removal in v11.0.0.")] + public static partial global::System.Text.StringBuilder O( + string y, + out string z); + } +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNestedGenericPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController`2.Inner`3.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NestedGeneric#G.D`2.C`3.verified.cs similarity index 50% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNestedGenericPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController`2.Inner`3.verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NestedGeneric#G.D`2.C`3.verified.cs index 2de0d823ff6..988670df7a2 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNestedGenericPartialClass_AddsPartialWithObsoleteAttribute#Example.Test.PagesController`2.Inner`3.verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NestedGeneric#G.D`2.C`3.verified.cs @@ -1,12 +1,12 @@ -//HintName: Example.Test.PagesController`2.Inner`3.cs -// -namespace Example.Test; - -partial class PagesController -{ - [global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use outer class. Scheduled for removal in v12.0.0.")] - partial class Inner - { - } -} - +//HintName: G.D`2.C`3.cs +// +namespace G; + +partial class D +{ + [global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use outer class. Scheduled for removal in v12.0.0.")] + partial class C + { + } +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNestedPartialRecord_AddsPartialWithObsoleteAttribute#Example.Test.Page.InnerPage.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NestedRecord#G.A.H.verified.cs similarity index 55% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNestedPartialRecord_AddsPartialWithObsoleteAttribute#Example.Test.Page.InnerPage.verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NestedRecord#G.A.H.verified.cs index f9b96035fcf..afd6a2f5d05 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNestedPartialRecord_AddsPartialWithObsoleteAttribute#Example.Test.Page.InnerPage.verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NestedRecord#G.A.H.verified.cs @@ -1,12 +1,12 @@ -//HintName: Example.Test.Page.InnerPage.cs -// -namespace Example.Test; - -partial class Page -{ - [global::System.Obsolete(@"Deprecated in DotNetNuke 9.1.2. Please use InnerPageInfo. Scheduled for removal in v11.0.0.")] - partial record InnerPage - { - } -} - +//HintName: G.A.H.cs +// +namespace G; + +partial class A +{ + [global::System.Obsolete(@"Deprecated in DotNetNuke 9.1.2. Please use InnerPageInfo. Scheduled for removal in v11.0.0.")] + partial record H + { + } +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNonPartialClass_ReportsAnErrorDiagnostic.verified.txt b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NotPartial_ReportsError.verified.txt similarity index 96% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNonPartialClass_ReportsAnErrorDiagnostic.verified.txt rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NotPartial_ReportsError.verified.txt index cf1b35f014d..617398cec0d 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedNonPartialClass_ReportsAnErrorDiagnostic.verified.txt +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.NotPartial_ReportsError.verified.txt @@ -1,16 +1,16 @@ -{ - Diagnostics: [ - { - Id: DNN1001, - Title: Must be partial, - Severity: Error, - WarningLevel: 0, - Location: : (4,0)-(7,1), - Description: , - HelpLink: , - MessageFormat: The member that the DnnDeprecated attribute is applied to must be partial, - Message: The member that the DnnDeprecated attribute is applied to must be partial, - Category: Usage - } - ] +{ + Diagnostics: [ + { + Id: DNN1001, + Title: Must be partial, + Severity: Error, + WarningLevel: 0, + Location: : (4,0)-(7,1), + Description: , + HelpLink: , + MessageFormat: The member that the DnnDeprecated attribute is applied to must be partial, + Message: The member that the DnnDeprecated attribute is applied to must be partial, + Category: Usage + } + ] } \ No newline at end of file diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethodWithOptionalParameters_AddsPartialWithObsoleteAttribute#Example.Test.Page.GetFileList(DirectoryInfo,string,bool).verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.OptionalParameters#G.A.Q(DirectoryInfo,string,bool).verified.cs similarity index 58% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethodWithOptionalParameters_AddsPartialWithObsoleteAttribute#Example.Test.Page.GetFileList(DirectoryInfo,string,bool).verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.OptionalParameters#G.A.Q(DirectoryInfo,string,bool).verified.cs index 93d54a15c81..483cbdf40d9 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethodWithOptionalParameters_AddsPartialWithObsoleteAttribute#Example.Test.Page.GetFileList(DirectoryInfo,string,bool).verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.OptionalParameters#G.A.Q(DirectoryInfo,string,bool).verified.cs @@ -1,11 +1,11 @@ -//HintName: Example.Test.Page.GetFileList(DirectoryInfo,string,bool).cs +//HintName: G.A.Q(DirectoryInfo,string,bool).cs // -namespace Example.Test; +namespace G; -partial class Page +partial class A { [global::System.Obsolete(@"Deprecated in DotNetNuke 7.0.0. No replacement. Scheduled for removal in v11.0.0.")] - public static partial global::System.Collections.ArrayList GetFileList( + public static partial global::System.Collections.ArrayList Q( global::System.IO.DirectoryInfo currentDirectory, string strExtensions = @"", bool noneSpecified = true); diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethodWithParamsParameter_AddsPartialWithObsoleteAttribute#Example.Test.Page.WithParams(int[]).verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.ParamsParameter#G.A.P(int[]).verified.cs similarity index 58% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethodWithParamsParameter_AddsPartialWithObsoleteAttribute#Example.Test.Page.WithParams(int[]).verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.ParamsParameter#G.A.P(int[]).verified.cs index 817ef0de132..1717452354c 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedMethodWithParamsParameter_AddsPartialWithObsoleteAttribute#Example.Test.Page.WithParams(int[]).verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.ParamsParameter#G.A.P(int[]).verified.cs @@ -1,11 +1,11 @@ -//HintName: Example.Test.Page.WithParams(int[]).cs -// -namespace Example.Test; - -partial class Page -{ - [global::System.Obsolete(@"Deprecated in DotNetNuke 9.9.1. Use overload taking IEnumerable. Scheduled for removal in v11.0.0.")] - partial void WithParams( - params int[] numbers); -} - +//HintName: G.A.P(int[]).cs +// +namespace G; + +partial class A +{ + [global::System.Obsolete(@"Deprecated in DotNetNuke 9.9.1. Use overload taking IEnumerable. Scheduled for removal in v11.0.0.")] + partial void P( + params int[] numbers); +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialStruct_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Record#G.A.verified.cs similarity index 61% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialStruct_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Record#G.A.verified.cs index ae8a1a268e5..1f250467b06 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialStruct_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Record#G.A.verified.cs @@ -1,9 +1,9 @@ -//HintName: Example.Test.Page.cs -// -namespace Example.Test; - -[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use PageInfo. Scheduled for removal in v12.0.0.")] -partial struct Page -{ -} - +//HintName: G.A.cs +// +namespace G; + +[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use PageInfo. Scheduled for removal in v12.0.0.")] +partial record A +{ +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.MakePage().verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.I().verified.cs similarity index 53% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.MakePage().verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.I().verified.cs index 2029077c909..28148c92d4d 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.MakePage().verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.I().verified.cs @@ -1,12 +1,12 @@ -//HintName: Example.Test.Page.MakePage().cs -// -namespace Example.Test; - -partial class Page -{ - [global::System.Obsolete(@"Deprecated in DotNetNuke 9.2.2. Use PageMaker.MakePage("" - PageType1 -""). Scheduled for removal in v11.0.0.")] - public static partial void MakePage(); -} - +//HintName: G.A.I().cs +// +namespace G; + +partial class A +{ + [global::System.Obsolete(@"Deprecated in DotNetNuke 9.2.2. Use PageMaker.MakePage("" + PageType1 +""). Scheduled for removal in v11.0.0.")] + public static partial void I(); +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.MakePage2().verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.J().verified.cs similarity index 53% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.MakePage2().verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.J().verified.cs index a2357c911e7..9ea4964e598 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.MakePage2().verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.J().verified.cs @@ -1,10 +1,10 @@ -//HintName: Example.Test.Page.MakePage2().cs -// -namespace Example.Test; - -partial class Page -{ - [global::System.Obsolete(@"Deprecated in DotNetNuke 9.2.2. Use PageMaker.MakePage(""PageType2"") . Scheduled for removal in v11.0.0.")] - public static partial void MakePage2(); -} - +//HintName: G.A.J().cs +// +namespace G; + +partial class A +{ + [global::System.Obsolete(@"Deprecated in DotNetNuke 9.2.2. Use PageMaker.MakePage(""PageType2"") . Scheduled for removal in v11.0.0.")] + public static partial void J(); +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.verified.cs similarity index 64% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.verified.cs index ec626b38321..30f658cb78c 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedWithSpecialCharacters_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.SpecialCharacters#G.A.verified.cs @@ -1,9 +1,9 @@ -//HintName: Example.Test.Page.cs -// -namespace Example.Test; - -[global::System.Obsolete(@"Deprecated in DotNetNuke 9.1.2. Use PageMaker.MakePage(""PageType0""). Scheduled for removal in v11.0.0.")] -partial class Page -{ -} - +//HintName: G.A.cs +// +namespace G; + +[global::System.Obsolete(@"Deprecated in DotNetNuke 9.1.2. Use PageMaker.MakePage(""PageType0""). Scheduled for removal in v11.0.0.")] +partial class A +{ +} + diff --git a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialRecord_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Struct#G.A.verified.cs similarity index 61% rename from DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialRecord_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs rename to DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Struct#G.A.verified.cs index c498ae0b3f7..0802faa59f9 100644 --- a/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/DnnDeprecatedGeneratorTests.DeprecatedPartialRecord_AddsPartialWithObsoleteAttribute#Example.Test.Page.verified.cs +++ b/DNN Platform/Tests/DotNetNuke.Tests.SourceGenerators/Snapshots/GeneratorTests.Struct#G.A.verified.cs @@ -1,9 +1,9 @@ -//HintName: Example.Test.Page.cs -// -namespace Example.Test; - -[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use PageInfo. Scheduled for removal in v12.0.0.")] -partial record Page -{ -} - +//HintName: G.A.cs +// +namespace G; + +[global::System.Obsolete(@"Deprecated in DotNetNuke 10.0.0. Please use PageInfo. Scheduled for removal in v12.0.0.")] +partial struct A +{ +} +