From 4336bdd98113ae44ccc1574ff644c297b82f7774 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 15:53:57 +1000 Subject: [PATCH 1/4] feat!: ship the attributes in a public library instead of generating them into each project Every generator injected its attributes and enums into each consuming project as internal types. Two projects that share internals through InternalsVisibleTo then saw two copies of ReactiveUI.SourceGenerators.ReactiveAttribute and failed with CS0436. The attributes and the AccessModifier, PropertyAccessModifier and InheritanceModifier enums are now public types in ReactiveUI.SourceGenerators.dll, built for net8.0-net11.0 and net462-net481. They are [Conditional], so a consuming assembly keeps no reference to it. The generators no longer register post-initialization output. The ReactiveUI.SourceGenerators project is now that library and the package consumers install. The Roslyn 4.8, 4.14 and 5.0 builds are renamed ReactiveUI.SourceGenerators.Roslyn.dll and bundled under analyzers/, each band with the code fixes, which the package previously referenced only as a dependency that excluded its analyzers. BREAKING CHANGE: the package is no longer a development dependency, because consumers compile against its attributes. A PackageReference whose IncludeAssets omits compile must drop that line. The attributes' named properties have set accessors instead of init. --- CLAUDE.md | 34 +- README.md | 9 + src/Directory.Build.props | 2 + .../BDLG.FRxProps#BdlAttr.verified.cs | 28 -- .../DLE.AccMods#BdlAttr.verified.cs | 28 -- .../DLE.CplxGen#BdlAttr.verified.cs | 28 -- .../DLE.DateTimeT#BdlAttr.verified.cs | 28 -- .../DLE.DiffNss#BdlAttr.verified.cs | 28 -- .../DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs | 28 -- .../DLE.GenClass#BdlAttr.verified.cs | 28 -- .../DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs | 28 -- ....IntClassGenPublicProp#BdlAttr.verified.cs | 28 -- .../DLE.InterfaceT#BdlAttr.verified.cs | 28 -- .../DLE.MultiLists#BdlAttr.verified.cs | 28 -- .../DLE.NestClass#BdlAttr.verified.cs | 28 -- .../DLE.NullElements#BdlAttr.verified.cs | 28 -- .../DLE.RecordClass#BdlAttr.verified.cs | 28 -- .../DLE.StructT#BdlAttr.verified.cs | 28 -- .../DLE.TupleT#BdlAttr.verified.cs | 28 -- .../DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs | 28 -- .../REACTIVE/RG.Basic#AccMod.verified.cs | 50 --- .../REACTIVE/RG.Basic#RxAttr.verified.cs | 51 --- .../RG.CalledValue#AccMod.verified.cs | 50 --- .../RG.CalledValue#RxAttr.verified.cs | 51 --- .../REACTIVE/RG.Partial#AccMod.verified.cs | 50 --- .../REACTIVE/RG.Partial#RxAttr.verified.cs | 51 --- .../RG.PartialAlsoNotify#AccMod.verified.cs | 50 --- .../RG.PartialAlsoNotify#RxAttr.verified.cs | 51 --- .../REACTIVE/RG.WAcc#AccMod.verified.cs | 50 --- .../REACTIVE/RG.WAcc#RxAttr.verified.cs | 51 --- .../RG.WAttrAccInherit#AccMod.verified.cs | 50 --- .../RG.WAttrAccInherit#RxAttr.verified.cs | 51 --- .../REACTIVE/RG.WAttrs#AccMod.verified.cs | 50 --- .../REACTIVE/RG.WAttrs#RxAttr.verified.cs | 51 --- .../RG.WIdenticalClass#AccMod.verified.cs | 50 --- .../RG.WIdenticalClass#RxAttr.verified.cs | 51 --- .../REACTIVE/RG.WInit#AccMod.verified.cs | 50 --- .../REACTIVE/RG.WInit#RxAttr.verified.cs | 51 --- .../REACTIVE/RG.WNestClass#AccMod.verified.cs | 50 --- .../REACTIVE/RG.WNestClass#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Arrays#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Arrays#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.CplxGen#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.CplxGen#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.DeepNest#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.DeepNest#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Delegates#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Delegates#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Enums#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Enums#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Gen#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Gen#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.GenClass#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.GenClass#RxAttr.verified.cs | 51 --- .../RGE.Interfaces#AccMod.verified.cs | 50 --- .../RGE.Interfaces#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Lazy#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Lazy#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.MixedAcc#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.MixedAcc#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.MultiAlso#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.MultiAlso#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.MultiAttr#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.MultiAttr#RxAttr.verified.cs | 51 --- .../RGE.MultiPartial#AccMod.verified.cs | 50 --- .../RGE.MultiPartial#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.NewMod#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.NewMod#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Null#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Null#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Override#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Override#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Record#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Record#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Ro#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Ro#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Struct#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Struct#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Time#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Time#RxAttr.verified.cs | 51 --- .../REACTIVE/RGE.Tuples#AccMod.verified.cs | 50 --- .../REACTIVE/RGE.Tuples#RxAttr.verified.cs | 51 --- .../RCE.FMultiRxCmds#RxCmdAttr.verified.cs | 52 --- ...CmdInDeeplyNestClass#RxCmdAttr.verified.cs | 52 --- ...RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs | 52 --- ....FRxCmdInRecordClass#RxCmdAttr.verified.cs | 52 --- ...CE.FRxCmdWArrayParam#RxCmdAttr.verified.cs | 52 --- ...CE.FRxCmdWCanExecute#RxCmdAttr.verified.cs | 52 --- ...CmdWCanExecuteMethod#RxCmdAttr.verified.cs | 52 --- ...WCanExecuteScheduler#RxCmdAttr.verified.cs | 52 --- ...E.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs | 52 --- .../RCE.FRxCmdWCt#RxCmdAttr.verified.cs | 52 --- .../RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs | 52 --- ...FRxCmdWDelegateParam#RxCmdAttr.verified.cs | 52 --- ...RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs | 52 --- ...E.FRxCmdWMultiParams#RxCmdAttr.verified.cs | 52 --- ...RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs | 52 --- .../RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs | 52 --- ...CE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs | 52 --- ....FRxCmdWProtectedAcc#RxCmdAttr.verified.cs | 52 --- ...FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs | 52 --- ...RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs | 52 --- ...RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs | 52 --- ...sPartialDeclarations#RxCmdAttr.verified.cs | 52 --- .../RCMDG.Acc#RxCmdAttr.verified.cs | 52 --- .../RCMDG.AsyncWParam#RxCmdAttr.verified.cs | 52 --- .../RCMDG.Basic#RxCmdAttr.verified.cs | 52 --- .../RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs | 52 --- .../RCMDG.Nest#RxCmdAttr.verified.cs | 52 --- .../RCMDG.NullTRet#RxCmdAttr.verified.cs | 52 --- ...CMDG.RunInBackground#RxCmdAttr.verified.cs | 52 --- .../RCMDG.Scheduler#RxCmdAttr.verified.cs | 52 --- .../RCMDG.WParam#RxCmdAttr.verified.cs | 52 --- .../RCE.ByteArray#RxCollAttr.verified.cs | 19 - .../RCE.CplxT#RxCollAttr.verified.cs | 19 - .../RCE.DateTime#RxCollAttr.verified.cs | 19 - .../RCE.DiffNs#RxCollAttr.verified.cs | 19 - .../RCE.Enum#RxCollAttr.verified.cs | 19 - .../RCE.Gen#RxCollAttr.verified.cs | 19 - .../RCE.Guid#RxCollAttr.verified.cs | 19 - .../RCE.Interface#RxCollAttr.verified.cs | 19 - .../RCE.Multi#RxCollAttr.verified.cs | 19 - .../RCE.Nest#RxCollAttr.verified.cs | 19 - .../RCE.Null#RxCollAttr.verified.cs | 19 - .../RCE.Record#RxCollAttr.verified.cs | 19 - .../RCE.Struct#RxCollAttr.verified.cs | 19 - .../RCE.Tuple#RxCollAttr.verified.cs | 19 - .../RCE.WRx#RxCollAttr.verified.cs | 19 - .../RCG.BasicField#RxCollAttr.verified.cs | 19 - .../ROE.Basic#IRxObjAttr.verified.cs | 19 - .../ROE.CplxT#IRxObjAttr.verified.cs | 19 - .../ROE.Enums#IRxObjAttr.verified.cs | 19 - .../ROE.FRxObjRecord#IRxObjAttr.verified.cs | 19 - .../ROE.FRxObjWAccMods#IRxObjAttr.verified.cs | 19 - .../ROE.FRxObjWAttrs#IRxObjAttr.verified.cs | 19 - ...jWDeeplyNestClasses#IRxObjAttr.verified.cs | 19 - ...ROE.FRxObjWGenClass#IRxObjAttr.verified.cs | 19 - .../ROE.FRxObjWInhMods#IRxObjAttr.verified.cs | 19 - ...E.FRxObjWMultiProps#IRxObjAttr.verified.cs | 19 - ...jWMultiTConstraints#IRxObjAttr.verified.cs | 19 - ...OE.FRxObjWNestClass#IRxObjAttr.verified.cs | 19 - .../ROE.Interface#IRxObjAttr.verified.cs | 19 - .../ROE.MultiNs#IRxObjAttr.verified.cs | 19 - .../ROE.Null#IRxObjAttr.verified.cs | 19 - .../ROG.Basic#IRxObjAttr.verified.cs | 19 - .../ReactiveUI.SourceGenerators.Tests.csproj | 1 + .../TestHelper.cs | 200 +-------- .../UnitTests/ReactiveUiIntegrationTests.cs | 6 +- .../UnitTests/TestCompilationReferences.cs | 3 +- .../UnitTests/ViewApiIntegrationTests.cs | 3 +- ...iveUI.SourceGenerators.Execute.Maui.csproj | 1 + ...UI.SourceGenerators.Execute.Nested1.csproj | 1 + ...UI.SourceGenerators.Execute.Nested2.csproj | 1 + ...UI.SourceGenerators.Execute.Nested3.csproj | 1 + ...ReactiveUI.SourceGenerators.Execute.csproj | 1 + .../AttributeDefinitions.cs | 390 +----------------- .../BindableDerivedListGenerator.cs | 8 - .../Reactive/ReactiveGenerator.cs | 11 - .../ReactiveCollectionGenerator.cs | 13 +- .../ReactiveCommandGenerator.cs | 5 - .../ReactiveObject/ReactiveObjectGenerator.cs | 5 - .../RoutedControlHostGenerator.Execute.cs | 10 +- .../RoutedControlHostGenerator.cs | 5 - .../ViewModelControlHostGenerator.Execute.cs | 10 +- .../ViewModelControlHostGenerator.cs | 7 - ...ctiveUI.SourceGenerators.Roslyn4140.csproj | 2 +- ...activeUI.SourceGenerators.Roslyn480.csproj | 2 +- .../Properties/launchSettings.json | 0 ...ctiveUI.SourceGenerators.Roslyn5000.csproj | 2 +- ...activeUI.SourceGenerators.V23.Tests.csproj | 1 + .../ReactiveUiV23CompatibilityTests.cs | 1 + .../AccessModifier.cs | 30 ++ .../BindableDerivedListAttribute.cs | 17 + .../IReactiveObjectAttribute.cs | 13 + .../InheritanceModifier.cs | 21 + .../KeepAttributes.cs | 17 + .../PropertyAccessModifier.cs | 27 ++ .../ReactiveAttribute.cs | 27 ++ .../ReactiveCollectionAttribute.cs | 13 + .../ReactiveCommandAttribute.cs | 27 ++ .../ReactiveUI.SourceGenerators.csproj | 50 +-- .../WinForms/RoutedControlHostAttribute.cs | 18 + .../WinForms/ViewModelControlHostAttribute.cs | 18 + .../TestAvaloniaApplication.csproj | 1 + .../TestMauiApplication.csproj | 1 + .../TestWinFormsApplication.csproj | 1 + .../TestWpfApplication.csproj | 1 + .../GenerationBenchmarks.cs | 7 +- ...ctiveUI.SourceGenerators.Benchmarks.csproj | 1 + .../Support/GeneratorHarness.cs | 1 + ...SourceGenerators.Runtime.Benchmarks.csproj | 1 + 191 files changed, 340 insertions(+), 6514 deletions(-) delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs rename src/{ReactiveUI.SourceGenerators => ReactiveUI.SourceGenerators.Roslyn5000}/Properties/launchSettings.json (100%) create mode 100644 src/ReactiveUI.SourceGenerators/AccessModifier.cs create mode 100644 src/ReactiveUI.SourceGenerators/BindableDerivedListAttribute.cs create mode 100644 src/ReactiveUI.SourceGenerators/IReactiveObjectAttribute.cs create mode 100644 src/ReactiveUI.SourceGenerators/InheritanceModifier.cs create mode 100644 src/ReactiveUI.SourceGenerators/KeepAttributes.cs create mode 100644 src/ReactiveUI.SourceGenerators/PropertyAccessModifier.cs create mode 100644 src/ReactiveUI.SourceGenerators/ReactiveAttribute.cs create mode 100644 src/ReactiveUI.SourceGenerators/ReactiveCollectionAttribute.cs create mode 100644 src/ReactiveUI.SourceGenerators/ReactiveCommandAttribute.cs create mode 100644 src/ReactiveUI.SourceGenerators/WinForms/RoutedControlHostAttribute.cs create mode 100644 src/ReactiveUI.SourceGenerators/WinForms/ViewModelControlHostAttribute.cs diff --git a/CLAUDE.md b/CLAUDE.md index f452b4e4..fd3deaef 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,7 +26,24 @@ Each versioned project links all `.cs` files from `ReactiveUI.SourceGenerators.R `#if ROSYLN_412 || ROSYLN_500` guards inside the shared source enable partial-property pipelines only on the newer Roslyn builds. -The `ReactiveUI.SourceGenerators` NuGet project packages all three DLLs under separate `analyzers/dotnet/roslyn4.8/cs`, `analyzers/dotnet/roslyn4.14/cs`, and `analyzers/dotnet/roslyn5.0/cs` paths, so NuGet/MSBuild automatically selects the right build based on the host compiler. +Each versioned project builds `ReactiveUI.SourceGenerators.Roslyn.dll`. The `ReactiveUI.SourceGenerators` project is +the package consumers install: it builds the attributes into `ReactiveUI.SourceGenerators.dll` under `lib/`, and bundles +the three generator DLLs, each with the code fixes, under `analyzers/dotnet/roslyn4.8/cs`, `analyzers/dotnet/roslyn4.14/cs`, +and `analyzers/dotnet/roslyn5.0/cs`, so NuGet/MSBuild automatically selects the right build based on the host compiler. + +### Generated code never declares a shared type + +The attributes and the enums they take (`AccessModifier`, `PropertyAccessModifier`, `InheritanceModifier`) are public +types in `ReactiveUI.SourceGenerators`, which targets `$(LibraryTfms)` (net8.0-net11.0, net462-net481). A type +declared into each consumer would repeat in every assembly, and an assembly granted `InternalsVisibleTo` would see two +copies (CS0436). + +- **Do not use `RegisterPostInitializationOutput`**, or emit any type whose fully qualified name another assembly + could also declare. +- A new attribute goes in `ReactiveUI.SourceGenerators` and is `[Conditional(KeepAttributes.Symbol)]`: the generators + read it from source, so a consumer keeps no reference to the attributes assembly. +- Generators, analyzers and code fixes stay `netstandard2.0`, the Roslyn host's framework. Only the attributes library + targets `$(LibraryTfms)`. Generators report only the `RXUISG*` diagnostics about input they cannot generate from (see [Analyzer Separation](#analyzer-separation-roslyn-best-practice)). Diagnostics about how code should be written, and @@ -37,7 +54,7 @@ their code fixes, live in the separate `ReactiveUI.SourceGenerators.Analyzers.Co ``` src/ ├── ReactiveUI.SourceGenerators.Roslyn/ # Shared source (linked into all versioned projects) -│ ├── AttributeDefinitions.cs # Injected attribute source texts +│ ├── AttributeDefinitions.cs # Metadata names of the attributes the generators read │ ├── Reactive/ # [Reactive] generator + Execute + models │ ├── ReactiveCommand/ # [ReactiveCommand] generator + Execute + models │ ├── RoutedControlHost/ # [RoutedControlHost] generator @@ -52,11 +69,11 @@ src/ │ ├── Extensions/ # ISymbol*, ITypeSymbol*, INamedTypeSymbol*, AttributeData extensions │ ├── Helpers/ # ImmutableArrayBuilder, EquatableArray, HashCode, etc. │ └── Models/ # Result, DiagnosticInfo, TargetInfo, etc. -├── ReactiveUI.SourceGenerators.Roslyn480/ # Roslyn 4.8 build (no define) +├── ReactiveUI.SourceGenerators.Roslyn480/ # Roslyn 4.8 build (no define) of ReactiveUI.SourceGenerators.Roslyn.dll ├── ReactiveUI.SourceGenerators.Roslyn4140/ # Roslyn 4.14 build (ROSYLN_412) ├── ReactiveUI.SourceGenerators.Roslyn5000/ # Roslyn 5.0 build (ROSYLN_500) ├── ReactiveUI.SourceGenerators.Analyzers.CodeFixes/ # Analyzers + code fixers -├── ReactiveUI.SourceGenerators/ # NuGet packaging project (bundles all three DLLs) +├── ReactiveUI.SourceGenerators/ # The package: public attributes, with the Roslyn builds bundled ├── ReactiveUI.SourceGenerator.Tests/ # TUnit tests with generator snapshots (GeneratorSnapshot) ├── benchmarks/ # BenchmarkDotNet generation benchmarks with EventPipe tracing ├── ReactiveUI.SourceGenerators.Execute*/ # Compile-time execution verification projects @@ -98,9 +115,6 @@ _ = writer.Lines(""" nothing), `OpenContainingTypes`, `OpenPartialType`, `CloseBlocks`, `InheritDoc`, `ExcludeFromCodeCoverage`. Build a generator's `GeneratedCode` attribute once, in a static field, with `SourceWriterExtensions.GeneratedCodeAttribute`. -The injected attribute source texts (in `AttributeDefinitions.cs`) are fixed `$$"""..."""` raw strings, each built once -per process. - A change to an emitter must keep the output token-for-token the same unless it deliberately changes generated code; compare changed snapshots with whitespace removed to prove it. @@ -108,14 +122,13 @@ compare changed snapshots with whitespace removed to prove it. Each generator follows this structure: -1. **`Initialize`** — registers post-initialization output (inject attribute source), then calls one or more `Run*` methods. +1. **`Initialize`** — calls one or more `Run*` methods. It registers no post-initialization output. 2. **`Run*`** — builds the `IncrementalValuesProvider` using `ForAttributeWithMetadataName` + a syntax predicate + a semantic extraction function. 3. **`Get*Info` (Execute file)** — stateless extraction function. Returns `Result` with embedded diagnostics. Must be pure; must not capture any `ISymbol` or `SyntaxNode` beyond this call. 4. **`GenerateSource` (Execute file)** — pure function that writes a model through `SourceWriter`. No Roslyn symbols allowed here. ``` Initialize() - ├─ RegisterPostInitializationOutput → inject attribute definitions └─ SyntaxProvider.ForAttributeWithMetadataName ├─ syntax predicate (fast, node-type check only) ├─ semantic extraction → Get*Info() → Result @@ -220,7 +233,8 @@ Analyzer and helper tests use direct `CSharpCompilation` / `CompilationWithAnaly ### Adding a New Generator 1. Create a value-equatable model record in `Core/Models/` or the generator's own `Models/` folder. -2. Add attribute source text to `AttributeDefinitions.cs` as a `$$"""..."""` raw string property initialised once. +2. Add the attribute as a public `[Conditional(KeepAttributes.Symbol)]` type in `ReactiveUI.SourceGenerators`, and its + metadata name to `AttributeDefinitions.cs`. 3. Create `Generator.cs` with `Initialize` wiring up `ForAttributeWithMetadataName`. 4. Create `Generator.Execute.cs` with `Get*Info` (extraction) and `GenerateSource` (writes through `SourceWriter`). 5. Add snapshot tests in `ReactiveUI.SourceGenerator.Tests/UnitTests/`. diff --git a/README.md b/README.md index cba991db..fb9e5d63 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,15 @@ dotnet add package ReactiveUI.SourceGenerators Ensure the package is loaded with `PrivateAssets="all"` to avoid issues with generated code in consuming projects. +The attributes (`[Reactive]`, `[ReactiveCommand]` and the rest) are public types in the package's +`ReactiveUI.SourceGenerators` assembly; the generators no longer declare them in your project, so assemblies +that share internals through `InternalsVisibleTo` no longer see two copies. Your project compiles against that assembly +but keeps no reference to it. If an older install added an `` line without `compile`, remove it: + +```xml + +``` + ReactiveUI V24.x.x consumers can reference either `ReactiveUI` for the primitives-based API without System.Reactive, or `ReactiveUI.Reactive` for the System.Reactive-based API. The generators detect the referenced API surface automatically. ReactiveUI releases from 23.2.28 remain supported. diff --git a/src/Directory.Build.props b/src/Directory.Build.props index edcb1553..227e4823 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -42,6 +42,8 @@ netstandard2.0 + + net8.0;net9.0;net10.0;net11.0;net462;net47;net471;net472;net48;net481 net8.0;net9.0;net10.0 diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs deleted file mode 100644 index 2b2de01f..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs deleted file mode 100644 index 2b2de01f..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs deleted file mode 100644 index 2b2de01f..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs deleted file mode 100644 index 2b2de01f..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs deleted file mode 100644 index 2b2de01f..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs deleted file mode 100644 index 1150c13e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs +++ /dev/null @@ -1,28 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs deleted file mode 100644 index f0a955ae..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs +++ /dev/null @@ -1,50 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// AccessModifier. -/// -internal enum AccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, -} - -/// -/// Property Access Modifier. -/// -internal enum PropertyAccessModifier -{ - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, -} - -/// -/// InheritanceModifier. -/// -internal enum InheritanceModifier -{ - None, - Virtual, - Override, - New, -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs deleted file mode 100644 index 1198bf74..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs deleted file mode 100644 index 0f45d48c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs +++ /dev/null @@ -1,52 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs deleted file mode 100644 index 4bef164c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs deleted file mode 100644 index fa7282c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj b/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj index 8ddb77de..a81664e3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj +++ b/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj @@ -69,6 +69,7 @@ + global,RoslynSourceGenerator diff --git a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs index 1a9c7833..c0d1e5c6 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs @@ -17,24 +17,6 @@ namespace ReactiveUI.SourceGenerator.Tests; public sealed partial class TestHelper : IDisposable where T : IIncrementalGenerator, new() { - /// The Reactive attribute definition property name. - private const string ReactiveAttributeName = "ReactiveAttribute"; - - /// The generated hint name for the Reactive attribute. - private const string ReactiveAttributeHintName = "ReactiveAttribute.g.cs"; - - /// The fully qualified type name containing attribute definitions. - private const string AttributeDefinitionsTypeName = "ReactiveUI.SourceGenerators.Helpers.AttributeDefinitions"; - - /// - /// Cache support references per generator type T. The support assembly compiles attribute - /// definitions that are NOT injected by T via RegisterPostInitializationOutput — an expensive - /// Roslyn compilation + Emit step that produces an identical result for every test in the same - /// generator class. Compute it once and reuse it for all subsequent tests. - /// - private static readonly Lazy> supportReferences = - new(CreateSupportReferences, LazyThreadSafetyMode.ExecutionAndPublication); - /// The concrete generator type name used for snapshots and support assemblies. private static readonly string generatorTypeName = new T().GetType().Name; @@ -138,6 +120,7 @@ private static string GetVerifiedFilePath() /// The test code to compile. /// The language version settings. /// The prepared Roslyn compilation. + /// The attributes come from the ReactiveUI.SourceGenerators reference, as they do for a consumer. private static CSharpCompilation CreateTestCompilation(string code, CSharpParseOptions parseOptions) { var syntaxTrees = new List @@ -146,32 +129,8 @@ private static CSharpCompilation CreateTestCompilation(string code, CSharpParseO CSharpSyntaxTree.ParseText(code, parseOptions), }; - AddGeneratorSpecificSyntaxTrees(syntaxTrees, parseOptions); AddWindowsDesktopStubsWhenNeeded(syntaxTrees, parseOptions); - return CSharpCompilation.Create("TestProject", syntaxTrees, CreateAssemblyReferences(), new(OutputKind.DynamicallyLinkedLibrary, deterministic: true)); - } - - /// Adds source trees required by the active generator. - /// The source-tree collection to extend. - /// The language version settings. - private static void AddGeneratorSpecificSyntaxTrees(List syntaxTrees, CSharpParseOptions parseOptions) - { - if (typeof(T) != typeof(ReactiveGenerator)) - { - AddSyntaxTree(syntaxTrees, GetAttributeDefinitionsMethodResult("GetAccessModifierEnum"), parseOptions, "AccessModifierEnum.g.cs"); - } - - if (typeof(T) == typeof(ReactiveObjectGenerator)) - { - AddSyntaxTree(syntaxTrees, GetAttributeDefinitionsPropertyResult(ReactiveAttributeName), parseOptions, ReactiveAttributeHintName); - } - - if (typeof(T) != typeof(BindableDerivedListGenerator) && typeof(T) != typeof(ReactiveCollectionGenerator)) - { - return; - } - - AddSyntaxTree(syntaxTrees, GetAttributeDefinitionsPropertyResult(ReactiveAttributeName), parseOptions, ReactiveAttributeHintName); + return CSharpCompilation.Create("TestProject", syntaxTrees, TestCompilationReferences.CreateDefault(), new(OutputKind.DynamicallyLinkedLibrary, deterministic: true)); } /// Adds Windows desktop stubs when the operating system does not provide them. @@ -228,161 +187,6 @@ private static void ThrowIfDiagnosticsExist(List diagnostics, string throw new InvalidOperationException($"{failureMessage}{Environment.NewLine}{CreateDiagnosticMessage(diagnostics)}"); } - /// Returns attribute and enum source strings not injected by generator . - /// The source strings required by the support assembly. - private static List GetGeneratedSupportSources() - { - var supportSources = new List { GetAttributeDefinitionsMethodResult("GetAccessModifierEnum") }; - - AddRequiredAttributeDefinitions(supportSources); - return supportSources; - } - - /// Adds attribute definitions required before the common definitions. - /// The support-source collection to extend. - private static void AddRequiredAttributeDefinitions(List supportSources) - { - // Yield each attribute definition only if generator T does NOT inject it. - if (typeof(T) != typeof(ReactiveCommandGenerator)) - { - supportSources.Add(GetAttributeDefinitionsPropertyResult("ReactiveCommandAttribute")); - } - - AddReactiveAttributeDefinitionIfNeeded(supportSources); - - AddRemainingAttributeDefinitions(supportSources); - } - - /// Adds the Reactive attribute definition when the active generator does not provide it. - /// The support-source collection to extend. - private static void AddReactiveAttributeDefinitionIfNeeded(List supportSources) - { - if (typeof(T) == typeof(ReactiveGenerator) || typeof(T) == typeof(ReactiveObjectGenerator) - || typeof(T) == typeof(BindableDerivedListGenerator) || typeof(T) == typeof(ReactiveCollectionGenerator)) - { - return; - } - - supportSources.Add(GetAttributeDefinitionsPropertyResult(ReactiveAttributeName)); - } - - /// Adds the remaining conditional attribute definitions. - /// The support-source collection to extend. - private static void AddRemainingAttributeDefinitions(List supportSources) - { - if (typeof(T) != typeof(BindableDerivedListGenerator)) - { - supportSources.Add(GetAttributeDefinitionsPropertyResult("BindableDerivedListAttribute")); - } - - if (typeof(T) != typeof(ReactiveCollectionGenerator)) - { - supportSources.Add(GetAttributeDefinitionsPropertyResult("ReactiveCollectionAttribute")); - } - - if (typeof(T) != typeof(ReactiveObjectGenerator)) - { - supportSources.Add(GetAttributeDefinitionsPropertyResult("ReactiveObjectAttribute")); - } - - if (typeof(T) != typeof(RoutedControlHostGenerator)) - { - supportSources.Add(GetAttributeDefinitionsMethodResult("GetRoutedControlHostAttribute")); - } - - if (typeof(T) == typeof(ViewModelControlHostGenerator)) - { - return; - } - - supportSources.Add(GetAttributeDefinitionsPropertyResult("ViewModelControlHostAttribute")); - } - - /// Creates metadata references for the support source assembly. - /// The references that provide support attributes and enums. - private static ImmutableArray CreateSupportReferences() - { - var supportSources = GetGeneratedSupportSources(); - - if (supportSources.Count == 0) - { - return []; - } - - var parseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13); - var supportCompilation = CSharpCompilation.Create( - $"{generatorTypeName}.Support", - CreateSupportSyntaxTrees(supportSources, parseOptions), - TestCompilationReferences.CreateDefault(), - new(OutputKind.DynamicallyLinkedLibrary, deterministic: true)); - - using var stream = new MemoryStream(); - var emitResult = supportCompilation.Emit(stream); - - if (!emitResult.Success) - { - var diagnostics = CreateDiagnosticMessage(emitResult.Diagnostics); - throw new InvalidOperationException($"Support assembly compilation failed for {generatorTypeName}.{Environment.NewLine}{diagnostics}"); - } - - return [MetadataReference.CreateFromImage(stream.ToArray())]; - } - - /// Creates the metadata references used by an in-memory test compilation. - /// The default and generator support metadata references. - private static HashSet CreateAssemblyReferences() - { - var references = new HashSet(TestCompilationReferences.CreateDefault()); - references.UnionWith(supportReferences.Value); - return references; - } - - /// Creates syntax trees for the supplied support source strings. - /// The support source strings. - /// The language version settings. - /// The parsed support syntax trees. - private static List CreateSupportSyntaxTrees(List supportSources, CSharpParseOptions parseOptions) - { - var syntaxTrees = new List(supportSources.Count); - for (var index = 0; index < supportSources.Count; index++) - { - syntaxTrees.Add(CSharpSyntaxTree.ParseText(supportSources[index], parseOptions, path: $"Support{index}.g.cs")); - } - - return syntaxTrees; - } - - /// Gets a public attribute-definition method result. - /// The public static method name. - /// The generated source returned by the method. - private static string GetAttributeDefinitionsMethodResult(string methodName) - { - var attributeDefinitionsType = typeof(ReactiveGenerator).Assembly.GetType(AttributeDefinitionsTypeName, throwOnError: false, ignoreCase: false) - ?? throw new InvalidOperationException("Could not locate AttributeDefinitions type."); - - var method = attributeDefinitionsType.GetMethod(methodName) - ?? throw new InvalidOperationException($"Could not locate AttributeDefinitions.{methodName}."); - - var result = method.Invoke(null, null); - return (string?)result - ?? throw new InvalidOperationException($"AttributeDefinitions.{methodName} returned null."); - } - - /// Gets a public attribute-definition property result. - /// The public static property name. - /// The generated source returned by the property. - private static string GetAttributeDefinitionsPropertyResult(string propertyName) - { - var attributeDefinitionsType = typeof(ReactiveGenerator).Assembly.GetType(AttributeDefinitionsTypeName, throwOnError: false, ignoreCase: false) - ?? throw new InvalidOperationException("Could not locate AttributeDefinitions type."); - - var property = attributeDefinitionsType.GetProperty(propertyName) - ?? throw new InvalidOperationException($"Could not locate AttributeDefinitions.{propertyName}."); - - return (string?)property.GetValue(null) - ?? throw new InvalidOperationException($"AttributeDefinitions.{propertyName} returned null."); - } - /// Determines whether a diagnostic is an accepted generated-output diagnostic. /// The diagnostic to inspect. /// when the diagnostic is expected. diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs index 49fb613d..b3f4faf3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs @@ -441,7 +441,8 @@ public async Task V24ReactiveUsesReactiveNamespaceAndSystemReactiveUnit() typeof(System.ComponentModel.INotifyPropertyChanged).Assembly, typeof(ReactiveUI.Reactive.ReactiveObject).Assembly, typeof(System.Reactive.Unit).Assembly, - typeof(ReactiveCommandGenerator).Assembly); + typeof(ReactiveCommandGenerator).Assembly, + typeof(ReactiveCommandAttribute).Assembly); var (compilation, generatedSource) = RunCommandGenerator( """ using ReactiveUI.Reactive; @@ -492,7 +493,8 @@ public async Task V23UsesLegacyNamespaceAndSystemReactiveUnit() typeof(Enumerable).Assembly, typeof(System.ComponentModel.INotifyPropertyChanged).Assembly, typeof(System.Reactive.Unit).Assembly, - typeof(ReactiveCommandGenerator).Assembly) + typeof(ReactiveCommandGenerator).Assembly, + typeof(ReactiveCommandAttribute).Assembly) .Add(legacyReference); var (compilation, generatedSource) = RunCommandGenerator( """ diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/TestCompilationReferences.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/TestCompilationReferences.cs index 280e05ef..cddaacaf 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/TestCompilationReferences.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/TestCompilationReferences.cs @@ -154,7 +154,8 @@ private static ImmutableArray CreateDefaultCore(bool includeW typeof(ReactiveObject).Assembly, // ReactiveUI typeof(System.Reactive.Unit).Assembly, // System.Reactive test inputs typeof(DynamicData.SourceList<>).Assembly, // Bindable derived list test inputs - typeof(ReactiveGenerator).Assembly, // ReactiveUI.SourceGenerators + typeof(ReactiveGenerator).Assembly, // ReactiveUI.SourceGenerators.Roslyn + typeof(ReactiveAttribute).Assembly, // ReactiveUI.SourceGenerators, the attributes typeof(PropertyToReactiveFieldAnalyzer).Assembly, // analyzer assembly typeof(Splat.Locator).Assembly, // Splat }; diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ViewApiIntegrationTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ViewApiIntegrationTests.cs index dfe8e0d0..f5f470bc 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ViewApiIntegrationTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ViewApiIntegrationTests.cs @@ -179,7 +179,8 @@ private static CSharpCompilation CreateCompilation(params string[] sources) typeof(object).Assembly, typeof(Component).Assembly, typeof(System.ComponentModel.CategoryAttribute).Assembly, - typeof(BindableAttribute).Assembly), + typeof(BindableAttribute).Assembly, + typeof(ViewModelControlHostAttribute).Assembly), new(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable)); } } diff --git a/src/ReactiveUI.SourceGenerators.Execute.Maui/ReactiveUI.SourceGenerators.Execute.Maui.csproj b/src/ReactiveUI.SourceGenerators.Execute.Maui/ReactiveUI.SourceGenerators.Execute.Maui.csproj index 3488f4d9..4db6c4bf 100644 --- a/src/ReactiveUI.SourceGenerators.Execute.Maui/ReactiveUI.SourceGenerators.Execute.Maui.csproj +++ b/src/ReactiveUI.SourceGenerators.Execute.Maui/ReactiveUI.SourceGenerators.Execute.Maui.csproj @@ -26,6 +26,7 @@ + diff --git a/src/ReactiveUI.SourceGenerators.Execute.Nested1/ReactiveUI.SourceGenerators.Execute.Nested1.csproj b/src/ReactiveUI.SourceGenerators.Execute.Nested1/ReactiveUI.SourceGenerators.Execute.Nested1.csproj index 0d28f5b5..ae99e92d 100644 --- a/src/ReactiveUI.SourceGenerators.Execute.Nested1/ReactiveUI.SourceGenerators.Execute.Nested1.csproj +++ b/src/ReactiveUI.SourceGenerators.Execute.Nested1/ReactiveUI.SourceGenerators.Execute.Nested1.csproj @@ -10,6 +10,7 @@ + diff --git a/src/ReactiveUI.SourceGenerators.Execute.Nested2/ReactiveUI.SourceGenerators.Execute.Nested2.csproj b/src/ReactiveUI.SourceGenerators.Execute.Nested2/ReactiveUI.SourceGenerators.Execute.Nested2.csproj index 4ca541f3..6bf4cc8d 100644 --- a/src/ReactiveUI.SourceGenerators.Execute.Nested2/ReactiveUI.SourceGenerators.Execute.Nested2.csproj +++ b/src/ReactiveUI.SourceGenerators.Execute.Nested2/ReactiveUI.SourceGenerators.Execute.Nested2.csproj @@ -10,6 +10,7 @@ + diff --git a/src/ReactiveUI.SourceGenerators.Execute.Nested3/ReactiveUI.SourceGenerators.Execute.Nested3.csproj b/src/ReactiveUI.SourceGenerators.Execute.Nested3/ReactiveUI.SourceGenerators.Execute.Nested3.csproj index f264397c..dcb7ea04 100644 --- a/src/ReactiveUI.SourceGenerators.Execute.Nested3/ReactiveUI.SourceGenerators.Execute.Nested3.csproj +++ b/src/ReactiveUI.SourceGenerators.Execute.Nested3/ReactiveUI.SourceGenerators.Execute.Nested3.csproj @@ -10,6 +10,7 @@ + diff --git a/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj b/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj index ddd367df..7efd48bf 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj +++ b/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj @@ -23,6 +23,7 @@ + diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs index a7da9516..8e02d253 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs @@ -1,396 +1,40 @@ -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -// -#pragma warning disable -using System; - namespace ReactiveUI.SourceGenerators.Helpers; +/// The metadata names of the attributes the generators read, and names the generated code uses. +/// +/// The attributes are public types in the ReactiveUI.SourceGenerators assembly. The generators never +/// declare a type in a consumer, so no two assemblies that share internals can each hold a copy. +/// internal static class AttributeDefinitions { - public const string GeneratedCode = "global::System.CodeDom.Compiler.GeneratedCode"; - public const string Obsolete = "global::System.Obsolete"; - public const string AccessModifierType = "ReactiveUI.SourceGenerators.AccessModifier"; + /// The name of the ReactiveUI assembly. public const string ReactiveUI = "ReactiveUI"; - public static string[] ExcludeFromCodeCoverage = ["[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]"]; - - private static string AccessModifierEnumText { get; } = $$""" - // Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. - // Licensed to the .NET Foundation under one or more agreements. - // The .NET Foundation licenses this file to you under the MIT license. - // See the LICENSE file in the project root for full license information. - - // - #pragma warning disable - #nullable enable - namespace ReactiveUI.SourceGenerators; - - /// - /// AccessModifier. - /// - internal enum AccessModifier - { - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - Init, - } - - /// - /// Property Access Modifier. - /// - internal enum PropertyAccessModifier - { - Public, - Protected, - Internal, - Private, - InternalProtected, - PrivateProtected, - } - - /// - /// InheritanceModifier. - /// - internal enum InheritanceModifier - { - None, - Virtual, - Override, - New, - } - #nullable restore - #pragma warning restore - """; - - public static string GetAccessModifierEnum() => AccessModifierEnumText; - + /// The metadata name of [IReactiveObject]. public const string ReactiveObjectAttributeType = "ReactiveUI.SourceGenerators.IReactiveObjectAttribute"; - public static string ReactiveObjectAttribute { get; } = $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// IReactiveObject Attribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveObjectGenerator", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IReactiveObjectAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore -"""; - + /// The metadata name of [ReactiveCommand]. public const string ReactiveCommandAttributeType = "ReactiveUI.SourceGenerators.ReactiveCommandAttribute"; - /// - /// Gets the reactive command attribute. - /// - /// - /// The reactive command attribute. - /// - public static string ReactiveCommandAttribute { get; } = $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveCommand Attribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveCommandGenerator", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCommandAttribute : global::System.Attribute -{ - /// - /// Gets the can execute method or property. - /// - /// - /// The name of the CanExecute Observable of bool. - /// - public string? CanExecute { get; init; } - - /// - /// Gets the output scheduler. - /// - /// - /// The output scheduler. - /// - public string? OutputScheduler { get; init; } - - /// - /// Gets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// - /// - /// to create the command with ReactiveCommand.CreateRunInBackground. - /// - public bool RunInBackground { get; init; } - - /// - /// Gets the AccessModifier of the ReactiveCommand property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore -"""; - + /// The metadata name of [Reactive]. public const string ReactiveAttributeType = "ReactiveUI.SourceGenerators.ReactiveAttribute"; - /// - /// Gets the reactive attribute. - /// - /// - /// The reactive attribute. - /// -#if ROSYLN_412 || ROSYLN_500 - public static string ReactiveAttribute { get; } = $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("{{ReactiveGenerator.GeneratorName}}", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore -"""; -#else - public static string ReactiveAttribute { get; } = $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("{{ReactiveGenerator.GeneratorName}}", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveAttribute : global::System.Attribute -{ - /// - /// Initializes a new instance of the class. - /// - public ReactiveAttribute(params string[] alsoNotify) - { - AlsoNotify = alsoNotify; - } - - /// - /// Gets the AccessModifier of the set property. - /// - /// - /// The AccessModifier of the set property. - /// - public AccessModifier SetModifier { get; init; } - - /// - /// Gets the InheritanceModifier of the property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Use Required attribute to indicate that the property is required. - /// - public bool UseRequired { get; init; } - - /// - /// Gets the AlsoNotify properties to raise change notifications for. - /// - public string[]? AlsoNotify { get; } -} -#nullable restore -#pragma warning restore -"""; -#endif - + /// The metadata name of [ViewModelControlHost]. public const string ViewModelControlHostAttributeType = "ReactiveUI.SourceGenerators.WinForms.ViewModelControlHostAttribute"; - public static string ViewModelControlHostAttribute { get; } = $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators.WinForms; - -/// -/// ViewModelControlHostAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model. -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ViewModelControlHostGenerator", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class ViewModelControlHostAttribute(string? baseType) : global::System.Attribute; -#nullable restore -#pragma warning restore -"""; - + /// The metadata name of [RoutedControlHost]. public const string RoutedControlHostAttributeType = "ReactiveUI.SourceGenerators.WinForms.RoutedControlHostAttribute"; - private static string RoutedControlHostAttributeText { get; } = $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators.WinForms; - -/// -/// RoutedControlHostAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model. -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.RoutedControlHostGenerator", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class RoutedControlHostAttribute(string? baseType) : global::System.Attribute; -#nullable restore -#pragma warning restore -"""; - - public static string GetRoutedControlHostAttribute() => RoutedControlHostAttributeText; - + /// The metadata name of [BindableDerivedList]. public const string BindableDerivedListAttributeType = "ReactiveUI.SourceGenerators.BindableDerivedListAttribute"; - public static string BindableDerivedListAttribute { get; } = $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("{{ReactiveGenerator.GeneratorName}}", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class BindableDerivedListAttribute : global::System.Attribute -{ - /// - /// Gets the AccessModifier of the BindableDerivedList property. - /// - /// - /// The AccessModifier of the property. - /// - public PropertyAccessModifier AccessModifier { get; init; } -} -#nullable restore -#pragma warning restore -"""; - + /// The metadata name of [ReactiveCollection]. public const string ReactiveCollectionAttributeType = "ReactiveUI.SourceGenerators.ReactiveCollectionAttribute"; - public static string ReactiveCollectionAttribute { get; } = $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("{{ReactiveGenerator.GeneratorName}}", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : global::System.Attribute; -#nullable restore -#pragma warning restore -"""; + /// The attribute that excludes a generated control host from code coverage. + public const string ExcludeFromCodeCoverage = "[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]"; } - -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs index a14b64dc..ce248944 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs @@ -4,8 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; -using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; @@ -18,12 +16,6 @@ public sealed partial class BindableDerivedListGenerator : IIncrementalGenerator /// public void Initialize(IncrementalGeneratorInitializationContext context) { - context.RegisterPostInitializationOutput(static ctx => - { - // Add the BindableDerivedListAttribute to the compilation - ctx.AddSource($"{AttributeDefinitions.BindableDerivedListAttributeType}.g.cs", SourceText.From(AttributeDefinitions.BindableDerivedListAttribute, SourceWriterExtensions.Utf8WithoutBom)); - }); - // Gather info for all annotated variable with at least one attribute. var results = context.SyntaxProvider diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs index 31936f8e..b5a164c0 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs @@ -4,8 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; -using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -22,15 +20,6 @@ public sealed partial class ReactiveGenerator : IIncrementalGenerator /// public void Initialize(IncrementalGeneratorInitializationContext context) { - context.RegisterPostInitializationOutput(static ctx => - { - // Add the AccessModifier enum to the compilation - ctx.AddSource($"{AttributeDefinitions.AccessModifierType}.g.cs", SourceText.From(AttributeDefinitions.GetAccessModifierEnum(), SourceWriterExtensions.Utf8WithoutBom)); - - // Add the ReactiveAttribute to the compilation - ctx.AddSource($"{AttributeDefinitions.ReactiveAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ReactiveAttribute, SourceWriterExtensions.Utf8WithoutBom)); - }); - RunReactiveFromField(context); #if ROSYLN_412 || ROSYLN_500 RunReactiveFromProperty(context); diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs index f7d686de..37b2f0ca 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs @@ -4,8 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; -using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; @@ -16,16 +14,7 @@ namespace ReactiveUI.SourceGenerators; public sealed partial class ReactiveCollectionGenerator : IIncrementalGenerator { /// - public void Initialize(IncrementalGeneratorInitializationContext context) - { - context.RegisterPostInitializationOutput(static ctx => - { - // Add the ReactiveAttribute to the compilation - ctx.AddSource($"{AttributeDefinitions.ReactiveCollectionAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ReactiveCollectionAttribute, SourceWriterExtensions.Utf8WithoutBom)); - }); - - RunReactiveCollectionFromField(in context); - } + public void Initialize(IncrementalGeneratorInitializationContext context) => RunReactiveCollectionFromField(in context); /// Registers the pipeline that generates properties from reactive collection fields. /// The incremental generator initialization context. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs index 649e6240..23ae9135 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs @@ -4,8 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; -using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; @@ -18,9 +16,6 @@ public sealed partial class ReactiveCommandGenerator : IIncrementalGenerator /// public void Initialize(IncrementalGeneratorInitializationContext context) { - context.RegisterPostInitializationOutput(static ctx => - ctx.AddSource($"{AttributeDefinitions.ReactiveCommandAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ReactiveCommandAttribute, SourceWriterExtensions.Utf8WithoutBom))); - // Gather info for all annotated command methods, then group them per type: each type's file is written from // its own group, so an edit to one type's commands leaves every other type's file cached. var types = diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs index ecb0b2bd..e2e37e2e 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs @@ -5,8 +5,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; -using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -20,9 +18,6 @@ public sealed partial class ReactiveObjectGenerator : IIncrementalGenerator /// public void Initialize(IncrementalGeneratorInitializationContext context) { - context.RegisterPostInitializationOutput(static ctx => - ctx.AddSource($"{AttributeDefinitions.ReactiveObjectAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ReactiveObjectAttribute, SourceWriterExtensions.Utf8WithoutBom))); - // Gather info for all annotated IReactiveObject Classes, one output per type. var types = context.SyntaxProvider diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs index f5412a7b..4ce63332 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs @@ -105,13 +105,9 @@ private static string GenerateSource(RoutedControlHostInfo info, ReactiveUiInteg WriteFileHeader(writer, integration); // The namespace is written as-is, even when empty, to keep the historical output. - _ = writer.Append("namespace ").Line(info.TargetNamespace).OpenBlock(); - foreach (var attribute in AttributeDefinitions.ExcludeFromCodeCoverage) - { - _ = writer.Line(attribute); - } - - _ = writer.Line("[DefaultProperty(\"ViewModel\")]") + _ = writer.Append("namespace ").Line(info.TargetNamespace).OpenBlock() + .Line(AttributeDefinitions.ExcludeFromCodeCoverage) + .Line("[DefaultProperty(\"ViewModel\")]") .Line(GeneratedCodeAttribute) .Append(info.TargetVisibility).Append(" partial ").Append(info.TargetType).Append(' ').Append(info.TargetName) .Append(" : ").Append(info.BaseTypeName).Line(", IReactiveObject") diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs index 94e8d2ce..69711641 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs @@ -4,8 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; -using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; @@ -18,9 +16,6 @@ public sealed partial class RoutedControlHostGenerator : IIncrementalGenerator /// public void Initialize(IncrementalGeneratorInitializationContext context) { - context.RegisterPostInitializationOutput(static ctx => - ctx.AddSource($"{AttributeDefinitions.RoutedControlHostAttributeType}.g.cs", SourceText.From(AttributeDefinitions.GetRoutedControlHostAttribute(), SourceWriterExtensions.Utf8WithoutBom))); - // One model per annotated class, each written by its own output so it caches on its own. var hosts = context.SyntaxProvider diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs index a0fefef9..358c7845 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs @@ -99,13 +99,9 @@ private static string GenerateSource(ViewModelControlHostInfo info, ReactiveUiIn WriteFileHeader(writer, integration); // The namespace is written as-is, even when empty, to keep the historical output. - _ = writer.Append("namespace ").Line(info.TargetNamespace).OpenBlock(); - foreach (var attribute in AttributeDefinitions.ExcludeFromCodeCoverage) - { - _ = writer.Line(attribute); - } - - _ = writer.Line("[DefaultProperty(\"ViewModel\")]") + _ = writer.Append("namespace ").Line(info.TargetNamespace).OpenBlock() + .Line(AttributeDefinitions.ExcludeFromCodeCoverage) + .Line("[DefaultProperty(\"ViewModel\")]") .Line(GeneratedCodeAttribute) .Append(info.TargetVisibility).Append(" partial ").Append(info.TargetType).Append(' ').Append(info.TargetName) .Append(" : ").Append(info.ViewModelTypeName).Append(", IReactiveObject, ").Append(integration.ViewNamespace).Line(".IViewFor") diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs index 9261cc38..d17d0cdd 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs @@ -4,8 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; -using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; @@ -18,11 +16,6 @@ public sealed partial class ViewModelControlHostGenerator : IIncrementalGenerato /// public void Initialize(IncrementalGeneratorInitializationContext context) { - context.RegisterPostInitializationOutput(static ctx => - ctx.AddSource( - $"{AttributeDefinitions.ViewModelControlHostAttributeType}.g.cs", - SourceText.From(AttributeDefinitions.ViewModelControlHostAttribute, SourceWriterExtensions.Utf8WithoutBom))); - // One model per annotated class, each written by its own output so it caches on its own. var hosts = context.SyntaxProvider diff --git a/src/ReactiveUI.SourceGenerators.Roslyn4140/ReactiveUI.SourceGenerators.Roslyn4140.csproj b/src/ReactiveUI.SourceGenerators.Roslyn4140/ReactiveUI.SourceGenerators.Roslyn4140.csproj index d4b4b061..d3388db6 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn4140/ReactiveUI.SourceGenerators.Roslyn4140.csproj +++ b/src/ReactiveUI.SourceGenerators.Roslyn4140/ReactiveUI.SourceGenerators.Roslyn4140.csproj @@ -13,7 +13,7 @@ false A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the Source Generators package for ReactiveUI - ReactiveUI.SourceGenerators + ReactiveUI.SourceGenerators.Roslyn $(DefineConstants);ROSYLN_412 diff --git a/src/ReactiveUI.SourceGenerators.Roslyn480/ReactiveUI.SourceGenerators.Roslyn480.csproj b/src/ReactiveUI.SourceGenerators.Roslyn480/ReactiveUI.SourceGenerators.Roslyn480.csproj index f9c50fc6..571ad7a3 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn480/ReactiveUI.SourceGenerators.Roslyn480.csproj +++ b/src/ReactiveUI.SourceGenerators.Roslyn480/ReactiveUI.SourceGenerators.Roslyn480.csproj @@ -13,7 +13,7 @@ false A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the Source Generators package for ReactiveUI - ReactiveUI.SourceGenerators + ReactiveUI.SourceGenerators.Roslyn diff --git a/src/ReactiveUI.SourceGenerators/Properties/launchSettings.json b/src/ReactiveUI.SourceGenerators.Roslyn5000/Properties/launchSettings.json similarity index 100% rename from src/ReactiveUI.SourceGenerators/Properties/launchSettings.json rename to src/ReactiveUI.SourceGenerators.Roslyn5000/Properties/launchSettings.json diff --git a/src/ReactiveUI.SourceGenerators.Roslyn5000/ReactiveUI.SourceGenerators.Roslyn5000.csproj b/src/ReactiveUI.SourceGenerators.Roslyn5000/ReactiveUI.SourceGenerators.Roslyn5000.csproj index e62e1a68..50ed7c1f 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn5000/ReactiveUI.SourceGenerators.Roslyn5000.csproj +++ b/src/ReactiveUI.SourceGenerators.Roslyn5000/ReactiveUI.SourceGenerators.Roslyn5000.csproj @@ -11,7 +11,7 @@ true false A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the Source Generators package for ReactiveUI - ReactiveUI.SourceGenerators + ReactiveUI.SourceGenerators.Roslyn $(DefineConstants);ROSYLN_500 diff --git a/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUI.SourceGenerators.V23.Tests.csproj b/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUI.SourceGenerators.V23.Tests.csproj index 41a21f3c..b24f216b 100644 --- a/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUI.SourceGenerators.V23.Tests.csproj +++ b/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUI.SourceGenerators.V23.Tests.csproj @@ -22,6 +22,7 @@ + diff --git a/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUiV23CompatibilityTests.cs b/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUiV23CompatibilityTests.cs index 9cd86c56..bf9b0e6c 100644 --- a/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUiV23CompatibilityTests.cs +++ b/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUiV23CompatibilityTests.cs @@ -131,6 +131,7 @@ private static ImmutableArray CreateReferences(Assembly react AddReference(reactiveUiAssembly.Location, paths, references); AddReference(typeof(System.Reactive.Unit).Assembly.Location, paths, references); + AddReference(typeof(ReactiveAttribute).Assembly.Location, paths, references); return references.ToImmutable(); } diff --git a/src/ReactiveUI.SourceGenerators/AccessModifier.cs b/src/ReactiveUI.SourceGenerators/AccessModifier.cs new file mode 100644 index 00000000..19fe9737 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/AccessModifier.cs @@ -0,0 +1,30 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +namespace ReactiveUI.SourceGenerators; + +/// The accessibility of a generated property's set accessor. +public enum AccessModifier +{ + /// A public accessor. + Public, + + /// A protected accessor. + Protected, + + /// An internal accessor. + Internal, + + /// A private accessor. + Private, + + /// A protected internal accessor. + InternalProtected, + + /// A private protected accessor. + PrivateProtected, + + /// An init accessor. + Init, +} diff --git a/src/ReactiveUI.SourceGenerators/BindableDerivedListAttribute.cs b/src/ReactiveUI.SourceGenerators/BindableDerivedListAttribute.cs new file mode 100644 index 00000000..e59db005 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/BindableDerivedListAttribute.cs @@ -0,0 +1,17 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Diagnostics; + +namespace ReactiveUI.SourceGenerators; + +/// Generates a property that exposes the annotated ReadOnlyObservableCollection<T> field. +[Conditional(KeepAttributes.Symbol)] +[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] +public sealed class BindableDerivedListAttribute : Attribute +{ + /// Gets or sets the accessibility of the generated property. + public PropertyAccessModifier AccessModifier { get; set; } +} diff --git a/src/ReactiveUI.SourceGenerators/IReactiveObjectAttribute.cs b/src/ReactiveUI.SourceGenerators/IReactiveObjectAttribute.cs new file mode 100644 index 00000000..a6768928 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/IReactiveObjectAttribute.cs @@ -0,0 +1,13 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Diagnostics; + +namespace ReactiveUI.SourceGenerators; + +/// Generates an IReactiveObject implementation for a class that cannot inherit from ReactiveObject. +[Conditional(KeepAttributes.Symbol)] +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] +public sealed class IReactiveObjectAttribute : Attribute; diff --git a/src/ReactiveUI.SourceGenerators/InheritanceModifier.cs b/src/ReactiveUI.SourceGenerators/InheritanceModifier.cs new file mode 100644 index 00000000..a813e0bb --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/InheritanceModifier.cs @@ -0,0 +1,21 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +namespace ReactiveUI.SourceGenerators; + +/// The inheritance modifier of a generated property. +public enum InheritanceModifier +{ + /// No modifier. + None, + + /// A virtual property. + Virtual, + + /// An override property. + Override, + + /// A new property. + New, +} diff --git a/src/ReactiveUI.SourceGenerators/KeepAttributes.cs b/src/ReactiveUI.SourceGenerators/KeepAttributes.cs new file mode 100644 index 00000000..fcba5e1b --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/KeepAttributes.cs @@ -0,0 +1,17 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +namespace ReactiveUI.SourceGenerators; + +/// The compilation symbol that keeps the generator attributes in a consumer's metadata. +/// +/// Every attribute in this assembly is on this symbol. The +/// generators read the attributes from source, so a consumer that does not define it keeps no reference to this +/// assembly, and nothing about the attributes reaches its dependents. +/// +internal static class KeepAttributes +{ + /// The symbol a consumer defines to keep the attributes in its metadata. + internal const string Symbol = "REACTIVEUI_SOURCEGENERATORS_KEEP_ATTRIBUTES"; +} diff --git a/src/ReactiveUI.SourceGenerators/PropertyAccessModifier.cs b/src/ReactiveUI.SourceGenerators/PropertyAccessModifier.cs new file mode 100644 index 00000000..b617291b --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/PropertyAccessModifier.cs @@ -0,0 +1,27 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +namespace ReactiveUI.SourceGenerators; + +/// The accessibility of a generated property. +public enum PropertyAccessModifier +{ + /// A public property. + Public, + + /// A protected property. + Protected, + + /// An internal property. + Internal, + + /// A private property. + Private, + + /// A protected internal property. + InternalProtected, + + /// A private protected property. + PrivateProtected, +} diff --git a/src/ReactiveUI.SourceGenerators/ReactiveAttribute.cs b/src/ReactiveUI.SourceGenerators/ReactiveAttribute.cs new file mode 100644 index 00000000..1d68a791 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/ReactiveAttribute.cs @@ -0,0 +1,27 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Diagnostics; + +namespace ReactiveUI.SourceGenerators; + +/// Generates a property that raises change notifications from the annotated field or partial property. +/// The names of other properties to raise change notifications for. +[Conditional(KeepAttributes.Symbol)] +[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] +public sealed class ReactiveAttribute(params string[] alsoNotify) : Attribute +{ + /// Gets or sets the accessibility of the generated set accessor. + public AccessModifier SetModifier { get; set; } + + /// Gets or sets the inheritance modifier of the generated property. + public InheritanceModifier Inheritance { get; set; } + + /// Gets or sets a value indicating whether the generated property is required. + public bool UseRequired { get; set; } + + /// Gets the names of other properties to raise change notifications for. + public string[]? AlsoNotify { get; } = alsoNotify; +} diff --git a/src/ReactiveUI.SourceGenerators/ReactiveCollectionAttribute.cs b/src/ReactiveUI.SourceGenerators/ReactiveCollectionAttribute.cs new file mode 100644 index 00000000..df6bb55d --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/ReactiveCollectionAttribute.cs @@ -0,0 +1,13 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Diagnostics; + +namespace ReactiveUI.SourceGenerators; + +/// Generates a property that raises change notifications when the annotated ObservableCollection<T> changes. +[Conditional(KeepAttributes.Symbol)] +[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] +public sealed class ReactiveCollectionAttribute : Attribute; diff --git a/src/ReactiveUI.SourceGenerators/ReactiveCommandAttribute.cs b/src/ReactiveUI.SourceGenerators/ReactiveCommandAttribute.cs new file mode 100644 index 00000000..10356e98 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/ReactiveCommandAttribute.cs @@ -0,0 +1,27 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Diagnostics; + +namespace ReactiveUI.SourceGenerators; + +/// Generates a ReactiveCommand property that executes the annotated method. +[Conditional(KeepAttributes.Symbol)] +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] +public sealed class ReactiveCommandAttribute : Attribute +{ + /// Gets or sets the name of the IObservable<bool> member that decides whether the command can execute. + public string? CanExecute { get; set; } + + /// Gets or sets the scheduler the command delivers its results on. + public string? OutputScheduler { get; set; } + + /// Gets or sets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. + /// to create the command with ReactiveCommand.CreateRunInBackground. + public bool RunInBackground { get; set; } + + /// Gets or sets the accessibility of the generated command property. + public PropertyAccessModifier AccessModifier { get; set; } +} diff --git a/src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj b/src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj index 1655b558..fb223c48 100644 --- a/src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj +++ b/src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj @@ -1,49 +1,41 @@ + - $(RoslynTfm) - enable - latest - true - true - true - true - false - true - + $(LibraryTfms) A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the Source Generators package for ReactiveUI - True + - - - - - + + + + - - - - - - - - + The 4.8 baseline keeps the supported .NET 8 line (through Nov 2026) working — see README. + The code fixes are built against Roslyn 4.8, so every band carries the same assembly. --> + + <_RoslynOutput>bin\$(Configuration)\netstandard2.0\ReactiveUI.SourceGenerators.Roslyn.dll + <_CodeFixesOutput>..\ReactiveUI.SourceGenerators.Analyzers.CodeFixes\bin\$(Configuration)\netstandard2.0\ReactiveUI.SourceGenerators.Analyzers.CodeFixes.dll + - - - + + + + diff --git a/src/ReactiveUI.SourceGenerators/WinForms/RoutedControlHostAttribute.cs b/src/ReactiveUI.SourceGenerators/WinForms/RoutedControlHostAttribute.cs new file mode 100644 index 00000000..02ec70be --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/WinForms/RoutedControlHostAttribute.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Diagnostics; + +namespace ReactiveUI.SourceGenerators.WinForms; + +/// Generates a WinForms control that hosts the view for the current route. +/// The fully qualified name of the control type the generated host derives from. +[Conditional(KeepAttributes.Symbol)] +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] +public sealed class RoutedControlHostAttribute(string? baseType) : Attribute +{ + /// Gets the fully qualified name of the control type the generated host derives from. + public string? BaseType { get; } = baseType; +} diff --git a/src/ReactiveUI.SourceGenerators/WinForms/ViewModelControlHostAttribute.cs b/src/ReactiveUI.SourceGenerators/WinForms/ViewModelControlHostAttribute.cs new file mode 100644 index 00000000..e648c268 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators/WinForms/ViewModelControlHostAttribute.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Diagnostics; + +namespace ReactiveUI.SourceGenerators.WinForms; + +/// Generates a WinForms control that hosts the view for its view model. +/// The fully qualified name of the control type the generated host derives from. +[Conditional(KeepAttributes.Symbol)] +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] +public sealed class ViewModelControlHostAttribute(string? baseType) : Attribute +{ + /// Gets the fully qualified name of the control type the generated host derives from. + public string? BaseType { get; } = baseType; +} diff --git a/src/TestApps/TestAvaloniaApplication/TestAvaloniaApplication.csproj b/src/TestApps/TestAvaloniaApplication/TestAvaloniaApplication.csproj index 2cc655fe..acfab463 100644 --- a/src/TestApps/TestAvaloniaApplication/TestAvaloniaApplication.csproj +++ b/src/TestApps/TestAvaloniaApplication/TestAvaloniaApplication.csproj @@ -20,6 +20,7 @@ + diff --git a/src/TestApps/TestMauiApplication/TestMauiApplication.csproj b/src/TestApps/TestMauiApplication/TestMauiApplication.csproj index ac6a3da0..92db8ae1 100644 --- a/src/TestApps/TestMauiApplication/TestMauiApplication.csproj +++ b/src/TestApps/TestMauiApplication/TestMauiApplication.csproj @@ -64,6 +64,7 @@ + diff --git a/src/TestApps/TestWinFormsApplication/TestWinFormsApplication.csproj b/src/TestApps/TestWinFormsApplication/TestWinFormsApplication.csproj index 68059003..eaaa516a 100644 --- a/src/TestApps/TestWinFormsApplication/TestWinFormsApplication.csproj +++ b/src/TestApps/TestWinFormsApplication/TestWinFormsApplication.csproj @@ -14,6 +14,7 @@ + diff --git a/src/TestApps/TestWpfApplication/TestWpfApplication.csproj b/src/TestApps/TestWpfApplication/TestWpfApplication.csproj index 6cefc1c7..0e4d18b7 100644 --- a/src/TestApps/TestWpfApplication/TestWpfApplication.csproj +++ b/src/TestApps/TestWpfApplication/TestWpfApplication.csproj @@ -14,6 +14,7 @@ + diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/GenerationBenchmarks.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/GenerationBenchmarks.cs index fec0ece8..b1994694 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/GenerationBenchmarks.cs +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/GenerationBenchmarks.cs @@ -34,7 +34,7 @@ public class GenerationBenchmarks /// Runs a whole cold generation: syntax scan, extraction and emission. /// The number of generated characters, so the work cannot be optimized away. - /// The corpus generated nothing beyond the injected attributes. + /// The corpus generated fewer files than it has copies. [Benchmark] public int Generate() { @@ -51,8 +51,9 @@ public int Generate() } } - // A corpus that stopped matching the attributes would quietly measure driver overhead instead. - return files <= Copies + // Every copy generates at least one file. A corpus that stopped matching the attributes would quietly measure + // driver overhead instead. + return files < Copies ? throw new InvalidOperationException($"The {Corpus} corpus generated {files} files; the benchmark is measuring nothing.") : characters; } diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj index 57f72e22..7cb7d323 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj @@ -28,6 +28,7 @@ --> + diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs index f2b7317e..08d5a11e 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs @@ -112,6 +112,7 @@ private static List CreateReferences() typeof(System.Text.Json.JsonSerializer).Assembly, typeof(System.Runtime.Serialization.DataContractAttribute).Assembly, typeof(System.ComponentModel.DescriptionAttribute).Assembly, + typeof(ReactiveAttribute).Assembly, ]; foreach (var seed in seeds) diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks.csproj b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks.csproj index 7e44eeea..357ab2c0 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks.csproj +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks.csproj @@ -20,6 +20,7 @@ + From 0395d1adfb44a23df21effcc7aa6a7a3a853957f Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 16:16:56 +1000 Subject: [PATCH 2/4] fix: stop [BindableDerivedList] output requiring DynamicData The generated file opened with `using DynamicData;` although the property it writes is fully qualified and only exposes the ReadOnlyObservableCollection field. A project without DynamicData, and so without System.Reactive, failed with CS0246. The using is gone, so the field can be filled by any means. Closes #489 --- ...DLG.FRxProps#TestNs.TestVM.Bdl.verified.cs | 1 - .../DLE.AccMods#TestNs.TestVM.Bdl.verified.cs | 1 - .../DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs | 1 - ...LE.DateTimeT#TestNs.TestVM.Bdl.verified.cs | 1 - .../DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs | 1 - .../DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs | 1 - .../DLE.EnumT#TestNs.TestVM.Bdl.verified.cs | 1 - ...LE.GenClass#TestNs.GenVM`1.Bdl.verified.cs | 1 - .../DLE.GuidT#TestNs.TestVM.Bdl.verified.cs | 1 - ...assGenPublicProp#TestNs.Vm.Bdl.verified.cs | 1 - ...E.InterfaceT#TestNs.TestVM.Bdl.verified.cs | 1 - ...E.MultiLists#TestNs.TestVM.Bdl.verified.cs | 1 - ...uterVM+InnerVM+DeepInnerVM.Bdl.verified.cs | 1 - ...ass#TestNs.OuterVM+InnerVM.Bdl.verified.cs | 1 - ...E.NestClass#TestNs.OuterVM.Bdl.verified.cs | 1 - ...NullElements#TestNs.TestVM.Bdl.verified.cs | 1 - ...dClass#TestNs.TestVMRecord.Bdl.verified.cs | 1 - .../DLE.StructT#TestNs.TestVM.Bdl.verified.cs | 1 - .../DLE.TupleT#TestNs.TestVM.Bdl.verified.cs | 1 - .../DLE.WRx#TestNs.TestVM.Bdl.verified.cs | 1 - .../UnitTests/ReactiveUiIntegrationTests.cs | 48 +++++++++++++++++++ .../BindableDerivedListGenerator.Execute.cs | 1 - 22 files changed, 48 insertions(+), 21 deletions(-) diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#TestNs.TestVM.Bdl.verified.cs index 6cb69fee..5ff61546 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#TestNs.TestVM.Bdl.verified.cs index 68169715..fc49cbc7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs index d10086c0..9669a697 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#TestNs.TestVM.Bdl.verified.cs index 8979887c..e4e1b145 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs index 3e42a391..cf64ac34 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: Namespace1.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs index a62ddd8a..d48416dc 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: Namespace2.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#TestNs.TestVM.Bdl.verified.cs index ca900426..d910c798 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#TestNs.GenVM`1.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#TestNs.GenVM`1.Bdl.verified.cs index 3458dd34..7e013217 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#TestNs.GenVM`1.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#TestNs.GenVM`1.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.GenericVM`1.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#TestNs.TestVM.Bdl.verified.cs index 0462e27b..5adc3b8a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#TestNs.Vm.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#TestNs.Vm.Bdl.verified.cs index e6a21d3a..a3a8c6fb 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#TestNs.Vm.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#TestNs.Vm.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.ViewModel.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#TestNs.TestVM.Bdl.verified.cs index dc3bb8c0..7da3d96c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#TestNs.TestVM.Bdl.verified.cs index b8cd09c3..a0b23906 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM+DeepInnerVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM+DeepInnerVM.Bdl.verified.cs index 2d1f74eb..d603556b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM+DeepInnerVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM+DeepInnerVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.OuterVM+InnerVM+DeepInnerVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM.Bdl.verified.cs index 319c4fba..ab8239df 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.OuterVM+InnerVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM.Bdl.verified.cs index 508b63d5..7b249e1b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.OuterVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#TestNs.TestVM.Bdl.verified.cs index cc7bff77..e2385f98 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#TestNs.TestVMRecord.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#TestNs.TestVMRecord.Bdl.verified.cs index 232de777..d23dba5d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#TestNs.TestVMRecord.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#TestNs.TestVMRecord.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVMRecord.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#TestNs.TestVM.Bdl.verified.cs index cc4dae36..47877bc6 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#TestNs.TestVM.Bdl.verified.cs index bdc5df28..988ccf6b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#TestNs.TestVM.Bdl.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#TestNs.TestVM.Bdl.verified.cs index 73d410e2..01d73687 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#TestNs.TestVM.Bdl.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#TestNs.TestVM.Bdl.verified.cs @@ -1,7 +1,6 @@ //HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; -using DynamicData; using ReactiveUI; #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs index b3f4faf3..d93a817c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs @@ -522,6 +522,54 @@ private void Save() await Assert.That(GetErrors(compilation)).IsEmpty(); } + /// + /// Verifies that a [BindableDerivedList] property compiles in a project that references neither DynamicData + /// nor System.Reactive, since the generated property only exposes the field. + /// + /// A task representing the asynchronous assertion work. + [Test] + public async Task BindableDerivedListCompilesWithoutDynamicData() + { + const string source = """ + using System.Collections.ObjectModel; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + + namespace Consumer; + + public partial class ViewModel : ReactiveObject + { + [BindableDerivedList] + private ReadOnlyObservableCollection? _items; + } + """; + var references = TestCompilationReferences.CreateForAssemblies( + typeof(object).Assembly, + typeof(System.ComponentModel.INotifyPropertyChanged).Assembly, + typeof(System.Collections.ObjectModel.ReadOnlyObservableCollection<>).Assembly, + typeof(ReactiveObject).Assembly, + typeof(BindableDerivedListAttribute).Assembly); + var compilation = CSharpCompilation.Create( + "Consumer", + [CSharpSyntaxTree.ParseText(source, CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13))], + references, + new(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable)); + _ = CSharpGeneratorDriver + .Create(new BindableDerivedListGenerator()) + .WithUpdatedParseOptions((CSharpParseOptions)compilation.SyntaxTrees.First().Options) + .RunGeneratorsAndUpdateCompilation(compilation, out var outputCompilation, out _); + var referenceNames = new List(); + foreach (var reference in references) + { + referenceNames.Add(Path.GetFileNameWithoutExtension(reference.Display ?? string.Empty)); + } + + await Assert.That(referenceNames).DoesNotContain("DynamicData"); + await Assert.That(referenceNames).DoesNotContain("System.Reactive"); + await Assert.That(outputCompilation.GetTypeByMetadataName("Consumer.ViewModel")!.GetMembers("Items")).IsNotEmpty(); + await Assert.That(GetErrors(outputCompilation)).IsEmpty(); + } + /// Exercises package detection when the command API is absent, referenced, or exposes primitive void. /// A task representing the asynchronous assertion work. [Test] diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs index 11f04b3c..957fab21 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs @@ -179,7 +179,6 @@ private static string GenerateSource(EquatableArray pro var writer = SourceWriter.Rent() .AutoGenerated() .Using("System.Collections.ObjectModel") - .Using("DynamicData") .Using("ReactiveUI") .BlankLine() .DisableWarningsEnableNullable() From 5e7fd66b57847588c98f803c1e6aff99298b4a6f Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 16:17:02 +1000 Subject: [PATCH 3/4] feat: run task commands in the background, and choose the background scheduler [ReactiveCommand(RunInBackground = true)] now starts a task-returning method with Task.Run, passing the command parameter and CancellationToken through, so the code before its first await no longer runs on the calling thread. It previously applied to synchronous methods only and was ignored for tasks. BackgroundScheduler names the scheduler a synchronous background command runs on: a scheduler member of the class or a built-in ReactiveUI scheduler, as for OutputScheduler. Setting it implies RunInBackground. Without an output scheduler or can-execute, the call names `canExecute: null`, since ReactiveUI 24 has no overload taking only the execute delegate and a background scheduler. Closes #347 --- README.md | 13 +- ...Scheduler#TestNs.TestVM.RxCmds.verified.cs | 33 ++++ .../UnitTests/ReactiveCMDGeneratorTests.cs | 35 ++++ ...ReactiveCommandBackgroundBehaviourTests.cs | 160 ++++++++++++++++++ .../UnitTests/ReactiveUiIntegrationTests.cs | 42 ++++- .../ReactiveCommand/Models/CommandInfo.cs | 6 +- .../ReactiveCommandGenerator.Execute.cs | 138 +++++++++++---- .../ReactiveUiV23CompatibilityTests.cs | 106 +++++++----- .../ReactiveCommandAttribute.cs | 15 +- 9 files changed, 464 insertions(+), 84 deletions(-) create mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackgroundTasksScheduler#TestNs.TestVM.RxCmds.verified.cs create mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCommandBackgroundBehaviourTests.cs diff --git a/README.md b/README.md index fb9e5d63..6123feff 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,8 @@ ReactiveUI Source Generators automatically generate ReactiveUI objects to stream - `[Reactive(UseRequired = true)]` With field and access modifiers. This will generate a required property, (Not Required for partial properties, use required keyword for property declaration). - `[Reactive(nameof(RaiseProperty1), nameof(RaiseProperty2))]` With field and property changed notification for additional properties. - `[ReactiveCommand]` -- `[ReactiveCommand(RunInBackground = true)]` runs a synchronous command on ReactiveUI's background scheduler +- `[ReactiveCommand(RunInBackground = true)]` runs a synchronous command on ReactiveUI's background scheduler, and starts a task-returning command with `Task.Run` +- `[ReactiveCommand(BackgroundScheduler = nameof(_scheduler))]` runs a synchronous command on the given scheduler - `[ReactiveCommand(CanExecute = nameof(IObservableBoolName))]` with CanExecute - `[ReactiveCommand(OutputScheduler = "RxSchedulers.MainThreadScheduler")]` using a ReactiveUI Scheduler - `[ReactiveCommand(OutputScheduler = nameof(_isheduler))]` using a Scheduler defined in the class @@ -334,7 +335,9 @@ public partial class MyReactiveClass ### Usage ReactiveCommand on the background scheduler -Use `RunInBackground` for synchronous command methods that should be created with `ReactiveCommand.CreateRunInBackground`. Task- and observable-returning methods continue to use their asynchronous ReactiveCommand factories. +Use `RunInBackground` to run a command's method off the calling thread. A synchronous method's command is created with `ReactiveCommand.CreateRunInBackground`. A task-returning method is started with `Task.Run`, so the code before its first `await` no longer runs on the calling thread; the command parameter and `CancellationToken` are passed through. Observable-returning methods are unaffected. + +`BackgroundScheduler` chooses the scheduler a synchronous method runs on, from a scheduler member of the class or a built-in ReactiveUI scheduler, and implies `RunInBackground`. A task-returning method always starts on the thread pool. ```csharp using ReactiveUI.SourceGenerators; @@ -343,6 +346,12 @@ public partial class MyReactiveClass { [ReactiveCommand(RunInBackground = true)] private void ExecuteExpensiveWork() { } + + [ReactiveCommand(RunInBackground = true)] + private async Task LoadAsync(int id, CancellationToken token) => await _repository.LoadAsync(id, token); + + [ReactiveCommand(BackgroundScheduler = nameof(_workScheduler))] + private void Crunch() { } } ``` diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackgroundTasksScheduler#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackgroundTasksScheduler#TestNs.TestVM.RxCmds.verified.cs new file mode 100644 index 00000000..c339f653 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackgroundTasksScheduler#TestNs.TestVM.RxCmds.verified.cs @@ -0,0 +1,33 @@ +//HintName: TestNs.TestVM.ReactiveCommands.g.cs +// + +#pragma warning disable +#nullable enable + +namespace TestNs +{ + public partial class TestVM + { + private global::ReactiveUI.ReactiveCommand? _loadCommand; + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand LoadCommand { get => _loadCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(() => global::System.Threading.Tasks.Task.Run(() => Load())); } + + private global::ReactiveUI.ReactiveCommand? _fetchCommand; + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand FetchCommand { get => _fetchCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask((int p, global::System.Threading.CancellationToken ct) => global::System.Threading.Tasks.Task.Run(() => Fetch(p, ct), ct)); } + + private global::ReactiveUI.ReactiveCommand? _cancellableCommand; + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand CancellableCommand { get => _cancellableCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask((global::System.Threading.CancellationToken ct) => global::System.Threading.Tasks.Task.Run(() => Cancellable(ct), ct)); } + + private global::ReactiveUI.ReactiveCommand? _crunchCommand; + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand CrunchCommand { get => _crunchCommand ??= global::ReactiveUI.ReactiveCommand.CreateRunInBackground(Crunch, canExecute: null, backgroundScheduler: Worker); } + } +} +#nullable restore +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCMDGeneratorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCMDGeneratorTests.cs index e17e8c2b..77e77a44 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCMDGeneratorTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCMDGeneratorTests.cs @@ -180,6 +180,41 @@ private void Foreground() { } return TestHelper.TestPass(sourceCode); } + /// Tests task ReactiveCommands started on the thread pool, and a chosen background scheduler. + /// A task to monitor the async. + [Test] + public Task RunInBackgroundTasksAndScheduler() + { + const string sourceCode = """ + using System.Threading; + using System.Threading.Tasks; + using ReactiveUI; + using ReactiveUI.Primitives.Concurrency; + using ReactiveUI.SourceGenerators; + + namespace TestNs; + + public partial class TestVM : ReactiveObject + { + private static ISequencer Worker => RxSchedulers.TaskpoolScheduler; + + [ReactiveCommand(RunInBackground = true)] + private Task Load() => Task.CompletedTask; + + [ReactiveCommand(RunInBackground = true)] + private Task Fetch(int value, CancellationToken token) => Task.FromResult(value); + + [ReactiveCommand(RunInBackground = true)] + private Task Cancellable(CancellationToken token) => Task.CompletedTask; + + [ReactiveCommand(BackgroundScheduler = nameof(Worker))] + private void Crunch() { } + } + """; + + return TestHelper.TestPass(sourceCode); + } + /// Froms the reactive command with nested classes. /// A task to monitor the async. [Test] diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCommandBackgroundBehaviourTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCommandBackgroundBehaviourTests.cs new file mode 100644 index 00000000..e764c1d8 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCommandBackgroundBehaviourTests.cs @@ -0,0 +1,160 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Runtime.Loader; +using System.Windows.Input; + +namespace ReactiveUI.SourceGenerator.Tests; + +/// Runs generated task commands to check which thread RunInBackground starts them on. +public class ReactiveCommandBackgroundBehaviourTests +{ + /// A view model whose commands report the thread they ran on. + private const string Source = """ + using System; + using System.Threading; + using System.Threading.Tasks; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + + namespace Behaviour; + + public partial class ViewModel : ReactiveObject + { + public TaskCompletionSource Ran { get; } = new(TaskCreationOptions.RunContinuationsAsynchronously); + + public int Parameter { get; private set; } + + public bool CanCancel { get; private set; } + + [ReactiveCommand(RunInBackground = true)] + private Task Background() + { + Ran.SetResult(Environment.CurrentManagedThreadId); + return Task.CompletedTask; + } + + [ReactiveCommand(RunInBackground = true)] + private Task WithParameter(int value, CancellationToken token) + { + Parameter = value; + CanCancel = token.CanBeCanceled; + Ran.SetResult(Environment.CurrentManagedThreadId); + return Task.FromResult(value); + } + + [ReactiveCommand] + private Task Foreground() + { + Ran.SetResult(Environment.CurrentManagedThreadId); + return Task.CompletedTask; + } + } + """; + + /// The parameter the parameterised command is executed with. + private const int CommandParameter = 42; + + /// How long a command is given to report that it ran. + private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(10); + + /// A task command with RunInBackground runs its method on another thread. + /// A task to monitor the async. + [Test] + public async Task RunInBackgroundStartsTheTaskOffTheCallingThread() + { + var viewModel = CreateViewModel(); + + var (callingThread, ranOn) = Execute(viewModel, "BackgroundCommand", null); + + await Assert.That(ranOn).IsNotEqualTo(callingThread); + } + + /// The background lambda passes the command parameter and a cancellable token to the method. + /// A task to monitor the async. + [Test] + public async Task RunInBackgroundPassesTheParameterAndToken() + { + var viewModel = CreateViewModel(); + + var (callingThread, ranOn) = Execute(viewModel, "WithParameterCommand", CommandParameter); + + await Assert.That(ranOn).IsNotEqualTo(callingThread); + await Assert.That((int)GetProperty(viewModel, "Parameter")).IsEqualTo(CommandParameter); + await Assert.That((bool)GetProperty(viewModel, "CanCancel")).IsTrue(); + } + + /// A task command without RunInBackground still starts its method on the calling thread. + /// A task to monitor the async. + [Test] + public async Task WithoutRunInBackgroundTheTaskStartsOnTheCallingThread() + { + var viewModel = CreateViewModel(); + + var (callingThread, ranOn) = Execute(viewModel, "ForegroundCommand", null); + + await Assert.That(ranOn).IsEqualTo(callingThread); + } + + /// Executes a command from a dedicated thread and waits for its method to report the thread it ran on. + /// The view model. + /// The generated command property. + /// The command parameter. + /// The thread that executed the command, and the thread the method ran on. + /// + /// The executing thread stays alive until the method reports, so no other thread can share its id. A thread pool + /// thread would not do: the pool could run the background work on the very thread that queued it. + /// + private static (int CallingThread, int RanOn) Execute(object viewModel, string commandName, object? parameter) + { + var command = (ICommand)GetProperty(viewModel, commandName); + var ran = ((TaskCompletionSource)GetProperty(viewModel, "Ran")).Task; + var callingThread = 0; + var thread = new Thread(() => + { + callingThread = Environment.CurrentManagedThreadId; + command.Execute(parameter); + _ = SpinWait.SpinUntil(() => ran.IsCompleted, Timeout); + }); + thread.Start(); + thread.Join(); + + return ran.IsCompletedSuccessfully + ? (callingThread, ran.Result) + : throw new TimeoutException($"{commandName} did not run."); + } + + /// Reads a public property of the view model. + /// The view model. + /// The property name. + /// The property's value. + private static object GetProperty(object viewModel, string name) => viewModel.GetType().GetProperty(name)!.GetValue(viewModel)!; + + /// Generates, compiles and loads the view model. + /// An instance of the view model. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SES1402", Justification = "The test loads the assembly it has just compiled from its own source.")] + private static object CreateViewModel() + { + var parseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13); + var compilation = CSharpCompilation.Create( + "ReactiveCommandBackgroundBehaviour", + [CSharpSyntaxTree.ParseText(Source, parseOptions)], + TestCompilationReferences.CreatePortableDefault(), + new(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable)); + _ = CSharpGeneratorDriver + .Create([new ReactiveCommandGenerator().AsSourceGenerator()], parseOptions: parseOptions) + .RunGeneratorsAndUpdateCompilation(compilation, out var output, out _); + + using var image = new MemoryStream(); + var emit = output.Emit(image); + if (!emit.Success) + { + throw new InvalidOperationException(string.Join(Environment.NewLine, emit.Diagnostics)); + } + + image.Position = 0; + var assembly = new AssemblyLoadContext(nameof(ReactiveCommandBackgroundBehaviourTests), isCollectible: true).LoadFromStream(image); + return Activator.CreateInstance(assembly.GetType("Behaviour.ViewModel", throwOnError: true)!)!; + } +} diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs index d93a817c..7bb63809 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs @@ -77,6 +77,28 @@ private void Foreground() { } CanExecute = nameof(CanRun), OutputScheduler = "global::ReactiveUI.RxSchedulers.MainThreadScheduler")] private IObservable AlreadyObservable() => Observable.Return(1); + + [ReactiveCommand(RunInBackground = true)] + private Task Cancellable(System.Threading.CancellationToken token) => Task.CompletedTask; + + [ReactiveCommand(RunInBackground = true)] + private Task Fetch(int value, System.Threading.CancellationToken token) => Task.FromResult(value); + + [ReactiveCommand(RunInBackground = true)] + private Task Describe(int value) => Task.FromResult(value.ToString()); + + private static global::ReactiveUI.Primitives.Concurrency.ISequencer Worker => global::ReactiveUI.RxSchedulers.TaskpoolScheduler; + + [ReactiveCommand(BackgroundScheduler = "global::ReactiveUI.RxSchedulers.TaskpoolScheduler")] + private void Pooled() { } + + [ReactiveCommand( + BackgroundScheduler = nameof(Worker), + OutputScheduler = "global::ReactiveUI.RxSchedulers.MainThreadScheduler")] + private int Compute() => 1; + + [ReactiveCommand(BackgroundScheduler = nameof(Worker), CanExecute = nameof(CanRun))] + private void Guarded(int value) { } } """; @@ -339,7 +361,7 @@ private void Run() await Assert.That(GetErrors(compilation)).IsEmpty(); } - /// Verifies background command generation for every synchronous delegate shape. + /// Verifies background command generation for every synchronous and task delegate shape. /// A task representing the asynchronous assertion work. [Test] public async Task ReactiveCommandRunInBackgroundUsesBackgroundFactoryForSynchronousMethods() @@ -348,8 +370,16 @@ public async Task ReactiveCommandRunInBackgroundUsesBackgroundFactoryForSynchron const string scheduler = "global::ReactiveUI.RxSchedulers.MainThreadScheduler"; const string scheduledCommandFactory = $"ReactiveCommand.CreateRunInBackground(Scheduled, backgroundScheduler: null, outputScheduler: {scheduler})"; const string formattedCommandFactory = $"ReactiveCommand.CreateRunInBackground(Format, CanRun, backgroundScheduler: null, outputScheduler: {scheduler})"; - const string asyncCommandFactory = $"ReactiveCommand.CreateFromTask(AlreadyAsync, CanRun, outputScheduler: {scheduler})"; + const string taskRun = "global::System.Threading.Tasks.Task.Run"; + const string token = "global::System.Threading.CancellationToken"; + const string asyncCommandFactory = $"ReactiveCommand.CreateFromTask(() => {taskRun}(() => AlreadyAsync()), CanRun, outputScheduler: {scheduler})"; const string observableCommandFactory = $"ReactiveCommand.CreateFromObservable(AlreadyObservable, CanRun, outputScheduler: {scheduler})"; + const string cancellableCommandFactory = $"ReactiveCommand.CreateFromTask(({token} ct) => {taskRun}(() => Cancellable(ct), ct))"; + const string fetchCommandFactory = $"ReactiveCommand.CreateFromTask((int p, {token} ct) => {taskRun}(() => Fetch(p, ct), ct))"; + const string describeCommandFactory = $"ReactiveCommand.CreateFromTask((int p) => {taskRun}(() => Describe(p)))"; + const string pooledCommandFactory = "ReactiveCommand.CreateRunInBackground(Pooled, canExecute: null, backgroundScheduler: global::ReactiveUI.RxSchedulers.TaskpoolScheduler)"; + const string computeCommandFactory = $"ReactiveCommand.CreateRunInBackground(Compute, backgroundScheduler: Worker, outputScheduler: {scheduler})"; + const string guardedCommandFactory = "ReactiveCommand.CreateRunInBackground(Guarded, CanRun, backgroundScheduler: Worker)"; await Assert.That(generatedSource.Contains("ReactiveCommand.CreateRunInBackground(Save)", StringComparison.Ordinal)).IsTrue(); await Assert.That(generatedSource.Contains("ReactiveCommand.CreateRunInBackground(Calculate)", StringComparison.Ordinal)).IsTrue(); @@ -358,8 +388,14 @@ public async Task ReactiveCommandRunInBackgroundUsesBackgroundFactoryForSynchron await Assert.That(generatedSource.Contains(scheduledCommandFactory, StringComparison.Ordinal)).IsTrue(); await Assert.That(generatedSource.Contains(formattedCommandFactory, StringComparison.Ordinal)).IsTrue(); await Assert.That(generatedSource.Contains("ReactiveCommand.Create(Foreground)", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains(asyncCommandFactory, StringComparison.Ordinal)).IsTrue(); + await Assert.That(generatedSource).Contains(asyncCommandFactory); await Assert.That(generatedSource.Contains(observableCommandFactory, StringComparison.Ordinal)).IsTrue(); + await Assert.That(generatedSource).Contains(cancellableCommandFactory); + await Assert.That(generatedSource).Contains(fetchCommandFactory); + await Assert.That(generatedSource).Contains(describeCommandFactory); + await Assert.That(generatedSource).Contains(pooledCommandFactory); + await Assert.That(generatedSource).Contains(computeCommandFactory); + await Assert.That(generatedSource).Contains(guardedCommandFactory); await Assert.That(GetErrors(compilation)).IsEmpty(); } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/Models/CommandInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/Models/CommandInfo.cs index 4d3de4ab..ffa7366d 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/Models/CommandInfo.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/Models/CommandInfo.cs @@ -17,7 +17,9 @@ namespace ReactiveUI.SourceGenerators.Models; /// The optional can-execute member name. /// The kind of can-execute member. /// The optional output scheduler expression. -/// Whether a synchronous method uses the background command factory. +/// Whether the method runs off the calling thread. +/// The optional scheduler a synchronous background command runs on. +/// Whether the method's last parameter is a CancellationToken. /// Attributes copied to the generated property. /// The generated property access modifier. /// XML documentation copied to the generated property. @@ -33,6 +35,8 @@ internal sealed record CommandInfo( CanExecuteTypeInfo? CanExecuteTypeInfo, string? OutputScheduler, bool RunInBackground, + string? BackgroundScheduler, + bool HasCancellationToken, EquatableArray ForwardedPropertyAttributes, string AccessModifier, string? XmlComment) diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs index 09bff0eb..154db432 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs @@ -51,6 +51,15 @@ public partial class ReactiveCommandGenerator /// The attribute property used to request background execution. private const string RunInBackground = "RunInBackground"; + /// The attribute property used to specify the background scheduler. + private const string BackgroundScheduler = "BackgroundScheduler"; + + /// The method that starts a task-returning command on the thread pool. + private const string TaskRun = "global::System.Threading.Tasks.Task.Run"; + + /// The cancellation token type a task-returning command method may take last. + private const string CancellationTokenType = "global::System.Threading.CancellationToken"; + /// The access-modifier value for internal generated commands. private const int InternalAccessibility = 2; @@ -106,9 +115,11 @@ context.TargetSymbol is IMethodSymbol methodSymbol token.ThrowIfCancellationRequested(); TryGetCanExecuteExpressionType(methodSymbol, attributeData, out var canExecuteObservableName, out var canExecuteTypeInfo); token.ThrowIfCancellationRequested(); - TryGetOutputScheduler(methodSymbol, attributeData, context.SemanticModel.Compilation.GetReactiveUiIntegration(), out var outputScheduler); + var integration = context.SemanticModel.Compilation.GetReactiveUiIntegration(); + TryGetScheduler(methodSymbol, attributeData, OutputScheduler, integration, out var outputScheduler); token.ThrowIfCancellationRequested(); - var runInBackground = attributeData.GetNamedArgument(RunInBackground); + TryGetScheduler(methodSymbol, attributeData, BackgroundScheduler, integration, out var backgroundScheduler); + var runInBackground = backgroundScheduler is not null || attributeData.GetNamedArgument(RunInBackground); token.ThrowIfCancellationRequested(); var accessModifier = GetAccessModifier(attributeData); token.ThrowIfCancellationRequested(); @@ -140,6 +151,8 @@ context.TargetSymbol is IMethodSymbol methodSymbol canExecuteTypeInfo, outputScheduler, runInBackground, + backgroundScheduler, + HasTrailingCancellationToken(methodSymbol), forwardedPropertyAttributes, accessModifier, context.TargetNode.HasDocumentationComment() ? GetXmlDocumentation(methodSymbol, token) : string.Empty); @@ -192,6 +205,13 @@ private static ImmutableArray GetCommandParameters(IMethodSymb return builder.ToImmutable(); } + /// Determines whether a command method takes a CancellationToken as its last parameter. + /// The command method. + /// when the last parameter is a CancellationToken. + private static bool HasTrailingCancellationToken(IMethodSymbol methodSymbol) => + !methodSymbol.Parameters.IsEmpty + && methodSymbol.Parameters[methodSymbol.Parameters.Length - 1].Type.ToDisplayString() == "System.Threading.CancellationToken"; + /// Gets the generated command property's access modifier. /// The command attribute. /// The C# access-modifier text. @@ -307,12 +327,55 @@ private static void WriteCommand(SourceWriter writer, CommandInfo commandInfo, R WriteFieldName(writer, methodName, stemStart, stemLength); _ = writer.Append(" ??= ").Append(integration.Namespace).Append('.').Append(ReactiveCommand).Append(GetCommandFactoryMethod(commandInfo)); WriteGenericTypeArguments(writer, commandInfo, inputType, outputType); - _ = writer.Append('(').Append(methodName); + _ = writer.Append('('); + WriteExecuteArgument(writer, commandInfo); WriteCanExecuteArgument(writer, commandInfo); - WriteOutputSchedulerArgument(writer, commandInfo); + WriteSchedulerArguments(writer, commandInfo); _ = writer.Line("); }"); } + /// Writes the execute argument: the method group, or for a background task a lambda starting it on the thread pool. + /// The writer. + /// The command. + /// + /// The lambda's parameters are typed, so it selects the same factory overload the method group would: + /// (T p, CancellationToken ct) => Task.Run(() => M(p, ct), ct). + /// + private static void WriteExecuteArgument(SourceWriter writer, CommandInfo commandInfo) + { + if (!commandInfo.IsTask || !commandInfo.RunInBackground) + { + _ = writer.Append(commandInfo.MethodName); + return; + } + + var hasArgument = commandInfo.ArgumentType is not null; + var hasToken = commandInfo.HasCancellationToken; + _ = writer.Append('('); + if (hasArgument) + { + _ = writer.Append(commandInfo.ArgumentType).Append(" p"); + } + + if (hasToken) + { + _ = writer.Append(hasArgument ? ", " : null).Append(CancellationTokenType).Append(" ct"); + } + + _ = writer.Append(") => ").Append(TaskRun).Append("(() => ").Append(commandInfo.MethodName).Append('('); + if (hasArgument) + { + _ = writer.Append('p'); + } + + if (hasToken) + { + _ = writer.Append(hasArgument ? ", " : null).Append("ct"); + } + + _ = writer.Append(hasToken ? "), ct)" : "))"); + } + /// Writes the closed command type, {namespace}.ReactiveCommand<{input}, {output}>. /// The writer. /// The selected ReactiveUI API surface. @@ -343,19 +406,32 @@ private static void WriteGenericTypeArguments(SourceWriter writer, CommandInfo c _ = writer.Append('>'); } - /// Writes the optional output-scheduler arguments of a command factory call. + /// Writes the optional background- and output-scheduler arguments of a command factory call. /// The writer. /// The command. - private static void WriteOutputSchedulerArgument(SourceWriter writer, CommandInfo commandInfo) + /// + /// CreateRunInBackground takes the background scheduler before the output scheduler, so a synchronous + /// background command names it, as for ReactiveUI's default, whenever either is set. + /// ReactiveUI 24 has no overload taking only the execute delegate and a background scheduler, so that call also + /// names a can-execute, which ReactiveUI 23's all-optional overload accepts too. + /// + private static void WriteSchedulerArguments(SourceWriter writer, CommandInfo commandInfo) { - if (string.IsNullOrEmpty(commandInfo.OutputScheduler)) + var hasOutputScheduler = !string.IsNullOrEmpty(commandInfo.OutputScheduler); + if (commandInfo.RunInBackground && !commandInfo.IsTask && !commandInfo.IsObservable + && (hasOutputScheduler || !string.IsNullOrEmpty(commandInfo.BackgroundScheduler))) { - return; + if (!hasOutputScheduler && string.IsNullOrEmpty(commandInfo.CanExecuteObservableName)) + { + _ = writer.Append(", canExecute: null"); + } + + _ = writer.Append(", backgroundScheduler: ").Append(commandInfo.BackgroundScheduler ?? "null"); } - if (commandInfo.RunInBackground && !commandInfo.IsTask && !commandInfo.IsObservable) + if (!hasOutputScheduler) { - _ = writer.Append(", backgroundScheduler: null"); + return; } _ = writer.Append(", outputScheduler: ").Append(commandInfo.OutputScheduler); @@ -456,36 +532,38 @@ private static void TryGetCanExecuteExpressionType( canExecuteTypeInfo = null; } - /// Gets the configured output scheduler, when its member is valid. + /// Gets a configured scheduler, when its member is valid. /// The attributed command method. /// The command attribute. + /// The attribute property naming the scheduler. /// The selected ReactiveUI API surface. - /// The scheduler expression, when valid. - private static void TryGetOutputScheduler( + /// The scheduler expression, when valid. + private static void TryGetScheduler( IMethodSymbol methodSymbol, AttributeData attributeData, + string argumentName, ReactiveUiIntegration integration, - out string? outputScheduler) + out string? schedulerExpression) { - if (!attributeData.TryGetNamedArgument(OutputScheduler, out string? scheduler) || scheduler is null) + if (!attributeData.TryGetNamedArgument(argumentName, out string? scheduler) || scheduler is null) { - outputScheduler = null; + schedulerExpression = null; return; } if (IsReactiveUiScheduler(scheduler)) { - outputScheduler = scheduler; + schedulerExpression = scheduler; return; } - if (!TryGetSingleMember(methodSymbol.ContainingType!.GetAllMembers(scheduler), out var outputSchedulerSymbol)) + if (!TryGetSingleMember(methodSymbol.ContainingType!.GetAllMembers(scheduler), out var schedulerSymbol)) { - outputScheduler = null; + schedulerExpression = null; return; } - _ = TryGetOutputSchedulerFromSymbol(outputSchedulerSymbol, integration.Api, out outputScheduler); + _ = TryGetSchedulerFromSymbol(schedulerSymbol, integration.Api, out schedulerExpression); } /// Determines whether a scheduler expression names a built-in ReactiveUI scheduler. @@ -518,38 +596,38 @@ private static bool TryGetSingleMember(IEnumerable symbols, [NotNullWhe } /// Validates a candidate scheduler symbol and gets its expression. - /// The candidate scheduler symbol. + /// The candidate scheduler symbol. /// The selected ReactiveUI API. - /// The scheduler expression, when valid. + /// The scheduler expression, when valid. /// when the symbol is a supported scheduler. - private static bool TryGetOutputSchedulerFromSymbol( - ISymbol outputSchedulerSymbol, + private static bool TryGetSchedulerFromSymbol( + ISymbol schedulerSymbol, ReactiveUiApi api, - [NotNullWhen(true)] out string? outputScheduler) + [NotNullWhen(true)] out string? schedulerExpression) { - switch (outputSchedulerSymbol) + switch (schedulerSymbol) { case IFieldSymbol fieldSymbol when fieldSymbol.Type.IsSchedulerType(api): { - outputScheduler = fieldSymbol.Name; + schedulerExpression = fieldSymbol.Name; return true; } case IPropertySymbol { GetMethod: not null } propertySymbol when propertySymbol.Type.IsSchedulerType(api): { - outputScheduler = propertySymbol.Name; + schedulerExpression = propertySymbol.Name; return true; } case IMethodSymbol methodSymbol when methodSymbol.ReturnType.IsSchedulerType(api): { - outputScheduler = $"{methodSymbol.Name}()"; + schedulerExpression = $"{methodSymbol.Name}()"; return true; } default: { - outputScheduler = null; + schedulerExpression = null; return false; } } diff --git a/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUiV23CompatibilityTests.cs b/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUiV23CompatibilityTests.cs index bf9b0e6c..6c0a8738 100644 --- a/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUiV23CompatibilityTests.cs +++ b/src/ReactiveUI.SourceGenerators.V23.Tests/ReactiveUiV23CompatibilityTests.cs @@ -20,6 +20,62 @@ public sealed class ReactiveUiV23CompatibilityTests /// The ReactiveUI package version intentionally covered by this project. private const string ExpectedReactiveUiVersion = "23.2.28"; + /// The consumer source compiled against ReactiveUI 23. + private const string ConsumerSource = """ + using System; + using System.Reactive.Concurrency; + using System.Reactive.Linq; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + + namespace Compatibility; + + public partial class ViewModel : ReactiveObject + { + private IObservable CanRefresh => Observable.Return(true); + + private static IScheduler Scheduler => ImmediateScheduler.Instance; + + [Reactive] + private string? _name; + + [ReactiveCommand] + private void Save() + { + } + + [ReactiveCommand(RunInBackground = true)] + private void Refresh() + { + } + + [ReactiveCommand(RunInBackground = true, CanExecute = nameof(CanRefresh))] + private void ConditionalRefresh() + { + } + + [ReactiveCommand(RunInBackground = true, OutputScheduler = nameof(Scheduler))] + private void ScheduledRefresh() + { + } + + [ReactiveCommand( + RunInBackground = true, + CanExecute = nameof(CanRefresh), + OutputScheduler = nameof(Scheduler))] + private int Recalculate() => 42; + + [ReactiveCommand(BackgroundScheduler = nameof(Scheduler))] + private void Pooled() + { + } + + [ReactiveCommand(RunInBackground = true)] + private System.Threading.Tasks.Task FetchAsync(int value, System.Threading.CancellationToken token) => + System.Threading.Tasks.Task.FromResult(value); + } + """; + /// ReactiveUI 23 produces compilable legacy command output. /// A task representing the asynchronous assertion work. [Test] @@ -52,6 +108,9 @@ await Assert.That(generatedSource.Contains( await Assert.That(generatedSource.Contains( "ReactiveCommand.CreateRunInBackground(Recalculate, CanRefresh, backgroundScheduler: null, outputScheduler: Scheduler)", StringComparison.Ordinal)).IsTrue(); + await Assert.That(generatedSource).Contains("ReactiveCommand.CreateRunInBackground(Pooled, canExecute: null, backgroundScheduler: Scheduler)"); + await Assert.That(generatedSource).Contains( + "ReactiveCommand.CreateFromTask((int p, global::System.Threading.CancellationToken ct) => global::System.Threading.Tasks.Task.Run(() => FetchAsync(p, ct), ct))"); await Assert.That(errors).IsEmpty(); } @@ -60,55 +119,10 @@ await Assert.That(generatedSource.Contains( /// The consumer compilation. private static CSharpCompilation CreateCompilation(Assembly reactiveUiAssembly) { - const string source = """ - using System; - using System.Reactive.Concurrency; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace Compatibility; - - public partial class ViewModel : ReactiveObject - { - private IObservable CanRefresh => Observable.Return(true); - - private static IScheduler Scheduler => ImmediateScheduler.Instance; - - [Reactive] - private string? _name; - - [ReactiveCommand] - private void Save() - { - } - - [ReactiveCommand(RunInBackground = true)] - private void Refresh() - { - } - - [ReactiveCommand(RunInBackground = true, CanExecute = nameof(CanRefresh))] - private void ConditionalRefresh() - { - } - - [ReactiveCommand(RunInBackground = true, OutputScheduler = nameof(Scheduler))] - private void ScheduledRefresh() - { - } - - [ReactiveCommand( - RunInBackground = true, - CanExecute = nameof(CanRefresh), - OutputScheduler = nameof(Scheduler))] - private int Recalculate() => 42; - } - """; var parseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13); return CSharpCompilation.Create( "ReactiveUiV23Consumer", - [CSharpSyntaxTree.ParseText(SourceText.From(source), parseOptions)], + [CSharpSyntaxTree.ParseText(SourceText.From(ConsumerSource), parseOptions)], CreateReferences(reactiveUiAssembly), new(OutputKind.DynamicallyLinkedLibrary)); } diff --git a/src/ReactiveUI.SourceGenerators/ReactiveCommandAttribute.cs b/src/ReactiveUI.SourceGenerators/ReactiveCommandAttribute.cs index 10356e98..7e4256ac 100644 --- a/src/ReactiveUI.SourceGenerators/ReactiveCommandAttribute.cs +++ b/src/ReactiveUI.SourceGenerators/ReactiveCommandAttribute.cs @@ -18,10 +18,21 @@ public sealed class ReactiveCommandAttribute : Attribute /// Gets or sets the scheduler the command delivers its results on. public string? OutputScheduler { get; set; } - /// Gets or sets a value indicating whether a synchronous method runs on ReactiveUI's background scheduler. - /// to create the command with ReactiveCommand.CreateRunInBackground. + /// Gets or sets a value indicating whether the command runs its method off the calling thread. + /// + /// to create a synchronous method's command with ReactiveCommand.CreateRunInBackground, + /// and to start a task-returning method with Task.Run. Observable-returning methods are unaffected. + /// public bool RunInBackground { get; set; } + /// Gets or sets the scheduler a synchronous method runs on in the background. + /// + /// A scheduler member of the containing type, or a built-in ReactiveUI scheduler. Setting it implies + /// ; when it is not set, ReactiveUI's background scheduler is used. A task-returning + /// method always starts on the thread pool. + /// + public string? BackgroundScheduler { get; set; } + /// Gets or sets the accessibility of the generated command property. public PropertyAccessModifier AccessModifier { get; set; } } From f4a0c8b6124b4998b493de1281eddc22f1f88817 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 16:23:59 +1000 Subject: [PATCH 4/4] test: cover the public attributes' constructors and accessors The generators read the attributes from source and a consuming assembly never instantiates them, so no generator test ran their constructors. The tests construct each attribute and check what it holds. --- .../UnitTests/AttributeTests.cs | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/AttributeTests.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/AttributeTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/AttributeTests.cs new file mode 100644 index 00000000..6d353d7a --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/AttributeTests.cs @@ -0,0 +1,85 @@ +// Copyright (c) 2019-2026 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using ReactiveUI.SourceGenerators.WinForms; + +namespace ReactiveUI.SourceGenerator.Tests; + +/// +/// Tests that the public attributes hold what they are given. The generators read the attributes from source, so these +/// are the only callers of their constructors and accessors. +/// +public class AttributeTests +{ + /// The base type named by the host attributes. + private const string HostBaseType = "System.Windows.Forms.UserControl"; + + /// [Reactive] keeps its extra notifications and its options. + /// A task to monitor the async. + [Test] + public async Task ReactiveAttributeHoldsItsArguments() + { + var attribute = new ReactiveAttribute("First", "Second") { SetModifier = AccessModifier.Protected, Inheritance = InheritanceModifier.Virtual, UseRequired = true }; + + await Assert.That(attribute.AlsoNotify).IsEquivalentTo(["First", "Second"]); + await Assert.That(attribute.SetModifier).IsEqualTo(AccessModifier.Protected); + await Assert.That(attribute.Inheritance).IsEqualTo(InheritanceModifier.Virtual); + await Assert.That(attribute.UseRequired).IsTrue(); + } + + /// [Reactive] without arguments notifies no other property. + /// A task to monitor the async. + [Test] + public async Task ReactiveAttributeWithoutArgumentsHasNoExtraNotifications() => + await Assert.That(new ReactiveAttribute().AlsoNotify).IsEmpty(); + + /// [ReactiveCommand] keeps its options. + /// A task to monitor the async. + [Test] + public async Task ReactiveCommandAttributeHoldsItsOptions() + { + var attribute = new ReactiveCommandAttribute + { + CanExecute = "CanRun", + OutputScheduler = "Output", + RunInBackground = true, + BackgroundScheduler = "Background", + AccessModifier = PropertyAccessModifier.Internal, + }; + + await Assert.That(attribute.CanExecute).IsEqualTo("CanRun"); + await Assert.That(attribute.OutputScheduler).IsEqualTo("Output"); + await Assert.That(attribute.RunInBackground).IsTrue(); + await Assert.That(attribute.BackgroundScheduler).IsEqualTo("Background"); + await Assert.That(attribute.AccessModifier).IsEqualTo(PropertyAccessModifier.Internal); + } + + /// [BindableDerivedList] keeps its access modifier. + /// A task to monitor the async. + [Test] + public async Task BindableDerivedListAttributeHoldsItsAccessModifier() => + await Assert.That(new BindableDerivedListAttribute { AccessModifier = PropertyAccessModifier.Private }.AccessModifier) + .IsEqualTo(PropertyAccessModifier.Private); + + /// The attributes that take no arguments can be applied. + /// A task to monitor the async. + [Test] + public async Task ArgumentlessAttributesCanBeCreated() + { + await Assert.That(new ReactiveCollectionAttribute()).IsNotNull(); + await Assert.That(new IReactiveObjectAttribute()).IsNotNull(); + } + + /// [ViewModelControlHost] keeps the base type it names. + /// A task to monitor the async. + [Test] + public async Task ViewModelControlHostAttributeHoldsItsBaseType() => + await Assert.That(new ViewModelControlHostAttribute(HostBaseType).BaseType).IsEqualTo(HostBaseType); + + /// [RoutedControlHost] keeps the base type it names. + /// A task to monitor the async. + [Test] + public async Task RoutedControlHostAttributeHoldsItsBaseType() => + await Assert.That(new RoutedControlHostAttribute(HostBaseType).BaseType).IsEqualTo(HostBaseType); +}