From 74882b332ca3912feb6d0ae2a8dd2b81b248a9ae Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Fri, 25 Sep 2026 23:09:50 +1000 Subject: [PATCH 01/30] chore: ignore Claude Code workspace folders --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index dfcfd56f..a8679d30 100644 --- a/.gitignore +++ b/.gitignore @@ -348,3 +348,6 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ + +# Claude Code local workspace +.claude/ From 83d1edd1b37e021b39467a59c88c990626afabbb Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 00:48:28 +1000 Subject: [PATCH 02/30] test: add generator benchmarks with EventPipe allocation tracing --- src/Directory.Packages.props | 1 + src/ReactiveUI.SourceGenerators.slnx | 3 + src/benchmarks/.editorconfig | 8 + .../GenerationBenchmarks.cs | 59 +++++++ .../Mocks/BindableDerivedList.cs | 17 +++ .../Mocks/IViewFor.cs | 27 ++++ .../Mocks/Reactive.cs | 73 +++++++++ .../Mocks/ReactiveCollection.cs | 17 +++ .../Mocks/ReactiveCommand.cs | 42 +++++ .../Mocks/ReactiveObject.cs | 24 +++ .../Mocks/RoutedControlHost.cs | 14 ++ .../Mocks/Stubs.cs | 64 ++++++++ .../Mocks/ViewModelControlHost.cs | 14 ++ .../Program.cs | 63 ++++++++ ...ctiveUI.SourceGenerators.Benchmarks.csproj | 36 +++++ .../Support/GeneratorCatalog.cs | 62 ++++++++ .../Support/GeneratorHarness.cs | 144 ++++++++++++++++++ 17 files changed, 668 insertions(+) create mode 100644 src/benchmarks/.editorconfig create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/GenerationBenchmarks.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/BindableDerivedList.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/IViewFor.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Reactive.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveCollection.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveCommand.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveObject.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/RoutedControlHost.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Stubs.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ViewModelControlHost.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Program.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorCatalog.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index b548c23c..c75a3c41 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -38,6 +38,7 @@ + diff --git a/src/ReactiveUI.SourceGenerators.slnx b/src/ReactiveUI.SourceGenerators.slnx index d90f297c..927f0d7a 100644 --- a/src/ReactiveUI.SourceGenerators.slnx +++ b/src/ReactiveUI.SourceGenerators.slnx @@ -1,4 +1,7 @@ + + + diff --git a/src/benchmarks/.editorconfig b/src/benchmarks/.editorconfig new file mode 100644 index 00000000..94936343 --- /dev/null +++ b/src/benchmarks/.editorconfig @@ -0,0 +1,8 @@ +[*.cs] + +################### +# Benchmark harness relaxations +# +# The benchmark host is a console tool: it reports to the console rather than through a logging abstraction. +################### +dotnet_diagnostic.SST1449.severity = none # Console output is the harness's report diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/GenerationBenchmarks.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/GenerationBenchmarks.cs new file mode 100644 index 00000000..fec0ece8 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/GenerationBenchmarks.cs @@ -0,0 +1,59 @@ +// 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 BenchmarkDotNet.Attributes; +using Microsoft.CodeAnalysis; +using ReactiveUI.SourceGenerators.Benchmarks.Support; + +namespace ReactiveUI.SourceGenerators.Benchmarks; + +/// Measures a cold generation pass over a mock consumer corpus. +/// +/// The driver is rebuilt per iteration so each measurement is a cold generation, which is what a consumer's build +/// pays. A reused driver would serve the next iteration from its incremental caches. +/// +public class GenerationBenchmarks +{ + /// How many times each mock file is repeated, each copy in its own namespace. + private const int Copies = 20; + + /// The mock consumer compilation, built once per parameter set. + private Compilation _compilation = null!; + + /// Gets the corpus names. + public static IEnumerable Corpora => GeneratorCatalog.Corpora; + + /// Gets or sets the corpus: one generator's mock file, or every mock file. + [ParamsSource(nameof(Corpora))] + public string Corpus { get; set; } = GeneratorHarness.AllCorpus; + + /// Builds the mock consumer compilation once per parameter set. + [GlobalSetup] + public void Setup() => _compilation = GeneratorHarness.BuildCompilation(Corpus, Copies); + + /// 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. + [Benchmark] + public int Generate() + { + var result = GeneratorHarness.CreateDriver(Corpus).RunGenerators(_compilation).GetRunResult(); + + var characters = 0; + var files = 0; + foreach (var generator in result.Results) + { + foreach (var generated in generator.GeneratedSources) + { + characters += generated.SourceText.Length; + files++; + } + } + + // 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/Mocks/BindableDerivedList.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/BindableDerivedList.cs new file mode 100644 index 00000000..5afb35ca --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/BindableDerivedList.cs @@ -0,0 +1,17 @@ +using System.Collections.ObjectModel; +using ReactiveUI.Reactive; +using ReactiveUI.SourceGenerators; + +namespace Mocks.BindableDerivedList__N__; + +public partial class ListViewModel : ReactiveObject +{ + [BindableDerivedList] + private readonly ReadOnlyObservableCollection? _names; + + [BindableDerivedList(AccessModifier = PropertyAccessModifier.Internal)] + private readonly ReadOnlyObservableCollection? _numbers; + + [BindableDerivedList] + private readonly ReadOnlyObservableCollection? _children; +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/IViewFor.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/IViewFor.cs new file mode 100644 index 00000000..cc67792f --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/IViewFor.cs @@ -0,0 +1,27 @@ +using ReactiveUI.Reactive; +using ReactiveUI.SourceGenerators; + +namespace Mocks.IViewFor__N__; + +public sealed class LoginViewModel : ReactiveObject +{ +} + +public sealed class DashboardViewModel : ReactiveObject +{ +} + +[IViewFor] +public partial class LoginView : System.Windows.Controls.UserControl +{ +} + +[IViewFor] +public partial class DashboardView : System.Windows.Forms.UserControl +{ +} + +[IViewFor("Mocks.IViewFor__N__.LoginViewModel")] +public partial class LoginWindow : System.Windows.Window +{ +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Reactive.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Reactive.cs new file mode 100644 index 00000000..b940356d --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Reactive.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using ReactiveUI.Reactive; +using ReactiveUI.SourceGenerators; + +namespace Mocks.Reactive__N__; + +/// A view model with field and partial-property reactive members. +public partial class PersonViewModel : ReactiveObject +{ + [Reactive] + private string _firstName = string.Empty; + + [Reactive(nameof(FullName))] + private string _lastName = string.Empty; + + [Reactive(SetModifier = AccessModifier.Protected)] + private int _age; + + [Reactive(Inheritance = InheritanceModifier.Virtual)] + private double? _height; + + [Reactive] + private List? _tags; + + [Reactive] + private DateTimeOffset _updated; + + public string FullName => FirstName + " " + LastName; + + /// Gets or sets the nickname. + [Reactive] + public partial string? Nickname { get; set; } + + [Reactive] + public partial int Score { get; protected set; } + + [Reactive("Summary")] + public partial bool IsActive { get; set; } + + public string Summary => IsActive ? FullName : string.Empty; +} + +public partial class AddressViewModel : ReactiveObject +{ + [Reactive] + private string? _street; + + [Reactive] + private string? _city; + + [Reactive] + private string? _postCode; + + [Reactive] + public partial string? Country { get; set; } + + public partial class Nested : ReactiveObject + { + [Reactive] + private int _level; + } +} + +public partial class GenericViewModel : ReactiveObject + where T : class +{ + [Reactive] + private T? _value; + + [Reactive] + public partial IReadOnlyList? Items { get; set; } +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveCollection.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveCollection.cs new file mode 100644 index 00000000..4da0bbcd --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveCollection.cs @@ -0,0 +1,17 @@ +using System.Collections.ObjectModel; +using ReactiveUI.Reactive; +using ReactiveUI.SourceGenerators; + +namespace Mocks.ReactiveCollection__N__; + +public partial class CollectionViewModel : ReactiveObject +{ + [ReactiveCollection] + private ObservableCollection _names = []; + + [ReactiveCollection] + private ObservableCollection _numbers = []; + + [ReactiveCollection] + private ObservableCollection? _children; +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveCommand.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveCommand.cs new file mode 100644 index 00000000..75a4b6fb --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveCommand.cs @@ -0,0 +1,42 @@ +using System; +using System.Reactive.Linq; +using System.Threading; +using System.Threading.Tasks; +using ReactiveUI.Reactive; +using ReactiveUI.SourceGenerators; + +namespace Mocks.ReactiveCommand__N__; + +public partial class CommandsViewModel : ReactiveObject +{ + private readonly IObservable _canSave = Observable.Return(true); + + [ReactiveCommand] + private void Refresh() + { + } + + [ReactiveCommand] + private int Add(int value) => value + 1; + + [ReactiveCommand(CanExecute = nameof(_canSave))] + private Task SaveAsync() => Task.CompletedTask; + + [ReactiveCommand] + private Task LoadAsync(string key, CancellationToken token) => Task.FromResult(key); + + [ReactiveCommand] + private IObservable Stream(double seed) => Observable.Return(seed); + + [ReactiveCommand(OutputScheduler = "RxSchedulers.MainThreadScheduler")] + private string Format(int value) => value.ToString(); + + [ReactiveCommand(AccessModifier = PropertyAccessModifier.Internal)] + private void Reset() + { + } + + [ReactiveCommand] + [property: System.ComponentModel.Description("delete")] + private async Task DeleteAsync(int id, CancellationToken token) => await Task.Delay(id, token); +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveObject.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveObject.cs new file mode 100644 index 00000000..d30ebe7c --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ReactiveObject.cs @@ -0,0 +1,24 @@ +using System.ComponentModel; +using ReactiveUI.SourceGenerators; + +namespace Mocks.ReactiveObject__N__; + +[IReactiveObject] +public partial class PlainObject +{ + [Reactive] + private string? _name; + + [Reactive] + private int _count; + + [Reactive] + public partial bool Enabled { get; set; } +} + +[IReactiveObject] +public partial class Settings +{ + [Reactive] + private double _volume; +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/RoutedControlHost.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/RoutedControlHost.cs new file mode 100644 index 00000000..a555429e --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/RoutedControlHost.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; +using ReactiveUI.SourceGenerators.WinForms; + +namespace Mocks.RoutedControlHost__N__; + +[RoutedControlHost("System.Windows.Forms.UserControl")] +public partial class RouterControl +{ + private IContainer? components; + + private void InitializeComponent() + { + } +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Stubs.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Stubs.cs new file mode 100644 index 00000000..1ec676ff --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Stubs.cs @@ -0,0 +1,64 @@ +// Stand-ins for the WPF and WinForms types the view mocks derive from, so the corpus compiles on every OS. +namespace System.Windows +{ + public class DependencyProperty + { + public static DependencyProperty Register(string name, global::System.Type propertyType, global::System.Type ownerType, PropertyMetadata typeMetadata) => null!; + } + public class PropertyMetadata + { + public PropertyMetadata(object? defaultValue) { } + } + public class DependencyObject + { + public object GetValue(DependencyProperty dp) => null!; + public void SetValue(DependencyProperty dp, object value) { } + } + public class UIElement : DependencyObject { } + public class FrameworkElement : UIElement { } + public class Window : FrameworkElement { } +} +namespace System.Windows.Controls +{ + public class UserControl : System.Windows.FrameworkElement { } + public class Page : System.Windows.FrameworkElement { } +} +namespace System.Windows.Forms +{ + public enum DockStyle + { + None, + Fill, + } + + public class Control : global::System.ComponentModel.Component + { + public ControlCollection Controls { get; } = new(); + public DockStyle Dock { get; set; } + public void SuspendLayout() { } + public void ResumeLayout() { } + } + + public sealed class ControlCollection : global::System.Collections.Generic.IEnumerable + { + private readonly global::System.Collections.Generic.List controls = new(); + + public int Count => controls.Count; + public void Add(Control control) => controls.Add(control); + public void Clear() => controls.Clear(); + public void Remove(Control? control) + { + if (control is not null) + { + controls.Remove(control); + } + } + + public global::System.Collections.Generic.IEnumerator GetEnumerator() => controls.GetEnumerator(); + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public class Form : Control { } + public class UserControl : Control { } +} + diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ViewModelControlHost.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ViewModelControlHost.cs new file mode 100644 index 00000000..e0df9504 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/ViewModelControlHost.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; +using ReactiveUI.SourceGenerators.WinForms; + +namespace Mocks.ViewModelControlHost__N__; + +[ViewModelControlHost("System.Windows.Forms.UserControl")] +public partial class HostControl +{ + private IContainer? components; + + private void InitializeComponent() + { + } +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Program.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Program.cs new file mode 100644 index 00000000..ccc39e13 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Program.cs @@ -0,0 +1,63 @@ +// 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.Diagnostics.Tracing; +using BenchmarkDotNet.Configs; +using BenchmarkDotNet.Diagnosers; +using BenchmarkDotNet.Running; +using Microsoft.Diagnostics.NETCore.Client; +using Microsoft.Diagnostics.Tracing.Parsers; +using ReactiveUI.SourceGenerators.Benchmarks.Support; + +namespace ReactiveUI.SourceGenerators.Benchmarks; + +/// Entry point that hands the command line to the BenchmarkDotNet switcher. +internal static class Program +{ + /// The environment variable that turns the EventPipe profiler off when set to false. + private const string ProfilersVariable = "BENCHMARK_PROFILERS"; + + /// Runs the benchmarks the command line selects, or --smoke to run each corpus once. + /// The command-line arguments. + internal static void Main(string[] args) + { + if (args is ["--smoke"]) + { + // Runs each corpus once outside BenchmarkDotNet, to prove the mocks still generate before a long run. + foreach (var corpus in GeneratorCatalog.Corpora) + { + var benchmark = new GenerationBenchmarks { Corpus = corpus }; + benchmark.Setup(); + Console.WriteLine($"{corpus}: {benchmark.Generate():N0} characters, {GeneratorHarness.CountErrors(corpus)} compile errors"); + } + + return; + } + + _ = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, CreateConfig()); + } + + /// Creates the run configuration. + /// The memory diagnoser, plus an EventPipe trace per benchmark unless profiling is turned off. + /// + /// The trace carries verbose GC events, whose AllocationTick events name the allocated type and its call stack, + /// and CPU samples. The traces land in BenchmarkDotNet.Artifacts and are summarised with nettrace-analyzer.cs. + /// + private static ManualConfig CreateConfig() + { + var config = ManualConfig.Create(DefaultConfig.Instance).AddDiagnoser(MemoryDiagnoser.Default); + if (string.Equals(Environment.GetEnvironmentVariable(ProfilersVariable), "false", StringComparison.OrdinalIgnoreCase)) + { + return config; + } + + EventPipeProvider[] providers = + [ + new("Microsoft-DotNETCore-SampleProfiler", EventLevel.Informational), + new(ClrTraceEventParser.ProviderName, EventLevel.Verbose, (long)(ClrTraceEventParser.Keywords.Default | ClrTraceEventParser.Keywords.GCHandle)), + ]; + + return config.AddDiagnoser(new EventPipeProfiler(EventPipeProfile.GcVerbose, providers)); + } +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj new file mode 100644 index 00000000..b0a1980e --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj @@ -0,0 +1,36 @@ + + + + net10.0 + Exe + false + enable + enable + + $(NoWarn);CA1515;CA1822;CA1001 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorCatalog.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorCatalog.cs new file mode 100644 index 00000000..464af29c --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorCatalog.cs @@ -0,0 +1,62 @@ +// 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 Microsoft.CodeAnalysis; +using ReactiveUI.SourceGenerators.WinForms; + +namespace ReactiveUI.SourceGenerators.Benchmarks.Support; + +/// Names the generators the package ships and the mock corpus each one reads. +internal static class GeneratorCatalog +{ + /// Gets the corpus names, one per generator, each matching a file in the mocks folder. + internal static IEnumerable Corpora => + [ + "Reactive", + "ReactiveCommand", + "ReactiveObject", + "BindableDerivedList", + "ReactiveCollection", + "IViewFor", + "ViewModelControlHost", + "RoutedControlHost", + GeneratorHarness.AllCorpus, + ]; + + /// Creates the generators a corpus exercises: its own generator, or every generator for the whole corpus. + /// The corpus name. + /// The generators. + /// + /// always runs, because it injects the modifier enums the other attributes take. + /// No other corpus marks a member [Reactive], so it adds only its fixed cost. + /// + internal static ISourceGenerator[] Create(string corpus) => + corpus switch + { + "Reactive" => [new ReactiveGenerator().AsSourceGenerator()], + "ReactiveCommand" => [new ReactiveGenerator().AsSourceGenerator(), new ReactiveCommandGenerator().AsSourceGenerator()], + "ReactiveObject" => [new ReactiveGenerator().AsSourceGenerator(), new ReactiveObjectGenerator().AsSourceGenerator()], + "BindableDerivedList" => [new ReactiveGenerator().AsSourceGenerator(), new BindableDerivedListGenerator().AsSourceGenerator()], + "ReactiveCollection" => [new ReactiveGenerator().AsSourceGenerator(), new ReactiveCollectionGenerator().AsSourceGenerator()], + "IViewFor" => [new ReactiveGenerator().AsSourceGenerator(), new IViewForGenerator().AsSourceGenerator()], + "ViewModelControlHost" => [new ReactiveGenerator().AsSourceGenerator(), new ViewModelControlHostGenerator().AsSourceGenerator()], + "RoutedControlHost" => [new ReactiveGenerator().AsSourceGenerator(), new RoutedControlHostGenerator().AsSourceGenerator()], + _ => Create(), + }; + + /// Creates every generator the package ships. + /// The generators. + internal static ISourceGenerator[] Create() => + [ + new ReactiveGenerator().AsSourceGenerator(), + new ReactiveCommandGenerator().AsSourceGenerator(), + new ObservableAsPropertyGenerator().AsSourceGenerator(), + new ReactiveObjectGenerator().AsSourceGenerator(), + new BindableDerivedListGenerator().AsSourceGenerator(), + new ReactiveCollectionGenerator().AsSourceGenerator(), + new IViewForGenerator().AsSourceGenerator(), + new ViewModelControlHostGenerator().AsSourceGenerator(), + new RoutedControlHostGenerator().AsSourceGenerator(), + ]; +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs new file mode 100644 index 00000000..51d57e54 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs @@ -0,0 +1,144 @@ +// 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.Reflection; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; + +namespace ReactiveUI.SourceGenerators.Benchmarks.Support; + +/// Builds the compilation and the generator driver the generation benchmarks run. +internal static class GeneratorHarness +{ + /// The corpus name that selects every mock file. + internal const string AllCorpus = "All"; + + /// The folder beside the benchmark assembly that holds the mock consumer source. + private const string MocksFolder = "Mocks"; + + /// The token in a mock file that each copy replaces with its own index. + private const string IndexToken = "__N__"; + + /// The parse options every benchmark compilation uses. + private static readonly CSharpParseOptions ParseOptions = new(LanguageVersion.CSharp13); + + /// The metadata references for the mock consumer, resolved once per process. + private static readonly Lazy> References = new(CreateReferences); + + /// Builds a compilation over the mock consumer source copied beside the benchmark assembly. + /// The mock file name without extension, or for every mock file. + /// How many times each mock file is repeated, each copy in its own namespace. + /// The compilation. + internal static CSharpCompilation BuildCompilation(string corpus, int copies) + { + var paths = Directory.GetFiles(Path.Combine(AppContext.BaseDirectory, MocksFolder), "*.cs"); + Array.Sort(paths, StringComparer.Ordinal); + + var syntaxTrees = new List(); + foreach (var path in paths) + { + var name = Path.GetFileNameWithoutExtension(path); + if (corpus != AllCorpus && !string.Equals(name, corpus, StringComparison.Ordinal) && !string.Equals(name, "Stubs", StringComparison.Ordinal)) + { + continue; + } + + var template = File.ReadAllText(path); + if (!template.Contains(IndexToken, StringComparison.Ordinal)) + { + syntaxTrees.Add(CSharpSyntaxTree.ParseText(template, ParseOptions, path)); + continue; + } + + for (var i = 0; i < copies; i++) + { + var text = template.Replace(IndexToken, i.ToString(System.Globalization.CultureInfo.InvariantCulture), StringComparison.Ordinal); + syntaxTrees.Add(CSharpSyntaxTree.ParseText(text, ParseOptions, $"{name}{i}.cs")); + } + } + + return CSharpCompilation.Create( + "Mocks", + syntaxTrees, + References.Value, + new(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable)); + } + + /// Creates a cold generator driver for a corpus, carrying no caches from a previous run. + /// The corpus whose generators the driver runs. + /// The generator driver. + internal static GeneratorDriver CreateDriver(string corpus) => + CSharpGeneratorDriver.Create( + GeneratorCatalog.Create(corpus), + parseOptions: ParseOptions); + + /// Generates over a corpus and counts the errors in the resulting compilation, printing each one. + /// The corpus name. + /// The number of errors. + internal static int CountErrors(string corpus) + { + _ = CreateDriver(corpus).RunGeneratorsAndUpdateCompilation(BuildCompilation(corpus, 1), out var output, out _); + var errors = 0; + foreach (var diagnostic in output.GetDiagnostics()) + { + if (diagnostic.Severity == DiagnosticSeverity.Error) + { + errors++; + Console.WriteLine($" {diagnostic}"); + } + } + + return errors; + } + + /// Creates the metadata references for the mock consumer: the runtime plus ReactiveUI and its dependencies. + /// The references. + private static List CreateReferences() + { + var visited = new HashSet(StringComparer.OrdinalIgnoreCase); + var references = new List(); + Assembly[] seeds = + [ + typeof(object).Assembly, + typeof(Enumerable).Assembly, + typeof(System.ComponentModel.INotifyPropertyChanged).Assembly, + typeof(ReactiveUI.Reactive.ReactiveObject).Assembly, + typeof(System.Reactive.Unit).Assembly, + typeof(DynamicData.SourceList<>).Assembly, + typeof(Splat.Locator).Assembly, + ]; + + foreach (var seed in seeds) + { + AddTransitive(seed, visited, references); + } + + return references; + } + + /// Adds an assembly and its loadable references to the reference list. + /// The assembly. + /// The assembly locations already added. + /// The references to add to. + private static void AddTransitive(Assembly assembly, HashSet visited, List references) + { + if (assembly.IsDynamic || string.IsNullOrEmpty(assembly.Location) || !visited.Add(assembly.Location)) + { + return; + } + + references.Add(MetadataReference.CreateFromFile(assembly.Location)); + foreach (var name in assembly.GetReferencedAssemblies()) + { + try + { + AddTransitive(Assembly.Load(name), visited, references); + } + catch (FileNotFoundException) + { + // A facade the runtime does not ship is not needed by the mocks. + } + } + } +} From b20ee61a8e55af85b0008738b885858736341371 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:01:18 +1000 Subject: [PATCH 03/30] test: host the generator benchmarks on current Roslyn against the Roslyn 5.0 band --- .gitignore | 4 ++++ src/Directory.Packages.props | 2 +- src/benchmarks/Directory.Packages.props | 9 +++++++++ .../ReactiveUI.SourceGenerators.Benchmarks.csproj | 6 +++--- 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 src/benchmarks/Directory.Packages.props diff --git a/.gitignore b/.gitignore index a8679d30..e95da353 100644 --- a/.gitignore +++ b/.gitignore @@ -351,3 +351,7 @@ MigrationBackup/ # Claude Code local workspace .claude/ + +# BenchmarkDotNet +**/.bdn/ +**/BenchmarkDotNet.Artifacts/ diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index c75a3c41..7ff5bfdb 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -14,7 +14,7 @@ - + diff --git a/src/benchmarks/Directory.Packages.props b/src/benchmarks/Directory.Packages.props new file mode 100644 index 00000000..950cb65b --- /dev/null +++ b/src/benchmarks/Directory.Packages.props @@ -0,0 +1,9 @@ + + + + + + 5.9.0 + + diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj index b0a1980e..c38853e1 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj @@ -12,8 +12,8 @@ - - + + @@ -25,7 +25,7 @@ measurement covers the generator rather than whatever the host build decides to do with it. --> - + From 3f3cbfc665ac519bad2dfd325f5e3b9686ce9ff7 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:01:18 +1000 Subject: [PATCH 04/30] feat!: remove [ObservableAsProperty] and IViewFor view registration, now provided by ReactiveUI.Binding ReactiveUI.Binding ships [ObservableAsProperty] with ToProperty, and a view locator that registers every IViewFor at compile time. The copies here are removed: - the [ObservableAsProperty] generator for fields, methods, observable properties and partial properties, with InitializeOAPH - RXUISG0014, RXUISG0017 and the RXUISPR0002 suppressor; RXUISPR0003 now covers [ReactiveCommand] only - RegisterViewsForViewModelsSourceGenerated, the RegistrationType and ViewModelRegistrationType options, and SplatRegistrationType RXUISG0012 and RXUISG0013 were reported for an invalid forwarded attribute by every generator; they keep their IDs with a generic message. The examples write ObservableAsPropertyHelper by hand and register views with Splat, with notes pointing at ReactiveUI.Binding. --- ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 25 - ...Generators.IViewForAttribute.g.verified.cs | 60 -- ...pts#TestNs.FullView.IViewFor.g.verified.cs | 35 - ...UISourceGeneratorsExtensions.g.verified.cs | 24 - ...Generators.IViewForAttribute.g.verified.cs | 60 -- ...ant#TestNs.TestView.IViewFor.g.verified.cs | 35 - ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 25 - ...Generators.IViewForAttribute.g.verified.cs | 60 -- ...ion#TestNs.TestView.IViewFor.g.verified.cs | 35 - ...UISourceGeneratorsExtensions.g.verified.cs | 24 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 24 - ...Generators.IViewForAttribute.g.verified.cs | 60 -- ...gle#TestNs.TestView.IViewFor.g.verified.cs | 35 - ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...UISourceGeneratorsExtensions.g.verified.cs | 24 - ...Generators.IViewForAttribute.g.verified.cs | 60 -- ...Req#TestNs.TestView.IViewFor.g.verified.cs | 35 - ...UISourceGeneratorsExtensions.g.verified.cs | 23 - ...Generators.IViewForAttribute.g.verified.cs | 30 +- ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 34 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 34 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 21 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 33 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 40 -- ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 35 - ...ableAsPropertyFromObservable.g.verified.cs | 38 -- ...ableAsPropertyFromObservable.g.verified.cs | 35 - ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 34 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 19 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...nner1.ObservableAsProperties.g.verified.cs | 23 - ...nner3.ObservableAsProperties.g.verified.cs | 26 - ...nner2.ObservableAsProperties.g.verified.cs | 23 - ...estVM.ObservableAsProperties.g.verified.cs | 19 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 19 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 19 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 19 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...evel4.ObservableAsProperties.g.verified.cs | 29 - ...ableAsPropertyFromObservable.g.verified.cs | 41 -- ...evel3.ObservableAsProperties.g.verified.cs | 26 - ...evel2.ObservableAsProperties.g.verified.cs | 23 - ...ableAsPropertyFromObservable.g.verified.cs | 35 - ...evel1.ObservableAsProperties.g.verified.cs | 19 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...cVM`1.ObservableAsProperties.g.verified.cs | 19 - ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ecord.ObservableAsProperties.g.verified.cs | 19 - ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 22 - ...ableAsPropertyFromObservable.g.verified.cs | 34 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 19 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 25 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 19 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 25 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 25 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...estVM.ObservableAsProperties.g.verified.cs | 43 -- ...ableAsPropertyFromObservable.g.verified.cs | 41 -- ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 41 -- ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 41 -- ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 41 -- ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...bservableAsPropertyAttribute.g.verified.cs | 56 -- ...ableAsPropertyFromObservable.g.verified.cs | 31 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...rceGenerators.AccessModifier.g.verified.cs | 8 - ...ors.IReactiveObjectAttribute.g.verified.cs | 19 - ...estNs.TestVM.IReactiveObject.g.verified.cs | 68 -- .../TestHelper.cs | 7 - .../UnitTests/DiagnosticSuppressorTests.cs | 31 +- .../UnitTests/GeneratedOutputCoverageTests.cs | 25 +- .../UnitTests/IViewForGeneratorTests.cs | 32 +- .../OAPFromObservableGeneratorTests.cs | 392 ----------- .../UnitTests/OAPGeneratorTests.cs | 152 ----- .../UnitTests/OapExtTests.cs | 641 ------------------ .../UnitTests/ReactiveUiIntegrationTests.cs | 102 +-- .../UnitTests/RxObjExtTests.cs | 25 - .../UnitTests/ViewForExtTests.cs | 146 +--- .../AnalyzerReleases.Shipped.md | 16 +- .../TestViewModel.cs | 17 +- .../Program.cs | 7 +- .../TestClassOAPH_VM.cs | 41 +- .../TestViewModel.Initialization.cs | 63 +- .../TestViewModel.cs | 164 +++-- .../TestViewWinForms.cs | 2 +- .../TestViewWpf.cs | 2 +- .../TestViewWpf2.cs | 2 +- .../AnalyzerReleases.Shipped.md | 20 +- .../AnalyzerReleases.Unshipped.md | 14 + .../AttributeDefinitions.cs | 153 +---- .../Core/Extensions/ContextExtensions.cs | 4 +- .../Diagnostics/DiagnosticDescriptors.cs | 57 +- .../Diagnostics/SuppressionDescriptors.cs | 8 +- ...esNotNeedToBeStaticDiagnosticSuppressor.cs | 43 -- ...eWithFieldNeverReadDiagnosticSuppressor.cs | 53 -- .../IViewFor/IViewForGenerator.Execute.cs | 176 +---- .../IViewFor/IViewForGenerator.cs | 15 +- .../IViewFor/Models/IViewForInfo.cs | 6 +- .../Models/ObservableFieldInfo.cs | 32 - .../Models/ObservableMethodInfo.cs | 52 -- .../ObservableAsPropertyGenerator.cs | 33 - ...eAsPropertyGenerator{FromField}.Execute.cs | 322 --------- ...bservableAsPropertyGenerator{FromField}.cs | 78 --- ...opertyGenerator{FromObservable}.Execute.cs | 540 --------------- ...ableAsPropertyGenerator{FromObservable}.cs | 78 --- ...activeUI.SourceGenerators.Roslyn.projitems | 9 - .../Support/GeneratorCatalog.cs | 1 - 204 files changed, 301 insertions(+), 8598 deletions(-) delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#TestNs.FullView.IViewFor.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#TestNs.TestView.IViewFor.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#TestNs.TestView.IViewFor.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#TestNs.TestView.IViewFor.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#TestNs.TestView.IViewFor.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrNullRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrNullRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithEmptyStringInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithEmptyStringInitialValue#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithoutInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithoutInitialValue#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithAttr#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithAttr#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3+Level4.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3+Level4.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#TestNs.GenericVM`1.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#TestNs.GenericVM`1.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#TestNs.TestVMRecord.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#TestNs.TestVMRecord.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithArrayTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithArrayTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithCombinedOptions#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithCombinedOptions#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithDelegateTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithDelegateTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithEnumTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithEnumTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithGenericTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithGenericTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInitialValue#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInterfaceTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInterfaceTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNullableTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNullableTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNumericInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNumericInitialValue#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTimeTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTimeTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTupleTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTupleTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#TestNs.TestVM.ObservableAsProperties.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservableMethodWithCustomName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservableMethodWithCustomName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithComplexGenerics#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithComplexGenerics#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithEnum#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithEnum#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithGenericType#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithGenericType#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithInterface#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithInterface#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithTuple#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithTuple#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.WithOap#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.WithOap#TestNs.TestVM.IReactiveObject.g.verified.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/OAPFromObservableGeneratorTests.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/OAPGeneratorTests.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/OapExtTests.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/Suppressions/OAPHMethodDoesNotNeedToBeStaticDiagnosticSuppressor.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/Suppressions/ObservableAsPropertyAttributeWithFieldNeverReadDiagnosticSuppressor.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/Models/ObservableFieldInfo.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/Models/ObservableMethodInfo.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.Execute.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.Execute.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index 08cdb68c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,25 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - resolver.RegisterConstant>(new global::TestNs.FullView()); - resolver.Register(); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs deleted file mode 100644 index ee889df3..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ /dev/null @@ -1,60 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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; - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model, ensure to use the full type name including namespace. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#TestNs.FullView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#TestNs.FullView.IViewFor.g.verified.cs deleted file mode 100644 index a0351071..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.AllRegOpts#TestNs.FullView.IViewFor.g.verified.cs +++ /dev/null @@ -1,35 +0,0 @@ -//HintName: TestNs.FullView.IViewFor.g.cs -// -using ReactiveUI; -using System.Windows; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - /// - /// Partial class for the FullView which contains ReactiveUI IViewFor initialization. - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial class FullView : IViewFor - { - /// - /// The view model dependency property. - /// - public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel), typeof(TestNs.FullViewModel), typeof(FullView), new PropertyMetadata(null)); - - /// - /// Gets the binding root view model. - /// - public TestNs.FullViewModel BindingRoot => ViewModel; - - /// - public TestNs.FullViewModel ViewModel { get => (TestNs.FullViewModel)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (TestNs.FullViewModel)value; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index c6758a7c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,24 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - resolver.RegisterConstant>(new global::TestNs.TestView()); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs deleted file mode 100644 index ee889df3..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ /dev/null @@ -1,60 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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; - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model, ensure to use the full type name including namespace. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#TestNs.TestView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#TestNs.TestView.IViewFor.g.verified.cs deleted file mode 100644 index cf05cbc2..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Constant#TestNs.TestView.IViewFor.g.verified.cs +++ /dev/null @@ -1,35 +0,0 @@ -//HintName: TestNs.TestView.IViewFor.g.cs -// -using ReactiveUI; -using System.Windows; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - /// - /// Partial class for the TestView which contains ReactiveUI IViewFor initialization. - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial class TestView : IViewFor - { - /// - /// The view model dependency property. - /// - public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel), typeof(TestNs.TestViewModel), typeof(TestView), new PropertyMetadata(null)); - - /// - /// Gets the binding root view model. - /// - public TestNs.TestViewModel BindingRoot => ViewModel; - - /// - public TestNs.TestViewModel ViewModel { get => (TestNs.TestViewModel)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (TestNs.TestViewModel)value; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index 9b9b7c89..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,25 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - resolver.RegisterLazySingleton>(() => new global::TestNs.TestView()); - resolver.RegisterLazySingleton(() => new global::TestNs.TestViewModel()); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs deleted file mode 100644 index ee889df3..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ /dev/null @@ -1,60 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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; - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model, ensure to use the full type name including namespace. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#TestNs.TestView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#TestNs.TestView.IViewFor.g.verified.cs deleted file mode 100644 index cf05cbc2..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithViewModelRegistration#TestNs.TestView.IViewFor.g.verified.cs +++ /dev/null @@ -1,35 +0,0 @@ -//HintName: TestNs.TestView.IViewFor.g.cs -// -using ReactiveUI; -using System.Windows; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - /// - /// Partial class for the TestView which contains ReactiveUI IViewFor initialization. - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial class TestView : IViewFor - { - /// - /// The view model dependency property. - /// - public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel), typeof(TestNs.TestViewModel), typeof(TestView), new PropertyMetadata(null)); - - /// - /// Gets the binding root view model. - /// - public TestNs.TestViewModel BindingRoot => ViewModel; - - /// - public TestNs.TestViewModel ViewModel { get => (TestNs.TestViewModel)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (TestNs.TestViewModel)value; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index e8122464..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,24 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - resolver.RegisterLazySingleton>(() => new global::TestNs.View3()); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index 09a9a9f1..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,24 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - resolver.RegisterLazySingleton>(() => new global::TestNs.TestView()); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs deleted file mode 100644 index ee889df3..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ /dev/null @@ -1,60 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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; - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model, ensure to use the full type name including namespace. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#TestNs.TestView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#TestNs.TestView.IViewFor.g.verified.cs deleted file mode 100644 index cf05cbc2..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.LazySingle#TestNs.TestView.IViewFor.g.verified.cs +++ /dev/null @@ -1,35 +0,0 @@ -//HintName: TestNs.TestView.IViewFor.g.cs -// -using ReactiveUI; -using System.Windows; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - /// - /// Partial class for the TestView which contains ReactiveUI IViewFor initialization. - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial class TestView : IViewFor - { - /// - /// The view model dependency property. - /// - public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel), typeof(TestNs.TestViewModel), typeof(TestView), new PropertyMetadata(null)); - - /// - /// Gets the binding root view model. - /// - public TestNs.TestViewModel BindingRoot => ViewModel; - - /// - public TestNs.TestViewModel ViewModel { get => (TestNs.TestViewModel)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (TestNs.TestViewModel)value; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index d5913d0c..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,24 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - resolver.Register, global::TestNs.TestView>(); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs deleted file mode 100644 index ee889df3..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ /dev/null @@ -1,60 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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; - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} - -/// -/// IViewForAttribute. -/// -/// -/// -/// Initializes a new instance of the class. -/// -/// Type of the view model, ensure to use the full type name including namespace. -[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#TestNs.TestView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#TestNs.TestView.IViewFor.g.verified.cs deleted file mode 100644 index cf05cbc2..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.PerReq#TestNs.TestView.IViewFor.g.verified.cs +++ /dev/null @@ -1,35 +0,0 @@ -//HintName: TestNs.TestView.IViewFor.g.cs -// -using ReactiveUI; -using System.Windows; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - /// - /// Partial class for the TestView which contains ReactiveUI IViewFor initialization. - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial class TestView : IViewFor - { - /// - /// The view model dependency property. - /// - public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel), typeof(TestNs.TestViewModel), typeof(TestView), new PropertyMetadata(null)); - - /// - /// Gets the binding root view model. - /// - public TestNs.TestViewModel BindingRoot => ViewModel; - - /// - public TestNs.TestViewModel ViewModel { get => (TestNs.TestViewModel)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (TestNs.TestViewModel)value; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs deleted file mode 100644 index ee04db7b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ee889df3..0318d8ef 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -18,20 +18,7 @@ namespace ReactiveUI.SourceGenerators; /// /// Type of the view model. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -42,19 +29,6 @@ internal sealed class IViewForAttribute : global::System.Attribute /// /// Type of the view model, ensure to use the full type name including namespace. [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrNullRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrNullRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrNullRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrNullRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrNullRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index e83082da..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrNullRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,34 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private object? _myNamedProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _myNamedPropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - public object? MyNamedProperty { get => _myNamedProperty = (_myNamedPropertyHelper == null ? _myNamedProperty : _myNamedPropertyHelper.Value); } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _myNamedPropertyHelper = Test7!.ToProperty(this, nameof(MyNamedProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 7b1a883d..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.AttrRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,34 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private object _myNamedProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _myNamedPropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - public object MyNamedProperty { get => _myNamedProperty = _myNamedPropertyHelper?.Value ?? _myNamedProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _myNamedPropertyHelper = Test6!.ToProperty(this, nameof(MyNamedProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 318d2020..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,21 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _testPropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.Runtime.Serialization.DataMemberAttribute()] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - public double? TestProperty { get => _testProperty = (_testPropertyHelper == null ? _testProperty : _testPropertyHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 3c24f8cd..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private int _test2Property; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _test2PropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Test2Property { get => _test2Property = _test2PropertyHelper?.Value ?? _test2Property; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _test2PropertyHelper = Test2()!.ToProperty(this, nameof(Test2Property)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index e80caabd..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private int _myNamedProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _myNamedPropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int MyNamedProperty { get => _myNamedProperty = _myNamedPropertyHelper?.Value ?? _myNamedProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _myNamedPropertyHelper = Test3()!.ToProperty(this, nameof(MyNamedProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index e0b9a239..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private int _test1Property; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _test1PropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Test1Property { get => _test1Property = _test1PropertyHelper?.Value ?? _test1Property; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _test1PropertyHelper = Test1!.ToProperty(this, nameof(Test1Property)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 4d47e86b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,33 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private double? _testProperty = 1.1d; - - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _testPropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public partial double? TestProperty { get => _testProperty = (_testPropertyHelper == null ? _testProperty : _testPropertyHelper.Value); } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithEmptyStringInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithEmptyStringInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 2ba75ce7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithEmptyStringInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithEmptyStringInitialValue#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithEmptyStringInitialValue#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 06b00e6d..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithEmptyStringInitialValue#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private string _pLCActive = ""; - - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _pLCActiveHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial string PLCActive { get => _pLCActive = (_pLCActiveHelper == null ? _pLCActive : _pLCActiveHelper.Value); } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithoutInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithoutInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 2ba75ce7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithoutInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithoutInitialValue#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithoutInitialValue#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index a640e042..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialPropertyWithoutInitialValue#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,40 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private string _pLCActive = string.Empty; - - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _pLCActiveHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial string PLCActive { get => _pLCActive = (_pLCActiveHelper == null ? _pLCActive : _pLCActiveHelper.Value); } -/// - private string? _pLCName; - - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _pLCNameHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial string? PLCName { get => _pLCName = (_pLCNameHelper == null ? _pLCName : _pLCNameHelper.Value); } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index dca36436..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,35 +0,0 @@ -//HintName: TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - public partial class TestVM -{ - - public partial class TestVMInner1 - { - /// - private int _testIn1Property; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _testIn1PropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestIn1Property { get => _testIn1Property = _testIn1PropertyHelper?.Value ?? _testIn1Property; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _testIn1PropertyHelper = TestIn1!.ToProperty(this, nameof(TestIn1Property)); - } - } -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 3c245835..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,38 +0,0 @@ -//HintName: TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - public partial class TestVM -{ -public partial class TestVMInner2 -{ - - public partial class TestVMInner3 - { - /// - private int _testIn3Property; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _testIn3PropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestIn3Property { get => _testIn3Property = _testIn3PropertyHelper?.Value ?? _testIn3Property; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _testIn3PropertyHelper = TestIn3!.ToProperty(this, nameof(TestIn3Property)); - } - } -} -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index b1258225..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,35 +0,0 @@ -//HintName: TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - public partial class TestVM -{ - - public partial class TestVMInner2 - { - /// - private int _testIn2Property; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _testIn2PropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestIn2Property { get => _testIn2Property = _testIn2PropertyHelper?.Value ?? _testIn2Property; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _testIn2PropertyHelper = TestIn2!.ToProperty(this, nameof(TestIn2Property)); - } - } -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index e0b9a239..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.Nested#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private int _test1Property; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _test1PropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Test1Property { get => _test1Property = _test1PropertyHelper?.Value ?? _test1Property; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _test1PropertyHelper = Test1!.ToProperty(this, nameof(Test1Property)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithAttr#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithAttr#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithAttr#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithAttr#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithAttr#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 5d3d2d6a..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithAttr#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,34 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private int _myNamedProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _myNamedPropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - public int MyNamedProperty { get => _myNamedProperty = _myNamedPropertyHelper?.Value ?? _myNamedProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _myNamedPropertyHelper = Test5!.ToProperty(this, nameof(MyNamedProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 1e5c1f55..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.WithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private int _myNamedProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _myNamedPropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int MyNamedProperty { get => _myNamedProperty = _myNamedPropertyHelper?.Value ?? _myNamedProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _myNamedPropertyHelper = Test4!.ToProperty(this, nameof(MyNamedProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 23682fad..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _test1Helper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Test1 { get => _test1 = _test1Helper?.Value ?? _test1; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 5221cb69..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - public partial class TestVM -{ - - public partial class TestVMInner1 - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _testIn1Helper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestIn1 { get => _testIn1 = _testIn1Helper?.Value ?? _testIn1; } - } -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 190f193e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,26 +0,0 @@ -//HintName: TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - public partial class TestVM -{ -public partial class TestVMInner2 -{ - - public partial class TestVMInner3 - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _testIn3Helper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestIn3 { get => _testIn3 = _testIn3Helper?.Value ?? _testIn3; } - } -} -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs deleted file mode 100644 index d8747a92..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - public partial class TestVM -{ - - public partial class TestVMInner2 - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _testIn2Helper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestIn2 { get => _testIn2 = _testIn2Helper?.Value ?? _testIn2; } - } -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 2897a9b2..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _test2Helper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Test2 { get => _test2 = _test2Helper?.Value ?? _test2; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index e96b9824..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _test4Helper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Test4 { get => _test4 = _test4Helper?.Value ?? _test4; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index f53f3651..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private ReactiveUI.ObservableAsPropertyHelper? _test3Helper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Test3 { get => _test3 = _test3Helper?.Value ?? _test3; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index b31d92e4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - protected readonly ReactiveUI.ObservableAsPropertyHelper _test5Helper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Test5 { get => _test5 = _test5Helper?.Value ?? _test5; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3+Level4.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3+Level4.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 36d26d37..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3+Level4.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,29 +0,0 @@ -//HintName: TestNs.Level1+Level2+Level3+Level4.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - public partial class Level1 -{ -public partial class Level2 -{ -public partial class Level3 -{ - - public partial class Level4 - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _level4ValueHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Level4Value { get => _level4Value = _level4ValueHelper?.Value ?? _level4Value; } - } -} -} -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3+Level4.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3+Level4.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 1c3738e4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3+Level4.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,41 +0,0 @@ -//HintName: TestNs.Level1+Level2+Level3+Level4.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - public partial class Level1 -{ -public partial class Level2 -{ -public partial class Level3 -{ - - public partial class Level4 - { - /// - private bool _deepObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _deepObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public bool DeepObservableProperty { get => _deepObservableProperty = _deepObservablePropertyHelper?.Value ?? _deepObservableProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _deepObservablePropertyHelper = DeepObservable!.ToProperty(this, nameof(DeepObservableProperty)); - } - } -} -} -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 0f495d2b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2+Level3.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,26 +0,0 @@ -//HintName: TestNs.Level1+Level2+Level3.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - public partial class Level1 -{ -public partial class Level2 -{ - - public partial class Level3 - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _level3ValueHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Level3Value { get => _level3Value = _level3ValueHelper?.Value ?? _level3Value; } - } -} -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 072b2420..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,23 +0,0 @@ -//HintName: TestNs.Level1+Level2.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - public partial class Level1 -{ - - public partial class Level2 - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _level2ValueHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Level2Value { get => _level2Value = _level2ValueHelper?.Value ?? _level2Value; } - } -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index a31f90bd..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1+Level2.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,35 +0,0 @@ -//HintName: TestNs.Level1+Level2.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - public partial class Level1 -{ - - public partial class Level2 - { - /// - private string _level2ObservableProperty = string.Empty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _level2ObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string Level2ObservableProperty { get => _level2ObservableProperty = _level2ObservablePropertyHelper?.Value ?? _level2ObservableProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _level2ObservablePropertyHelper = Level2Observable!.ToProperty(this, nameof(Level2ObservableProperty)); - } - } -} - -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1.ObservableAsProperties.g.verified.cs deleted file mode 100644 index fbac836b..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInDeeplyNestedClass#TestNs.Level1.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.Level1.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class Level1 - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _level1ValueHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Level1Value { get => _level1Value = _level1ValueHelper?.Value ?? _level1Value; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#TestNs.GenericVM`1.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#TestNs.GenericVM`1.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 62f3a14d..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#TestNs.GenericVM`1.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.GenericVM`1.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class GenericVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _itemHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public T? Item { get => _item = (_itemHelper == null ? _item : _itemHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#TestNs.GenericVM`1.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#TestNs.GenericVM`1.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index ae88087e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInGenericClass#TestNs.GenericVM`1.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.GenericVM`1.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class GenericVM - { - /// - private T? _itemObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _itemObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public T? ItemObservableProperty { get => _itemObservableProperty = (_itemObservablePropertyHelper == null ? _itemObservableProperty : _itemObservablePropertyHelper.Value); } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _itemObservablePropertyHelper = ItemObservable!.ToProperty(this, nameof(ItemObservableProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#TestNs.TestVMRecord.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#TestNs.TestVMRecord.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 8c710372..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#TestNs.TestVMRecord.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.TestVMRecord.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial record TestVMRecord - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _statusHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string? Status { get => _status = (_statusHelper == null ? _status : _statusHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#TestNs.TestVMRecord.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#TestNs.TestVMRecord.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index ba89effb..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldInRecordClass#TestNs.TestVMRecord.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVMRecord.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial record TestVMRecord - { - /// - private int _countObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _countObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int CountObservableProperty { get => _countObservableProperty = _countObservablePropertyHelper?.Value ?? _countObservableProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _countObservablePropertyHelper = CountObservable!.ToProperty(this, nameof(CountObservableProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithArrayTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithArrayTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithArrayTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithArrayTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithArrayTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 540c6128..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithArrayTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _bytesHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public byte[]? Bytes { get => _bytes = (_bytesHelper == null ? _bytes : _bytesHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _stringsHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string[]? Strings { get => _strings = (_stringsHelper == null ? _strings : _stringsHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _jaggedArrayHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int[][]? JaggedArray { get => _jaggedArray = (_jaggedArrayHelper == null ? _jaggedArray : _jaggedArrayHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 44e982b6..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,22 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _computedValueHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.Runtime.Serialization.DataMemberAttribute(Name="computedValue")] - [global::System.Text.Json.Serialization.JsonPropertyNameAttribute("computed_value")] - [global::System.Text.Json.Serialization.JsonIncludeAttribute()] - public int ComputedValue { get => _computedValue = _computedValueHelper?.Value ?? _computedValue; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 69c292fd..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithAttributes#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,34 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private string _internalStateProperty = string.Empty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _internalStatePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.Text.Json.Serialization.JsonIgnoreAttribute()] - [global::System.Runtime.Serialization.IgnoreDataMemberAttribute()] - [global::System.Text.Json.Serialization.JsonIgnoreAttribute()] - public string InternalStateProperty { get => _internalStateProperty = _internalStatePropertyHelper?.Value ?? _internalStateProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _internalStatePropertyHelper = InternalState!.ToProperty(this, nameof(InternalStateProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithCombinedOptions#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithCombinedOptions#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithCombinedOptions#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithCombinedOptions#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithCombinedOptions#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 7e7eac36..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithCombinedOptions#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - protected ReactiveUI.ObservableAsPropertyHelper? _statusFieldHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string StatusField { get => _statusField = _statusFieldHelper?.Value ?? _statusField; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithDelegateTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithDelegateTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithDelegateTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithDelegateTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithDelegateTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 55f1d64f..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithDelegateTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper?> _formatterHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Func? Formatter { get => _formatter = (_formatterHelper == null ? _formatter : _formatterHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _callbackHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Action? Callback { get => _callback = (_callbackHelper == null ? _callback : _callbackHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _handlerHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.EventHandler? Handler { get => _handler = (_handlerHelper == null ? _handler : _handlerHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithEnumTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithEnumTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithEnumTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithEnumTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithEnumTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 6c2569a6..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithEnumTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,25 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _statusHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::TestNs.Status Status { get => _status = _statusHelper?.Value ?? _status; } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _nullableStatusHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::TestNs.Status? NullableStatus { get => _nullableStatus = (_nullableStatusHelper == null ? _nullableStatus : _nullableStatusHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithGenericTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithGenericTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithGenericTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithGenericTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithGenericTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index df1ff3c4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithGenericTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper?> _itemsHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.Generic.List? Items { get => _items = (_itemsHelper == null ? _items : _itemsHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper?> _mappingsHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.Generic.Dictionary? Mappings { get => _mappings = (_mappingsHelper == null ? _mappings : _mappingsHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper?> _numbersHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.Generic.IReadOnlyList? Numbers { get => _numbers = (_numbersHelper == null ? _numbers : _numbersHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInitialValue#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInitialValue#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index e80f52f4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInitialValue#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,19 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _statusHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string Status { get => _status = _statusHelper?.Value ?? _status; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInterfaceTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInterfaceTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInterfaceTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInterfaceTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInterfaceTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 6e6accf8..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithInterfaceTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _currentItemHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::TestNs.IItem? CurrentItem { get => _currentItem = (_currentItemHelper == null ? _currentItem : _currentItemHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _subscriptionHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.IDisposable? Subscription { get => _subscription = (_subscriptionHelper == null ? _subscription : _subscriptionHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper?> _allItemsHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.Generic.IReadOnlyCollection? AllItems { get => _allItems = (_allItemsHelper == null ? _allItems : _allItemsHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNullableTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNullableTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNullableTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNullableTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNullableTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index da9b282e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNullableTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _nullableIntHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int? NullableInt { get => _nullableInt = (_nullableIntHelper == null ? _nullableInt : _nullableIntHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _nullableDateTimeHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.DateTime? NullableDateTime { get => _nullableDateTime = (_nullableDateTimeHelper == null ? _nullableDateTime : _nullableDateTimeHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _nullableGuidHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Guid? NullableGuid { get => _nullableGuid = (_nullableGuidHelper == null ? _nullableGuid : _nullableGuidHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNumericInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNumericInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNumericInitialValue#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNumericInitialValue#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNumericInitialValue#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index fb0290ff..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithNumericInitialValue#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,25 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _countHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Count { get => _count = _countHelper?.Value ?? _count; } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _percentageHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public double Percentage { get => _percentage = _percentageHelper?.Value ?? _percentage; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTimeTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTimeTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTimeTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTimeTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTimeTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 46262ff9..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTimeTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _elapsedHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.TimeSpan Elapsed { get => _elapsed = _elapsedHelper?.Value ?? _elapsed; } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _lastUpdatedHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.DateTimeOffset LastUpdated { get => _lastUpdated = _lastUpdatedHelper?.Value ?? _lastUpdated; } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _remainingTimeHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.TimeSpan? RemainingTime { get => _remainingTime = (_remainingTimeHelper == null ? _remainingTime : _remainingTimeHelper.Value); } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTupleTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTupleTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTupleTypes#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTupleTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTupleTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index 846130c7..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromFieldWithTupleTypes#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,25 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper<(int Id, string Name)?> _namedTupleHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public (int Id, string Name)? NamedTuple { get => _namedTuple = (_namedTupleHelper == null ? _namedTuple : _namedTupleHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper<(string, int, bool)> _valueTupleHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public (string, int, bool) ValueTuple { get => _valueTuple = _valueTupleHelper?.Value ?? _valueTuple; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#TestNs.TestVM.ObservableAsProperties.g.verified.cs deleted file mode 100644 index dafa97cd..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ /dev/null @@ -1,43 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsProperties.g.cs -// -#pragma warning disable -#nullable enable -namespace TestNs -{ - - public partial class TestVM - { - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _isLoadingHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public bool IsLoading { get => _isLoading = _isLoadingHelper?.Value ?? _isLoading; } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _errorMessageHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string? ErrorMessage { get => _errorMessage = (_errorMessageHelper == null ? _errorMessage : _errorMessageHelper.Value); } - /// - private readonly ReactiveUI.ObservableAsPropertyHelper _itemCountHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int ItemCount { get => _itemCount = _itemCountHelper?.Value ?? _itemCount; } - /// - protected readonly ReactiveUI.ObservableAsPropertyHelper _progressHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public double Progress { get => _progress = _progressHelper?.Value ?? _progress; } - /// - private ReactiveUI.ObservableAsPropertyHelper? _statusHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string Status { get => _status = _statusHelper?.Value ?? _status; } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 56ee1032..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromMultipleObservableAsProperties#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,41 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private bool _hasItemsProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _hasItemsPropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public bool HasItemsProperty { get => _hasItemsProperty = _hasItemsPropertyHelper?.Value ?? _hasItemsProperty; } -/// - private string _displayNameProperty = string.Empty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _displayNamePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string DisplayNameProperty { get => _displayNameProperty = _displayNamePropertyHelper?.Value ?? _displayNameProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _hasItemsPropertyHelper = HasItems!.ToProperty(this, nameof(HasItemsProperty)); - _displayNamePropertyHelper = DisplayName()!.ToProperty(this, nameof(DisplayNameProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservableMethodWithCustomName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservableMethodWithCustomName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservableMethodWithCustomName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservableMethodWithCustomName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservableMethodWithCustomName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 33288696..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservableMethodWithCustomName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,41 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private bool _isLoading; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _isLoadingHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public bool IsLoading { get => _isLoading = _isLoadingHelper?.Value ?? _isLoading; } -/// - private string? _errorMessage; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _errorMessageHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public string? ErrorMessage { get => _errorMessage = (_errorMessageHelper == null ? _errorMessage : _errorMessageHelper.Value); } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _isLoadingHelper = GetLoadingState()!.ToProperty(this, nameof(IsLoading)); - _errorMessageHelper = GetError()!.ToProperty(this, nameof(ErrorMessage)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithComplexGenerics#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithComplexGenerics#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithComplexGenerics#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithComplexGenerics#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithComplexGenerics#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 6dbe4e43..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithComplexGenerics#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,41 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private global::System.Collections.Generic.Dictionary> _complexDataObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper>>? _complexDataObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.Generic.Dictionary> ComplexDataObservableProperty { get => _complexDataObservableProperty = _complexDataObservablePropertyHelper?.Value ?? _complexDataObservableProperty; } -/// - private global::System.Collections.Generic.IReadOnlyDictionary> _nestedReadOnlyObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper>>? _nestedReadOnlyObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.Generic.IReadOnlyDictionary> NestedReadOnlyObservableProperty { get => _nestedReadOnlyObservableProperty = _nestedReadOnlyObservablePropertyHelper?.Value ?? _nestedReadOnlyObservableProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _complexDataObservablePropertyHelper = ComplexDataObservable!.ToProperty(this, nameof(ComplexDataObservableProperty)); - _nestedReadOnlyObservablePropertyHelper = NestedReadOnlyObservable!.ToProperty(this, nameof(NestedReadOnlyObservableProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithEnum#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithEnum#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithEnum#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithEnum#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithEnum#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 557059be..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithEnum#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private global::TestNs.ConnectionState _stateObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _stateObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::TestNs.ConnectionState StateObservableProperty { get => _stateObservableProperty = _stateObservablePropertyHelper?.Value ?? _stateObservableProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _stateObservablePropertyHelper = StateObservable!.ToProperty(this, nameof(StateObservableProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithGenericType#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithGenericType#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithGenericType#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithGenericType#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithGenericType#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 9382076e..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithGenericType#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,41 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private global::System.Collections.Generic.List _itemsObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper>? _itemsObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.Generic.List ItemsObservableProperty { get => _itemsObservableProperty = _itemsObservablePropertyHelper?.Value ?? _itemsObservableProperty; } -/// - private global::System.Collections.Generic.IReadOnlyDictionary _mappingsObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper>? _mappingsObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.Generic.IReadOnlyDictionary MappingsObservableProperty { get => _mappingsObservableProperty = _mappingsObservablePropertyHelper?.Value ?? _mappingsObservableProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _itemsObservablePropertyHelper = ItemsObservable!.ToProperty(this, nameof(ItemsObservableProperty)); - _mappingsObservablePropertyHelper = MappingsObservable!.ToProperty(this, nameof(MappingsObservableProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithInterface#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithInterface#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithInterface#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithInterface#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithInterface#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 7eeacf97..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithInterface#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private global::TestNs.IResult? _resultObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper? _resultObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::TestNs.IResult? ResultObservableProperty { get => _resultObservableProperty = (_resultObservablePropertyHelper == null ? _resultObservableProperty : _resultObservablePropertyHelper.Value); } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _resultObservablePropertyHelper = ResultObservable!.ToProperty(this, nameof(ResultObservableProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithTuple#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithTuple#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs deleted file mode 100644 index 05d217a4..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithTuple#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ /dev/null @@ -1,56 +0,0 @@ -//HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithTuple#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithTuple#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs deleted file mode 100644 index 87410b58..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OapExtTests.FromObservablePropertyWithTuple#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ /dev/null @@ -1,31 +0,0 @@ -//HintName: TestNs.TestVM.ObservableAsPropertyFromObservable.g.cs -// -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace TestNs -{ - - public partial class TestVM - { - /// - private (bool Success, string Message) _resultObservableProperty; - - /// - private ReactiveUI.ObservableAsPropertyHelper<(bool Success, string Message)>? _resultObservablePropertyHelper; - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public (bool Success, string Message) ResultObservableProperty { get => _resultObservableProperty = _resultObservablePropertyHelper?.Value ?? _resultObservableProperty; } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - _resultObservablePropertyHelper = ResultObservable!.ToProperty(this, nameof(ResultObservableProperty)); - } - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1ba9e652..ee675de4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -46,13 +46,5 @@ internal enum InheritanceModifier Override, New, } - -internal enum SplatRegistrationType -{ - None, - LazySingleton, - Constant, - PerRequest, -} #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.WithOap#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.WithOap#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs deleted file mode 100644 index 159a4426..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.WithOap#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.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/RxObjExtTests.WithOap#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.WithOap#TestNs.TestVM.IReactiveObject.g.verified.cs deleted file mode 100644 index cb482d41..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.WithOap#TestNs.TestVM.IReactiveObject.g.verified.cs +++ /dev/null @@ -1,68 +0,0 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs -// -#pragma warning disable -#nullable enable -using System; -using System.Diagnostics.CodeAnalysis; -using System.ComponentModel; -using ReactiveUI; - -namespace TestNs -{ - /// - /// Partial class for the TestVM which contains ReactiveUI IReactiveObject initialization. - /// - public partial class TestVM : IReactiveObject - { - private bool _propertyChangingEventsSubscribed; - private bool _propertyChangedEventsSubscribed; - - /// - public event PropertyChangingEventHandler? PropertyChanging - { - add - { - if (!_propertyChangingEventsSubscribed) - { - this.SubscribePropertyChangingEvents(); - _propertyChangingEventsSubscribed = true; - } - - PropertyChangingHandler += value; - } - remove => PropertyChangingHandler -= value; - } - - /// - public event PropertyChangedEventHandler? PropertyChanged - { - add - { - if (!_propertyChangedEventsSubscribed) - { - this.SubscribePropertyChangedEvents(); - _propertyChangedEventsSubscribed = true; - } - - PropertyChangedHandler += value; - } - remove => PropertyChangedHandler -= value; - } - - [SuppressMessage("Roslynator", "RCS1159:Use EventHandler", Justification = "Long term design.")] - private event PropertyChangingEventHandler? PropertyChangingHandler; - - [SuppressMessage("Roslynator", "RCS1159:Use EventHandler", Justification = "Long term design.")] - private event PropertyChangedEventHandler? PropertyChangedHandler; - - /// - void IReactiveObject.RaisePropertyChanging(PropertyChangingEventArgs args) => - PropertyChangingHandler?.Invoke(this, args); - - /// - void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args) => - PropertyChangedHandler?.Invoke(this, args); - } -} -#nullable restore -#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs index 1d4f49f2..69279ef7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs @@ -133,7 +133,6 @@ private static string GetVerifiedFilePath() { nameof(ReactiveGenerator) => "REACTIVE", nameof(ReactiveCommandGenerator) => "REACTIVECMD", - nameof(ObservableAsPropertyGenerator) => "OAPH", nameof(IViewForGenerator) => "IVIEWFOR", nameof(RoutedControlHostGenerator) => "ROUTEDHOST", nameof(ViewModelControlHostGenerator) => "CONTROLHOST", @@ -180,7 +179,6 @@ private static void AddGeneratorSpecificSyntaxTrees(List syntaxTrees if (typeof(T) == typeof(ReactiveObjectGenerator)) { AddSyntaxTree(syntaxTrees, GetAttributeDefinitionsPropertyResult(ReactiveAttributeName), parseOptions, ReactiveAttributeHintName); - AddSyntaxTree(syntaxTrees, GetAttributeDefinitionsPropertyResult("ObservableAsPropertyAttribute"), parseOptions, "ObservableAsPropertyAttribute.g.cs"); } if (typeof(T) != typeof(BindableDerivedListGenerator) && typeof(T) != typeof(ReactiveCollectionGenerator)) @@ -275,11 +273,6 @@ private static void AddRequiredAttributeDefinitions(List supportSources) supportSources.Add(GetAttributeDefinitionsPropertyResult("IViewForAttribute")); } - if (typeof(T) != typeof(ObservableAsPropertyGenerator) && typeof(T) != typeof(ReactiveObjectGenerator)) - { - supportSources.Add(GetAttributeDefinitionsPropertyResult("ObservableAsPropertyAttribute")); - } - AddRemainingAttributeDefinitions(supportSources); } diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/DiagnosticSuppressorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/DiagnosticSuppressorTests.cs index 1fcc09cd..d5fcaa81 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/DiagnosticSuppressorTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/DiagnosticSuppressorTests.cs @@ -18,10 +18,10 @@ public sealed class DiagnosticSuppressorTests private const int InvalidTargetDiagnosticCount = 4; /// The number of synthetic diagnostics expected to be suppressed. - private const int SyntheticSuppressedDiagnosticCount = 8; + private const int SyntheticSuppressedDiagnosticCount = 2; /// The number of synthetic diagnostics intentionally left unsuppressed. - private const int SyntheticUnsuppressedDiagnosticCount = 7; + private const int SyntheticUnsuppressedDiagnosticCount = 6; /// Source containing each invalid generated-member attribute target. private const string AttributeTargetSource = """ @@ -77,8 +77,6 @@ public sealed class ReactiveAttribute : Attribute; [AttributeUsage(AttributeTargets.Method)] public sealed class ReactiveCommandAttribute : Attribute; - [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)] - public sealed class ObservableAsPropertyAttribute : Attribute; } namespace TestNs @@ -99,26 +97,14 @@ private void Plain() { } - [ReactiveUI.SourceGenerators.ObservableAsProperty] - [field: Obsolete] - private object Observe() => new(); [field: Obsolete] private object NotObservable() => new(); - [ReactiveUI.SourceGenerators.ObservableAsProperty] - private object ObservableValue => new(); - - [ReactiveUI.SourceGenerators.ObservableAsProperty] - [property: Obsolete] - private object ObservePropertyTarget() => new(); [method: Obsolete] private object MethodTarget() => new(); - [ReactiveUI.SourceGenerators.ObservableAsProperty] - [field: Obsolete] - private object ObservablePropertyTarget => new(); } } """; @@ -176,18 +162,12 @@ await AssertDescriptor( new ReactiveCommandAttributeWithFieldOrPropertyTargetDiagnosticSuppressor(), "RXUISPR0001", InvalidAttributeTargetDiagnosticId); - await AssertDescriptor( - new ObservableAsPropertyAttributeWithFieldNeverReadDiagnosticSuppressor(), - "RXUISPR0002", - "IDE0052"); + await AssertDescriptor( new ReactiveCommandMethodDoesNotNeedToBeStaticDiagnosticSuppressor(), "RXUISPR0003", "CA1822"); - await AssertDescriptor( - new OAPHMethodDoesNotNeedToBeStaticDiagnosticSuppressor(), - "RXUISPR0003", - "CA1822"); + await AssertDescriptor( new ReactiveFieldDoesNotNeedToBeReadOnlyDiagnosticSuppressor(), "RXUISPR0004", @@ -260,8 +240,7 @@ public async Task MemberSuppressors_SuppressOnlyMatchingSyntheticDiagnostics() ImmutableArray analyzers = [ CreateMemberCoverageDiagnosticAnalyzer(), - new OAPHMethodDoesNotNeedToBeStaticDiagnosticSuppressor(), - new ObservableAsPropertyAttributeWithFieldNeverReadDiagnosticSuppressor(), + new ReactiveCommandMethodDoesNotNeedToBeStaticDiagnosticSuppressor(), new ReactiveFieldDoesNotNeedToBeReadOnlyDiagnosticSuppressor(), ]; diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/GeneratedOutputCoverageTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/GeneratedOutputCoverageTests.cs index ed1400ff..5f4d8a45 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/GeneratedOutputCoverageTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/GeneratedOutputCoverageTests.cs @@ -105,10 +105,10 @@ public partial class DerivedListViewModel await Assert.That(generatedSource.Contains("DataMemberAttribute", StringComparison.Ordinal)).IsTrue(); } - /// ObservableAsProperty fields cover invalid targets, collisions, and inheritance modifiers. + /// Reactive fields cover invalid targets, collisions, and inheritance modifiers. /// A task representing the asynchronous assertion work. [Test] - public async Task ObservableAsPropertyFieldsCoverValidationAndInheritanceOutput() + public async Task ReactiveFieldsCoverValidationAndInheritanceOutput() { const string source = """ using ReactiveUI; @@ -116,37 +116,34 @@ public async Task ObservableAsPropertyFieldsCoverValidationAndInheritanceOutput( namespace Coverage; - public partial class InvalidObservableTarget + public partial class InvalidReactiveTarget { - [ObservableAsProperty] + [Reactive] private int _invalid; } - public class ObservableBase : ReactiveObject + public class ReactiveBase : ReactiveObject { public virtual int Override { get; set; } } - public partial class ObservableViewModel : ObservableBase + public partial class ReactiveViewModel : ReactiveBase { - [ObservableAsProperty] + [Reactive] private int Collision; - [ObservableAsProperty(Inheritance = InheritanceModifier.Virtual)] + [Reactive(Inheritance = InheritanceModifier.Virtual)] private int _virtual; - [ObservableAsProperty(Inheritance = InheritanceModifier.Override)] + [Reactive(Inheritance = InheritanceModifier.Override)] private int _override; - [ObservableAsProperty(Inheritance = InheritanceModifier.New)] + [Reactive(Inheritance = InheritanceModifier.New)] private int _new; } """; - var (generatedSource, diagnostics) = RunGenerator( - source, - new ObservableAsPropertyGenerator(), - new ReactiveGenerator()); + var (generatedSource, diagnostics) = RunGenerator(source, new ReactiveGenerator()); var diagnosticIds = GetDiagnosticIds(diagnostics); await Assert.That(diagnosticIds).Contains("RXUISG0018"); diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IViewForGeneratorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IViewForGeneratorTests.cs index 8a768e7d..fabfd560 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IViewForGeneratorTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IViewForGeneratorTests.cs @@ -10,14 +10,11 @@ namespace ReactiveUI.SourceGenerator.Tests; /// Tests view-for source generation. public class IViewForGeneratorTests : TestBase { - /// The generated source count for four supported platform targets. - private const int SupportedPlatformGeneratedSourceCount = 6; + /// The generated source count for four supported platform targets: the attribute and one file per view. + private const int SupportedPlatformGeneratedSourceCount = 5; - /// The generated source count when no target can produce a view implementation. - private const int NoViewImplementationGeneratedSourceCount = 2; - - /// The stable hint name of the generated registration extensions. - private const string RegistrationExtensionsHintName = "ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs"; + /// The generated source count when no target can produce a view implementation: the attribute alone. + private const int NoViewImplementationGeneratedSourceCount = 1; /// Tests that the source generator correctly generates reactive properties. /// A task to monitor the async. @@ -113,10 +110,10 @@ await Assert.That(mauiSource.Contains( StringComparison.Ordinal)).IsTrue(); } - /// Verifies WinUI, Uno, string view models, and every registration mapping. + /// Verifies WinUI, Uno and string view models, and that no view registration is generated. /// A task representing the asynchronous assertion work. [Test] - public async Task GeneratesWinUiUnoAndRegistrationVariants() + public async Task GeneratesWinUiAndUnoViewsWithoutRegistration() { var generatedSources = RunIViewForGenerator( """ @@ -124,19 +121,15 @@ public async Task GeneratesWinUiUnoAndRegistrationVariants() namespace Microsoft.UI.Xaml.Controls { public class Page { } } namespace Windows.UI.Xaml.Controls { public class Page { } } - namespace ReactiveUI.SourceGenerators - { - internal enum SplatRegistrationType { None, LazySingleton, Constant, PerRequest } - } namespace TestNs { public sealed class ViewModel { } - [IViewFor(RegistrationType = SplatRegistrationType.LazySingleton, ViewModelRegistrationType = SplatRegistrationType.Constant)] + [IViewFor] public partial class WinUiView : Microsoft.UI.Xaml.Controls.Page { } - [IViewFor("TestNs.ViewModel", RegistrationType = SplatRegistrationType.PerRequest, ViewModelRegistrationType = SplatRegistrationType.PerRequest)] + [IViewFor("TestNs.ViewModel")] public partial class UnoView : Windows.UI.Xaml.Controls.Page { } [IViewFor("")] @@ -145,14 +138,11 @@ public partial class MissingViewModelView : Microsoft.UI.Xaml.Controls.Page { } """); var winUiSource = GetGeneratedSource(generatedSources, "TestNs.WinUiView.IViewFor.g.cs"); var unoSource = GetGeneratedSource(generatedSources, "TestNs.UnoView.IViewFor.g.cs"); - var registrationSource = GetGeneratedSource(generatedSources, RegistrationExtensionsHintName); await Assert.That(winUiSource.Contains("using Microsoft.UI.Xaml;", StringComparison.Ordinal)).IsTrue(); await Assert.That(unoSource.Contains("using Windows.UI.Xaml;", StringComparison.Ordinal)).IsTrue(); - await Assert.That(registrationSource.Contains("RegisterLazySingleton", StringComparison.Ordinal)).IsTrue(); - await Assert.That(registrationSource.Contains("RegisterConstant", StringComparison.Ordinal)).IsTrue(); - await Assert.That(registrationSource.Contains("Register", StringComparison.Ordinal)).IsTrue(); - await Assert.That(registrationSource.Contains("MissingViewModelView", StringComparison.Ordinal)).IsFalse(); + await Assert.That(generatedSources.Any(static source => source.HintName.Contains("MissingViewModelView", StringComparison.Ordinal))).IsFalse(); + await Assert.That(generatedSources.Any(static source => source.SourceText.ToString().Contains("RegisterViewsForViewModelsSourceGenerated", StringComparison.Ordinal))).IsFalse(); } /// Verifies unsupported and non-partial IViewFor targets do not emit view implementations. @@ -178,8 +168,6 @@ public class NonPartialView { } await Assert.That(generatedSources.Count).IsEqualTo(NoViewImplementationGeneratedSourceCount); await Assert.That(generatedSources.Any(static source => source.HintName.EndsWith(".IViewFor.g.cs", StringComparison.Ordinal))).IsFalse(); - await Assert.That(GetGeneratedSource(generatedSources, RegistrationExtensionsHintName).Contains("UnsupportedView", StringComparison.Ordinal)).IsFalse(); - await Assert.That(GetGeneratedSource(generatedSources, RegistrationExtensionsHintName).Contains("NonPartialView", StringComparison.Ordinal)).IsFalse(); } /// Runs the IViewFor generator and returns its emitted sources for focused assertions. diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OAPFromObservableGeneratorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OAPFromObservableGeneratorTests.cs deleted file mode 100644 index 2f0f6e8d..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OAPFromObservableGeneratorTests.cs +++ /dev/null @@ -1,392 +0,0 @@ -// 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.SourceGenerator.Tests; - -/// Unit tests for the ObservableAsProperty generator. -public class OAPFromObservableGeneratorTests : TestBase -{ - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task FromObservableProp() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - public IObservable Test1 => Observable.Return(42); - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task Nested() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - public IObservable Test1 => Observable.Return(42); - - public partial class TestVMInner1 : ReactiveObject - { - [ObservableAsProperty] - public IObservable TestIn1 => Observable.Return(42); - } - - public partial class TestVMInner2 : ReactiveObject - { - [ObservableAsProperty] - public IObservable TestIn2 => Observable.Return(42); - - public partial class TestVMInner3 : ReactiveObject - { - [ObservableAsProperty] - public IObservable TestIn3 => Observable.Return(42); - } - } - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task FromObservableMethods() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - public IObservable Test2() => Observable.Return(42); - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task FromObservableMethodsWithName() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(PropertyName = "MyNamedProperty")] - public IObservable Test3() => Observable.Return(42); - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task WithName() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(PropertyName = "MyNamedProperty")] - public IObservable Test4 => Observable.Return(42); - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task WithAttr() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using System.Runtime.Serialization; - using System.Text.Json.Serialization; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(PropertyName = "MyNamedProperty")] - [property: JsonInclude] - [DataMember] - public IObservable Test5 => Observable.Return(42); - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task AttrRef() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using System.Runtime.Serialization; - using System.Text.Json.Serialization; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(PropertyName = "MyNamedProperty")] - [property: JsonInclude] - [DataMember] - public IObservable Test6 => Observable.Return(new object()); - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task AttrNullRef() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using System.Runtime.Serialization; - using System.Text.Json.Serialization; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(PropertyName = "MyNamedProperty")] - [property: JsonInclude] - [DataMember] - public IObservable Test7 => Observable.Return(new object()); - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// - /// A task to monitor the async. - /// - [Test] - public Task FromField() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using System.Runtime.Serialization; - using System.Text.Json.Serialization; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - using System.Reactive.Subjects; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - private readonly Subject _testSubject = new(); - - [property: JsonInclude] - [DataMember] - [ObservableAsProperty] - private double? _testProperty = 1.1d; - - public TestVM() - { - _testPropertyHelper = _testSubject.ToProperty(this, nameof(TestProperty)); - } - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// - /// A task to monitor the async. - /// - [Test] - public Task FromPartialProperty() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using System.Runtime.Serialization; - using System.Text.Json.Serialization; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - using System.Reactive.Subjects; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - private readonly Subject _testSubject = new(); - - public TestVM() - { - _testPropertyHelper = _testSubject.ToProperty(this, nameof(TestProperty)); - } - - [JsonInclude] - [DataMember] - [ObservableAsProperty(InitialValue = "1.1d")] - public partial double? TestProperty { get; } - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that an empty string initial value initialises the generated backing field. - /// - /// A task to monitor the async. - /// - [Test] - public Task FromPartialPropertyWithEmptyStringInitialValue() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - using System.Reactive.Subjects; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - private readonly Subject _testSubject = new(); - - public TestVM() - { - _pLCActiveHelper = _testSubject.ToProperty(this, nameof(PLCActive)); - } - - [ObservableAsProperty(InitialValue = "")] - public partial string PLCActive { get; } - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that a non nullable string without an initial value defaults to an empty string. - /// - /// A task to monitor the async. - /// - [Test] - public Task FromPartialPropertyWithoutInitialValue() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - using System.Reactive.Subjects; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - private readonly Subject _testSubject = new(); - private readonly Subject _testNullableSubject = new(); - - public TestVM() - { - _pLCActiveHelper = _testSubject.ToProperty(this, nameof(PLCActive)); - _pLCNameHelper = _testNullableSubject.ToProperty(this, nameof(PLCName)); - } - - [ObservableAsProperty] - public partial string PLCActive { get; } - - [ObservableAsProperty] - public partial string? PLCName { get; } - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } -} diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OAPGeneratorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OAPGeneratorTests.cs deleted file mode 100644 index bee6c2c0..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OAPGeneratorTests.cs +++ /dev/null @@ -1,152 +0,0 @@ -// 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.SourceGenerator.Tests; - -/// Unit tests for the ObservableAsProperty generator. -public class OAPGeneratorTests : TestBase -{ - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task FromField() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private int _test1 = 10; - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task FromFieldNestedClass() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private int _test2 = 10; - - public partial class TestVMInner1 : ReactiveObject - { - [ObservableAsProperty] - private int _testIn1 = 10; - } - - public partial class TestVMInner2 : ReactiveObject - { - [ObservableAsProperty] - private int _testIn2 = 10; - - public partial class TestVMInner3 : ReactiveObject - { - [ObservableAsProperty] - private int _testIn3 = 10; - } - } - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task NonReadOnlyFromField() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(ReadOnly = false)] - private int _test3 = 10; - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task NamedFromField() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(PropertyName = "MyNamedProperty")] - private int _test4 = 10; - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } - - /// Tests that the source generator correctly generates observable properties. - /// A task to monitor the async. - [Test] - public Task NonReadOnlyFromFieldProtected() - { - // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(UseProtected = true)] - private int _test5 = 10; - } - """; - - // Act: Initialize the helper and run the generator. Assert: Verify the generated code. - return TestHelper.TestPass(sourceCode); - } -} diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OapExtTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OapExtTests.cs deleted file mode 100644 index 94176492..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/OapExtTests.cs +++ /dev/null @@ -1,641 +0,0 @@ -// 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.SourceGenerator.Tests; - -/// Extended unit tests for the ObservableAsProperty generator covering edge cases. -public class OapExtTests : TestBase -{ - /// Tests ObservableAsProperty with initial value. - /// A task to monitor the async. - [Test] - public Task FromFieldWithInitialValue() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - using System.Reactive.Linq; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(InitialValue = "\"Loading...\"")] - private string _status = string.Empty; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with initial value for numeric type. - /// A task to monitor the async. - [Test] - public Task FromFieldWithNumericInitialValue() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(InitialValue = "-1")] - private int _count; - - [ObservableAsProperty(InitialValue = "0.0")] - private double _percentage; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with combined options. - /// A task to monitor the async. - [Test] - public Task FromFieldWithCombinedOptions() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(ReadOnly = false, UseProtected = true, PropertyName = "CustomStatus")] - private string _statusField = string.Empty; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with generic types. - /// A task to monitor the async. - [Test] - public Task FromFieldWithGenericTypes() - { - const string sourceCode = """ - using System; - using System.Collections.Generic; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private List? _items; - - [ObservableAsProperty] - private Dictionary? _mappings; - - [ObservableAsProperty] - private IReadOnlyList? _numbers; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty from observable property with generic type. - /// A task to monitor the async. - [Test] - public Task FromObservablePropertyWithGenericType() - { - const string sourceCode = """ - using System; - using System.Collections.Generic; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - public IObservable> ItemsObservable => Observable.Return(new List()); - - [ObservableAsProperty] - public IObservable> MappingsObservable => - Observable.Return>(new Dictionary()); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with nullable types. - /// A task to monitor the async. - [Test] - public Task FromFieldWithNullableTypes() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private int? _nullableInt; - - [ObservableAsProperty] - private DateTime? _nullableDateTime; - - [ObservableAsProperty] - private Guid? _nullableGuid; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty from observable method with parameters converted. - /// A task to monitor the async. - [Test] - public Task FromObservableMethodWithCustomName() - { - const string sourceCode = """ - using System; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty(PropertyName = "IsLoading")] - public IObservable GetLoadingState() => Observable.Return(false); - - [ObservableAsProperty(PropertyName = "ErrorMessage")] - public IObservable GetError() => Observable.Return(null); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with tuple types. - /// A task to monitor the async. - [Test] - public Task FromFieldWithTupleTypes() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private (int Id, string Name)? _namedTuple; - - [ObservableAsProperty] - private ValueTuple _valueTuple; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty from observable property with tuple. - /// A task to monitor the async. - [Test] - public Task FromObservablePropertyWithTuple() - { - const string sourceCode = """ - using System; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - public IObservable<(bool Success, string Message)> ResultObservable => - Observable.Return((true, "Done")); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with array types. - /// A task to monitor the async. - [Test] - public Task FromFieldWithArrayTypes() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private byte[]? _bytes; - - [ObservableAsProperty] - private string[]? _strings; - - [ObservableAsProperty] - private int[][]? _jaggedArray; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty in generic class. - /// A task to monitor the async. - [Test] - public Task FromFieldInGenericClass() - { - const string sourceCode = """ - using System; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class GenericVM : ReactiveObject where T : class - { - [ObservableAsProperty] - private T? _item; - - [ObservableAsProperty] - public IObservable ItemObservable => Observable.Return(default); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with enum types. - /// A task to monitor the async. - [Test] - public Task FromFieldWithEnumTypes() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public enum Status { Pending, Active, Completed } - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private Status _status; - - [ObservableAsProperty] - private Status? _nullableStatus; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty from observable property with enum. - /// A task to monitor the async. - [Test] - public Task FromObservablePropertyWithEnum() - { - const string sourceCode = """ - using System; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public enum ConnectionState { Disconnected, Connecting, Connected } - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - public IObservable StateObservable => - Observable.Return(ConnectionState.Disconnected); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests multiple ObservableAsProperty in same class. - /// A task to monitor the async. - [Test] - public Task FromMultipleObservableAsProperties() - { - const string sourceCode = """ - using System; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private bool _isLoading; - - [ObservableAsProperty] - private string? _errorMessage; - - [ObservableAsProperty] - private int _itemCount; - - [ObservableAsProperty(UseProtected = true)] - private double _progress; - - [ObservableAsProperty(ReadOnly = false)] - private string _status = string.Empty; - - [ObservableAsProperty] - public IObservable HasItems => Observable.Return(true); - - [ObservableAsProperty] - public IObservable DisplayName() => Observable.Return("Test"); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty in record class. - /// A task to monitor the async. - [Test] - public Task FromFieldInRecordClass() - { - const string sourceCode = """ - using System; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial record TestVMRecord : ReactiveObject - { - [ObservableAsProperty] - private string? _status; - - [ObservableAsProperty] - public IObservable CountObservable => Observable.Return(0); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with interface types. - /// A task to monitor the async. - [Test] - public Task FromFieldWithInterfaceTypes() - { - const string sourceCode = """ - using System; - using System.Collections.Generic; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public interface IItem - { - string Name { get; } - } - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private IItem? _currentItem; - - [ObservableAsProperty] - private IDisposable? _subscription; - - [ObservableAsProperty] - private IReadOnlyCollection? _allItems; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty from observable property with interface. - /// A task to monitor the async. - [Test] - public Task FromObservablePropertyWithInterface() - { - const string sourceCode = """ - using System; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public interface IResult - { - bool Success { get; } - } - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - public IObservable ResultObservable => Observable.Return(null); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with TimeSpan and DateTimeOffset. - /// A task to monitor the async. - [Test] - public Task FromFieldWithTimeTypes() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private TimeSpan _elapsed; - - [ObservableAsProperty] - private DateTimeOffset _lastUpdated; - - [ObservableAsProperty] - private TimeSpan? _remainingTime; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty in deeply nested class. - /// A task to monitor the async. - [Test] - public Task FromFieldInDeeplyNestedClass() - { - const string sourceCode = """ - using System; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class Level1 : ReactiveObject - { - [ObservableAsProperty] - private int _level1Value; - - public partial class Level2 : ReactiveObject - { - [ObservableAsProperty] - private int _level2Value; - - [ObservableAsProperty] - public IObservable Level2Observable => Observable.Return("L2"); - - public partial class Level3 : ReactiveObject - { - [ObservableAsProperty] - private int _level3Value; - - public partial class Level4 : ReactiveObject - { - [ObservableAsProperty] - private int _level4Value; - - [ObservableAsProperty] - public IObservable DeepObservable => Observable.Return(true); - } - } - } - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with delegate types. - /// A task to monitor the async. - [Test] - public Task FromFieldWithDelegateTypes() - { - const string sourceCode = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - private Func? _formatter; - - [ObservableAsProperty] - private Action? _callback; - - [ObservableAsProperty] - private EventHandler? _handler; - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with attributes. - /// A task to monitor the async. - [Test] - public Task FromFieldWithAttributes() - { - const string sourceCode = """ - using System; - using System.Runtime.Serialization; - using System.Text.Json.Serialization; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [property: JsonPropertyName("computed_value")] - [property: JsonInclude] - [DataMember(Name = "computedValue")] - [ObservableAsProperty] - private int _computedValue; - - [property: JsonIgnore] - [IgnoreDataMember] - [ObservableAsProperty] - public IObservable InternalState => Observable.Return("state"); - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests ObservableAsProperty with complex nested generics from observable. - /// A task to monitor the async. - [Test] - public Task FromObservablePropertyWithComplexGenerics() - { - const string sourceCode = """ - using System; - using System.Collections.Generic; - using System.Reactive.Linq; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class TestVM : ReactiveObject - { - [ObservableAsProperty] - public IObservable>> ComplexDataObservable => - Observable.Return(new Dictionary>()); - - [ObservableAsProperty] - public IObservable>> NestedReadOnlyObservable => - Observable.Return>>( - new Dictionary>()); - } - """; - - return TestHelper.TestPass(sourceCode); - } -} diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs index f36f95d5..e84e11a5 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs @@ -259,66 +259,6 @@ public partial class ReactiveNameCollision : ReactiveObject } """; - /// Consumer source covering observable-as-property generation and rejection paths. - private const string ObservableAsPropertyOptionsSource = """ - using System; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace Compatibility; - - public partial class ObservableOptionsViewModel : ReactiveObject - { - [ObservableAsProperty(UseProtected = true, InitialValue = "42")] - public IObservable NumberStream => null!; - - [ObservableAsProperty(PropertyName = "Status", InitialValue = "ready")] - public IObservable StatusStream => null!; - - [ObservableAsProperty(PropertyName = "Computed", UseProtected = true)] - public IObservable Compute() => null!; - - [ObservableAsProperty] - public IObservable Maybe() => null!; - - [ObservableAsProperty] - public IObservable HasParameter(int value) => null!; - - [ObservableAsProperty] - public int NotObservable() => 0; - - [ObservableAsProperty] - public int OrdinaryProperty { get; set; } - - [ObservableAsProperty(ReadOnly = false, UseProtected = true, InitialValue = "7")] - public partial int PartialValue { get; } - - [ObservableAsProperty] - private int _defaultField; - - [ObservableAsProperty(UseProtected = true)] - private string? _nullableField; - - [ObservableAsProperty(ReadOnly = false)] - private int _mutableField = 1; - - [ObservableAsProperty] - private int Collision; - } - - public partial class InvalidObservableTarget - { - [ObservableAsProperty] - public IObservable InvalidProperty => null!; - - [ObservableAsProperty] - public IObservable InvalidMethod() => null!; - - [ObservableAsProperty] - private int _invalidField; - } - """; - /// Verifies this test project is executing against a real ReactiveUI 24-or-newer package. /// A task representing the asynchronous assertion work. [Test] @@ -490,28 +430,6 @@ public async Task ReactivePartialPropertiesCoverLanguageAndDiagnosticPaths() await Assert.That(GetDiagnosticIds(csharp13Diagnostics)).IsEquivalentTo(previewIds); } - /// Verifies observable-as-property options and rejected member shapes end to end. - /// A task representing the asynchronous assertion work. - [Test] - public async Task ObservableAsPropertyOptionsCoverGeneratedAndDiagnosticPaths() - { - var (_, generatedSource, diagnostics) = RunObservableAsPropertyGenerator(ObservableAsPropertyOptionsSource); - var diagnosticIds = GetDiagnosticIds(diagnostics); - - await Assert.That(generatedSource.Contains("protected ReactiveUI.ObservableAsPropertyHelper?", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains("private string? _status = \"ready\";", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains("public string? Status", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains("Compute()!.ToProperty", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains("NumberStream!.ToProperty", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains("public partial int PartialValue", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains("protected ReactiveUI.ObservableAsPropertyHelper? _partialValueHelper", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains("private readonly ReactiveUI.ObservableAsPropertyHelper _defaultFieldHelper", StringComparison.Ordinal)).IsTrue(); - await Assert.That(generatedSource.Contains("private ReactiveUI.ObservableAsPropertyHelper? _mutableFieldHelper", StringComparison.Ordinal)).IsTrue(); - await Assert.That(diagnosticIds).Contains("RXUISG0009"); - await Assert.That(diagnosticIds).Contains("RXUISG0017"); - await Assert.That(diagnosticIds).Contains("RXUISG0018"); - } - /// Verifies that the ReactiveUI 24 System.Reactive variant selects its moved namespace. /// A task representing the asynchronous assertion work. [Test] @@ -721,7 +639,7 @@ public partial class ForwardingViewModel : ReactiveObject /// Verifies unresolved and nonconstant forwarded attribute expressions produce generator diagnostics. /// A task representing the asynchronous assertion work. [Test] - public async Task ObservableAsPropertyReportsInvalidForwardedAttributeForms() + public async Task ReactiveReportsInvalidForwardedAttributeForms() { const string source = """ using System; @@ -732,11 +650,11 @@ namespace Compatibility; public partial class InvalidForwardingViewModel : ReactiveObject { - [ObservableAsProperty] + [Reactive] [property: Missing] private int _missing; - [ObservableAsProperty] + [Reactive] [property: Obsolete(GetMessage())] private int _invalidExpression; @@ -744,7 +662,7 @@ public partial class InvalidForwardingViewModel : ReactiveObject } """; - var (_, _, diagnostics) = RunObservableAsPropertyGenerator(source); + var (_, _, diagnostics) = RunReactiveGenerator(source, LanguageVersion.Preview); var diagnosticIds = GetDiagnosticIds(diagnostics); await Assert.That(diagnosticIds).Contains("RXUISG0012"); @@ -956,18 +874,6 @@ private static (Compilation Compilation, string GeneratedSource, ImmutableArray< new ReactiveGenerator(), static hintName => hintName.EndsWith("Properties.g.cs", StringComparison.Ordinal)); - /// Runs the observable-as-property generator and collects its product sources. - /// The consumer source text. - /// The output compilation, generated source, and generator diagnostics. - private static (Compilation Compilation, string GeneratedSource, ImmutableArray Diagnostics) RunObservableAsPropertyGenerator( - string source) => - RunGenerator( - source, - LanguageVersion.Preview, - new ObservableAsPropertyGenerator(), - static hintName => hintName.EndsWith(".ObservableAsProperties.g.cs", StringComparison.Ordinal) - || hintName.EndsWith(".ObservableAsPropertyFromObservable.g.cs", StringComparison.Ordinal)); - /// Runs one incremental generator and collects selected generated sources. /// The consumer source text. /// The consumer language version. diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/RxObjExtTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/RxObjExtTests.cs index 85fb3943..c2e277e6 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/RxObjExtTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/RxObjExtTests.cs @@ -67,31 +67,6 @@ public partial class ChildVM return TestHelper.TestPass(sourceCode); } - /// Tests ReactiveObject with ObservableAsProperty. - /// A task to monitor the async. - [Test] - public Task WithOap() - { - const string sourceCode = """ - using System; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - [IReactiveObject] - public partial class TestVM - { - [Reactive] - private string? _input; - - [ObservableAsProperty] - private string? _output; - } - """; - - return TestHelper.TestPass(sourceCode); - } - /// Tests ReactiveObject with generic type parameters. /// A task to monitor the async. [Test] diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ViewForExtTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ViewForExtTests.cs index 98b5a9bc..41c8d7fa 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ViewForExtTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ViewForExtTests.cs @@ -7,120 +7,6 @@ namespace ReactiveUI.SourceGenerator.Tests; /// Extended unit tests for the IViewFor generator covering edge cases. public class ViewForExtTests : TestBase { - /// Tests IViewFor with LazySingleton registration type. - /// A task to monitor the async. - [Test] - public Task LazySingle() - { - const string sourceCode = """ - using System.Collections.ObjectModel; - using System.Windows; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - [IViewFor(RegistrationType = SplatRegistrationType.LazySingleton)] - public partial class TestView : Window - { - public TestView() => ViewModel = new TestViewModel(); - } - - public partial class TestViewModel : ReactiveObject - { - public int TestProperty { get; set; } - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests IViewFor with Constant registration type. - /// A task to monitor the async. - [Test] - public Task Constant() - { - const string sourceCode = """ - using System.Collections.ObjectModel; - using System.Windows; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - [IViewFor(RegistrationType = SplatRegistrationType.Constant)] - public partial class TestView : Window - { - public TestView() => ViewModel = new TestViewModel(); - } - - public partial class TestViewModel : ReactiveObject - { - public string? Name { get; set; } - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests IViewFor with PerRequest registration type. - /// A task to monitor the async. - [Test] - public Task PerReq() - { - const string sourceCode = """ - using System.Collections.ObjectModel; - using System.Windows; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - [IViewFor(RegistrationType = SplatRegistrationType.PerRequest)] - public partial class TestView : Window - { - public TestView() => ViewModel = new TestViewModel(); - } - - public partial class TestViewModel : ReactiveObject - { - public bool IsActive { get; set; } - } - """; - - return TestHelper.TestPass(sourceCode); - } - - /// Tests IViewFor with ViewModel registration. - /// A task to monitor the async. - [Test] - public Task FromIViewForWithViewModelRegistration() - { - const string sourceCode = """ - using System.Collections.ObjectModel; - using System.Windows; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - [IViewFor( - RegistrationType = SplatRegistrationType.LazySingleton, - ViewModelRegistrationType = SplatRegistrationType.LazySingleton)] - public partial class TestView : Window - { - public TestView() => ViewModel = new TestViewModel(); - } - - public partial class TestViewModel : ReactiveObject - { - public int Count { get; set; } - } - """; - - return TestHelper.TestPass(sourceCode); - } - /// Tests IViewFor with nested ViewModel. /// A task to monitor the async. [Test] @@ -257,7 +143,7 @@ public partial class View2 : Window public View2() => ViewModel = new ViewModel2(); } - [IViewFor(RegistrationType = SplatRegistrationType.LazySingleton)] + [IViewFor] public partial class View3 : Window { public View3() => ViewModel = new ViewModel3(); @@ -430,36 +316,6 @@ public partial class CommandsView : Window return TestHelper.TestPass(sourceCode); } - /// Tests IViewFor with all registration options. - /// A task to monitor the async. - [Test] - public Task AllRegOpts() - { - const string sourceCode = """ - using System.Collections.ObjectModel; - using System.Windows; - using ReactiveUI; - using ReactiveUI.SourceGenerators; - - namespace TestNs; - - public partial class FullViewModel - { - public string? Title { get; set; } - } - - [IViewFor( - RegistrationType = SplatRegistrationType.Constant, - ViewModelRegistrationType = SplatRegistrationType.PerRequest)] - public partial class FullView : Window - { - public FullView() => ViewModel = new FullViewModel(); - } - """; - - return TestHelper.TestPass(sourceCode); - } - /// Tests IViewFor with interface ViewModel type via string. /// A task to monitor the async. [Test] diff --git a/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/AnalyzerReleases.Shipped.md b/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/AnalyzerReleases.Shipped.md index cf40e4fc..40598cb3 100644 --- a/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/AnalyzerReleases.Shipped.md +++ b/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/AnalyzerReleases.Shipped.md @@ -46,14 +46,14 @@ This rule checks if the `Reactive` has Invalid property targeted attribute type. - RXUISG0011 - ReactiveGenerator This rule checks if the `Reactive` has Invalid property targeted attribute expression. -- RXUISG0012 - ObservableAsPropertyGenerator -This rule checks if the `ObservableAsProperty` has Invalid property targeted attribute type. +- RXUISG0012 - Forwarded attributes +This rule checks that an attribute a member forwards to its generated member with a `[property:]` or `[field:]` target resolves to a valid type. -- RXUISG0013 - ObservableAsPropertyGenerator -This rule checks if the `ObservableAsProperty` has Invalid property targeted attribute expression. +- RXUISG0013 - Forwarded attributes +This rule checks that an attribute a member forwards to its generated member with a `[property:]` or `[field:]` target uses valid expressions. -- RXUISG0014 - ObservableAsPropertyGenerator -This rule checks if the `ObservableAsProperty` has Invalid generated property declaration. +- RXUISG0014 - Removed +`[ObservableAsProperty]` moved to ReactiveUI.Binding. - RXUISG0015 - ReactiveGenerator This rule checks if the `Reactive` attribute is being used correctly. If the `Reactive` has Invalid generated property declaration. @@ -61,8 +61,8 @@ This rule checks if the `Reactive` attribute is being used correctly. If the `Re - RXUISG0016 - PropertyToReactiveFieldCodeFixProvider This rule checks if there are any Properties to change to Reactive Field, change to [Reactive] private type _fieldName;. -- RXUISG0017 - ObservableAsPropertyFromObservableGenerator -This rule checks if the `ObservableAsProperty` has Invalid generated property declaration. +- RXUISG0017 - Removed +`[ObservableAsProperty]` moved to ReactiveUI.Binding. - RXUISG0020 - ReactiveUI.SourceGenerators.CodeFixers.ReactiveAttributeMisuseAnalyzer This rule warns when `[Reactive]` is used on non-partial property/type. diff --git a/src/ReactiveUI.SourceGenerators.Execute.Maui/TestViewModel.cs b/src/ReactiveUI.SourceGenerators.Execute.Maui/TestViewModel.cs index 893af8f7..f1cf7f8e 100644 --- a/src/ReactiveUI.SourceGenerators.Execute.Maui/TestViewModel.cs +++ b/src/ReactiveUI.SourceGenerators.Execute.Maui/TestViewModel.cs @@ -34,11 +34,12 @@ public partial class TestViewModel : ReactiveObject /// Represents the duration of the cancellable sample command. private const int CancellableCommandDelayMilliseconds = 2_000; - /// Stores the observable-as-property sample value. - [JsonInclude] - [DataMember] - [ObservableAsProperty(ReadOnly = false)] - private double _test2Property; + /// Backs . + /// + /// [ObservableAsProperty] moved to ReactiveUI.Binding, so the helper is written by hand with ReactiveUI's + /// ToProperty. On ReactiveUI.Binding, mark a partial property [ObservableAsProperty] instead. + /// + private ObservableAsPropertyHelper? _test2PropertyHelper; /// Stores the reactive property sample value. [JsonInclude] @@ -52,6 +53,11 @@ public partial class TestViewModel : ReactiveObject /// Gets an observable that enables the first sample command. public IObservable CanExecuteTest1 => Observable.Return(_test1Property >= 0); + /// Gets the latest value the observable command produced. + [JsonInclude] + [DataMember] + public double Test2Property => _test2PropertyHelper?.Value ?? default; + /// Writes a message when the first generated command executes. [ReactiveCommand(CanExecute = nameof(CanExecuteTest1))] [property: JsonInclude] @@ -179,7 +185,6 @@ private void InitializeObservableProperty() _test2PropertyHelper = Test8ObservableCommand!.ToProperty(this, static viewModel => viewModel.Test2Property); _ = Test8ObservableCommand.Execute(ObservableCommandArgument).Subscribe(Console.Out.WriteLine); Console.Out.WriteLine($"Test2Property Value: {Test2Property}"); - Console.Out.WriteLine($"Test2Property underlying Value: {_test2Property}"); } /// Executes the cancellable and argument-taking generated commands. diff --git a/src/ReactiveUI.SourceGenerators.Execute/Program.cs b/src/ReactiveUI.SourceGenerators.Execute/Program.cs index 4ce9524f..3e84e7b4 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/Program.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/Program.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for full license information. using System.Diagnostics.CodeAnalysis; -using ReactiveUI.SourceGenerators; +using ReactiveUI; using Splat; namespace SGReactiveUI.SourceGenerators.Test; @@ -16,7 +16,10 @@ public static class Program [System.STAThread] public static void Main() { - AppLocator.CurrentMutable.RegisterViewsForViewModelsSourceGenerated(); + // The generated RegisterViewsForViewModelsSourceGenerated() is gone: ReactiveUI.Binding's view locator registers + // every IViewFor at compile time. Without ReactiveUI.Binding, register the views with Splat yourself. + AppLocator.CurrentMutable.Register>(static () => new TestViewWinForms()); + AppLocator.CurrentMutable.Register>>(static () => new TestViewWpf2()); Application.Run(new TestViewWinForms()); } } diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestClassOAPH_VM.cs b/src/ReactiveUI.SourceGenerators.Execute/TestClassOAPH_VM.cs index 83c47010..3829c13f 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestClassOAPH_VM.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestClassOAPH_VM.cs @@ -8,13 +8,23 @@ namespace SGReactiveUI.SourceGenerators.Test; -/// TestClassOAPH VM. +/// Read-only properties that follow reactive properties. +/// +/// [ObservableAsProperty] moved to ReactiveUI.Binding, so this sample writes each +/// by hand with ReactiveUI's ToProperty. On ReactiveUI.Binding, mark a +/// partial property [ObservableAsProperty] and the helper field is generated for you. +/// [ExcludeFromCodeCoverage] public partial class TestClassOAPH_VM : ReactiveObject { - /// Stores the observable boolean field. - [ObservableAsProperty] - private bool _observableTestField; + /// Backs . + private readonly ObservableAsPropertyHelper _observableTestPropertyHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _observableTestFieldHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _testHelper; /// Stores the reactive boolean field. [Reactive] @@ -37,14 +47,11 @@ public TestClassOAPH_VM() TestProperty = "Test2"; } - /// - /// Gets a value indicating whether [observable test property]. - /// - /// - /// true if [observable test property]; otherwise, false. - /// - [ObservableAsProperty] - public partial bool ObservableTestProperty { get; } + /// Gets a value indicating whether is set. + public bool ObservableTestProperty => _observableTestPropertyHelper.Value; + + /// Gets a value indicating whether is set. + public bool ObservableTestField => _observableTestFieldHelper.Value; /// /// Gets or sets a value indicating whether [reactive test property]. @@ -55,14 +62,8 @@ public TestClassOAPH_VM() [Reactive] public partial bool ReactiveTestProperty { get; set; } - /// - /// Gets the test. - /// - /// - /// The test. - /// - [ObservableAsProperty] - public partial string? Test { get; } + /// Gets the latest . + public string? Test => _testHelper.Value; /// Creates the helper that projects the reactive property to its observable counterpart. /// The initialized observable property helper. diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.Initialization.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.Initialization.cs index d049a2c9..554e7b47 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.Initialization.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.Initialization.cs @@ -22,12 +22,12 @@ public partial class TestViewModel /// Creates the helper that projects the test command output. /// The initialized observable property helper. private ObservableAsPropertyHelper CreateTest2PropertyHelper() => - Test8ObservableCommand!.ToProperty(this, x => x.Test2Property); + Test8ObservableCommand!.ToProperty(this, x => x.Test2Property, initialValue: Test2InitialValue); /// Creates the helper that projects the activated reactive property. /// The initialized observable property helper. private ObservableAsPropertyHelper CreateTest11PropertyHelper() => - this.WhenAnyValue(x => x.Test12Property).ToProperty(this, x => x.Test11Property, out _); + this.WhenAnyValue(x => x.Test12Property).ToProperty(this, x => x.Test11Property, initialValue: Test11InitialValue); /// Creates the helper that projects the protected observable property. /// The initialized observable property helper. @@ -37,34 +37,59 @@ private ObservableAsPropertyHelper CreateObservableAsPropertyTest3Proper /// Creates the helper that projects the partial observable property. /// The initialized observable property helper. private ObservableAsPropertyHelper CreateObservableAsPropertyFromPropertyHelper() => - _fromPartialTestSubject.ToProperty(this, x => x.ObservableAsPropertyFromProperty); + _fromPartialTestSubject.ToProperty(this, x => x.ObservableAsPropertyFromProperty, initialValue: FromPropertyInitialValue); /// Creates the helper that projects the active PLC identifier. /// The initialized observable property helper. private ObservableAsPropertyHelper CreatePlcActiveHelper() => - this.WhenAnyValue(x => x.PartialRequiredPropertyTest).ToProperty(this, nameof(PLCActive)); + this.WhenAnyValue(x => x.PartialRequiredPropertyTest).ToProperty(this, nameof(PLCActive), initialValue: "Not Connected"); /// Creates the helper that projects the PLC status message. /// The initialized observable property helper. private ObservableAsPropertyHelper CreatePlcStatusHelper() => - this.WhenAnyValue(x => x.PLCActive).Select(static x => x ?? string.Empty).ToProperty(this, nameof(PLCStatus)); + this.WhenAnyValue(x => x.PLCActive).Select(static x => x ?? string.Empty).ToProperty(this, nameof(PLCStatus), initialValue: string.Empty); /// Creates the helper that projects the PLC port. /// The initialized observable property helper. private ObservableAsPropertyHelper CreatePlcPortHelper() => - this.WhenAnyValue(x => x.Test1Property).ToProperty(this, nameof(PLCPort)); + this.WhenAnyValue(x => x.Test1Property).ToProperty(this, nameof(PLCPort), initialValue: PlcInitialPort); /// Creates the helper that projects the PLC instance. /// The initialized observable property helper. private ObservableAsPropertyHelper CreatePlcInstanceHelper() => - this.WhenAnyValue(x => x.PlcInstanceCore).ToProperty(this, nameof(InstanceOfPLC)); + this.WhenAnyValue(x => x.PlcInstanceCore).ToProperty(this, nameof(InstanceOfPLC), initialValue: new()); + + /// Creates the helper that follows the non-null reference type observable. + /// The initialized observable property helper. + private ObservableAsPropertyHelper CreateReferenceTypeHelper() => + ReferenceTypeObservable.ToProperty(this, nameof(ReferenceTypeObservableProperty), initialValue: new()); + + /// Creates the helper that follows the nullable reference type observable. + /// The initialized observable property helper. + private ObservableAsPropertyHelper CreateNullableReferenceTypeHelper() => + NullableReferenceTypeObservable.ToProperty(this, nameof(NullableReferenceTypeObservableProperty)); + + /// Creates the helper that follows . + /// The initialized observable property helper. + private ObservableAsPropertyHelper CreateObservableAsPropertyTest2PropertyHelper() => + ObservableAsPropertyTest2.ToProperty(this, nameof(ObservableAsPropertyTest2Property), initialValue: ObservableAsPropertyInitialValue); + + /// Creates the helper that follows . + /// The initialized observable property helper. + private ObservableAsPropertyHelper CreateMyReadOnlyPropertyHelper() => + ObservableAsPropertyTest().ToProperty(this, nameof(MyReadOnlyProperty), initialValue: NegativeInitialReadOnlyValue); + + /// Creates the helper that follows . + /// The initialized observable property helper. + private ObservableAsPropertyHelper CreateMyReadOnlyNonNullPropertyHelper() => + ObservableAsPropertyTestNonNull().ToProperty(this, nameof(MyReadOnlyNonNullProperty), initialValue: NegativeNonNullReadOnlyValue); /// Registers the lifecycle activation subscriptions. private void RegisterActivation() => this.WhenActivated(disposables => { Console.Out.WriteLine("Activated"); - _test11PropertyHelper?.Dispose(); + _test11PropertyHelper.Dispose(); _test11PropertyHelper = CreateTest11PropertyHelper(); disposables(_test11PropertyHelper); disposables(GetDataCommand.Do(static _ => Console.Out.WriteLine("GetDataCommand Executed")).Subscribe()); @@ -75,17 +100,12 @@ private void RegisterActivation() => private void InitializeObservableProperties() { Console.Out.WriteLine("MyReadOnlyProperty before init"); - _myReadOnlyProperty = NegativeInitialReadOnlyValue; Console.Out.WriteLine(MyReadOnlyProperty); - Console.Out.WriteLine(_myReadOnlyProperty); Console.Out.WriteLine("MyReadOnlyNonNullProperty before init"); - _myReadOnlyNonNullProperty = NegativeNonNullReadOnlyValue; Console.Out.WriteLine(MyReadOnlyNonNullProperty); - Console.Out.WriteLine(_myReadOnlyNonNullProperty); - _observableAsPropertyTest2Property = ObservableAsPropertyInitialValue; Console.Out.WriteLine(ObservableAsPropertyTest2Property); - Console.Out.WriteLine(_observableAsPropertyTest2Property); - InitializeOAPH(); + Console.Out.WriteLine(ReferenceTypeObservableProperty); + Console.Out.WriteLine(NullableReferenceTypeObservableProperty); } /// Exercises the initial generated command set. @@ -111,7 +131,6 @@ private void ExerciseInitialCommands() Console.Out.WriteLine($"Test2Property default Value: {Test2Property}"); Test8ObservableCommand?.Execute(CommandArgumentValue).Subscribe(static d => Console.Out.WriteLine(d)); Console.Out.WriteLine($"Test2Property Value: {Test2Property}"); - Console.Out.WriteLine($"Test2Property underlying Value: {_test2Property}"); Console.Out.WriteLine(ObservableAsPropertyTest2Property); } @@ -119,28 +138,20 @@ private void ExerciseInitialCommands() private void ExerciseReadOnlyProperties() { Console.Out.WriteLine("MyReadOnlyProperty After Init"); - _myReadOnlyProperty = NegativeUpdatedReadOnlyValue; + _testSubject.OnNext(NegativeUpdatedReadOnlyValue); Console.Out.WriteLine(MyReadOnlyProperty); - Console.Out.WriteLine(_myReadOnlyProperty); _testSubject.OnNext(FirstObservedDoubleValue); Console.Out.WriteLine(MyReadOnlyProperty); - Console.Out.WriteLine(_myReadOnlyProperty); _testSubject.OnNext(null); Console.Out.WriteLine(MyReadOnlyProperty); - Console.Out.WriteLine(_myReadOnlyProperty); Console.Out.WriteLine("MyReadOnlyNonNullProperty After Init"); - _myReadOnlyNonNullProperty = NegativeUpdatedReadOnlyValue; + _testNonNullSubject.OnNext(NegativeUpdatedReadOnlyValue); Console.Out.WriteLine(MyReadOnlyNonNullProperty); - Console.Out.WriteLine(_myReadOnlyNonNullProperty); _testNonNullSubject.OnNext(SecondObservedDoubleValue); Console.Out.WriteLine(MyReadOnlyNonNullProperty); - Console.Out.WriteLine(_myReadOnlyNonNullProperty); _testNonNullSubject.OnNext(default); - Console.Out.WriteLine(_test13Property); Console.Out.WriteLine(Test13Property); - Console.Out.WriteLine(_test13PropertyHelper); Console.Out.WriteLine(MyReadOnlyNonNullProperty); - Console.Out.WriteLine(_myReadOnlyNonNullProperty); } /// Exercises the remaining commands and observable property updates. diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs index a16c3995..566a4f06 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs @@ -58,6 +58,18 @@ public partial class TestViewModel : ReactiveObject, IActivatableViewModel, IDis /// Represents the cancellation delay in milliseconds. private const int CancellationDelayMilliseconds = 2_000; + /// Represents the initial value of . + private const double Test2InitialValue = 1.1D; + + /// Represents the initial value of and . + private const double Test11InitialValue = 11.1D; + + /// Represents the initial value of . + private const int PlcInitialPort = 9000; + + /// Represents the initial value of . + private const int FromPropertyInitialValue = 10; + /// Provides the observable used to control the private command. private readonly IObservable _observable = Observable.Return(true); @@ -73,23 +85,51 @@ public partial class TestViewModel : ReactiveObject, IActivatableViewModel, IDis /// Provides the scheduler used by generated reactive commands. private readonly IScheduler _scheduler = RxSchedulers.MainThreadScheduler; - /// Stores the first observable-as-property value. - [property: JsonInclude] - [DataMember] - [ObservableAsProperty] - private double? _test2Property = 1.1D; + // [ObservableAsProperty] moved to ReactiveUI.Binding. The read-only properties below are backed by + // ObservableAsPropertyHelper fields written by hand with ReactiveUI's ToProperty. On ReactiveUI.Binding, mark a + // partial property [ObservableAsProperty] and assign the generated _nameHelper field with ToProperty instead. + /// Backs . + private readonly ObservableAsPropertyHelper _test2PropertyHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _observableAsPropertyTest3PropertyHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _observableAsPropertyTest2PropertyHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _observableAsPropertyFromPropertyHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _plcActiveHelper; - /// Stores the second observable-as-property value. - [ObservableAsProperty(ReadOnly = false)] - private double? _test11Property = 11.1D; + /// Backs . + private readonly ObservableAsPropertyHelper _plcStatusHelper; - /// Stores the third observable-as-property value. - [ObservableAsProperty(ReadOnly = false)] - private double _test13Property = 11.1D; + /// Backs . + private readonly ObservableAsPropertyHelper _plcPortHelper; - /// Stores the protected observable-as-property value. - [ObservableAsProperty(UseProtected = true)] - private double _observableAsPropertyTest3Property; + /// Backs . + private readonly ObservableAsPropertyHelper _plcInstanceHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _referenceTypeObservablePropertyHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _nullableReferenceTypeObservablePropertyHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _myReadOnlyPropertyHelper; + + /// Backs . + private readonly ObservableAsPropertyHelper _myReadOnlyNonNullPropertyHelper; + + /// Backs ; replaced each time the view model activates. + private ObservableAsPropertyHelper _test11PropertyHelper; + + /// Stores the value follows. + [Reactive] + private double _test13Property = Test11InitialValue; /// Stores the value used by the reactive test property. [property: Test(AParameter = "Test Input")] @@ -149,13 +189,17 @@ public TestViewModel() _test2PropertyHelper = CreateTest2PropertyHelper(); _observableAsPropertyTest3PropertyHelper = CreateObservableAsPropertyTest3PropertyHelper(); _observableAsPropertyFromPropertyHelper = CreateObservableAsPropertyFromPropertyHelper(); - _pLCActiveHelper = CreatePlcActiveHelper(); - _pLCStatusHelper = CreatePlcStatusHelper(); - _pLCPortHelper = CreatePlcPortHelper(); - _instanceOfPLCHelper = CreatePlcInstanceHelper(); - _referenceTypeObservableProperty = default!; + _plcActiveHelper = CreatePlcActiveHelper(); + _plcStatusHelper = CreatePlcStatusHelper(); + _plcPortHelper = CreatePlcPortHelper(); + _plcInstanceHelper = CreatePlcInstanceHelper(); ReferenceTypeObservable = Observable.Return(new object()); - NullableReferenceTypeObservable = Observable.Return(new object()); + NullableReferenceTypeObservable = Observable.Return(null); + _referenceTypeObservablePropertyHelper = CreateReferenceTypeHelper(); + _nullableReferenceTypeObservablePropertyHelper = CreateNullableReferenceTypeHelper(); + _observableAsPropertyTest2PropertyHelper = CreateObservableAsPropertyTest2PropertyHelper(); + _myReadOnlyPropertyHelper = CreateMyReadOnlyPropertyHelper(); + _myReadOnlyNonNullPropertyHelper = CreateMyReadOnlyNonNullPropertyHelper(); RegisterActivation(); InitializeObservableProperties(); ExerciseInitialCommands(); @@ -245,45 +289,48 @@ public TestViewModel() /// /// The observable as property test2. /// - [ObservableAsProperty] - [property: Test(AParameter = "Test Input")] public IObservable ObservableAsPropertyTest2 => Observable.Return(DefaultObservableValue); - /// - /// Gets the current active PLC identifier or name. - /// - [ObservableAsProperty(InitialValue = "Not Connected")] - public partial string? PLCActive { get; } + /// Gets the latest value produced. + [Test(AParameter = "Test Input")] + public int ObservableAsPropertyTest2Property => _observableAsPropertyTest2PropertyHelper.Value; - /// - /// Gets the current PLC status message, initialized with an empty string. - /// - [ObservableAsProperty(InitialValue = "")] - public partial string PLCStatus { get; } + /// Gets the latest value produced. + [JsonInclude] + public double? Test2Property => _test2PropertyHelper.Value; - /// - /// Gets the TCP port number used to communicate with the PLC. - /// - [ObservableAsProperty(InitialValue = "9000")] - public partial int PLCPort { get; } + /// Gets the latest , following it while the view model is active. + public double? Test11Property => _test11PropertyHelper.Value; - /// - /// Gets the current instance of the PLC (Programmable Logic Controller) used by the application. - /// - [ObservableAsProperty(InitialValue = $"new {nameof(PLCInstance)}()")] - public partial PLCInstance InstanceOfPLC { get; } + /// Gets the latest . + public double ObservableAsPropertyTest3Property => _observableAsPropertyTest3PropertyHelper.Value; + + /// Gets the latest value produced. + public double? MyReadOnlyProperty => _myReadOnlyPropertyHelper.Value; + + /// Gets the latest value produced. + public double MyReadOnlyNonNullProperty => _myReadOnlyNonNullPropertyHelper.Value; + + /// Gets the current active PLC identifier or name. + public string? PLCActive => _plcActiveHelper.Value; + + /// Gets the current PLC status message, initialized with an empty string. + public string PLCStatus => _plcStatusHelper.Value; + + /// Gets the TCP port number used to communicate with the PLC. + public int PLCPort => _plcPortHelper.Value; + + /// Gets the current instance of the PLC (Programmable Logic Controller) used by the application. + public PLCInstance InstanceOfPLC => _plcInstanceHelper.Value; /// Gets the Activator which will be used by the View when Activation/Deactivation occurs. public ViewModelActivator Activator { get; } = new(); - /// - /// Gets the observable as property from property. - /// + /// Gets the observable as property from property. /// /// The observable as property from property. /// - [ObservableAsProperty(InitialValue = "10")] - public partial int ObservableAsPropertyFromProperty { get; } + public int ObservableAsPropertyFromProperty => _observableAsPropertyFromPropertyHelper.Value; /// /// Gets or sets the value for internal use within the partial class or assembly. @@ -291,24 +338,26 @@ public TestViewModel() [Reactive] internal partial int InternalPartialPropertyTest { get; set; } + /// Gets the latest value produced. + private object ReferenceTypeObservableProperty => _referenceTypeObservablePropertyHelper.Value; + + /// Gets the latest value produced. + private object? NullableReferenceTypeObservableProperty => _nullableReferenceTypeObservablePropertyHelper.Value; + /// Gets the observable used for the non-null reference type example. - [ObservableAsProperty] private IObservable ReferenceTypeObservable { get; } /// Gets the observable used for the nullable reference type example. - [ObservableAsProperty] private IObservable NullableReferenceTypeObservable { get; } /// Gets observables as property test. /// /// Observable of double. /// - [ObservableAsProperty(PropertyName = "MyReadOnlyProperty")] public IObservable ObservableAsPropertyTest() => _testSubject; /// Observables as property test non null. /// Observable of double. - [ObservableAsProperty(PropertyName = "MyReadOnlyNonNullProperty")] public IObservable ObservableAsPropertyTestNonNull() => _testNonNullSubject; /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. @@ -333,6 +382,19 @@ protected virtual void Dispose(bool disposing) _testSubject.Dispose(); _testNonNullSubject.Dispose(); _fromPartialTestSubject.Dispose(); + _test2PropertyHelper.Dispose(); + _test11PropertyHelper.Dispose(); + _observableAsPropertyTest2PropertyHelper.Dispose(); + _observableAsPropertyTest3PropertyHelper.Dispose(); + _observableAsPropertyFromPropertyHelper.Dispose(); + _plcActiveHelper.Dispose(); + _plcStatusHelper.Dispose(); + _plcPortHelper.Dispose(); + _plcInstanceHelper.Dispose(); + _referenceTypeObservablePropertyHelper.Dispose(); + _nullableReferenceTypeObservablePropertyHelper.Dispose(); + _myReadOnlyPropertyHelper.Dispose(); + _myReadOnlyNonNullPropertyHelper.Dispose(); } _disposedValue = true; diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewWinForms.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewWinForms.cs index becab708..cb749090 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewWinForms.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewWinForms.cs @@ -8,7 +8,7 @@ namespace SGReactiveUI.SourceGenerators.Test; /// Provides the Windows Forms test view. /// -[IViewFor(RegistrationType = SplatRegistrationType.LazySingleton)] +[IViewFor] public partial class TestViewWinForms : Form { /// Initializes a new instance of the class. diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs index 73cde80e..5ca2e60e 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs @@ -10,7 +10,7 @@ namespace SGReactiveUI.SourceGenerators.Test; /// Provides the WPF test view. -[IViewFor(RegistrationType = SplatRegistrationType.PerRequest, ViewModelRegistrationType = SplatRegistrationType.Constant)] +[IViewFor] public partial class TestViewWpf : Window { /// Initializes a new instance of the class. diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf2.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf2.cs index 4c342a0e..b5f992e3 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf2.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf2.cs @@ -9,7 +9,7 @@ namespace SGReactiveUI.SourceGenerators.Test; /// Provides the generic WPF test view. /// -[IViewFor("SGReactiveUI.SourceGenerators.Test.TestViewModel2", RegistrationType = SplatRegistrationType.PerRequest)] +[IViewFor("SGReactiveUI.SourceGenerators.Test.TestViewModel2")] public partial class TestViewWpf2 : Window { /// Initializes a new instance of the class. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/AnalyzerReleases.Shipped.md b/src/ReactiveUI.SourceGenerators.Roslyn/AnalyzerReleases.Shipped.md index b0409285..050aa331 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/AnalyzerReleases.Shipped.md +++ b/src/ReactiveUI.SourceGenerators.Roslyn/AnalyzerReleases.Shipped.md @@ -59,14 +59,14 @@ This rule checks if the `Reactive` has Invalid property targeted attribute type. - RXUISG0011 - ReactiveGenerator This rule checks if the `Reactive` has Invalid property targeted attribute expression. -- RXUISG0012 - ObservableAsPropertyGenerator -This rule checks if the `ObservableAsProperty` has Invalid property targeted attribute type. +- RXUISG0012 - Forwarded attributes +This rule checks that an attribute a member forwards to its generated member with a `[property:]` or `[field:]` target resolves to a valid type. -- RXUISG0013 - ObservableAsPropertyGenerator -This rule checks if the `ObservableAsProperty` has Invalid property targeted attribute expression. +- RXUISG0013 - Forwarded attributes +This rule checks that an attribute a member forwards to its generated member with a `[property:]` or `[field:]` target uses valid expressions. -- RXUISG0014 - ObservableAsPropertyGenerator -This rule checks if the `ObservableAsProperty` has Invalid generated property declaration. +- RXUISG0014 - Removed +`[ObservableAsProperty]` moved to ReactiveUI.Binding. - RXUISG0015 - ReactiveGenerator This rule checks if the `Reactive` attribute is being used correctly. If the `Reactive` has Invalid generated property declaration. @@ -74,11 +74,11 @@ This rule checks if the `Reactive` attribute is being used correctly. If the `Re - RXUISG0016 - PropertyToReactiveFieldCodeFixProvider This rule checks if there are any Properties to change to Reactive Field, change to [Reactive] private type _fieldName;. -- RXUISG0017 - ObservableAsPropertyFromObservableGenerator -This rule checks if the `ObservableAsProperty` has Invalid generated property declaration. +- RXUISG0017 - Removed +`[ObservableAsProperty]` moved to ReactiveUI.Binding. -- RXUISG0018 - ObservableAsPropertyFromObservableGenerator/ReactiveGenerator -This rule checks if the `ObservableAsProperty` or `Reactive` has Invalid class inheritance, must inherit from `ReactiveObject`. +- RXUISG0018 - ReactiveGenerator +This rule checks if the `Reactive` has Invalid class inheritance, must inherit from `ReactiveObject`. - RXUISG0019 - BindableDerivedListGenerator - This rule checks if the `BindableDerivedList` has Invalid property inheritance type. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/AnalyzerReleases.Unshipped.md b/src/ReactiveUI.SourceGenerators.Roslyn/AnalyzerReleases.Unshipped.md index 11aac41e..4a2c0632 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/AnalyzerReleases.Unshipped.md +++ b/src/ReactiveUI.SourceGenerators.Roslyn/AnalyzerReleases.Unshipped.md @@ -1,2 +1,16 @@ ; Unshipped analyzer releases ; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md + +### Removed Rules + +Rule ID | Category | Severity | Notes +--------|----------|----------|------- +RXUISG0014 | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | `[ObservableAsProperty]` moved to ReactiveUI.Binding +RXUISG0017 | ReactiveUI.SourceGenerators.ObservableAsPropertyFromObservableGenerator | Error | `[ObservableAsProperty]` moved to ReactiveUI.Binding + +### Changed Rules + +Rule ID | New Category | New Severity | Old Category | Old Severity | Notes +--------|--------------|--------------|--------------|--------------|------- +RXUISG0012 | ReactiveUI.SourceGenerators | Error | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | Reports an unresolved attribute forwarded by any generator +RXUISG0013 | ReactiveUI.SourceGenerators | Error | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | Reports an invalid attribute expression forwarded by any generator diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs index 43f43f6f..95177df1 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2026 .NET Foundation and Contributors. All rights reserved. +// 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. @@ -66,14 +66,6 @@ internal enum InheritanceModifier Override, New, } - - internal enum SplatRegistrationType - { - None, - LazySingleton, - Constant, - PerRequest, - } #nullable restore #pragma warning restore """; @@ -283,119 +275,6 @@ public ReactiveAttribute(params string[] alsoNotify) """; #endif - public const string ObservableAsPropertyAttributeType = "ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute"; -#if ROSYLN_412 || ROSYLN_500 - public static string ObservableAsPropertyAttribute => $$""" -// 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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } - - /// - /// Gets the Initial Value of the OAPH property. - /// This should be a string representation of the value. i.e. "42" or "DateTime.Now" or "new List<string>()". - /// String values are automatically quoted. - /// - public string? InitialValue { get; init; } -} -#nullable restore -#pragma warning restore -"""; -#else - public static string ObservableAsPropertyAttribute => $$""" -// 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; - -/// -/// ObservableAsPropertyAttribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "{{ReactiveGenerator.GeneratorVersion}}")] -[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] -internal sealed class ObservableAsPropertyAttribute : global::System.Attribute -{ - /// - /// Gets the name of the property. - /// - /// - /// The name of the property. - /// - public string? PropertyName { get; init; } - - /// - /// Gets the Readonly state of the OAPH property. - /// - /// - /// The is read only of the OAPH property. - /// - public bool ReadOnly { get; init; } = true; - - /// - /// Gets the AccessModifier of the OAPH property. - /// - /// - /// The AccessModifier of the OAPH property, protected if true. - /// - public bool UseProtected { get; init; } = false; - - /// - /// Gets the inheritance modifier of the generated property. - /// - public InheritanceModifier Inheritance { get; init; } -} -#nullable restore -#pragma warning restore -"""; -#endif public const string IViewForAttributeType = "ReactiveUI.SourceGenerators.IViewForAttribute"; public static string IViewForAttribute => $$""" @@ -419,20 +298,7 @@ namespace ReactiveUI.SourceGenerators; /// Type of the view model. [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.IViewForGenerator", "{{ReactiveGenerator.GeneratorVersion}}")] [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -444,20 +310,7 @@ internal sealed class IViewForAttribute : global::System.Attribute /// Type of the view model, ensure to use the full type name including namespace. [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.IViewForGenerator", "{{ReactiveGenerator.GeneratorVersion}}")] [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute -{ - /// - /// Gets the Splat registration type for Splat IViewFor registration. - /// Registers IViewFor in the Splat service locator. - /// - public SplatRegistrationType RegistrationType { get; init; } = SplatRegistrationType.None; - - /// - /// Gets the Splat registration type for Splat View Model registration. - /// Registers the ViewModel (T) in the Splat service locator. - /// - public SplatRegistrationType ViewModelRegistrationType { get; init; } = SplatRegistrationType.None; -} +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore """; diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ContextExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ContextExtensions.cs index e7ba976f..1e369b60 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ContextExtensions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ContextExtensions.cs @@ -242,7 +242,7 @@ private static void AddExplicitForwardedAttribute( { if (!context.SemanticModel.GetSymbolInfo(attribute, token).TryGetAttributeTypeSymbol(out var attributeType)) { - diagnostics.Add(InvalidPropertyTargetedAttributeOnObservableAsPropertyField, attribute, symbol, attribute.Name); + diagnostics.Add(InvalidForwardedAttributeType, attribute, symbol, attribute.Name); return; } @@ -253,7 +253,7 @@ private static void AddExplicitForwardedAttribute( token, out var attributeInfo)) { - diagnostics.Add(InvalidPropertyTargetedAttributeExpressionOnObservableAsPropertyField, attribute, symbol, attribute.Name); + diagnostics.Add(InvalidForwardedAttributeExpression, attribute, symbol, attribute.Name); return; } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/DiagnosticDescriptors.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/DiagnosticDescriptors.cs index 386ea367..fa3575c4 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/DiagnosticDescriptors.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/DiagnosticDescriptors.cs @@ -60,53 +60,37 @@ internal static class DiagnosticDescriptors helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html"); /// - /// Gets a indicating when a field with [ObservableAsProperty] is using an invalid attribute targeting the property. + /// Gets a indicating when a member forwards an attribute to its generated member and the attribute type cannot be resolved. /// - /// Format: "The field {0} annotated with [ObservableAsProperty] is using attribute "{1}" which was not recognized as a valid type (are you missing a using directive?)". + /// Format: "The member {0} is forwarding attribute "{1}" to its generated member, but it was not recognized as a valid type (are you missing a using directive?)". /// /// - internal static readonly DiagnosticDescriptor InvalidPropertyTargetedAttributeOnObservableAsPropertyField = new( + internal static readonly DiagnosticDescriptor InvalidForwardedAttributeType = new( id: "RXUISG0012", - title: "Invalid property targeted attribute type", - messageFormat: "The field {0} annotated with [ObservableAsProperty] is using attribute \"{1}\" which was not recognized as a valid type (are you missing a using directive?)", - category: "ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", + title: "Invalid forwarded attribute type", + messageFormat: "The member {0} is forwarding attribute \"{1}\" to its generated member, but it was not recognized as a valid type (are you missing a using directive?)", + category: "ReactiveUI.SourceGenerators", defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true, - description: "All attributes targeting the generated property for a field annotated with [ObservableAsProperty] must correctly be resolved to valid types.", + description: "All attributes a member forwards to its generated member with a [property:] or [field:] target must resolve to valid types.", helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html"); /// - /// Gets a indicating when a field with [ObservableAsProperty] is using an invalid attribute expression targeting the property. + /// Gets a indicating when a member forwards an attribute to its generated member with an invalid expression. /// - /// Format: "The field {0} annotated with [ObservableAsProperty] is using attribute "{1}" with an invalid expression. + /// Format: "The member {0} is forwarding attribute "{1}" to its generated member with an invalid expression". /// The attribute constructor parameters might be incorrect. /// /// - internal static readonly DiagnosticDescriptor InvalidPropertyTargetedAttributeExpressionOnObservableAsPropertyField = new( + internal static readonly DiagnosticDescriptor InvalidForwardedAttributeExpression = new( id: "RXUISG0013", - title: "Invalid property targeted attribute expression", - messageFormat: "The field {0} annotated with [ObservableAsProperty] is using attribute \"{1}\" with an invalid expression " + title: "Invalid forwarded attribute expression", + messageFormat: "The member {0} is forwarding attribute \"{1}\" to its generated member with an invalid expression " + "(are you passing any incorrect parameters to the attribute constructor?)", - category: "ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", + category: "ReactiveUI.SourceGenerators", defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true, - description: "All attributes targeting the generated property for a field annotated with [ObservableAsProperty] must be using valid expressions.", - helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html"); - - /// - /// Gets a indicating when a generated property created with [ObservableAsProperty] would cause conflicts with other generated members. - /// - /// Format: "The field {0}.{1} cannot be used to generate an observable property, as its name or type would cause conflicts with other generated members". - /// - /// - internal static readonly DiagnosticDescriptor InvalidObservableAsPropertyError = new( - id: "RXUISG0014", - title: "Invalid generated property declaration", - messageFormat: "The field {0}.{1} cannot be used to generate an observable As property, as its name or type would cause conflicts with other generated members", - category: "ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", - defaultSeverity: DiagnosticSeverity.Error, - isEnabledByDefault: true, - description: "The fields annotated with [ObservableAsProperty] cannot result in a property name or have a type that would cause conflicts with other generated members.", + description: "All attributes a member forwards to its generated member with a [property:] or [field:] target must be using valid expressions.", helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html"); /// @@ -125,17 +109,6 @@ internal static class DiagnosticDescriptors description: "The fields annotated with [Reactive] cannot result in a property name or have a type that would cause conflicts with other generated members.", helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html"); - /// The observable as property method has parameters error. - internal static readonly DiagnosticDescriptor ObservableAsPropertyMethodHasParametersError = new( - id: "RXUISG0017", - title: "Invalid generated property declaration", - messageFormat: "The method {0} cannot be used to generate an observable As property, as it has parameters", - category: "ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", - defaultSeverity: DiagnosticSeverity.Error, - isEnabledByDefault: true, - description: "The method annotated with [ObservableAsProperty] cannot currently initialize methods with parameters.", - helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html"); - /// The invalid reactive object error. internal static readonly DiagnosticDescriptor InvalidReactiveObjectError = new( id: "RXUISG0018", @@ -144,7 +117,7 @@ internal static class DiagnosticDescriptors category: typeof(ReactiveGenerator).FullName, defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true, - description: "The fields annotated with [Reactive] or [ObservableAsProperty] must be part of a class that inherits from ReactiveObject.", + description: "The fields annotated with [Reactive] must be part of a class that inherits from ReactiveObject.", helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html"); /// The invalid reactive object error. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/SuppressionDescriptors.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/SuppressionDescriptors.cs index 58cfaee7..23a1e4ab 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/SuppressionDescriptors.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/SuppressionDescriptors.cs @@ -15,17 +15,11 @@ internal static class SuppressionDescriptors suppressedDiagnosticId: "CS0657", justification: "Methods using [ReactiveCommand] can use [field:] and [property:] attribute lists to forward attributes to the generated fields and properties"); - /// Suppresses unused-field diagnostics for observable-as-property helpers. - internal static readonly SuppressionDescriptor FieldIsUsedToGenerateAObservableAsPropertyHelper = new( - id: "RXUISPR0002", - suppressedDiagnosticId: "IDE0052", - justification: "Fields using [ObservableAsProperty] are never read"); - /// Suppresses static-member recommendations for generator-backed reactive members. internal static readonly SuppressionDescriptor ReactiveCommandDoesNotAccessInstanceData = new( id: "RXUISPR0003", suppressedDiagnosticId: "CA1822", - justification: "Methods using [ReactiveCommand] or [ObservableAsProperty] do not need to be static"); + justification: "Methods using [ReactiveCommand] do not need to be static"); /// Suppresses readonly-field recommendations for reactive fields. internal static readonly SuppressionDescriptor ReactiveFieldsShouldNotBeReadOnly = new( diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/Suppressions/OAPHMethodDoesNotNeedToBeStaticDiagnosticSuppressor.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/Suppressions/OAPHMethodDoesNotNeedToBeStaticDiagnosticSuppressor.cs deleted file mode 100644 index efe9e975..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/Suppressions/OAPHMethodDoesNotNeedToBeStaticDiagnosticSuppressor.cs +++ /dev/null @@ -1,43 +0,0 @@ -// 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.Collections.Immutable; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Diagnostics; -using ReactiveUI.SourceGenerators.Extensions; -using ReactiveUI.SourceGenerators.Helpers; -using static ReactiveUI.SourceGenerators.Diagnostics.SuppressionDescriptors; - -namespace ReactiveUI.SourceGenerators.Diagnostics.Suppressions; - -/// ReactiveCommand Attribute With Field Or Property Target Diagnostic Suppressor. -/// -[DiagnosticAnalyzer(LanguageNames.CSharp)] -public sealed class OAPHMethodDoesNotNeedToBeStaticDiagnosticSuppressor : DiagnosticSuppressor -{ - /// - public override ImmutableArray SupportedSuppressions => ImmutableArray.Empty.Add(ReactiveCommandDoesNotAccessInstanceData); - - /// - public override void ReportSuppressions(SuppressionAnalysisContext context) - { - foreach (var diagnostic in context.ReportedDiagnostics) - { - var syntaxNode = diagnostic.Location.SourceTree?.GetRoot(context.CancellationToken).FindNode(diagnostic.Location.SourceSpan); - if (syntaxNode is not (MethodDeclarationSyntax or PropertyDeclarationSyntax)) - { - continue; - } - - var semanticModel = context.GetSemanticModel(syntaxNode.SyntaxTree); - var declaredSymbol = semanticModel.GetDeclaredSymbol(syntaxNode, context.CancellationToken); - var oaphSymbol = semanticModel.Compilation.GetTypeByMetadataName(AttributeDefinitions.ObservableAsPropertyAttributeType); - if (oaphSymbol is not null && declaredSymbol?.HasAttributeWithType(oaphSymbol) == true) - { - context.ReportSuppression(Suppression.Create(ReactiveCommandDoesNotAccessInstanceData, diagnostic)); - } - } - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/Suppressions/ObservableAsPropertyAttributeWithFieldNeverReadDiagnosticSuppressor.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/Suppressions/ObservableAsPropertyAttributeWithFieldNeverReadDiagnosticSuppressor.cs deleted file mode 100644 index 77dcd1a4..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Diagnostics/Suppressions/ObservableAsPropertyAttributeWithFieldNeverReadDiagnosticSuppressor.cs +++ /dev/null @@ -1,53 +0,0 @@ -// 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.Collections.Immutable; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Diagnostics; -using ReactiveUI.SourceGenerators.Extensions; -using ReactiveUI.SourceGenerators.Helpers; -using static ReactiveUI.SourceGenerators.Diagnostics.SuppressionDescriptors; - -namespace ReactiveUI.SourceGenerators.Diagnostics.Suppressions; - -/// ObservableAsProperty Attribute With Field Never Read Diagnostic Suppressor. -/// -[DiagnosticAnalyzer(LanguageNames.CSharp)] -public sealed class ObservableAsPropertyAttributeWithFieldNeverReadDiagnosticSuppressor : DiagnosticSuppressor -{ - /// - public override ImmutableArray SupportedSuppressions => ImmutableArray.Empty.Add(FieldIsUsedToGenerateAObservableAsPropertyHelper); - - /// - public override void ReportSuppressions(SuppressionAnalysisContext context) - { - foreach (var diagnostic in context.ReportedDiagnostics) - { - var syntaxNode = diagnostic.Location.SourceTree?.GetRoot(context.CancellationToken).FindNode(diagnostic.Location.SourceSpan); - - // Check that the target is effectively [field:] or [property:] over a method declaration, which is the case we're looking for - if (syntaxNode is AttributeTargetSpecifierSyntax - { - Parent.Parent: MethodDeclarationSyntax methodDeclaration, - Identifier: SyntaxToken(SyntaxKind.FieldKeyword or SyntaxKind.PropertyKeyword), - }) - { - var semanticModel = context.GetSemanticModel(syntaxNode.SyntaxTree); - - // Get the method symbol from the first variable declaration - ISymbol? declaredSymbol = semanticModel.GetDeclaredSymbol(methodDeclaration, context.CancellationToken); - - // Check if the method is using [ObservableAsProperty], in which case we should suppress the warning - if (declaredSymbol is IMethodSymbol methodSymbol - && semanticModel.Compilation.GetTypeByMetadataName(AttributeDefinitions.ObservableAsPropertyAttributeType) is INamedTypeSymbol reactiveCommandSymbol - && methodSymbol.HasAttributeWithType(reactiveCommandSymbol)) - { - context.ReportSuppression(Suppression.Create(FieldIsUsedToGenerateAObservableAsPropertyHelper, diagnostic)); - } - } - } - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs index e484cd17..d058665c 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs @@ -2,8 +2,6 @@ // 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.Collections.Generic; -using System.Collections.Immutable; using System.Text; using System.Threading; using Microsoft.CodeAnalysis; @@ -25,12 +23,6 @@ public partial class IViewForGenerator /// Gets the fully qualified name used in generated-code metadata. internal static readonly string GeneratorName = typeof(IViewForGenerator).FullName!; - /// The attribute value that selects constant registration. - private const int RegisterConstantValue = 2; - - /// The attribute value that selects transient registration. - private const int RegisterValue = 3; - /// Creates the generation model for an annotated class declaration. /// The Roslyn context for the annotated declaration. /// The cancellation token. @@ -78,22 +70,10 @@ public partial class IViewForGenerator token.ThrowIfCancellationRequested(); - // Get RegistrationType enum value from the attribute - _ = attributeData.TryGetNamedArgument("RegistrationType", out int splatRegistrationType); - var registrationType = GetRegistrationType(splatRegistrationType); - - token.ThrowIfCancellationRequested(); - - // Get ViewModelRegistrationType enum value from the attribute - _ = attributeData.TryGetNamedArgument("ViewModelRegistrationType", out int splatViewModelRegistrationType); - var viewModelRegistrationType = GetRegistrationType(splatViewModelRegistrationType); - return new( targetInfo, viewModelTypeName!, - viewForBaseType, - registrationType, - viewModelRegistrationType); + viewForBaseType); } /// Identifies the supported UI framework represented by a class symbol. @@ -134,17 +114,6 @@ private static IViewForBaseType GetBaseType(INamedTypeSymbol classSymbol) : IViewForBaseType.None; } - /// Maps an attribute registration value to its Splat registration method name. - /// The integer value supplied by the attribute. - /// The Splat registration method name, or an empty string for no registration. - private static string GetRegistrationType(int registrationType) => registrationType switch - { - 1 => "RegisterLazySingleton", - RegisterConstantValue => "RegisterConstant", - RegisterValue => "Register", - _ => string.Empty, - }; - /// Generates the partial type source for a supported IViewFor target. /// The generation model. /// The enclosing type model, when the target is nested. @@ -401,147 +370,4 @@ private static string GetMauiViewModelPropertyDeclaration(IViewForInfo info) _ = builder.Append("), BindingMode.OneWay, propertyChanged: OnViewModelChanged);"); return builder.ToString(); } - - /// Generates the Splat registration extension source for discovered views. - /// The discovered view-generation models. - /// The generated extension source. - private static string GenerateRegistrationExtensions(in ImmutableArray viewForInfo) - { - var sb = new StringBuilder(); - _ = sb.AppendLine("if (resolver is null) throw new global::System.ArgumentNullException(nameof(resolver));"); - AppendViewRegistrations(sb, viewForInfo); - AppendViewModelRegistrations(sb, viewForInfo); - - var registrationsBody = sb.ToString().TrimEnd(); - return - $$""" -// -#pragma warning disable -#nullable enable - -using global::ReactiveUI; -using global::Splat; - -namespace ReactiveUI.SourceGenerators -{ - /// - /// Source-generated registration extensions for ReactiveUI views. - /// - internal static class ReactiveUISourceGeneratorsExtensions - { - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - public static void RegisterViewsForViewModelsSourceGenerated(this global::Splat.IMutableDependencyResolver resolver) - { - {{registrationsBody}} - } - } -} -#nullable restore -#pragma warning restore -"""; - } - - /// Appends unique view registrations to a generated method body. - /// The generated method-body builder. - /// The discovered view-generation models. - private static void AppendViewRegistrations(StringBuilder builder, ImmutableArray viewForInfo) - { - var registrations = new HashSet<(string ViewType, string ViewModelType, string RegistrationType)>(); - foreach (var item in viewForInfo) - { - var registrationType = item.SplatRegistrationType; - var viewModelType = GetGlobalTypeName(item.ViewModelTypeName); - if (string.IsNullOrWhiteSpace(registrationType) || viewModelType is null) - { - continue; - } - - var viewType = item.TargetInfo.TargetNamespaceWithNamespace; - if (registrations.Add((viewType, viewModelType, registrationType))) - { - AppendViewRegistration(builder, registrationType, viewType, viewModelType); - } - } - } - - /// Appends unique view model registrations to a generated method body. - /// The generated method-body builder. - /// The discovered view-generation models. - private static void AppendViewModelRegistrations(StringBuilder builder, ImmutableArray viewForInfo) - { - var registrations = new HashSet<(string ViewModelType, string RegistrationType)>(); - foreach (var item in viewForInfo) - { - var registrationType = item.SplatViewModelRegistrationType; - var viewModelType = GetGlobalTypeName(item.ViewModelTypeName); - if (string.IsNullOrWhiteSpace(registrationType) || viewModelType is null) - { - continue; - } - - if (registrations.Add((viewModelType, registrationType))) - { - AppendViewModelRegistration(builder, registrationType, viewModelType); - } - } - } - - /// Normalizes a type name for use in generated source. - /// The type name supplied by the attribute. - /// A global-qualified type name, or when no type was supplied. - private static string? GetGlobalTypeName(string typeName) - { - if (string.IsNullOrWhiteSpace(typeName)) - { - return null; - } - - return typeName.StartsWith("global::", System.StringComparison.Ordinal) - ? typeName - : $"global::{typeName}"; - } - - /// Appends one view registration statement. - /// The generated method-body builder. - /// The Splat registration method. - /// The generated view type. - /// The generated view model type. - private static void AppendViewRegistration(StringBuilder builder, string registrationType, string viewType, string viewModelType) - { - var serviceType = $"global::ReactiveUI.IViewFor<{viewModelType}>"; - var registration = registrationType switch - { - "RegisterLazySingleton" => $"resolver.{registrationType}<{serviceType}>(() => new {viewType}());", - "Register" => $"resolver.{registrationType}<{serviceType}, {viewType}>();", - "RegisterConstant" => $"resolver.{registrationType}<{serviceType}>(new {viewType}());", - _ => null, - }; - if (registration is null) - { - return; - } - - _ = builder.Append(" ").AppendLine(registration); - } - - /// Appends one view model registration statement. - /// The generated method-body builder. - /// The Splat registration method. - /// The generated view model type. - private static void AppendViewModelRegistration(StringBuilder builder, string registrationType, string viewModelType) - { - var registration = registrationType switch - { - "RegisterLazySingleton" => $"resolver.{registrationType}<{viewModelType}>(() => new {viewModelType}());", - "Register" => $"resolver.{registrationType}<{viewModelType}, {viewModelType}>();", - "RegisterConstant" => $"resolver.{registrationType}<{viewModelType}>(new {viewModelType}());", - _ => null, - }; - if (registration is null) - { - return; - } - - _ = builder.Append(" ").AppendLine(registration); - } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs index 05c9b292..4540d144 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs @@ -39,20 +39,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) { var groupedPropertyInfo = GroupByTarget(input); - const string fileName = "ReactiveUI.ReactiveUISourceGeneratorsExtensions.g.cs"; - - if (groupedPropertyInfo.Count == 0) - { - // Even if there are no views, emit an empty extension to keep API stable. - var empty = GenerateRegistrationExtensions(ImmutableArray.Empty); - context.AddSource(fileName, SourceText.From(empty, Encoding.UTF8)); - return; - } - - // Generate the IViewFor Splat Registration code for all classes in a single extension method here - var registrationSource = GenerateRegistrationExtensions(input); - context.AddSource(fileName, SourceText.From(registrationSource, Encoding.UTF8)); - + // View registration is not generated here: ReactiveUI.Binding's view locator registers every IViewFor. foreach (var grouping in groupedPropertyInfo.Values) { var info = grouping[0]; diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/Models/IViewForInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/Models/IViewForInfo.cs index 645de57b..5cf97896 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/Models/IViewForInfo.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/Models/IViewForInfo.cs @@ -8,11 +8,7 @@ namespace ReactiveUI.SourceGenerators.Models; /// The annotated target type. /// The fully qualified view model type name. /// The supported UI framework base type. -/// The Splat view registration method to invoke. -/// The Splat view model registration method to invoke. internal sealed record IViewForInfo( TargetInfo TargetInfo, string ViewModelTypeName, - IViewForBaseType BaseType, - string SplatRegistrationType, - string SplatViewModelRegistrationType); + IViewForBaseType BaseType); diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/Models/ObservableFieldInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/Models/ObservableFieldInfo.cs deleted file mode 100644 index 8851d062..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/Models/ObservableFieldInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -// 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.Helpers; - -namespace ReactiveUI.SourceGenerators.Models; - -/// A model with gathered info on a given field. -/// The target type that owns the generated property. -/// The property's fully qualified type name. -/// The source field name. -/// The generated property name. -/// The source field initializer, when present. -/// Whether the field type permits null. -/// Whether a member-not-null annotation is required. -/// Attributes copied to the generated property. -/// The generated property's read-only modifier. -/// The generated property's accessibility. -/// The generated property's inheritance modifier. -internal sealed record ObservableFieldInfo( - TargetInfo TargetInfo, - string TypeNameWithNullabilityAnnotations, - string FieldName, - string PropertyName, - string? Initializer, - bool IsReferenceTypeOrUnconstrainedTypeParameter, - bool IncludeMemberNotNullOnSetAccessor, - EquatableArray ForwardedAttributes, - string IsReadOnly, - string AccessModifier, - string Inheritance); diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/Models/ObservableMethodInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/Models/ObservableMethodInfo.cs deleted file mode 100644 index 8906c80c..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/Models/ObservableMethodInfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -// 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.Globalization; -using ReactiveUI.SourceGenerators.Helpers; - -namespace ReactiveUI.SourceGenerators.Models; - -/// Captures the metadata needed to generate an observable-backed property. -/// The target type that owns the generated property. -/// The source method or property name. -/// The source member's return type. -/// The source method's argument type, when present. -/// The generated property name. -/// The observable's fully qualified type name. -/// Whether the observable element type permits null. -/// Whether the source member is a property. -/// Attributes copied to the generated property. -/// The generated property's read-only modifier. -/// The generated property's accessibility. -/// The generated property's initial value, when present. -internal sealed record ObservableMethodInfo( - TargetInfo TargetInfo, - string MethodName, - string MethodReturnType, - string? ArgumentType, - string PropertyName, - string ObservableType, - bool IsNullableType, - bool IsProperty, - EquatableArray ForwardedPropertyAttributes, - string IsReadOnly, - string AccessModifier, - string? InitialValue) -{ - /// Gets whether this model originated from a partial property. - internal bool IsFromPartialProperty => ObservableType.IndexOf("##FromPartialProperty##", StringComparison.Ordinal) >= 0; - - /// Gets the observable type with its partial-property marker removed. - internal string PartialPropertyType => ObservableType.Replace("##FromPartialProperty##", string.Empty); - - /// Gets the field name generated for this property. - /// The generated backing field name. - internal string GetGeneratedFieldName() - { - var propertyName = PropertyName; - - return $"_{char.ToLower(propertyName[0], CultureInfo.InvariantCulture)}{propertyName[1..]}"; - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator.cs deleted file mode 100644 index a7597173..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator.cs +++ /dev/null @@ -1,33 +0,0 @@ -// 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.Text; - -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Text; - -using ReactiveUI.SourceGenerators.Helpers; - -namespace ReactiveUI.SourceGenerators; - -/// Main entry point. -[Generator(LanguageNames.CSharp)] -public sealed partial class ObservableAsPropertyGenerator : IIncrementalGenerator -{ - /// Gets the generator type name used in generated-code metadata. - internal static readonly string GeneratorName = typeof(ObservableAsPropertyGenerator).FullName!; - - /// Gets the generator assembly version used in generated-code metadata. - internal static readonly string GeneratorVersion = typeof(ObservableAsPropertyGenerator).Assembly.GetName().Version.ToString(); - - /// - public void Initialize(IncrementalGeneratorInitializationContext context) - { - context.RegisterPostInitializationOutput(static ctx => - ctx.AddSource($"{AttributeDefinitions.ObservableAsPropertyAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ObservableAsPropertyAttribute, Encoding.UTF8))); - - RunObservableAsPropertyFromObservable(context); - RunObservableAsPropertyFromField(context); - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.Execute.cs deleted file mode 100644 index 8b47edeb..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.Execute.cs +++ /dev/null @@ -1,322 +0,0 @@ -// 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.Text; -using System.Threading; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using ReactiveUI.SourceGenerators.Extensions; -using ReactiveUI.SourceGenerators.Helpers; -using ReactiveUI.SourceGenerators.Models; -using static ReactiveUI.SourceGenerators.Diagnostics.DiagnosticDescriptors; - -namespace ReactiveUI.SourceGenerators; - -/// Implements ObservableAsProperty generation from annotated fields. -/// -public sealed partial class ObservableAsPropertyGenerator -{ - /// Creates metadata for an ObservableAsProperty-annotated field. - /// The attribute syntax context for the field. - /// The cancellation token for the generator operation. - /// The field metadata and diagnostics, or when not applicable. - private static Result? GetVariableInfo(in GeneratorAttributeSyntaxContext context, CancellationToken token) - { - using var builder = ImmutableArrayBuilder.Rent(); - var symbol = context.TargetSymbol; - token.ThrowIfCancellationRequested(); - - if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.ObservableAsPropertyAttributeType, out var attributeData)) - { - return default; - } - - if (symbol is not IFieldSymbol fieldSymbol) - { - return default; - } - - if (!fieldSymbol.IsTargetTypeValid()) - { - builder.Add( - InvalidReactiveObjectError, - fieldSymbol, - fieldSymbol.ContainingType, - fieldSymbol.Name); - return new(default, builder.ToImmutable()); - } - - return CreateResult(context, fieldSymbol, attributeData, builder, token); - } - - /// Creates metadata for a validated ObservableAsProperty field. - /// The attribute syntax context for the field. - /// The validated field symbol. - /// The ObservableAsProperty attribute data. - /// The diagnostics collected while processing the field. - /// The cancellation token for the generator operation. - /// The field metadata and diagnostics. - private static Result CreateResult( - in GeneratorAttributeSyntaxContext context, - IFieldSymbol fieldSymbol, - AttributeData attributeData, - ImmutableArrayBuilder builder, - CancellationToken token) - { - var (isReadonly, useProtectedModifier, inheritance) = GetAttributeOptions(attributeData); - - token.ThrowIfCancellationRequested(); - - var typeNameWithNullabilityAnnotations = fieldSymbol.Type.GetFullyQualifiedNameWithNullabilityAnnotations(); - var fieldName = fieldSymbol.Name; - var propertyName = fieldSymbol.GetGeneratedPropertyName(); - - if (fieldName == propertyName) - { - builder.Add( - ReactivePropertyNameCollisionError, - fieldSymbol, - fieldSymbol.ContainingType, - fieldSymbol.Name); - return new(default, builder.ToImmutable()); - } - - var fieldDeclaration = (FieldDeclarationSyntax)context.TargetNode.Parent!.Parent!; - var variables = fieldDeclaration.Declaration.Variables; - var initializer = variables.Count > 0 ? variables[0].Initializer?.ToFullString() : null; - - token.ThrowIfCancellationRequested(); - - context.GetForwardedAttributes( - builder, - fieldSymbol, - fieldDeclaration.AttributeLists, - token, - out var forwardedPropertyAttributes); - - token.ThrowIfCancellationRequested(); - - var (isReferenceTypeOrUnconstraindTypeParameter, includeMemberNotNullOnSetAccessor) = - GetNullabilityInfo(fieldSymbol, context.SemanticModel); - - token.ThrowIfCancellationRequested(); - - var targetInfo = TargetInfo.From(fieldSymbol.ContainingType); - - return new( - new( - targetInfo, - typeNameWithNullabilityAnnotations, - fieldName, - propertyName, - initializer, - isReferenceTypeOrUnconstraindTypeParameter, - includeMemberNotNullOnSetAccessor, - forwardedPropertyAttributes, - isReadonly == false ? string.Empty : "readonly", - useProtectedModifier, - inheritance), - builder.ToImmutable()); - } - - /// Gets property-generation options from an ObservableAsProperty attribute. - /// The ObservableAsProperty attribute data. - /// The read-only flag, accessibility, and inheritance modifier. - private static (bool? IsReadonly, string Accessibility, string Inheritance) GetAttributeOptions(AttributeData attributeData) - { - _ = attributeData.TryGetNamedArgument("ReadOnly", out bool? isReadonly); - _ = attributeData.TryGetNamedArgument("Inheritance", out int inheritanceArgument); - _ = attributeData.TryGetNamedArgument("UseProtected", out bool useProtected); - - const int OverrideInheritance = 2; - const int NewInheritance = 3; - var inheritance = inheritanceArgument switch - { - 1 => " virtual", - OverrideInheritance => " override", - NewInheritance => " new", - _ => string.Empty, - }; - - return (isReadonly, useProtected ? "protected" : "private", inheritance); - } - - /// Gets nullability metadata for a generated observable property. - /// The source field symbol. - /// The semantic model for the source field. - /// The reference-type and member-not-null metadata. - private static (bool IsReferenceType, bool IncludeMemberNotNull) GetNullabilityInfo( - IFieldSymbol fieldSymbol, - SemanticModel semanticModel) - { - fieldSymbol.GetNullabilityInfo( - semanticModel, - out var isReferenceTypeOrUnconstraindTypeParameter, - out var includeMemberNotNullOnSetAccessor); - return (isReferenceTypeOrUnconstraindTypeParameter, includeMemberNotNullOnSetAccessor); - } - - /// Generates the complete source document for field-backed observable properties. - /// The name of the containing type. - /// The containing namespace. - /// The containing type visibility. - /// The containing type kind. - /// The generated property metadata. - /// The selected ReactiveUI integration metadata. - /// The generated source document. - private static string GenerateSource( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - ObservableFieldInfo[] properties, - ReactiveUiIntegration integration) - { - // Get Parent class details from properties.ParentInfo - var (parentClassDeclarationsString, closingBrackets) = TargetInfo.GenerateParentClassDeclarations(GetParentInfos(properties)); - - var classes = GenerateClassWithProperties(containingTypeName, containingClassVisibility, containingType, properties, integration.DeclarationNamespace); - - return $$""" -// -#pragma warning disable -#nullable enable -namespace {{containingNamespace}} -{ - {{parentClassDeclarationsString}}{{classes}}{{closingBrackets}} -} -#nullable restore -#pragma warning restore -"""; - } - - /// Generates the source code. - /// The contain type name. - /// The containing class visibility. - /// The containing type. - /// The properties. - /// The namespace containing the selected ReactiveUI implementation types. - /// The value. - private static string GenerateClassWithProperties( - string containingTypeName, - string containingClassVisibility, - string containingType, - ObservableFieldInfo[] properties, - string reactiveUiNamespace) - { - // Includes 2 tabs from the property declarations so no need to add them here. - var propertyDeclarations = GetPropertyDeclarations(properties, reactiveUiNamespace); - - return -$$""" - - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} - { -{{propertyDeclarations}} - } -"""; - } - - /// Generates a property declaration for an observable field. - /// The source field metadata. - /// The ReactiveUI implementation namespace. - /// The generated property declaration. - private static string GetPropertySyntax(ObservableFieldInfo propertyInfo, string reactiveUiNamespace) - { - var propertyAttributes = GetPropertyAttributes(propertyInfo); - - var getter = $$"""{ get => {{propertyInfo.FieldName}} = {{propertyInfo.FieldName}}Helper?.Value ?? {{propertyInfo.FieldName}}; }"""; - - // If the property is nullable, we need to add a null check to the getter - if (propertyInfo.TypeNameWithNullabilityAnnotations.EndsWith("?", System.StringComparison.Ordinal)) - { - getter = $$"""{ get => {{propertyInfo.FieldName}} = ({{propertyInfo.FieldName}}Helper == null ? {{propertyInfo.FieldName}} : {{propertyInfo.FieldName}}Helper.Value); }"""; - } - - var helperTypeName = $"{propertyInfo.AccessModifier} {reactiveUiNamespace}.ObservableAsPropertyHelper<{propertyInfo.TypeNameWithNullabilityAnnotations}>?"; - - // If the property is readonly, we need to change the helper to be non-nullable - if (propertyInfo.IsReadOnly == "readonly") - { - helperTypeName = $"{propertyInfo.AccessModifier} readonly {reactiveUiNamespace}.ObservableAsPropertyHelper<{propertyInfo.TypeNameWithNullabilityAnnotations}>"; - } - - return $$""" - /// - {{helperTypeName}} {{propertyInfo.FieldName}}Helper; - - /// - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - {{propertyAttributes}} - public{{propertyInfo.Inheritance}} {{propertyInfo.TypeNameWithNullabilityAnnotations}} {{propertyInfo.PropertyName}} {{getter}} -"""; - } - - /// Gets parent information for each generated property. - /// The generated property metadata. - /// The parent information for the generated properties. - private static TargetInfo?[] GetParentInfos(ObservableFieldInfo[] properties) - { - var parentInfos = new TargetInfo?[properties.Length]; - for (var index = 0; index < properties.Length; index++) - { - parentInfos[index] = properties[index].TargetInfo.ParentInfo; - } - - return parentInfos; - } - - /// Gets the generated property declarations. - /// The generated property metadata. - /// The ReactiveUI implementation namespace. - /// The generated property declarations. - private static string GetPropertyDeclarations(ObservableFieldInfo[] properties, string reactiveUiNamespace) - { - var builder = new StringBuilder(); - for (var index = 0; index < properties.Length; index++) - { - if (index > 0) - { - _ = builder.Append('\n'); - } - - _ = builder.Append(GetPropertySyntax(properties[index], reactiveUiNamespace)); - } - - return builder.ToString(); - } - - /// Gets attributes applied to a generated property. - /// The source field metadata. - /// The property attributes separated by generated-code indentation. - private static string GetPropertyAttributes(ObservableFieldInfo propertyInfo) - { - var builder = new StringBuilder(); - foreach (var attribute in AttributeDefinitions.ExcludeFromCodeCoverage) - { - AppendPropertyAttribute(builder, attribute); - } - - foreach (var attribute in propertyInfo.ForwardedAttributes.AsImmutableArray()) - { - AppendPropertyAttribute(builder, attribute); - } - - return builder.ToString(); - } - - /// Appends a generated property attribute with the required separator. - /// The destination builder. - /// The attribute source. - private static void AppendPropertyAttribute(StringBuilder builder, string attribute) - { - if (builder.Length > 0) - { - _ = builder.Append("\n "); - } - - _ = builder.Append(attribute); - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.cs deleted file mode 100644 index e2b0c1f2..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.cs +++ /dev/null @@ -1,78 +0,0 @@ -// 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.Collections.Generic; - -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; - -using ReactiveUI.SourceGenerators.Extensions; -using ReactiveUI.SourceGenerators.Helpers; -using ReactiveUI.SourceGenerators.Models; - -namespace ReactiveUI.SourceGenerators; - -/// A source generator for generating reactive properties. -public sealed partial class ObservableAsPropertyGenerator -{ - /// Registers generation of observable-backed properties declared from fields. - /// The incremental generator initialization context. - private static void RunObservableAsPropertyFromField(in IncrementalGeneratorInitializationContext context) - { - var propertyInfo = - context.SyntaxProvider - .ForAttributeWithMetadataName( - AttributeDefinitions.ObservableAsPropertyAttributeType, - static (node, _) => node is VariableDeclaratorSyntax - { - Parent.Parent: FieldDeclarationSyntax - { - Parent: ClassDeclarationSyntax or RecordDeclarationSyntax, - AttributeLists.Count: > 0, - }, - }, - static (context, token) => GetVariableInfo(context, token)) - .Where(static x => x is not null) - .Select(static (x, _) => x!) - .Collect() - .Combine(context.ReactiveUiIntegration()); - - // Generate the requested properties and methods - context.RegisterSourceOutput(propertyInfo, static (context, input) => - { - Dictionary< - (string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), - List> groupedPropertyInfo = []; - - foreach (var result in input.Left) - { - foreach (var diagnostic in result.Errors.AsImmutableArray()) - { - context.ReportDiagnostic(diagnostic.ToDiagnostic()); - } - - if (result.Value is not ObservableFieldInfo propertyInfo) - { - continue; - } - - var targetInfo = propertyInfo.TargetInfo; - var key = (targetInfo.FileHintName, targetInfo.TargetName, targetInfo.TargetNamespace, targetInfo.TargetVisibility, targetInfo.TargetType); - if (!groupedPropertyInfo.TryGetValue(key, out var properties)) - { - properties = []; - groupedPropertyInfo.Add(key, properties); - } - - properties.Add(propertyInfo); - } - - foreach (var grouping in groupedPropertyInfo) - { - var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, grouping.Value.ToArray(), input.Right); - context.AddSource($"{grouping.Key.FileHintName}.ObservableAsProperties.g.cs", source); - } - }); - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.Execute.cs deleted file mode 100644 index 367abe87..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.Execute.cs +++ /dev/null @@ -1,540 +0,0 @@ -// 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.Collections.Immutable; -using System.Linq; -using System.Text; -using System.Threading; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using ReactiveUI.SourceGenerators.Extensions; -using ReactiveUI.SourceGenerators.Helpers; -using ReactiveUI.SourceGenerators.Models; -using static ReactiveUI.SourceGenerators.Diagnostics.DiagnosticDescriptors; - -namespace ReactiveUI.SourceGenerators; - -/// Observable As Property From Observable Generator. -/// -public sealed partial class ObservableAsPropertyGenerator -{ - /// Creates metadata for an ObservableAsProperty-annotated method or property. - /// The attribute syntax context for the source member. - /// The cancellation token for the generator operation. - /// The member metadata and diagnostics, or when not applicable. - private static Result? GetObservableInfo(in GeneratorAttributeSyntaxContext context, CancellationToken token) - { - using var diagnostics = ImmutableArrayBuilder.Rent(); - var symbol = context.TargetSymbol; - token.ThrowIfCancellationRequested(); - - var attributeData = context.Attributes[0]; - - // Get the can PropertyName member, if any - _ = attributeData.TryGetNamedArgument("PropertyName", out string? propertyName); - - // Get the can InitialValue member, if any - _ = attributeData.TryGetNamedArgument("InitialValue", out string? initialValue); - - token.ThrowIfCancellationRequested(); - - _ = attributeData.TryGetNamedArgument("UseProtected", out bool useProtected); - var useProtectedModifier = useProtected ? "protected" : "private"; - - token.ThrowIfCancellationRequested(); - - // Get the can ReadOnly member, if any - _ = attributeData.TryGetNamedArgument("ReadOnly", out bool? isReadonly); - - token.ThrowIfCancellationRequested(); - - var settings = new ObservablePropertySettings(propertyName, initialValue, useProtectedModifier, isReadonly); - return context.TargetNode switch - { - MethodDeclarationSyntax methodSyntax when symbol is IMethodSymbol methodSymbol => GetObservableMethodInfo( - context, - methodSyntax, - methodSymbol, - propertyName, - initialValue, - useProtectedModifier, - token), - PropertyDeclarationSyntax propertySyntax when symbol is IPropertySymbol propertySymbol => GetObservablePropertyInfo( - context, - propertySyntax, - propertySymbol, - in settings, - diagnostics, - token), - _ => default, - }; - } - - /// Creates metadata for an ObservableAsProperty-annotated property. - /// The attribute syntax context for the property. - /// The property declaration syntax. - /// The property symbol. - /// The settings declared by the attribute. - /// The builder that receives diagnostics. - /// The cancellation token for the generator operation. - /// The property metadata and diagnostics, or when not applicable. - private static Result? GetObservablePropertyInfo( - in GeneratorAttributeSyntaxContext context, - PropertyDeclarationSyntax propertySyntax, - IPropertySymbol propertySymbol, - in ObservablePropertySettings settings, - ImmutableArrayBuilder diagnostics, - CancellationToken token) - { - if (!propertySymbol.IsTargetTypeValid()) - { - diagnostics.Add(InvalidReactiveObjectError, propertySymbol, propertySymbol.ContainingType, propertySymbol.Name); - return new(default, diagnostics.ToImmutable()); - } - - token.ThrowIfCancellationRequested(); - context.GetForwardedAttributes(diagnostics, propertySymbol, propertySyntax.AttributeLists, token, out var propertyAttributes); - token.ThrowIfCancellationRequested(); - - return propertySymbol.Type.IsObservableReturnType() - ? CreateObservablePropertyInfo( - propertySymbol, - in settings, - propertyAttributes, - diagnostics) - -#if ROSYLN_412 || ROSYLN_500 - : GetPartialObservablePropertyInfo( - context, - propertySyntax, - propertySymbol, - in settings, - propertyAttributes, - diagnostics, - token); -#else - : default; -#endif - } - - /// Creates the metadata for a property that returns an observable. - /// The property symbol. - /// The settings declared by the attribute. - /// The attributes to forward to the generated property. - /// The builder that receives diagnostics. - /// The property metadata and diagnostics. - private static Result CreateObservablePropertyInfo( - IPropertySymbol propertySymbol, - in ObservablePropertySettings settings, - ImmutableArray propertyAttributes, - ImmutableArrayBuilder diagnostics) - { - var observableType = GetObservableElementType(propertySymbol.Type); - var isNullableType = IsObservableElementNullable(propertySymbol.Type); - var targetInfo = TargetInfo.From(propertySymbol.ContainingType); - return new( - new( - targetInfo, - propertySymbol.Name, - propertySymbol.Type.GetFullyQualifiedNameWithNullabilityAnnotations(), - propertySymbol.Parameters.FirstOrDefault()?.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), - settings.PropertyName ?? $"{propertySymbol.Name}Property", - observableType, - isNullableType, - true, - propertyAttributes, - string.Empty, - settings.UseProtectedModifier, - settings.InitialValue), - diagnostics.ToImmutable()); - } - - /// Gets the element type of an observable property. - /// The property type. - /// The fully qualified observable element type, or an empty string when unavailable. - private static string GetObservableElementType(ITypeSymbol propertyType) => - propertyType is INamedTypeSymbol typeSymbol - ? typeSymbol.TypeArguments[0].GetFullyQualifiedNameWithNullabilityAnnotations() - : string.Empty; - - /// Determines whether the element type of an observable property permits null. - /// The property type. - /// when the observable element type permits null; otherwise, . - private static bool IsObservableElementNullable(ITypeSymbol propertyType) => - propertyType is INamedTypeSymbol typeSymbol && typeSymbol.TypeArguments[0].IsNullableType(); - -#if ROSYLN_412 || ROSYLN_500 - /// Creates metadata for a partial property that supplies its own observable value. - /// The attribute syntax context for the property. - /// The property declaration syntax. - /// The property symbol. - /// The settings declared by the attribute. - /// The attributes to forward to the generated property. - /// The builder that receives diagnostics. - /// The cancellation token for the generator operation. - /// The property metadata and diagnostics, or when not applicable. - private static Result? GetPartialObservablePropertyInfo( - in GeneratorAttributeSyntaxContext context, - PropertyDeclarationSyntax propertySyntax, - IPropertySymbol propertySymbol, - in ObservablePropertySettings settings, - ImmutableArray propertyAttributes, - ImmutableArrayBuilder diagnostics, - CancellationToken token) - { - if (!propertySymbol.IsPartialDefinition || propertySymbol.IsStatic) - { - return default; - } - - token.ThrowIfCancellationRequested(); - var propertyType = propertySymbol.Type.GetFullyQualifiedNameWithNullabilityAnnotations(); - var fieldName = propertySymbol.GetGeneratedFieldName(); - var generatedPropertyName = propertySymbol.Name; - if (fieldName == generatedPropertyName) - { - diagnostics.Add( - ReactivePropertyNameCollisionError, - propertySymbol, - propertySymbol.ContainingType, - propertySymbol.Name); - return new(default, diagnostics.ToImmutable()); - } - - token.ThrowIfCancellationRequested(); - context.GetForwardedAttributes(diagnostics, propertySymbol, propertySyntax.AttributeLists, token, out _); - token.ThrowIfCancellationRequested(); - - var isReadOnly = settings.IsReadOnly == false ? string.Empty : "readonly"; - var targetInfo = TargetInfo.From(propertySymbol.ContainingType); - return new( - new( - targetInfo, - propertySymbol.Name, - propertyType, - propertySymbol.Parameters.FirstOrDefault()?.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), - generatedPropertyName, - $"##FromPartialProperty##{propertyType}", - false, - true, - propertyAttributes, - isReadOnly, - settings.UseProtectedModifier, - settings.InitialValue), - diagnostics.ToImmutable()); - } -#endif - - /// Creates metadata for an ObservableAsProperty-annotated method. - /// The attribute syntax context for the method. - /// The method declaration syntax. - /// The method symbol. - /// The optional generated property name. - /// The optional generated property initial value. - /// The generated helper accessibility. - /// The cancellation token for the generator operation. - /// The method metadata and diagnostics, or when not applicable. - private static Result? GetObservableMethodInfo( - in GeneratorAttributeSyntaxContext context, - MethodDeclarationSyntax methodSyntax, - IMethodSymbol methodSymbol, - string? propertyName, - string? initialValue, - string useProtectedModifier, - CancellationToken token) - { - using var diagnostics = ImmutableArrayBuilder.Rent(); - if (!methodSymbol.IsTargetTypeValid()) - { - diagnostics.Add(InvalidReactiveObjectError, methodSymbol, methodSymbol.ContainingType, methodSymbol.Name); - return new(default, diagnostics.ToImmutable()); - } - - if (!methodSymbol.Parameters.IsEmpty) - { - diagnostics.Add(ObservableAsPropertyMethodHasParametersError, methodSymbol, methodSymbol.Name); - return new(default, diagnostics.ToImmutable()); - } - - if (!methodSymbol.ReturnType.IsObservableReturnType()) - { - return default; - } - - context.GetForwardedAttributes(diagnostics, methodSymbol, methodSyntax.AttributeLists, token, out var propertyAttributes); - var observableType = methodSymbol.ReturnType is INamedTypeSymbol typeSymbol - ? typeSymbol.TypeArguments[0].GetFullyQualifiedNameWithNullabilityAnnotations() - : string.Empty; - var isNullableType = methodSymbol.ReturnType is INamedTypeSymbol nullcheck && nullcheck.TypeArguments[0].IsNullableType(); - var targetInfo = TargetInfo.From(methodSymbol.ContainingType); - return new( - new( - targetInfo, - methodSymbol.Name, - methodSymbol.ReturnType.GetFullyQualifiedNameWithNullabilityAnnotations(), - methodSymbol.Parameters.FirstOrDefault()?.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), - propertyName ?? $"{methodSymbol.Name}Property", - observableType, - isNullableType, - false, - propertyAttributes, - string.Empty, - useProtectedModifier, - initialValue), - diagnostics.ToImmutable()); - } - - /// Generates the complete source document for method-backed observable properties. - /// The name of the containing type. - /// The containing namespace. - /// The containing type visibility. - /// The containing type kind. - /// The generated property metadata. - /// The selected ReactiveUI integration metadata. - /// The generated source document. - private static string GenerateObservableSource( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - ObservableMethodInfo[] properties, - ReactiveUiIntegration integration) - { - // Get Parent class details from properties.ParentInfo - var (parentClassDeclarationsString, closingBrackets) = TargetInfo.GenerateParentClassDeclarations(GetParentInfos(properties)); - - var classes = GenerateClassWithProperties(containingTypeName, containingClassVisibility, containingType, properties, integration.DeclarationNamespace); - - return -$$""" -// -{{integration.UsingDirectives}} - -#pragma warning disable -#nullable enable - -namespace {{containingNamespace}} -{ - {{parentClassDeclarationsString}}{{classes}}{{closingBrackets}} -} -#nullable restore -#pragma warning restore -"""; - } - - /// Generates the source code. - /// The contain type name. - /// The containing class visibility. - /// The containing type. - /// The properties. - /// The namespace containing the selected ReactiveUI implementation types. - /// The value. - private static string GenerateClassWithProperties( - string containingTypeName, - string containingClassVisibility, - string containingType, - ObservableMethodInfo[] properties, - string reactiveUiNamespace) - { - // Includes 2 tabs from the property declarations so no need to add them here. - var propertyDeclarations = GetPropertyDeclarations(properties, reactiveUiNamespace); - - return -$$""" - - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} - { - {{propertyDeclarations}} - - {{GetPropertyInitiliser(properties)}} - } -"""; - } - - /// Generates a property declaration for an observable source member. - /// The source member metadata. - /// The ReactiveUI implementation namespace. - /// The generated property declaration. - private static string GetPropertySyntax(ObservableMethodInfo propertyInfo, string reactiveUiNamespace) - { - var propertyAttributes = GetPropertyAttributes(propertyInfo); - var getterFieldIdentifierName = propertyInfo.GetGeneratedFieldName(); - var getterArrowExpression = propertyInfo.IsNullableType || propertyInfo.IsFromPartialProperty - ? $"{getterFieldIdentifierName} = ({getterFieldIdentifierName}Helper == null ? {getterFieldIdentifierName} : {getterFieldIdentifierName}Helper.Value)" - : $"{getterFieldIdentifierName} = {getterFieldIdentifierName}Helper?.Value ?? {getterFieldIdentifierName}"; - - var isPartialProperty = string.Empty; - var propertyType = propertyInfo.ObservableType; - var initialValue = GetInitialValueSyntax(propertyType, propertyInfo.InitialValue); - if (propertyInfo.IsFromPartialProperty) - { - isPartialProperty = "partial "; - propertyType = propertyInfo.PartialPropertyType; - } - - var helperTypeName = $"{propertyInfo.AccessModifier} {reactiveUiNamespace}.ObservableAsPropertyHelper<{propertyType}>?"; - - // If the property is readonly, we need to change the helper to be non-nullable - if (propertyInfo.IsReadOnly == "readonly") - { - helperTypeName = $"{propertyInfo.AccessModifier} readonly {reactiveUiNamespace}.ObservableAsPropertyHelper<{propertyType}>"; - } - - return $$""" -/// - private {{propertyType}} {{getterFieldIdentifierName}}{{initialValue}} - - /// - {{helperTypeName}} {{getterFieldIdentifierName}}Helper; - - /// - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - {{propertyAttributes}} - public {{isPartialProperty}}{{propertyType}} {{propertyInfo.PropertyName}} { get => {{getterArrowExpression}}; } -"""; - } - - /// Formats an optional initial value for an observable-backed generated field. - /// The generated property type or partial-property marker. - /// The configured initial value. - /// The field initializer suffix. - private static string GetInitialValueSyntax(string propertyType, string? initialValue) - { - var isNullableStringProperty = propertyType is "string?" - || propertyType.EndsWith("##string?", System.StringComparison.Ordinal); - var isStringProperty = isNullableStringProperty - || propertyType is "string" - || propertyType.EndsWith("##string", System.StringComparison.Ordinal); - - if (isStringProperty) - { - // A non nullable string field is initialised to an empty string when no initial value is - // supplied, so the generated field never holds null. Empty and whitespace values are valid - // string literals and are emitted as written. - if (initialValue is not null) - { - return $" = {Microsoft.CodeAnalysis.CSharp.SymbolDisplay.FormatLiteral(initialValue, quote: true)};"; - } - - return isNullableStringProperty ? ";" : " = string.Empty;"; - } - - return string.IsNullOrWhiteSpace(initialValue) - ? ";" - : $" = {initialValue};"; - } - - /// Generates the initialization method for observable property helpers. - /// The observable property metadata. - /// The generated initialization method. - private static string GetPropertyInitiliser(ObservableMethodInfo[] propertyInfos) - { - using var propertyInitilisers = ImmutableArrayBuilder.Rent(); - - foreach (var propertyInfo in propertyInfos) - { - if (propertyInfo.IsFromPartialProperty) - { - continue; - } - - var fieldIdentifierName = propertyInfo.GetGeneratedFieldName(); - if (propertyInfo.IsProperty) - { - propertyInitilisers.Add($"{fieldIdentifierName}Helper = {propertyInfo.MethodName}!.ToProperty(this, nameof({propertyInfo.PropertyName}));"); - } - else - { - propertyInitilisers.Add($"{fieldIdentifierName}Helper = {propertyInfo.MethodName}()!.ToProperty(this, nameof({propertyInfo.PropertyName}));"); - } - } - - return -$$""" -[global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - protected void InitializeOAPH() - { - {{string.Join("\n ", propertyInitilisers.ToImmutable())}} - } -"""; - } - - /// Gets parent information for each generated property. - /// The generated property metadata. - /// The parent information for the generated properties. - private static TargetInfo?[] GetParentInfos(ObservableMethodInfo[] properties) - { - var parentInfos = new TargetInfo?[properties.Length]; - for (var index = 0; index < properties.Length; index++) - { - parentInfos[index] = properties[index].TargetInfo.ParentInfo; - } - - return parentInfos; - } - - /// Gets the generated property declarations. - /// The generated property metadata. - /// The ReactiveUI implementation namespace. - /// The generated property declarations. - private static string GetPropertyDeclarations(ObservableMethodInfo[] properties, string reactiveUiNamespace) - { - var builder = new StringBuilder(); - for (var index = 0; index < properties.Length; index++) - { - if (index > 0) - { - _ = builder.Append('\n'); - } - - _ = builder.Append(GetPropertySyntax(properties[index], reactiveUiNamespace)); - } - - return builder.ToString(); - } - - /// Gets attributes applied to a generated property. - /// The source member metadata. - /// The property attributes separated by generated-code indentation. - private static string GetPropertyAttributes(ObservableMethodInfo propertyInfo) - { - var builder = new StringBuilder(); - foreach (var attribute in AttributeDefinitions.ExcludeFromCodeCoverage) - { - AppendObservablePropertyAttribute(builder, attribute); - } - - foreach (var attribute in propertyInfo.ForwardedPropertyAttributes.AsImmutableArray()) - { - AppendObservablePropertyAttribute(builder, attribute); - } - - return builder.ToString(); - } - - /// Appends a generated property attribute with the required separator. - /// The destination builder. - /// The attribute source. - private static void AppendObservablePropertyAttribute(StringBuilder builder, string attribute) - { - if (builder.Length > 0) - { - _ = builder.Append("\n "); - } - - _ = builder.Append(attribute); - } - - /// Groups the settings declared by an ObservableAsProperty attribute. - /// The optional generated property name. - /// The optional generated property initial value. - /// The generated helper accessibility. - /// Whether a partial generated property is read-only. - private readonly record struct ObservablePropertySettings( - string? PropertyName, - string? InitialValue, - string UseProtectedModifier, - bool? IsReadOnly); -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.cs deleted file mode 100644 index d154f0d5..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.cs +++ /dev/null @@ -1,78 +0,0 @@ -// 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.Collections.Generic; - -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; - -using ReactiveUI.SourceGenerators.Extensions; -using ReactiveUI.SourceGenerators.Helpers; -using ReactiveUI.SourceGenerators.Models; - -namespace ReactiveUI.SourceGenerators; - -/// A source generator for generating reactive properties. -public sealed partial class ObservableAsPropertyGenerator -{ - /// Registers generation of observable-backed properties declared from methods or properties. - /// The incremental generator initialization context. - private static void RunObservableAsPropertyFromObservable(in IncrementalGeneratorInitializationContext context) - { - // Gather info for all annotated command methods (starting from method declarations with at least one attribute) - var methodInfo = - context.SyntaxProvider - .ForAttributeWithMetadataName( - AttributeDefinitions.ObservableAsPropertyAttributeType, - static (node, _) => node is MethodDeclarationSyntax or PropertyDeclarationSyntax { Parent: ClassDeclarationSyntax or RecordDeclarationSyntax, AttributeLists.Count: > 0 }, - static (context, token) => GetObservableInfo(context, token)) - .Where(static x => x is not null) - .Select(static (x, _) => x!) - .Collect() - .Combine(context.ReactiveUiIntegration()); - - // Generate the requested properties and methods - context.RegisterSourceOutput(methodInfo, static (context, input) => - { - Dictionary< - (string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), - List> groupedPropertyInfo = []; - - foreach (var result in input.Left) - { - foreach (var diagnostic in result.Errors.AsImmutableArray()) - { - context.ReportDiagnostic(diagnostic.ToDiagnostic()); - } - - if (result.Value is not ObservableMethodInfo propertyInfo) - { - continue; - } - - var targetInfo = propertyInfo.TargetInfo; - var key = (targetInfo.FileHintName, targetInfo.TargetName, targetInfo.TargetNamespace, targetInfo.TargetVisibility, targetInfo.TargetType); - if (!groupedPropertyInfo.TryGetValue(key, out var properties)) - { - properties = []; - groupedPropertyInfo.Add(key, properties); - } - - properties.Add(propertyInfo); - } - - foreach (var grouping in groupedPropertyInfo) - { - var source = GenerateObservableSource( - grouping.Key.TargetName, - grouping.Key.TargetNamespace, - grouping.Key.TargetVisibility, - grouping.Key.TargetType, - grouping.Value.ToArray(), - input.Right); - context.AddSource($"{grouping.Key.FileHintName}.ObservableAsPropertyFromObservable.g.cs", source); - } - }); - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems index dad13ba9..359333fb 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems @@ -37,8 +37,6 @@ - - @@ -54,13 +52,6 @@ - - - - - - - diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorCatalog.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorCatalog.cs index 464af29c..8c11ba70 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorCatalog.cs +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorCatalog.cs @@ -51,7 +51,6 @@ internal static ISourceGenerator[] Create() => [ new ReactiveGenerator().AsSourceGenerator(), new ReactiveCommandGenerator().AsSourceGenerator(), - new ObservableAsPropertyGenerator().AsSourceGenerator(), new ReactiveObjectGenerator().AsSourceGenerator(), new BindableDerivedListGenerator().AsSourceGenerator(), new ReactiveCollectionGenerator().AsSourceGenerator(), From 48e5adcff106b83b3b0ef00f05019e1e3ede7a6b Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:04:37 +1000 Subject: [PATCH 05/30] test: compare generator output with snapshots without Verify A small in-repo helper compares each generated file with its stored .verified.cs snapshot, writes .received.cs on a mismatch, reports snapshots no longer produced, and accepts new output when ACCEPT_SNAPSHOTS is set. The stored snapshots are unchanged. This removes the Verify.TUnit and Verify.SourceGenerators packages. --- src/Directory.Packages.props | 8 +- .../GeneratorSnapshot.cs | 176 ++++++++++++++++++ .../ModuleInitializer.cs | 13 -- .../ReactiveUI.SourceGenerators.Tests.csproj | 10 +- .../TestHelper.cs | 66 +++---- 5 files changed, 212 insertions(+), 61 deletions(-) create mode 100644 src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs delete mode 100644 src/ReactiveUI.SourceGenerator.Tests/ModuleInitializer.cs diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 7ff5bfdb..ba73b6db 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -8,9 +8,9 @@ - - - + + + @@ -39,7 +39,5 @@ - - diff --git a/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs b/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs new file mode 100644 index 00000000..70d860ab --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs @@ -0,0 +1,176 @@ +// 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.Reflection; +using System.Text; + +namespace ReactiveUI.SourceGenerator.Tests; + +/// Compares a generator run's output with the snapshots stored in the test project. +/// +/// +/// Each generated file is stored as {folder}/{type}.{method}#{hint name}.verified.cs: a //HintName: +/// line, then the generated text. Output that differs from its snapshot, or has none, is written beside it as +/// *.received.cs and fails the test, as does a snapshot the run no longer produces. +/// +/// +/// Set ACCEPT_SNAPSHOTS=1 to write every output over its snapshot and delete snapshots nothing produces. +/// +/// +internal static class GeneratorSnapshot +{ + /// The environment variable that makes a run write its output over the snapshots. + private const string AcceptVariable = "ACCEPT_SNAPSHOTS"; + + /// The assembly metadata key the test project records its snapshot root under. + private const string DirectoryMetadataKey = "GeneratorSnapshotDirectory"; + + /// The suffix of a stored snapshot. + private const string VerifiedSuffix = ".verified.cs"; + + /// The suffix of the output written beside a snapshot it does not match. + private const string ReceivedSuffix = ".received.cs"; + + /// + /// A generated line carrying the generator's assembly version. It changes with every build of the package, so it + /// is left out of the snapshots. + /// + private const string GeneratedCodeAttributeLine = "[global::System.CodeDom.Compiler.GeneratedCode(\""; + + /// The encoding snapshots are written in: UTF-8 with a byte order mark, as the stored snapshots are. + private static readonly UTF8Encoding SnapshotEncoding = new(encoderShouldEmitUTF8Identifier: true); + + /// The directory holding the snapshot folders. + private static readonly string SnapshotRoot = ReadSnapshotRoot(); + + /// Asserts that the generated files match the stored snapshots. + /// The driver after the generator has run. + /// The snapshot folder, one per generator. + /// The snapshot name's type segment. + /// The snapshot name's method segment. + /// A task that completes once every file has been compared. + internal static async Task VerifyAsync(GeneratorDriver driver, string folder, string typeName, string methodName) + { + ArgumentNullException.ThrowIfNull(driver); + + var directory = Path.Combine(SnapshotRoot, folder); + _ = Directory.CreateDirectory(directory); + + var prefix = $"{typeName}.{methodName}#"; + var accept = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(AcceptVariable)); + var produced = new HashSet(StringComparer.Ordinal); + var failures = new List(); + + foreach (var result in driver.GetRunResult().Results) + { + foreach (var source in result.GeneratedSources) + { + var name = prefix + Path.GetFileNameWithoutExtension(source.HintName); + _ = produced.Add(name); + + var output = $"//HintName: {source.HintName}\n{Scrub(source.SourceText.ToString())}"; + if (!await StoreAsync(Path.Combine(directory, name), output, accept)) + { + failures.Add($"{folder}/{name}{VerifiedSuffix} does not match the generated output; see {name}{ReceivedSuffix}"); + } + } + } + + foreach (var snapshot in Directory.EnumerateFiles(directory, $"{prefix}*{VerifiedSuffix}")) + { + var fileName = Path.GetFileName(snapshot); + if (produced.Contains(fileName[..^VerifiedSuffix.Length])) + { + continue; + } + + if (accept) + { + File.Delete(snapshot); + } + else + { + failures.Add($"{folder}/{fileName} is no longer generated"); + } + } + + await Assert.That(failures).IsEmpty(); + } + + /// Settles one generated file against its snapshot, writing the received or accepted output as needed. + /// The snapshot path without its suffix. + /// The generated output, in snapshot form. + /// Whether the output replaces the snapshot. + /// when the output equals the snapshot or was accepted as it. + private static async Task StoreAsync(string basePath, string output, bool accept) + { + var verifiedPath = basePath + VerifiedSuffix; + var receivedPath = basePath + ReceivedSuffix; + + // Compared before accepting, so a matching snapshot keeps its bytes rather than being rewritten. A final line + // break is not significant: some stored snapshots end with one and some do not. + if (File.Exists(verifiedPath) + && string.Equals(Normalize(await File.ReadAllTextAsync(verifiedPath)).TrimEnd('\n'), output.TrimEnd('\n'), StringComparison.Ordinal)) + { + File.Delete(receivedPath); + return true; + } + + if (accept) + { + await File.WriteAllTextAsync(verifiedPath, output, SnapshotEncoding); + File.Delete(receivedPath); + return true; + } + + await File.WriteAllTextAsync(receivedPath, output, SnapshotEncoding); + return false; + } + + /// Reads the snapshot root the test project recorded when it was built. + /// The absolute path of the snapshot root. + /// The test assembly records no snapshot root. + private static string ReadSnapshotRoot() + { + // Recorded at build time: a CI build maps caller file paths to /_/, which does not exist on disk. + foreach (var attribute in typeof(GeneratorSnapshot).Assembly.GetCustomAttributes()) + { + if (attribute.Key == DirectoryMetadataKey && !string.IsNullOrEmpty(attribute.Value)) + { + return attribute.Value; + } + } + + throw new InvalidOperationException($"The test assembly records no '{DirectoryMetadataKey}' assembly metadata."); + } + + /// Puts generated text in snapshot form: LF line endings, without the generated-code attribute lines. + /// The generated text. + /// The text as a snapshot stores it. + private static string Scrub(string text) + { + var normalized = Normalize(text); + if (!normalized.Contains(GeneratedCodeAttributeLine, StringComparison.Ordinal)) + { + return normalized; + } + + var builder = new StringBuilder(normalized.Length); + foreach (var line in normalized.Split('\n')) + { + if (!line.Contains(GeneratedCodeAttributeLine, StringComparison.Ordinal)) + { + _ = builder.Append(line).Append('\n'); + } + } + + // Split yields an empty last element after a trailing newline; appending it added one newline too many. + return builder.ToString(0, builder.Length - 1); + } + + /// Normalises line endings so a snapshot compares the same on every checkout. + /// The text to normalise. + /// The text with LF line endings. + private static string Normalize(string text) => text.Replace("\r\n", "\n", StringComparison.Ordinal); +} diff --git a/src/ReactiveUI.SourceGenerator.Tests/ModuleInitializer.cs b/src/ReactiveUI.SourceGenerator.Tests/ModuleInitializer.cs deleted file mode 100644 index 245f0215..00000000 --- a/src/ReactiveUI.SourceGenerator.Tests/ModuleInitializer.cs +++ /dev/null @@ -1,13 +0,0 @@ -// 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.SourceGenerator.Tests; - -/// Initializes the source generator verifiers. -public static class ModuleInitializer -{ - /// Initializes the source generators. - [ModuleInitializer] - public static void Init() => VerifySourceGenerators.Initialize(); -} diff --git a/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj b/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj index 4b13e39b..12ad884e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj +++ b/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj @@ -12,12 +12,18 @@ true + + + + + + + + - - diff --git a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs index 69279ef7..98872f35 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs @@ -50,52 +50,46 @@ public sealed partial class TestHelper : IDisposable /// Tests a generator expecting it to fail by throwing an . /// The source code to test. + /// The calling test, which names the snapshots. + /// The calling test's file, whose name is its class name. /// A task representing the asynchronous assertion operation. - public async Task TestFail(string source) => - await Assert.That(() => RunGeneratorAndCheck(source)).Throws(); + public async Task TestFail(string source, [CallerMemberName] string methodName = "", [CallerFilePath] string filePath = "") => + await Assert.That(() => RunGeneratorAndCheck(source, withPreDiagnosics: false, methodName, filePath)).Throws(); /// Tests a generator expecting it to pass successfully. /// The source code to test. + /// The calling test, which names the snapshots. + /// The calling test's file, whose name is its class name. /// A task representing the asynchronous verification operation. - public Task TestPass(string source) => - TestPass(source, withPreDiagnosics: false); + public Task TestPass(string source, [CallerMemberName] string methodName = "", [CallerFilePath] string filePath = "") => + RunGeneratorAndCheck(source, withPreDiagnosics: false, methodName, filePath); /// Tests a generator expecting it to pass successfully. /// The source code to test. /// if set to true [with pre diagnosics]. + /// The calling test, which names the snapshots. + /// The calling test's file, whose name is its class name. /// A task representing the asynchronous verification operation. - public Task TestPass(string source, bool withPreDiagnosics) => - RunGeneratorAndCheck(source, withPreDiagnosics); + public Task TestPass(string source, bool withPreDiagnosics, [CallerMemberName] string methodName = "", [CallerFilePath] string filePath = "") => + RunGeneratorAndCheck(source, withPreDiagnosics, methodName, filePath); /// public void Dispose() { } - /// Runs the specified source generator and validates the generated code. - /// The code to be parsed and processed by the generator. - /// The generator driver used to run the generator. - /// Thrown if the compilation fails. - public SettingsTask RunGeneratorAndCheck(string code) => - RunGeneratorAndCheck(code, withPreDiagnosics: false, rerunCompilation: true); - - /// Runs the specified source generator and validates the generated code. + /// Runs the specified source generator, validates the generated code and compares it with its snapshots. /// The code to be parsed and processed by the generator. /// if set to true [with pre diagnosics]. - /// The generator driver used to run the generator. - public SettingsTask RunGeneratorAndCheck(string code, bool withPreDiagnosics) => - RunGeneratorAndCheck(code, withPreDiagnosics, rerunCompilation: true); - - /// Runs the specified source generator and validates the generated code. - /// The code to be parsed and processed by the generator. - /// if set to true [with pre diagnosics]. - /// Indicates whether to rerun the compilation after running the generator. - /// The generator driver used to run the generator. + /// The calling test, which names the snapshots. + /// The calling test's file, whose name is its class name. + /// A task that completes once the snapshots have been compared. /// Thrown if the compilation fails. - public SettingsTask RunGeneratorAndCheck( + public Task RunGeneratorAndCheck( string code, bool withPreDiagnosics, - bool rerunCompilation) + string methodName, + string filePath) { var parseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13); var compilation = CreateTestCompilation(code, parseOptions); @@ -118,10 +112,8 @@ public SettingsTask RunGeneratorAndCheck( var generator = new T(); var driver = CSharpGeneratorDriver.Create(generator).WithUpdatedParseOptions(parseOptions); - - return rerunCompilation - ? RunGeneratorAndVerify(code, driver, compilation) - : VerifyGenerator(driver.RunGenerators(compilation)); + var rerunDriver = RunGeneratorAndValidate(code, driver, compilation); + return GeneratorSnapshot.VerifyAsync(rerunDriver, GetVerifiedFilePath(), Path.GetFileNameWithoutExtension(filePath), methodName); } /// Gets the verified file path for generator type . @@ -214,14 +206,14 @@ private static void AddSyntaxTree(List syntaxTrees, string source, C /// The original source code. /// The configured generator driver. /// The input compilation. - /// The snapshot verification settings. - private static SettingsTask RunGeneratorAndVerify(string code, GeneratorDriver driver, Compilation compilation) + /// The driver after the run. + private static GeneratorDriver RunGeneratorAndValidate(string code, GeneratorDriver driver, Compilation compilation) { var rerunDriver = driver.RunGeneratorsAndUpdateCompilation(compilation, out var outputCompilation, out var diagnostics); ThrowIfDiagnosticsExist(GetDiagnosticsAtLeastSeverity(diagnostics, DiagnosticSeverity.Warning), "Diagnostic", "Compilation failed due to the above diagnostics."); ThrowIfDiagnosticsExist(GetUnexpectedOutputDiagnostics(outputCompilation.GetDiagnostics()), "Output diagnostic", "Output compilation failed due to the above diagnostics."); ValidateGeneratedCode(code, rerunDriver); - return VerifyGenerator(rerunDriver); + return rerunDriver; } /// Writes diagnostics and throws when a collection is non-empty. @@ -616,12 +608,4 @@ private static bool ContainsPropertyNotification(string generatedCode, string pr /// Writes a validation message to the current test output. /// The message to write. private static void WriteTestOutput(string message) => TestContext.Current?.OutputWriter.WriteLine(message); - - /// Creates snapshot verification settings for a generator driver. - /// The generator driver to verify. - /// The snapshot verification settings. - private static SettingsTask VerifyGenerator(GeneratorDriver driver) => - Verify(driver) - .UseDirectory(GetVerifiedFilePath()) - .ScrubLinesContaining("[global::System.CodeDom.Compiler.GeneratedCode(\""); - } +} From fba0558372050c3d5711f7e6d05edcdd41825575 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:06:27 +1000 Subject: [PATCH 06/30] test: abbreviate generator snapshot names to stay inside the Windows path limit Snapshot names use the test class's capitals and shortened common words in the method and hint segments, so the longest path under the test project drops from 145 to 94 characters. The snapshot contents are unchanged. --- ...d.cs => BDLG.FRxProps#BdlAttr.verified.cs} | 0 ...LG.FRxProps#TestNs.TestVM.Bdl.verified.cs} | 0 ...ied.cs => DLE.AccMods#BdlAttr.verified.cs} | 0 ...DLE.AccMods#TestNs.TestVM.Bdl.verified.cs} | 0 ...ied.cs => DLE.CplxGen#BdlAttr.verified.cs} | 0 ...DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs} | 0 ...d.cs => DLE.DateTimeT#BdlAttr.verified.cs} | 0 ...E.DateTimeT#TestNs.TestVM.Bdl.verified.cs} | 0 ...ied.cs => DLE.DiffNss#BdlAttr.verified.cs} | 0 ...=> DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs} | 0 ...=> DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs} | 0 ...ified.cs => DLE.EnumT#BdlAttr.verified.cs} | 0 ...> DLE.EnumT#TestNs.TestVM.Bdl.verified.cs} | 0 ...ed.cs => DLE.GenClass#BdlAttr.verified.cs} | 0 ...E.GenClass#TestNs.GenVM`1.Bdl.verified.cs} | 0 ...ified.cs => DLE.GuidT#BdlAttr.verified.cs} | 0 ...> DLE.GuidT#TestNs.TestVM.Bdl.verified.cs} | 0 ...IntClassGenPublicProp#BdlAttr.verified.cs} | 0 ...ssGenPublicProp#TestNs.Vm.Bdl.verified.cs} | 0 ....cs => DLE.InterfaceT#BdlAttr.verified.cs} | 0 ....InterfaceT#TestNs.TestVM.Bdl.verified.cs} | 0 ....cs => DLE.MultiLists#BdlAttr.verified.cs} | 0 ....MultiLists#TestNs.TestVM.Bdl.verified.cs} | 0 ...d.cs => DLE.NestClass#BdlAttr.verified.cs} | 0 ...terVM+InnerVM+DeepInnerVM.Bdl.verified.cs} | 0 ...ss#TestNs.OuterVM+InnerVM.Bdl.verified.cs} | 0 ....NestClass#TestNs.OuterVM.Bdl.verified.cs} | 0 ...s => DLE.NullElements#BdlAttr.verified.cs} | 0 ...ullElements#TestNs.TestVM.Bdl.verified.cs} | 0 ...cs => DLE.RecordClass#BdlAttr.verified.cs} | 0 ...Class#TestNs.TestVMRecord.Bdl.verified.cs} | 0 ...ied.cs => DLE.StructT#BdlAttr.verified.cs} | 0 ...DLE.StructT#TestNs.TestVM.Bdl.verified.cs} | 0 ...fied.cs => DLE.TupleT#BdlAttr.verified.cs} | 0 ... DLE.TupleT#TestNs.TestVM.Bdl.verified.cs} | 0 ...erified.cs => DLE.WRx#BdlAttr.verified.cs} | 0 ... => DLE.WRx#TestNs.TestVM.Bdl.verified.cs} | 0 .../GeneratorSnapshot.cs | 91 ++++++++++++++++++- ...fied.cs => IVFG.Basic#IvfAttr.verified.cs} | 0 ....Basic#TestNs.TestViewWpf.Ivf.verified.cs} | 0 ...fied.cs => VFE.DiffNs#IvfAttr.verified.cs} | 0 ....DiffNs#Views.ProductView.Ivf.verified.cs} | 0 ...Ns#App.Views.ExternalView.Ivf.verified.cs} | 0 ...ified.cs => VFE.ExtNs#IvfAttr.verified.cs} | 0 ...FE.FIvfWNestViewClass#IvfAttr.verified.cs} | 0 ...+MiddleContainer+NestView.Ivf.verified.cs} | 0 ... => VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs} | 0 ...WRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs} | 0 ...=> VFE.FIvfWRxPropsVm#IvfAttr.verified.cs} | 0 ...ropsVm#TestNs.RxPropsView.Ivf.verified.cs} | 0 ...=> VFE.FIvfWStringVmT#IvfAttr.verified.cs} | 0 ...StringVmT#TestNs.TestView.Ivf.verified.cs} | 0 ...VFE.FMultiIvfInSameNs#IvfAttr.verified.cs} | 0 ...iIvfInSameNs#TestNs.View1.Ivf.verified.cs} | 0 ...iIvfInSameNs#TestNs.View2.Ivf.verified.cs} | 0 ...iIvfInSameNs#TestNs.View3.Ivf.verified.cs} | 0 ...erified.cs => VFE.Gen#IvfAttr.verified.cs} | 0 ...Gen#TestNs.StringItemView.Ivf.verified.cs} | 0 ...d.cs => VFE.Interface#IvfAttr.verified.cs} | 0 ...face#TestNs.InterfaceView.Ivf.verified.cs} | 0 ...rified.cs => VFE.Nest#IvfAttr.verified.cs} | 0 ...VFE.Nest#TestNs.ChildView.Ivf.verified.cs} | 0 ...fied.cs => VFE.Record#IvfAttr.verified.cs} | 0 ....Record#TestNs.RecordView.Ivf.verified.cs} | 0 ...erified.cs => RG.Basic#AccMod.verified.cs} | 0 ...erified.cs => RG.Basic#RxAttr.verified.cs} | 0 ... RG.Basic#TestNs.TestVM.Props.verified.cs} | 0 ...d.cs => RG.CalledValue#AccMod.verified.cs} | 0 ...d.cs => RG.CalledValue#RxAttr.verified.cs} | 0 ...lledValue#TestNs.TestVM.Props.verified.cs} | 0 ...ified.cs => RG.Partial#AccMod.verified.cs} | 0 ...ified.cs => RG.Partial#RxAttr.verified.cs} | 0 ...> RG.PartialAlsoNotify#AccMod.verified.cs} | 0 ...> RG.PartialAlsoNotify#RxAttr.verified.cs} | 0 ...lsoNotify#TestNs.TestVM.Props.verified.cs} | 0 ...verified.cs => RG.WAcc#AccMod.verified.cs} | 0 ...verified.cs => RG.WAcc#RxAttr.verified.cs} | 0 ...> RG.WAcc#TestNs.TestVM.Props.verified.cs} | 0 ... => RG.WAttrAccInherit#AccMod.verified.cs} | 0 ... => RG.WAttrAccInherit#RxAttr.verified.cs} | 0 ...ccInherit#TestNs.TestVM.Props.verified.cs} | 0 ...rified.cs => RG.WAttrs#AccMod.verified.cs} | 0 ...rified.cs => RG.WAttrs#RxAttr.verified.cs} | 0 ...RG.WAttrs#TestNs.TestVM.Props.verified.cs} | 0 ... => RG.WIdenticalClass#AccMod.verified.cs} | 0 ... => RG.WIdenticalClass#RxAttr.verified.cs} | 0 ...calClass#TestNs1.TestVM.Props.verified.cs} | 0 ...calClass#TestNs2.TestVM.Props.verified.cs} | 0 ...erified.cs => RG.WInit#AccMod.verified.cs} | 0 ...erified.cs => RG.WInit#RxAttr.verified.cs} | 0 ... RG.WInit#TestNs.TestVM.Props.verified.cs} | 0 ...ed.cs => RG.WNestClass#AccMod.verified.cs} | 0 ...ed.cs => RG.WNestClass#RxAttr.verified.cs} | 0 ...TestVm3+TestInnerClass1.Props.verified.cs} | 0 ...rClass2+TestInnerClass3.Props.verified.cs} | 0 ...TestVm3+TestInnerClass2.Props.verified.cs} | 0 ...stClass#TestNs1.TestVm3.Props.verified.cs} | 0 ...ified.cs => RGE.Arrays#AccMod.verified.cs} | 0 ...ified.cs => RGE.Arrays#RxAttr.verified.cs} | 0 ...GE.Arrays#TestNs.TestVM.Props.verified.cs} | 0 ...fied.cs => RGE.CplxGen#AccMod.verified.cs} | 0 ...fied.cs => RGE.CplxGen#RxAttr.verified.cs} | 0 ...E.CplxGen#TestNs.TestVM.Props.verified.cs} | 0 ...ied.cs => RGE.DeepNest#AccMod.verified.cs} | 0 ...ied.cs => RGE.DeepNest#RxAttr.verified.cs} | 0 ...l2+Level3+Level4+Level5.Props.verified.cs} | 0 ...l1+Level2+Level3+Level4.Props.verified.cs} | 0 ...Ns.Level1+Level2+Level3.Props.verified.cs} | 0 ...st#TestNs.Level1+Level2.Props.verified.cs} | 0 ....DeepNest#TestNs.Level1.Props.verified.cs} | 0 ...ed.cs => RGE.Delegates#AccMod.verified.cs} | 0 ...ed.cs => RGE.Delegates#RxAttr.verified.cs} | 0 ...Delegates#TestNs.TestVM.Props.verified.cs} | 0 ...rified.cs => RGE.Enums#AccMod.verified.cs} | 0 ...rified.cs => RGE.Enums#RxAttr.verified.cs} | 0 ...RGE.Enums#TestNs.TestVM.Props.verified.cs} | 0 ...verified.cs => RGE.Gen#AccMod.verified.cs} | 0 ...verified.cs => RGE.Gen#RxAttr.verified.cs} | 0 ...> RGE.Gen#TestNs.TestVM.Props.verified.cs} | 0 ...ied.cs => RGE.GenClass#AccMod.verified.cs} | 0 ...ied.cs => RGE.GenClass#RxAttr.verified.cs} | 0 ...GenClass#TestNs.GenVM`1.Props.verified.cs} | 0 ...GenClass#TestNs.GenVM`2.Props.verified.cs} | 0 ...d.cs => RGE.Interfaces#AccMod.verified.cs} | 0 ...d.cs => RGE.Interfaces#RxAttr.verified.cs} | 0 ...nterfaces#TestNs.TestVM.Props.verified.cs} | 0 ...erified.cs => RGE.Lazy#AccMod.verified.cs} | 0 ...erified.cs => RGE.Lazy#RxAttr.verified.cs} | 0 ... RGE.Lazy#TestNs.TestVM.Props.verified.cs} | 0 ...ied.cs => RGE.MixedAcc#AccMod.verified.cs} | 0 ...ied.cs => RGE.MixedAcc#RxAttr.verified.cs} | 0 ....MixedAcc#TestNs.TestVM.Props.verified.cs} | 0 ...ed.cs => RGE.MultiAlso#AccMod.verified.cs} | 0 ...ed.cs => RGE.MultiAlso#RxAttr.verified.cs} | 0 ...MultiAlso#TestNs.TestVM.Props.verified.cs} | 0 ...ed.cs => RGE.MultiAttr#AccMod.verified.cs} | 0 ...ed.cs => RGE.MultiAttr#RxAttr.verified.cs} | 0 ...MultiAttr#TestNs.TestVM.Props.verified.cs} | 0 ...cs => RGE.MultiPartial#AccMod.verified.cs} | 0 ...cs => RGE.MultiPartial#RxAttr.verified.cs} | 0 ...tiPartial#TestNs.TestVM.Props.verified.cs} | 0 ...ified.cs => RGE.NewMod#AccMod.verified.cs} | 0 ...ified.cs => RGE.NewMod#RxAttr.verified.cs} | 0 ...GE.NewMod#TestNs.BaseVM.Props.verified.cs} | 0 ...NewMod#TestNs.DerivedVM.Props.verified.cs} | 0 ...erified.cs => RGE.Null#AccMod.verified.cs} | 0 ...erified.cs => RGE.Null#RxAttr.verified.cs} | 0 ... RGE.Null#TestNs.TestVM.Props.verified.cs} | 0 ...ied.cs => RGE.Override#AccMod.verified.cs} | 0 ...ied.cs => RGE.Override#RxAttr.verified.cs} | 0 ....Override#TestNs.BaseVM.Props.verified.cs} | 0 ...erride#TestNs.DerivedVM.Props.verified.cs} | 0 ...ified.cs => RGE.Record#AccMod.verified.cs} | 0 ...ified.cs => RGE.Record#RxAttr.verified.cs} | 0 ...ord#TestNs.TestVMRecord.Props.verified.cs} | 0 ....verified.cs => RGE.Ro#AccMod.verified.cs} | 0 ....verified.cs => RGE.Ro#RxAttr.verified.cs} | 0 ...=> RGE.Ro#TestNs.TestVM.Props.verified.cs} | 0 ...ified.cs => RGE.Struct#AccMod.verified.cs} | 0 ...ified.cs => RGE.Struct#RxAttr.verified.cs} | 0 ...GE.Struct#TestNs.TestVM.Props.verified.cs} | 0 ...erified.cs => RGE.Time#AccMod.verified.cs} | 0 ...erified.cs => RGE.Time#RxAttr.verified.cs} | 0 ... RGE.Time#TestNs.TestVM.Props.verified.cs} | 0 ...ified.cs => RGE.Tuples#AccMod.verified.cs} | 0 ...ified.cs => RGE.Tuples#RxAttr.verified.cs} | 0 ...GE.Tuples#TestNs.TestVM.Props.verified.cs} | 0 ...=> RCE.FMultiRxCmds#RxCmdAttr.verified.cs} | 0 ...tiRxCmds#TestNs.TestVM.RxCmds.verified.cs} | 0 ...mdInDeeplyNestClass#RxCmdAttr.verified.cs} | 0 ...r+Middle+Inner+Deepest.RxCmds.verified.cs} | 0 ...tNs.Outer+Middle+Inner.RxCmds.verified.cs} | 0 ...ss#TestNs.Outer+Middle.RxCmds.verified.cs} | 0 ...NestClass#TestNs.Outer.RxCmds.verified.cs} | 0 ...CE.FRxCmdInGenClass#RxCmdAttr.verified.cs} | 0 ...enClass#TestNs.GenVM`1.RxCmds.verified.cs} | 0 ...FRxCmdInRecordClass#RxCmdAttr.verified.cs} | 0 ...ss#TestNs.TestVMRecord.RxCmds.verified.cs} | 0 ...E.FRxCmdWArrayParam#RxCmdAttr.verified.cs} | 0 ...rayParam#TestNs.TestVM.RxCmds.verified.cs} | 0 ...E.FRxCmdWCanExecute#RxCmdAttr.verified.cs} | 0 ...nExecute#TestNs.TestVM.RxCmds.verified.cs} | 0 ...mdWCanExecuteMethod#RxCmdAttr.verified.cs} | 0 ...teMethod#TestNs.TestVM.RxCmds.verified.cs} | 0 ...CanExecuteScheduler#RxCmdAttr.verified.cs} | 0 ...cheduler#TestNs.TestVM.RxCmds.verified.cs} | 0 ....FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs} | 0 ...xGenRetT#TestNs.TestVM.RxCmds.verified.cs} | 0 ...cs => RCE.FRxCmdWCt#RxCmdAttr.verified.cs} | 0 ...RxCmdWCt#TestNs.TestVM.RxCmds.verified.cs} | 0 ... RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs} | 0 ...WCtParam#TestNs.TestVM.RxCmds.verified.cs} | 0 ...RxCmdWDelegateParam#RxCmdAttr.verified.cs} | 0 ...ateParam#TestNs.TestVM.RxCmds.verified.cs} | 0 ...CE.FRxCmdWEnumParam#RxCmdAttr.verified.cs} | 0 ...numParam#TestNs.TestVM.RxCmds.verified.cs} | 0 ....FRxCmdWMultiParams#RxCmdAttr.verified.cs} | 0 ...tiParams#TestNs.TestVM.RxCmds.verified.cs} | 0 ...CE.FRxCmdWNullParam#RxCmdAttr.verified.cs} | 0 ...ullParam#TestNs.TestVM.RxCmds.verified.cs} | 0 ...> RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs} | 0 ...dWObsRet#TestNs.TestVM.RxCmds.verified.cs} | 0 ...E.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs} | 0 ...ivateAcc#TestNs.TestVM.RxCmds.verified.cs} | 0 ...FRxCmdWProtectedAcc#RxCmdAttr.verified.cs} | 0 ...ectedAcc#TestNs.TestVM.RxCmds.verified.cs} | 0 ...RxCmdWTaskOfNullRet#RxCmdAttr.verified.cs} | 0 ...fNullRet#TestNs.TestVM.RxCmds.verified.cs} | 0 ...CE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs} | 0 ...upleRetT#TestNs.TestVM.RxCmds.verified.cs} | 0 ...CE.FRxCmdWValueTask#RxCmdAttr.verified.cs} | 0 ...alueTask#TestNs.TestVM.RxCmds.verified.cs} | 0 ...PartialDeclarations#RxCmdAttr.verified.cs} | 0 ...arations#TestNs.TestVM.RxCmds.verified.cs} | 0 ...ied.cs => RCMDG.Acc#RxCmdAttr.verified.cs} | 0 ...CMDG.Acc#TestNs.TestVM.RxCmds.verified.cs} | 0 ...> RCMDG.AsyncWParam#RxCmdAttr.verified.cs} | 0 ...ncWParam#TestNs.TestVM.RxCmds.verified.cs} | 0 ...d.cs => RCMDG.Basic#RxCmdAttr.verified.cs} | 0 ...DG.Basic#TestNs.TestVM.RxCmds.verified.cs} | 0 ...> RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs} | 0 ...AsyncCmd#TestNs.TestVM.RxCmds.verified.cs} | 0 ...ed.cs => RCMDG.Nest#RxCmdAttr.verified.cs} | 0 ...estVm3+TestInnerClass1.RxCmds.verified.cs} | 0 ...Class2+TestInnerClass3.RxCmds.verified.cs} | 0 ...estVm3+TestInnerClass2.RxCmds.verified.cs} | 0 ...DG.Nest#TestNs.TestVm3.RxCmds.verified.cs} | 0 ...s => RCMDG.NullTRet#RxCmdAttr.verified.cs} | 0 ...NullTRet#TestNs.TestVM.RxCmds.verified.cs} | 0 ...MDG.RunInBackground#RxCmdAttr.verified.cs} | 0 ...ckground#TestNs.TestVM.RxCmds.verified.cs} | 0 ... => RCMDG.Scheduler#RxCmdAttr.verified.cs} | 0 ...cheduler#TestNs.TestVM.RxCmds.verified.cs} | 0 ....cs => RCMDG.WParam#RxCmdAttr.verified.cs} | 0 ...G.WParam#TestNs.TestVM.RxCmds.verified.cs} | 0 ...s => RCE.ByteArray#RxCollAttr.verified.cs} | 0 ...teArray#TestNs.TestVM.RxColls.verified.cs} | 0 ...ed.cs => RCE.CplxT#RxCollAttr.verified.cs} | 0 ...E.CplxT#TestNs.TestVM.RxColls.verified.cs} | 0 ...cs => RCE.DateTime#RxCollAttr.verified.cs} | 0 ...ateTime#TestNs.TestVM.RxColls.verified.cs} | 0 ...RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs} | 0 ...RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs} | 0 ...d.cs => RCE.DiffNs#RxCollAttr.verified.cs} | 0 ...ied.cs => RCE.Enum#RxCollAttr.verified.cs} | 0 ...CE.Enum#TestNs.TestVM.RxColls.verified.cs} | 0 ...fied.cs => RCE.Gen#RxCollAttr.verified.cs} | 0 ...CE.Gen#TestNs.GenVM`1.RxColls.verified.cs} | 0 ...ied.cs => RCE.Guid#RxCollAttr.verified.cs} | 0 ...CE.Guid#TestNs.TestVM.RxColls.verified.cs} | 0 ...s => RCE.Interface#RxCollAttr.verified.cs} | 0 ...terface#TestNs.TestVM.RxColls.verified.cs} | 0 ...ed.cs => RCE.Multi#RxCollAttr.verified.cs} | 0 ...E.Multi#TestNs.TestVM.RxColls.verified.cs} | 0 ...ied.cs => RCE.Nest#RxCollAttr.verified.cs} | 0 ...M+InnerVM+DeepInnerVM.RxColls.verified.cs} | 0 ...estNs.OuterVM+InnerVM.RxColls.verified.cs} | 0 ...E.Nest#TestNs.OuterVM.RxColls.verified.cs} | 0 ...ied.cs => RCE.Null#RxCollAttr.verified.cs} | 0 ...CE.Null#TestNs.TestVM.RxColls.verified.cs} | 0 ...d.cs => RCE.Record#RxCollAttr.verified.cs} | 0 ...d#TestNs.TestVMRecord.RxColls.verified.cs} | 0 ...d.cs => RCE.Struct#RxCollAttr.verified.cs} | 0 ....Struct#TestNs.TestVM.RxColls.verified.cs} | 0 ...ed.cs => RCE.Tuple#RxCollAttr.verified.cs} | 0 ...E.Tuple#TestNs.TestVM.RxColls.verified.cs} | 0 ...fied.cs => RCE.WRx#RxCollAttr.verified.cs} | 0 ...RCE.WRx#TestNs.TestVM.RxColls.verified.cs} | 0 ... => RCG.BasicField#RxCollAttr.verified.cs} | 0 ...icField#TestNs.TestVM.RxColls.verified.cs} | 0 ...ed.cs => ROE.Basic#IRxObjAttr.verified.cs} | 0 ...OE.Basic#TestNs.TestVM.IRxObj.verified.cs} | 0 ...ed.cs => ROE.CplxT#IRxObjAttr.verified.cs} | 0 ...OE.CplxT#TestNs.TestVM.IRxObj.verified.cs} | 0 ...ed.cs => ROE.Enums#IRxObjAttr.verified.cs} | 0 ...OE.Enums#TestNs.TestVM.IRxObj.verified.cs} | 0 ...> ROE.FRxObjRecord#IRxObjAttr.verified.cs} | 0 ...ROE.FRxObjWAccMods#IRxObjAttr.verified.cs} | 0 ...WAccMods#TestNs.TestVM.IRxObj.verified.cs} | 0 ...> ROE.FRxObjWAttrs#IRxObjAttr.verified.cs} | 0 ...bjWAttrs#TestNs.TestVM.IRxObj.verified.cs} | 0 ...WDeeplyNestClasses#IRxObjAttr.verified.cs} | 0 ...1+Level2+Level3+Level4.IRxObj.verified.cs} | 0 ...s.Level1+Level2+Level3.IRxObj.verified.cs} | 0 ...s#TestNs.Level1+Level2.IRxObj.verified.cs} | 0 ...tClasses#TestNs.Level1.IRxObj.verified.cs} | 0 ...OE.FRxObjWGenClass#IRxObjAttr.verified.cs} | 0 ...enClass#TestNs.GenVM`1.IRxObj.verified.cs} | 0 ...ROE.FRxObjWInhMods#IRxObjAttr.verified.cs} | 0 ...WInhMods#TestNs.BaseVM.IRxObj.verified.cs} | 0 ...hMods#TestNs.DerivedVM.IRxObj.verified.cs} | 0 ....FRxObjWMultiProps#IRxObjAttr.verified.cs} | 0 ...ltiProps#TestNs.TestVM.IRxObj.verified.cs} | 0 ...WMultiTConstraints#IRxObjAttr.verified.cs} | 0 ...ints#TestNs.EntityVM`1.IRxObj.verified.cs} | 0 ...E.FRxObjWNestClass#IRxObjAttr.verified.cs} | 0 ...estNs.ParentVM+ChildVM.IRxObj.verified.cs} | 0 ...tClass#TestNs.ParentVM.IRxObj.verified.cs} | 0 ...s => ROE.Interface#IRxObjAttr.verified.cs} | 0 ...nterface#TestNs.TestVM.IRxObj.verified.cs} | 0 ....cs => ROE.MultiNs#IRxObjAttr.verified.cs} | 0 ...ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs} | 0 ...ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs} | 0 ...ied.cs => ROE.Null#IRxObjAttr.verified.cs} | 0 ...ROE.Null#TestNs.TestVM.IRxObj.verified.cs} | 0 ...ed.cs => ROG.Basic#IRxObjAttr.verified.cs} | 0 ...OG.Basic#TestNs.TestVM.IRxObj.verified.cs} | 0 307 files changed, 89 insertions(+), 2 deletions(-) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{BindableDerivedListGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => BDLG.FRxProps#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{BindableDerivedListGeneratorTests.FromReactiveProperties#TestNs.TestVM.BindableDerivedList.g.verified.cs => BDLG.FRxProps#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.AccessModifiers#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.AccMods#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.AccessModifiers#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.AccMods#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.ComplexGeneric#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.CplxGen#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.ComplexGeneric#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.DateTimeType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.DateTimeT#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.DateTimeType#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.DateTimeT#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.DiffNamespaces#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.DiffNss#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.DiffNamespaces#Namespace1.TestVM.BindableDerivedList.g.verified.cs => DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.DiffNamespaces#Namespace2.TestVM.BindableDerivedList.g.verified.cs => DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.EnumType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.EnumT#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.EnumType#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.EnumT#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.GenericClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.GenClass#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.GenericClass#TestNs.GenericVM`1.BindableDerivedList.g.verified.cs => DLE.GenClass#TestNs.GenVM`1.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.GuidType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.GuidT#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.GuidType#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.GuidT#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.InternalClassGeneratesPublicProperty#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.IntClassGenPublicProp#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.InternalClassGeneratesPublicProperty#TestNs.ViewModel.BindableDerivedList.g.verified.cs => DLE.IntClassGenPublicProp#TestNs.Vm.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.InterfaceType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.InterfaceT#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.InterfaceType#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.InterfaceT#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.MultipleLists#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.MultiLists#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.MultipleLists#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.MultiLists#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.NestedClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.NestClass#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.NestedClass#TestNs.OuterVM+InnerVM+DeepInnerVM.BindableDerivedList.g.verified.cs => DLE.NestClass#TestNs.OuterVM+InnerVM+DeepInnerVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.NestedClass#TestNs.OuterVM+InnerVM.BindableDerivedList.g.verified.cs => DLE.NestClass#TestNs.OuterVM+InnerVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.NestedClass#TestNs.OuterVM.BindableDerivedList.g.verified.cs => DLE.NestClass#TestNs.OuterVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.NullableElements#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.NullElements#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.NullableElements#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.NullElements#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.RecordClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.RecordClass#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.RecordClass#TestNs.TestVMRecord.BindableDerivedList.g.verified.cs => DLE.RecordClass#TestNs.TestVMRecord.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.StructType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.StructT#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.StructType#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.StructT#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.TupleType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.TupleT#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.TupleType#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.TupleT#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.WithReactive#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs => DLE.WRx#BdlAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/{DerivedListExtTests.WithReactive#TestNs.TestVM.BindableDerivedList.g.verified.cs => DLE.WRx#TestNs.TestVM.Bdl.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{IViewForGeneratorTests.Basic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => IVFG.Basic#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{IViewForGeneratorTests.Basic#TestNs.TestViewWpf.IViewFor.g.verified.cs => IVFG.Basic#TestNs.TestViewWpf.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.DiffNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.DiffNs#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.DiffNs#Views.ProductView.IViewFor.g.verified.cs => VFE.DiffNs#Views.ProductView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.ExtNs#App.Views.ExternalView.IViewFor.g.verified.cs => VFE.ExtNs#App.Views.ExternalView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.ExtNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.ExtNs#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.FIvfWNestViewClass#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromIViewForWithNestedViewClass#TestNs.OuterContainer+MiddleContainer+NestedView.IViewFor.g.verified.cs => VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#TestNs.CommandsView.IViewFor.g.verified.cs => VFE.FIvfWRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.FIvfWRxPropsVm#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#TestNs.ReactivePropertiesView.IViewFor.g.verified.cs => VFE.FIvfWRxPropsVm#TestNs.RxPropsView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.FIvfWStringVmT#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromIViewForWithStringViewModelType#TestNs.TestView.IViewFor.g.verified.cs => VFE.FIvfWStringVmT#TestNs.TestView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.FMultiIvfInSameNs#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View1.IViewFor.g.verified.cs => VFE.FMultiIvfInSameNs#TestNs.View1.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View2.IViewFor.g.verified.cs => VFE.FMultiIvfInSameNs#TestNs.View2.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View3.IViewFor.g.verified.cs => VFE.FMultiIvfInSameNs#TestNs.View3.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.Generic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.Gen#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.Generic#TestNs.StringItemView.IViewFor.g.verified.cs => VFE.Gen#TestNs.StringItemView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.Interface#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.Interface#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.Interface#TestNs.InterfaceView.IViewFor.g.verified.cs => VFE.Interface#TestNs.InterfaceView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.Nested#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.Nest#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.Nested#TestNs.ChildView.IViewFor.g.verified.cs => VFE.Nest#TestNs.ChildView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.Record#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs => VFE.Record#IvfAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/{ViewForExtTests.Record#TestNs.RecordView.IViewFor.g.verified.cs => VFE.Record#TestNs.RecordView.Ivf.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.Basic#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.Basic#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.Basic#TestNs.TestVM.Properties.g.verified.cs => RG.Basic#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.CalledValue#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.CalledValue#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.CalledValue#TestNs.TestVM.Properties.g.verified.cs => RG.CalledValue#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.Partial#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.Partial#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.PartialAlsoNotify#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.PartialAlsoNotify#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.PartialAlsoNotify#TestNs.TestVM.Properties.g.verified.cs => RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.WAcc#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.WAcc#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAccess#TestNs.TestVM.Properties.g.verified.cs => RG.WAcc#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.WAttrAccInherit#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.WAttrAccInherit#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAttrAccessInherit#TestNs.TestVM.Properties.g.verified.cs => RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.WAttrs#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.WAttrs#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithAttributes#TestNs.TestVM.Properties.g.verified.cs => RG.WAttrs#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.WIdenticalClass#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.WIdenticalClass#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs => RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs => RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.WInit#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.WInit#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithInit#TestNs.TestVM.Properties.g.verified.cs => RG.WInit#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RG.WNestClass#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RG.WNestClass#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs => RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs => RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs => RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs => RG.WNestClass#TestNs1.TestVm3.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Arrays#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Arrays#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Arrays#TestNs.TestVM.Properties.g.verified.cs => RGE.Arrays#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.CplxGen#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.CplxGen#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.ComplexGen#TestNs.TestVM.Properties.g.verified.cs => RGE.CplxGen#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.DeepNest#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.DeepNest#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3+Level4+Level5.Properties.g.verified.cs => RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3+Level4.Properties.g.verified.cs => RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3.Properties.g.verified.cs => RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.DeepNested#TestNs.Level1+Level2.Properties.g.verified.cs => RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.DeepNested#TestNs.Level1.Properties.g.verified.cs => RGE.DeepNest#TestNs.Level1.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Delegates#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Delegates#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Delegates#TestNs.TestVM.Properties.g.verified.cs => RGE.Delegates#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Enums#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Enums#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Enums#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Enums#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Enums#TestNs.TestVM.Properties.g.verified.cs => RGE.Enums#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Gen#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Gen#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Generic#TestNs.TestVM.Properties.g.verified.cs => RGE.Gen#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Generic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.GenClass#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Generic#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.GenClass#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.GenClass#TestNs.GenericVM`1.Properties.g.verified.cs => RGE.GenClass#TestNs.GenVM`1.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.GenClass#TestNs.GenericVM`2.Properties.g.verified.cs => RGE.GenClass#TestNs.GenVM`2.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Interfaces#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Interfaces#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Interfaces#TestNs.TestVM.Properties.g.verified.cs => RGE.Interfaces#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Lazy#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Lazy#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Lazy#TestNs.TestVM.Properties.g.verified.cs => RGE.Lazy#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.MixedAcc#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.MixedAcc#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MixedAccess#TestNs.TestVM.Properties.g.verified.cs => RGE.MixedAcc#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.MultiAlso#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.MultiAlso#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiAlso#TestNs.TestVM.Properties.g.verified.cs => RGE.MultiAlso#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.MultiAttr#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.MultiAttr#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiAttr#TestNs.TestVM.Properties.g.verified.cs => RGE.MultiAttr#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.MultiPartial#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.MultiPartial#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.MultiPartial#TestNs.TestVM.Properties.g.verified.cs => RGE.MultiPartial#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.NewMod#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.NewMod#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.NewMod#TestNs.BaseVM.Properties.g.verified.cs => RGE.NewMod#TestNs.BaseVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.NewMod#TestNs.DerivedVM.Properties.g.verified.cs => RGE.NewMod#TestNs.DerivedVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Null#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Null#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Nullable#TestNs.TestVM.Properties.g.verified.cs => RGE.Null#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Override#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Override#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Override#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Override#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Override#TestNs.BaseVM.Properties.g.verified.cs => RGE.Override#TestNs.BaseVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Override#TestNs.DerivedVM.Properties.g.verified.cs => RGE.Override#TestNs.DerivedVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Record#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Record#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Record#TestNs.TestVMRecord.Properties.g.verified.cs => RGE.Record#TestNs.TestVMRecord.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Record#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Ro#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Record#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Ro#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.ReadOnly#TestNs.TestVM.Properties.g.verified.cs => RGE.Ro#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Struct#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Struct#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Struct#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Struct#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Struct#TestNs.TestVM.Properties.g.verified.cs => RGE.Struct#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Time#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Time#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Time#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Time#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Time#TestNs.TestVM.Properties.g.verified.cs => RGE.Time#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs => RGE.Tuples#AccMod.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs => RGE.Tuples#RxAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVE/{RxGenExtTests.Tuples#TestNs.TestVM.Properties.g.verified.cs => RGE.Tuples#TestNs.TestVM.Props.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Access#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FMultiRxCmds#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromMultipleReactiveCommands#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.AsyncWithParam#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle+Inner+Deepest.ReactiveCommands.g.verified.cs => RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle+Inner.ReactiveCommands.g.verified.cs => RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle.ReactiveCommands.g.verified.cs => RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer.ReactiveCommands.g.verified.cs => RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Basic#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInGenericClass#TestNs.GenericVM`1.ReactiveCommands.g.verified.cs => RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInRecordClass#TestNs.TestVMRecord.ReactiveCommands.g.verified.cs => RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Nested#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithArrayParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.NullableTypeReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCanExecute#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.RunInBackground#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCanExecuteMethod#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Scheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCanExecuteAndScheduler#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.WithParam#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithComplexGenericReturnType#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromMultipleReactiveCommands#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWCt#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCancellationToken#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCancellationTokenAndParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInGenericClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithDelegateParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandInRecordClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithEnumParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithArrayParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithMultipleParameters#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCanExecute#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithNullableParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCanExecuteAndScheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithObservableReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCanExecuteMethod#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithPrivateAccess#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCancellationToken#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithProtectedAccess#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithCancellationTokenAndParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithTaskOfNullableReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithComplexGenericReturnType#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithTupleReturnType#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithDelegateParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithValueTask#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithEnumParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandsAcrossPartialDeclarations#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithMultipleParameters#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.Acc#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Access#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithNullableParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.AsyncWParam#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.AsyncWithParam#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithObservableReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.Basic#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Basic#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithPrivateAccess#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithProtectedAccess#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.Nest#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass1.ReactiveCommands.g.verified.cs => RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass2+TestInnerClass3.ReactiveCommands.g.verified.cs => RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass2.ReactiveCommands.g.verified.cs => RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3.ReactiveCommands.g.verified.cs => RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithTaskOfNullableReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.NullTRet#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.NullableTypeReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithTupleReturnType#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.RunInBackground#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.RunInBackground#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandWithValueTask#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.Scheduler#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.Scheduler#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{RxCmdExtTests.FromReactiveCommandsAcrossPartialDeclarations#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs => RCMDG.WParam#RxCmdAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/{ReactiveCMDGeneratorTests.WithParam#TestNs.TestVM.ReactiveCommands.g.verified.cs => RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{ReactiveCollectionGeneratorTests.BasicField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.ByteArray#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.ByteArray#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.ByteArray#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.CplxT#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.ComplexType#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.CplxT#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.ComplexType#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.DateTime#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.DateTime#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.DateTime#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.DiffNs#Namespace1.TestVM.ReactiveCollections.g.verified.cs => RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.DiffNs#Namespace2.TestVM.ReactiveCollections.g.verified.cs => RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.DateTime#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.DiffNs#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.DiffNs#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Enum#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Enum#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.Enum#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Enum#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Gen#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Generic#TestNs.GenericVM`1.ReactiveCollections.g.verified.cs => RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Generic#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Guid#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Guid#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.Guid#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Guid#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Interface#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Interface#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.Interface#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Interface#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Multi#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Multiple#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.Multi#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Multiple#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Nest#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Nested#TestNs.OuterVM+InnerVM+DeepInnerVM.ReactiveCollections.g.verified.cs => RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Nested#TestNs.OuterVM+InnerVM.ReactiveCollections.g.verified.cs => RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Nested#TestNs.OuterVM.ReactiveCollections.g.verified.cs => RCE.Nest#TestNs.OuterVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Nested#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Null#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Nullable#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.Null#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Nullable#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Record#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Record#TestNs.TestVMRecord.ReactiveCollections.g.verified.cs => RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Record#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Struct#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Struct#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.Struct#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Struct#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.Tuple#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Tuple#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.Tuple#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.Tuple#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCE.WRx#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.WithReactive#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCE.WRx#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{RxCollExtTests.WithReactive#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs => RCG.BasicField#RxCollAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/{ReactiveCollectionGeneratorTests.BasicField#TestNs.TestVM.ReactiveCollections.g.verified.cs => RCG.BasicField#TestNs.TestVM.RxColls.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{ReactiveObjectGeneratorTests.Basic#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.Basic#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{ReactiveObjectGeneratorTests.Basic#TestNs.TestVM.IReactiveObject.g.verified.cs => ROE.Basic#TestNs.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.Basic#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.CplxT#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.Basic#TestNs.TestVM.IReactiveObject.g.verified.cs => ROE.CplxT#TestNs.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.ComplexType#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.Enums#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.ComplexType#TestNs.TestVM.IReactiveObject.g.verified.cs => ROE.Enums#TestNs.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.Enums#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjRecord#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectRecord#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjWAccMods#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.Enums#TestNs.TestVM.IReactiveObject.g.verified.cs => ROE.FRxObjWAccMods#TestNs.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithAccessModifiers#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjWAttrs#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithAccessModifiers#TestNs.TestVM.IReactiveObject.g.verified.cs => ROE.FRxObjWAttrs#TestNs.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithAttributes#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2+Level3+Level4.IReactiveObject.g.verified.cs => ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3+Level4.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2+Level3.IReactiveObject.g.verified.cs => ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2.IReactiveObject.g.verified.cs => ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1.IReactiveObject.g.verified.cs => ROE.FRxObjWDeeplyNestClasses#TestNs.Level1.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjWGenClass#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithGenericClass#TestNs.GenericVM`1.IReactiveObject.g.verified.cs => ROE.FRxObjWGenClass#TestNs.GenVM`1.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithGenericClass#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjWInhMods#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#TestNs.BaseVM.IReactiveObject.g.verified.cs => ROE.FRxObjWInhMods#TestNs.BaseVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#TestNs.DerivedVM.IReactiveObject.g.verified.cs => ROE.FRxObjWInhMods#TestNs.DerivedVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithAttributes#TestNs.TestVM.IReactiveObject.g.verified.cs => ROE.FRxObjWMultiProps#TestNs.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithMultipleProperties#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithMultipleTypeConstraints#TestNs.EntityVM`1.IReactiveObject.g.verified.cs => ROE.FRxObjWMultiTConstraints#TestNs.EntityVM`1.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithMultipleTypeConstraints#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.FRxObjWNestClass#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithNestedClass#TestNs.ParentVM+ChildVM.IReactiveObject.g.verified.cs => ROE.FRxObjWNestClass#TestNs.ParentVM+ChildVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithNestedClass#TestNs.ParentVM.IReactiveObject.g.verified.cs => ROE.FRxObjWNestClass#TestNs.ParentVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithNestedClass#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.Interface#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.FromReactiveObjectWithMultipleProperties#TestNs.TestVM.IReactiveObject.g.verified.cs => ROE.Interface#TestNs.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.Interface#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.MultiNs#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.MultiNs#Namespace1.TestVM.IReactiveObject.g.verified.cs => ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.MultiNs#Namespace2.TestVM.IReactiveObject.g.verified.cs => ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.MultiNs#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROE.Null#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.Interface#TestNs.TestVM.IReactiveObject.g.verified.cs => ROE.Null#TestNs.TestVM.IRxObj.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.Nullable#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs => ROG.Basic#IRxObjAttr.verified.cs} (100%) rename src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/{RxObjExtTests.Nullable#TestNs.TestVM.IReactiveObject.g.verified.cs => ROG.Basic#TestNs.TestVM.IRxObj.verified.cs} (100%) diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BindableDerivedListGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BindableDerivedListGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BindableDerivedListGeneratorTests.FromReactiveProperties#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BindableDerivedListGeneratorTests.FromReactiveProperties#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.AccessModifiers#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.AccessModifiers#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.AccessModifiers#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.AccessModifiers#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.ComplexGeneric#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.ComplexGeneric#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.ComplexGeneric#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.ComplexGeneric#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DateTimeType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DateTimeType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DateTimeType#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DateTimeType#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DiffNamespaces#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DiffNamespaces#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DiffNamespaces#Namespace1.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DiffNamespaces#Namespace1.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DiffNamespaces#Namespace2.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.DiffNamespaces#Namespace2.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.EnumType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.EnumType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.EnumType#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.EnumType#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.GenericClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.GenericClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.GenericClass#TestNs.GenericVM`1.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#TestNs.GenVM`1.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.GenericClass#TestNs.GenericVM`1.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#TestNs.GenVM`1.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.GuidType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.GuidType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.GuidType#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.GuidType#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.InternalClassGeneratesPublicProperty#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.InternalClassGeneratesPublicProperty#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.InternalClassGeneratesPublicProperty#TestNs.ViewModel.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#TestNs.Vm.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.InternalClassGeneratesPublicProperty#TestNs.ViewModel.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#TestNs.Vm.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.InterfaceType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.InterfaceType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.InterfaceType#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.InterfaceType#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.MultipleLists#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.MultipleLists#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.MultipleLists#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.MultipleLists#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NestedClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NestedClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NestedClass#TestNs.OuterVM+InnerVM+DeepInnerVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM+DeepInnerVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NestedClass#TestNs.OuterVM+InnerVM+DeepInnerVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM+DeepInnerVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NestedClass#TestNs.OuterVM+InnerVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NestedClass#TestNs.OuterVM+InnerVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM+InnerVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NestedClass#TestNs.OuterVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NestedClass#TestNs.OuterVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#TestNs.OuterVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NullableElements#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NullableElements#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NullableElements#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.NullableElements#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.RecordClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.RecordClass#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.RecordClass#TestNs.TestVMRecord.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#TestNs.TestVMRecord.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.RecordClass#TestNs.TestVMRecord.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#TestNs.TestVMRecord.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.StructType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.StructType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.StructType#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.StructType#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.TupleType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.TupleType#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.TupleType#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.TupleType#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.WithReactive#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.WithReactive#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.WithReactive#TestNs.TestVM.BindableDerivedList.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#TestNs.TestVM.Bdl.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DerivedListExtTests.WithReactive#TestNs.TestVM.BindableDerivedList.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#TestNs.TestVM.Bdl.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs b/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs index 70d860ab..cccd6881 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs @@ -38,9 +38,58 @@ internal static class GeneratorSnapshot /// private const string GeneratedCodeAttributeLine = "[global::System.CodeDom.Compiler.GeneratedCode(\""; + /// The suffix a test class name ends with, dropped from the snapshot name. + private const string TestClassSuffix = "Tests"; + + /// The suffix every generated hint name ends with, dropped from the snapshot name. + private const string HintSuffix = ".g.cs"; + /// The encoding snapshots are written in: UTF-8 with a byte order mark, as the stored snapshots are. private static readonly UTF8Encoding SnapshotEncoding = new(encoderShouldEmitUTF8Identifier: true); + /// + /// The words shortened in a snapshot's method and hint segments, longest first so a longer word is never split by a + /// shorter one. They keep snapshot paths well inside the Windows path limit. + /// + private static readonly (string Word, string Abbreviation)[] Abbreviations = + [ + ("ReactiveUI.SourceGenerators.", string.Empty), + ("CancellationToken", "Ct"), + ("ReactiveCommand", "RxCmd"), + ("ReactiveObject", "RxObj"), + ("ReactiveCollection", "RxColl"), + ("BindableDerivedList", "Bdl"), + ("ObservableCollection", "ObsColl"), + ("ReadOnly", "Ro"), + ("Observable", "Obs"), + ("Properties", "Props"), + ("Property", "Prop"), + ("Reactive", "Rx"), + ("Attribute", "Attr"), + ("Collection", "Coll"), + ("Command", "Cmd"), + ("Generic", "Gen"), + ("Generates", "Gen"), + ("Nullable", "Null"), + ("Parameter", "Param"), + ("Namespace", "Ns"), + ("Multiple", "Multi"), + ("ViewModel", "Vm"), + ("IViewFor", "Ivf"), + ("Internal", "Int"), + ("Inheritance", "Inh"), + ("Modifier", "Mod"), + ("Access", "Acc"), + ("Nested", "Nest"), + ("Different", "Diff"), + ("Complex", "Cplx"), + ("Return", "Ret"), + ("Type", "T"), + ("With", "W"), + ("From", "F"), + ("And", string.Empty), + ]; + /// The directory holding the snapshot folders. private static readonly string SnapshotRoot = ReadSnapshotRoot(); @@ -57,7 +106,7 @@ internal static async Task VerifyAsync(GeneratorDriver driver, string folder, st var directory = Path.Combine(SnapshotRoot, folder); _ = Directory.CreateDirectory(directory); - var prefix = $"{typeName}.{methodName}#"; + var prefix = $"{AbbreviateTypeName(typeName)}.{Abbreviate(methodName)}#"; var accept = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(AcceptVariable)); var produced = new HashSet(StringComparer.Ordinal); var failures = new List(); @@ -66,7 +115,7 @@ internal static async Task VerifyAsync(GeneratorDriver driver, string folder, st { foreach (var source in result.GeneratedSources) { - var name = prefix + Path.GetFileNameWithoutExtension(source.HintName); + var name = prefix + AbbreviateHintName(source.HintName); _ = produced.Add(name); var output = $"//HintName: {source.HintName}\n{Scrub(source.SourceText.ToString())}"; @@ -145,6 +194,44 @@ private static string ReadSnapshotRoot() throw new InvalidOperationException($"The test assembly records no '{DirectoryMetadataKey}' assembly metadata."); } + /// Shortens a test class name to its capitals, such as RGE for RxGenExtTests. + /// The test class name. + /// The abbreviated name. + /// Each generator's snapshots live in their own folder, so the codes only need to differ within one folder. + private static string AbbreviateTypeName(string typeName) + { + var name = typeName.EndsWith(TestClassSuffix, StringComparison.Ordinal) ? typeName[..^TestClassSuffix.Length] : typeName; + var builder = new StringBuilder(name.Length); + foreach (var character in name) + { + if (char.IsUpper(character) || char.IsDigit(character)) + { + _ = builder.Append(character); + } + } + + return builder.ToString(); + } + + /// Shortens a generated file's hint name: no .g.cs suffix, and the common words abbreviated. + /// The hint name. + /// The abbreviated name. + private static string AbbreviateHintName(string hintName) => + Abbreviate(hintName.EndsWith(HintSuffix, StringComparison.Ordinal) ? hintName[..^HintSuffix.Length] : Path.GetFileNameWithoutExtension(hintName)); + + /// Replaces each common word with its abbreviation. + /// The text to shorten. + /// The shortened text. + private static string Abbreviate(string text) + { + foreach (var (word, abbreviation) in Abbreviations) + { + text = text.Replace(word, abbreviation, StringComparison.Ordinal); + } + + return text; + } + /// Puts generated text in snapshot form: LF line endings, without the generated-code attribute lines. /// The generated text. /// The text as a snapshot stores it. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#TestNs.TestViewWpf.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#TestNs.TestViewWpf.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.Basic#TestNs.TestViewWpf.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#TestNs.TestViewWpf.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#Views.ProductView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#Views.ProductView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.DiffNs#Views.ProductView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#Views.ProductView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#App.Views.ExternalView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#App.Views.ExternalView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#App.Views.ExternalView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#App.Views.ExternalView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.ExtNs#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#TestNs.OuterContainer+MiddleContainer+NestedView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithNestedViewClass#TestNs.OuterContainer+MiddleContainer+NestedView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#TestNs.CommandsView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactiveCommandsViewModel#TestNs.CommandsView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#TestNs.ReactivePropertiesView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#TestNs.RxPropsView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithReactivePropertiesViewModel#TestNs.ReactivePropertiesView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#TestNs.RxPropsView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#TestNs.TestView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#TestNs.TestView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromIViewForWithStringViewModelType#TestNs.TestView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#TestNs.TestView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View1.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View1.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View1.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View1.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View2.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View2.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View2.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View2.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View3.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View3.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.FromMultipleIViewForInSameNamespace#TestNs.View3.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View3.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#TestNs.StringItemView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#TestNs.StringItemView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Generic#TestNs.StringItemView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#TestNs.StringItemView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#TestNs.InterfaceView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#TestNs.InterfaceView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Interface#TestNs.InterfaceView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#TestNs.InterfaceView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#TestNs.ChildView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#TestNs.ChildView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Nested#TestNs.ChildView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#TestNs.ChildView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#IvfAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#IvfAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#TestNs.RecordView.IViewFor.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#TestNs.RecordView.Ivf.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/ViewForExtTests.Record#TestNs.RecordView.IViewFor.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#TestNs.RecordView.Ivf.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Basic#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.CalledValue#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.Partial#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.PartialAlsoNotify#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAccess#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttrAccessInherit#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithAttributes#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithInit#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.WithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Arrays#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ComplexGen#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3+Level4+Level5.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3+Level4+Level5.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3+Level4.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3+Level4.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1+Level2+Level3.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1+Level2.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1+Level2.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.DeepNested#TestNs.Level1.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Delegates#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Enums#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Generic#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#TestNs.GenericVM`1.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#TestNs.GenericVM`1.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#TestNs.GenericVM`2.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.GenClass#TestNs.GenericVM`2.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Interfaces#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Lazy#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MixedAccess#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAlso#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiAttr#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.MultiPartial#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#TestNs.BaseVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#TestNs.BaseVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#TestNs.DerivedVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.NewMod#TestNs.DerivedVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Nullable#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#TestNs.BaseVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#TestNs.BaseVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#TestNs.DerivedVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Override#TestNs.DerivedVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#TestNs.TestVMRecord.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#TestNs.TestVMRecord.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Record#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.ReadOnly#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Struct#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Time#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RxGenExtTests.Tuples#TestNs.TestVM.Properties.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Access#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Access#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromMultipleReactiveCommands#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromMultipleReactiveCommands#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.AsyncWithParam#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.AsyncWithParam#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle+Inner+Deepest.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle+Inner+Deepest.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle+Inner.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle+Inner.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer+Middle.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#TestNs.Outer.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Basic#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Basic#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInGenericClass#TestNs.GenericVM`1.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInGenericClass#TestNs.GenericVM`1.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInRecordClass#TestNs.TestVMRecord.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInRecordClass#TestNs.TestVMRecord.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithArrayParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithArrayParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.NullableTypeReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.NullableTypeReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecute#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecute#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.RunInBackground#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.RunInBackground#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecuteMethod#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecuteMethod#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Scheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Scheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecuteAndScheduler#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecuteAndScheduler#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.WithParam#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.WithParam#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithComplexGenericReturnType#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithComplexGenericReturnType#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromMultipleReactiveCommands#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromMultipleReactiveCommands#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCancellationToken#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCancellationToken#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInDeeplyNestedClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCancellationTokenAndParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCancellationTokenAndParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInGenericClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInGenericClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithDelegateParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithDelegateParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInRecordClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandInRecordClass#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithEnumParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithEnumParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithArrayParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithArrayParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithMultipleParameters#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithMultipleParameters#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecute#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecute#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithNullableParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithNullableParameter#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecuteAndScheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecuteAndScheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithObservableReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithObservableReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecuteMethod#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCanExecuteMethod#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithPrivateAccess#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithPrivateAccess#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCancellationToken#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCancellationToken#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithProtectedAccess#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithProtectedAccess#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCancellationTokenAndParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithCancellationTokenAndParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithTaskOfNullableReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithTaskOfNullableReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithComplexGenericReturnType#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithComplexGenericReturnType#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithTupleReturnType#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithTupleReturnType#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithDelegateParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithDelegateParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithValueTask#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithValueTask#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithEnumParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithEnumParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandsAcrossPartialDeclarations#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandsAcrossPartialDeclarations#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithMultipleParameters#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithMultipleParameters#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Access#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Access#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithNullableParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithNullableParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.AsyncWithParam#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.AsyncWithParam#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithObservableReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithObservableReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Basic#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Basic#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithPrivateAccess#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithPrivateAccess#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithProtectedAccess#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithProtectedAccess#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass1.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass1.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass2+TestInnerClass3.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass2+TestInnerClass3.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass2.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3+TestInnerClass2.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Nested#TestNs.TestViewModel3.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithTaskOfNullableReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithTaskOfNullableReturn#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.NullableTypeReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.NullableTypeReturn#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithTupleReturnType#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithTupleReturnType#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.RunInBackground#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.RunInBackground#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithValueTask#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandWithValueTask#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Scheduler#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.Scheduler#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandsAcrossPartialDeclarations#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RxCmdExtTests.FromReactiveCommandsAcrossPartialDeclarations#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.WithParam#TestNs.TestVM.ReactiveCommands.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.WithParam#TestNs.TestVM.ReactiveCommands.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.BasicField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.BasicField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.ByteArray#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.ByteArray#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.ByteArray#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.ByteArray#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.ComplexType#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.ComplexType#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.ComplexType#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.ComplexType#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DateTime#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DateTime#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DiffNs#Namespace1.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DiffNs#Namespace1.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DiffNs#Namespace2.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DiffNs#Namespace2.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DateTime#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DateTime#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DiffNs#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.DiffNs#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Enum#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Enum#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Enum#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Enum#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Generic#TestNs.GenericVM`1.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Generic#TestNs.GenericVM`1.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Generic#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Generic#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Guid#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Guid#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Guid#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Guid#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Interface#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Interface#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Interface#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Interface#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Multiple#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Multiple#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Multiple#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Multiple#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nested#TestNs.OuterVM+InnerVM+DeepInnerVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nested#TestNs.OuterVM+InnerVM+DeepInnerVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nested#TestNs.OuterVM+InnerVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nested#TestNs.OuterVM+InnerVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nested#TestNs.OuterVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nested#TestNs.OuterVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nested#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nested#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nullable#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nullable#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nullable#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Nullable#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Record#TestNs.TestVMRecord.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Record#TestNs.TestVMRecord.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Record#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Record#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Struct#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Struct#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Struct#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Struct#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Tuple#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Tuple#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Tuple#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.Tuple#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.WithReactive#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.WithReactive#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.WithReactive#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RxCollExtTests.WithReactive#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.BasicField#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.BasicField#TestNs.TestVM.ReactiveCollections.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ReactiveObjectGeneratorTests.Basic#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ReactiveObjectGeneratorTests.Basic#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ReactiveObjectGeneratorTests.Basic#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ReactiveObjectGeneratorTests.Basic#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#TestNs.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Basic#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Basic#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Basic#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Basic#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#TestNs.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.ComplexType#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.ComplexType#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.ComplexType#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.ComplexType#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#TestNs.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Enums#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Enums#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectRecord#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectRecord#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Enums#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Enums#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#TestNs.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithAccessModifiers#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithAccessModifiers#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithAccessModifiers#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithAccessModifiers#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#TestNs.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithAttributes#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithAttributes#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2+Level3+Level4.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3+Level4.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2+Level3+Level4.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3+Level4.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2+Level3.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2+Level3.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1+Level2.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#TestNs.Level1.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithDeeplyNestedClasses#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithGenericClass#TestNs.GenericVM`1.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#TestNs.GenVM`1.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithGenericClass#TestNs.GenericVM`1.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#TestNs.GenVM`1.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithGenericClass#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithGenericClass#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#TestNs.BaseVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.BaseVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#TestNs.BaseVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.BaseVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#TestNs.DerivedVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.DerivedVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#TestNs.DerivedVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.DerivedVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithInheritanceModifiers#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithAttributes#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithAttributes#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#TestNs.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithMultipleProperties#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithMultipleProperties#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithMultipleTypeConstraints#TestNs.EntityVM`1.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#TestNs.EntityVM`1.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithMultipleTypeConstraints#TestNs.EntityVM`1.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#TestNs.EntityVM`1.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithMultipleTypeConstraints#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithMultipleTypeConstraints#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithNestedClass#TestNs.ParentVM+ChildVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM+ChildVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithNestedClass#TestNs.ParentVM+ChildVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM+ChildVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithNestedClass#TestNs.ParentVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithNestedClass#TestNs.ParentVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithNestedClass#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithNestedClass#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithMultipleProperties#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.FromReactiveObjectWithMultipleProperties#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#TestNs.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Interface#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Interface#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.MultiNs#Namespace1.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.MultiNs#Namespace1.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.MultiNs#Namespace2.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.MultiNs#Namespace2.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.MultiNs#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.MultiNs#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Interface#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Interface#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#TestNs.TestVM.IRxObj.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Nullable#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Nullable#ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Nullable#TestNs.TestVM.IReactiveObject.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#TestNs.TestVM.IRxObj.verified.cs similarity index 100% rename from src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/RxObjExtTests.Nullable#TestNs.TestVM.IReactiveObject.g.verified.cs rename to src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#TestNs.TestVM.IRxObj.verified.cs From 44a638faa77077f582e920e0c182503be3e3fcb0 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:12:17 +1000 Subject: [PATCH 07/30] chore(deps): update packages to their latest releases Avalonia 12.1.3, ReactiveUI 24.3.0, TUnit 1.69.16, the StyleSharp, PerformanceSharp and SecuritySharp analyzers 5.1.2, and Microsoft.CodeAnalysis.Analyzers 5.9.0. The Roslyn API pins that pick each analyzer band stay where they are. PolySharp is dropped; nothing references it. SST1534 is off, as in the other ReactiveUI repositories: it contradicts SST1525's braces-on policy for switch sections. The sample apps opt out of SST1449 because they report to the console. --- .editorconfig | 1 + src/Directory.Packages.props | 19 +++++++++---------- .../UnitTests/AttributeDataExtensionTests.cs | 2 +- .../UnitTests/ReactiveUiIntegrationTests.cs | 4 +--- .../UnitTests/SymbolExtensionTests.cs | 4 ++-- ...iveUI.SourceGenerators.Execute.Maui.csproj | 2 ++ ...ReactiveUI.SourceGenerators.Execute.csproj | 3 ++- 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.editorconfig b/.editorconfig index 01cccffd..c4671a1b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1429,6 +1429,7 @@ dotnet_diagnostic.SST1522.severity = error # A file has more code lines than the dotnet_diagnostic.SST1523.severity = error # A member has more code lines than the configured maximum (default 60) dotnet_diagnostic.SST1524.severity = error # A switch section has more code lines than the configured maximum (default 20) dotnet_diagnostic.SST1525.severity = error # A multi-statement `switch` section has no braces; the braces-on policy extends to switch sections. Code fix wraps it. +dotnet_diagnostic.SST1534.severity = none # Switch braces that scope nothing — conflicts with SST1525's braces-on policy dotnet_diagnostic.SST1526.severity = error # A wrapped binary expression places the operator inconsistently. Configurable (`before`/`after`, default before). Opt-in. dotnet_diagnostic.SST1527.severity = error # The `=>` of an expression-bodied member wraps inconsistently. Configurable. Opt-in. dotnet_diagnostic.SST1528.severity = error # The `=` of a wrapped initializer wraps inconsistently. Configurable. Opt-in. diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index ba73b6db..4044aefc 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -3,7 +3,7 @@ true true 4.14.0 - 3.40.2 + 5.1.2 @@ -20,24 +20,23 @@ - - - - + + + - + - - - + + + - + diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/AttributeDataExtensionTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/AttributeDataExtensionTests.cs index 606193d2..517ccf49 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/AttributeDataExtensionTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/AttributeDataExtensionTests.cs @@ -380,7 +380,7 @@ public class C { } var compilation = CreateCompilation(source); var classDeclaration = await GetClassDeclaration(compilation); var semanticModel = compilation.GetSemanticModel(classDeclaration.SyntaxTree); - var typeSymbol = (INamedTypeSymbol)compilation.GetTypeByMetadataName("T.C")!; + var typeSymbol = compilation.GetTypeByMetadataName("T.C")!; AttributeData? triggerAttr = null; foreach (var candidate in typeSymbol.GetAttributes()) { diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs index e84e11a5..49fb613d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveUiIntegrationTests.cs @@ -930,11 +930,9 @@ private static string[] GetDiagnosticIds(ImmutableArray diagnostics) private static int CountOccurrences(string source, string value) { var count = 0; - var startIndex = 0; - while ((startIndex = source.IndexOf(value, startIndex, StringComparison.Ordinal)) >= 0) + for (var startIndex = source.IndexOf(value, StringComparison.Ordinal); startIndex >= 0; startIndex = source.IndexOf(value, startIndex + value.Length, StringComparison.Ordinal)) { count++; - startIndex += value.Length; } return count; diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/SymbolExtensionTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/SymbolExtensionTests.cs index ec3b3e85..3af49984 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/SymbolExtensionTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/SymbolExtensionTests.cs @@ -472,7 +472,7 @@ public class Derived : Base } """); - var derived = (INamedTypeSymbol)compilation.GetTypeByMetadataName(DerivedTypeMetadataName)!; + var derived = compilation.GetTypeByMetadataName(DerivedTypeMetadataName)!; var members = new List(); foreach (var member in derived.GetAllMembers()) { @@ -500,7 +500,7 @@ public class Derived : Base } """); - var derived = (INamedTypeSymbol)compilation.GetTypeByMetadataName(DerivedTypeMetadataName)!; + var derived = compilation.GetTypeByMetadataName(DerivedTypeMetadataName)!; List members = [.. derived.GetAllMembers("Shared")]; await Assert.That(members.Count).IsEqualTo(1); 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 d5950308..3488f4d9 100644 --- a/src/ReactiveUI.SourceGenerators.Execute.Maui/ReactiveUI.SourceGenerators.Execute.Maui.csproj +++ b/src/ReactiveUI.SourceGenerators.Execute.Maui/ReactiveUI.SourceGenerators.Execute.Maui.csproj @@ -8,6 +8,8 @@ false latest true + + $(NoWarn);SST1449 12.2 15.0 diff --git a/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj b/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj index 85dc8229..ddd367df 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj +++ b/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj @@ -9,7 +9,8 @@ enable false preview - $(NoWarn);CA1812 + + $(NoWarn);CA1812;SST1449 true 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 From 7ab0cbcd9914cc53f5a7c2f4e6b0bfd9789b2e4a Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:15:09 +1000 Subject: [PATCH 08/30] refactor: replace checked-in PolySharp output with shared polyfills The generators and the code fixes compile the same hand-written polyfills from ReactiveUI.SourceGenerators.Roslyn/Polyfills, in the form the ReactiveUI.Binding generators use. Only the polyfills the code needs are kept: IsExternalInit, Index, Range, NotNullWhenAttribute and UnscopedRefAttribute. --- ...ics.CodeAnalysis.NotNullWhenAttribute.g.cs | 29 ---- ...ics.CodeAnalysis.UnscopedRefAttribute.g.cs | 44 ----- ...ourceGenerators.Analyzers.CodeFixes.csproj | 4 + ...s.CodeAnalysis.DoesNotReturnAttribute.g.cs | 18 -- ...ics.CodeAnalysis.NotNullWhenAttribute.g.cs | 29 ---- ...ics.CodeAnalysis.UnscopedRefAttribute.g.cs | 44 ----- .../System.Index.g.cs | 156 ------------------ .../System.Range.g.cs | 119 ------------- ...ntime.CompilerServices.IsExternalInit.g.cs | 19 --- .../Polyfills/Index.cs | 98 +++++++++++ .../Polyfills/IsExternalInit.cs | 21 +++ .../Polyfills/NotNullWhenAttribute.cs | 29 ++++ .../Polyfills/Range.cs | 86 ++++++++++ .../Polyfills/UnscopedRefAttribute.cs | 24 +++ ...activeUI.SourceGenerators.Roslyn.projitems | 6 - 15 files changed, 262 insertions(+), 464 deletions(-) delete mode 100644 src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/Core/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.g.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/Core/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.g.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute.g.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.g.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.g.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Index.g.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Range.g.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Runtime.CompilerServices.IsExternalInit.g.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/Index.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/IsExternalInit.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/NotNullWhenAttribute.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/Range.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/UnscopedRefAttribute.cs diff --git a/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/Core/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.g.cs b/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/Core/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.g.cs deleted file mode 100644 index 7c47fadc..00000000 --- a/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/Core/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.g.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis -{ - /// - /// Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. - /// - [global::System.AttributeUsage(global::System.AttributeTargets.Parameter, Inherited = false)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal sealed class NotNullWhenAttribute : global::System.Attribute - { - /// - /// Initializes the attribute with the specified return value condition. - /// - /// The return value condition. If the method returns this value, the associated parameter will not be null. - public NotNullWhenAttribute(bool returnValue) - { - ReturnValue = returnValue; - } - - /// Gets the return value condition. - public bool ReturnValue { get; } - } -} \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/Core/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.g.cs b/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/Core/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.g.cs deleted file mode 100644 index 9757fde2..00000000 --- a/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/Core/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.g.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis -{ - /// - /// Used to indicate a byref escapes and is not scoped. - /// - /// - /// - /// There are several cases where the C# compiler treats a as implicitly - /// - where the compiler does not allow the to escape the method. - /// - /// - /// For example: - /// - /// for instance methods. - /// parameters that refer to types. - /// parameters. - /// - /// - /// - /// This attribute is used in those instances where the should be allowed to escape. - /// - /// - /// Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for - /// API authors to understand the lifetime implications of applying this attribute and how it may impact their users. - /// - /// - [global::System.AttributeUsage( - global::System.AttributeTargets.Method | - global::System.AttributeTargets.Property | - global::System.AttributeTargets.Parameter, - AllowMultiple = false, - Inherited = false)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal sealed class UnscopedRefAttribute : global::System.Attribute - { - } -} \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/ReactiveUI.SourceGenerators.Analyzers.CodeFixes.csproj b/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/ReactiveUI.SourceGenerators.Analyzers.CodeFixes.csproj index 3b4f7c10..32c534a5 100644 --- a/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/ReactiveUI.SourceGenerators.Analyzers.CodeFixes.csproj +++ b/src/ReactiveUI.SourceGenerators.Analyzers.CodeFixes/ReactiveUI.SourceGenerators.Analyzers.CodeFixes.csproj @@ -27,6 +27,10 @@ + + + + diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute.g.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute.g.cs deleted file mode 100644 index dee93bd7..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis -{ - /// - /// Applied to a method that will never return under any circumstance. - /// - [global::System.AttributeUsage(global::System.AttributeTargets.Method, Inherited = false)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal sealed class DoesNotReturnAttribute : global::System.Attribute - { - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.g.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.g.cs deleted file mode 100644 index 7c47fadc..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.g.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis -{ - /// - /// Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. - /// - [global::System.AttributeUsage(global::System.AttributeTargets.Parameter, Inherited = false)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal sealed class NotNullWhenAttribute : global::System.Attribute - { - /// - /// Initializes the attribute with the specified return value condition. - /// - /// The return value condition. If the method returns this value, the associated parameter will not be null. - public NotNullWhenAttribute(bool returnValue) - { - ReturnValue = returnValue; - } - - /// Gets the return value condition. - public bool ReturnValue { get; } - } -} \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.g.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.g.cs deleted file mode 100644 index 9757fde2..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Diagnostics.CodeAnalysis.UnscopedRefAttribute.g.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis -{ - /// - /// Used to indicate a byref escapes and is not scoped. - /// - /// - /// - /// There are several cases where the C# compiler treats a as implicitly - /// - where the compiler does not allow the to escape the method. - /// - /// - /// For example: - /// - /// for instance methods. - /// parameters that refer to types. - /// parameters. - /// - /// - /// - /// This attribute is used in those instances where the should be allowed to escape. - /// - /// - /// Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for - /// API authors to understand the lifetime implications of applying this attribute and how it may impact their users. - /// - /// - [global::System.AttributeUsage( - global::System.AttributeTargets.Method | - global::System.AttributeTargets.Property | - global::System.AttributeTargets.Parameter, - AllowMultiple = false, - Inherited = false)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal sealed class UnscopedRefAttribute : global::System.Attribute - { - } -} \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Index.g.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Index.g.cs deleted file mode 100644 index 7c944920..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Index.g.cs +++ /dev/null @@ -1,156 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System -{ - /// Represent a type can be used to index a collection either from the start or the end. - /// - /// Index is used by the C# compiler to support the new index syntax - /// - /// int[] someArray = new int[5] { 1, 2, 3, 4, 5 } ; - /// int lastElement = someArray[^1]; // lastElement = 5 - /// - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal readonly struct Index : global::System.IEquatable - { - private readonly int _value; - - /// Construct an Index using a value and indicating if the index is from the start or from the end. - /// The index value. it has to be zero or positive number. - /// Indicating if the index is from the start or from the end. - /// - /// If the Index constructed from the end, index value 1 means pointing at the last element and index value 0 means pointing at beyond last element. - /// - [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Index(int value, bool fromEnd = false) - { - if (value < 0) - { - global::System.Index.ThrowHelper.ThrowValueArgumentOutOfRange_NeedNonNegNumException(); - } - - if (fromEnd) - _value = ~value; - else - _value = value; - } - - // The following private constructors mainly created for perf reason to avoid the checks - private Index(int value) - { - _value = value; - } - - /// Create an Index pointing at first element. - public static global::System.Index Start => new global::System.Index(0); - - /// Create an Index pointing at beyond last element. - public static global::System.Index End => new global::System.Index(~0); - - /// Create an Index from the start at the position indicated by the value. - /// The index value from the start. - [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public static global::System.Index FromStart(int value) - { - if (value < 0) - { - global::System.Index.ThrowHelper.ThrowValueArgumentOutOfRange_NeedNonNegNumException(); - } - - return new global::System.Index(value); - } - - /// Create an Index from the end at the position indicated by the value. - /// The index value from the end. - [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public static global::System.Index FromEnd(int value) - { - if (value < 0) - { - global::System.Index.ThrowHelper.ThrowValueArgumentOutOfRange_NeedNonNegNumException(); - } - - return new global::System.Index(~value); - } - - /// Returns the index value. - public int Value - { - get - { - if (_value < 0) - return ~_value; - else - return _value; - } - } - - /// Indicates whether the index is from the start or the end. - public bool IsFromEnd => _value < 0; - - /// Calculate the offset from the start using the giving collection length. - /// The length of the collection that the Index will be used with. length has to be a positive value - /// - /// For performance reason, we don't validate the input length parameter and the returned offset value against negative values. - /// we don't validate either the returned offset is greater than the input length. - /// It is expected Index will be used with collections which always have non negative length/count. If the returned offset is negative and - /// then used to index a collection will get out of range exception which will be same affect as the validation. - /// - [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public int GetOffset(int length) - { - int offset = _value; - if (IsFromEnd) - { - // offset = length - (~value) - // offset = length + (~(~value) + 1) - // offset = length + value + 1 - - offset += length + 1; - } - return offset; - } - - /// Indicates whether the current Index object is equal to another object of the same type. - /// An object to compare with this object - public override bool Equals([global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object? value) => value is global::System.Index && _value == ((global::System.Index)value)._value; - - /// Indicates whether the current Index object is equal to another Index object. - /// An object to compare with this object - public bool Equals(global::System.Index other) => _value == other._value; - - /// Returns the hash code for this instance. - public override int GetHashCode() => _value; - - /// Converts integer number to an Index. - public static implicit operator global::System.Index(int value) => FromStart(value); - - /// Converts the value of the current Index object to its equivalent string representation. - public override string ToString() - { - if (IsFromEnd) - return ToStringFromEnd(); - - return ((uint)Value).ToString(); - } - - private string ToStringFromEnd() - { - return '^' + Value.ToString(); - } - - private static class ThrowHelper - { - [global::System.Diagnostics.CodeAnalysis.DoesNotReturn] - public static void ThrowValueArgumentOutOfRange_NeedNonNegNumException() - { - throw new global::System.ArgumentOutOfRangeException("value", "Non-negative number required."); - } - } - } -} \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Range.g.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Range.g.cs deleted file mode 100644 index c887825f..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Range.g.cs +++ /dev/null @@ -1,119 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System -{ - /// Represent a range has start and end indexes. - /// - /// Range is used by the C# compiler to support the range syntax. - /// - /// int[] someArray = new int[5] { 1, 2, 3, 4, 5 }; - /// int[] subArray1 = someArray[0..2]; // { 1, 2 } - /// int[] subArray2 = someArray[1..^0]; // { 2, 3, 4, 5 } - /// - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal readonly struct Range : global::System.IEquatable - { - /// Represent the inclusive start index of the Range. - public global::System.Index Start { get; } - - /// Represent the exclusive end index of the Range. - public global::System.Index End { get; } - - /// Construct a Range object using the start and end indexes. - /// Represent the inclusive start index of the range. - /// Represent the exclusive end index of the range. - public Range(global::System.Index start, global::System.Index end) - { - Start = start; - End = end; - } - - /// Indicates whether the current Range object is equal to another object of the same type. - /// An object to compare with this object - public override bool Equals([global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object? value) => - value is global::System.Range r && - r.Start.Equals(Start) && - r.End.Equals(End); - - /// Indicates whether the current Range object is equal to another Range object. - /// An object to compare with this object - public bool Equals(global::System.Range other) => other.Start.Equals(Start) && other.End.Equals(End); - - /// Returns the hash code for this instance. - public override int GetHashCode() - { - return global::System.Range.HashHelpers.Combine(Start.GetHashCode(), End.GetHashCode()); - } - - /// Converts the value of the current Range object to its equivalent string representation. - public override string ToString() - { - return Start.ToString() + ".." + End.ToString(); - } - - /// Create a Range object starting from start index to the end of the collection. - public static global::System.Range StartAt(global::System.Index start) => new global::System.Range(start, global::System.Index.End); - - /// Create a Range object starting from first element in the collection to the end Index. - public static global::System.Range EndAt(global::System.Index end) => new global::System.Range(global::System.Index.Start, end); - - /// Create a Range object starting from first element to the end. - public static global::System.Range All => new global::System.Range(global::System.Index.Start, global::System.Index.End); - - /// Calculate the start offset and length of range object using a collection length. - /// The length of the collection that the range will be used with. length has to be a positive value. - /// - /// For performance reason, we don't validate the input length parameter against negative values. - /// It is expected Range will be used with collections which always have non negative length/count. - /// We validate the range is inside the length scope though. - /// - [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public (int Offset, int Length) GetOffsetAndLength(int length) - { - int start; - global::System.Index startIndex = Start; - if (startIndex.IsFromEnd) - start = length - startIndex.Value; - else - start = startIndex.Value; - - int end; - global::System.Index endIndex = End; - if (endIndex.IsFromEnd) - end = length - endIndex.Value; - else - end = endIndex.Value; - - if ((uint)end > (uint)length || (uint)start > (uint)end) - { - global::System.Range.ThrowHelper.ThrowArgumentOutOfRangeException(); - } - - return (start, end - start); - } - - private static class HashHelpers - { - public static int Combine(int h1, int h2) - { - uint rol5 = ((uint)h1 << 5) | ((uint)h1 >> 27); - return ((int)rol5 + h1) ^ h2; - } - } - - private static class ThrowHelper - { - [global::System.Diagnostics.CodeAnalysis.DoesNotReturn] - public static void ThrowArgumentOutOfRangeException() - { - throw new global::System.ArgumentOutOfRangeException("length"); - } - } - } -} \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Runtime.CompilerServices.IsExternalInit.g.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Runtime.CompilerServices.IsExternalInit.g.cs deleted file mode 100644 index 8a7c8f68..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Generated/PolySharp.SourceGenerators/PolySharp.SourceGenerators.PolyfillsGenerator/System.Runtime.CompilerServices.IsExternalInit.g.cs +++ /dev/null @@ -1,19 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Runtime.CompilerServices -{ - /// - /// Reserved to be used by the compiler for tracking metadata. - /// This class should not be used by developers in source code. - /// - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal static class IsExternalInit - { - } -} \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/Index.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/Index.cs new file mode 100644 index 00000000..841e0eda --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/Index.cs @@ -0,0 +1,98 @@ +// 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. + +// Polyfill implementation adapted from SimonCropp/Polyfill +// https://github.com/SimonCropp/Polyfill +#if !NET +using System.Diagnostics.CodeAnalysis; + +namespace System; + +/// +/// Represents a type that can be used to index a collection either from the start or the end. +/// Polyfill for the framework targets that predate System.Index, enabling the ^ index operator. +/// +[ExcludeFromCodeCoverage] +internal readonly struct Index : IEquatable +{ + /// The encoded value; non-negative is measured from the start, the bitwise complement is measured from the end. + private readonly int _value; + + /// Initializes a new instance of the struct. + /// The index value. Must be zero or positive. + /// Indicates whether the index is counted from the start or the end. + /// is negative. + public Index(int value, bool fromEnd = false) + { + if (value < 0) + { + throw new ArgumentOutOfRangeException(nameof(value), "Non-negative number required."); + } + + _value = fromEnd ? ~value : value; + } + + /// Gets an that points at the first element of a collection. + internal static Index Start => new(0); + + /// Gets an that points beyond the last element of a collection. + internal static Index End => new(0, true); + + /// Gets the index value (without the from-end flag). + internal int Value => _value < 0 ? ~_value : _value; + + /// Gets a value indicating whether the index is counted from the end of a collection. + internal bool IsFromEnd => _value < 0; + + /// Converts an integer into an measured from the start. + /// The zero-based index from the start. + public static implicit operator Index(int value) => new(value); + + /// Determines whether two indexes are equal. + /// The first index. + /// The second index. + /// if the indexes are equal; otherwise . + public static bool operator ==(Index left, Index right) => left.Equals(right); + + /// Determines whether two indexes are not equal. + /// The first index. + /// The second index. + /// if the indexes are not equal; otherwise . + public static bool operator !=(Index left, Index right) => !left.Equals(right); + + /// + public bool Equals(Index other) => _value == other._value; + + /// + public override bool Equals(object? obj) => obj is Index other && _value == other._value; + + /// + public override int GetHashCode() => _value; + + /// Creates an measured from the start of a collection. + /// The zero-based index from the start. + /// The created . + internal static Index FromStart(int value) => new(value); + + /// Creates an measured from the end of a collection. + /// The index from the end (1 refers to the last element). + /// The created . + internal static Index FromEnd(int value) => new(value, true); + + /// Calculates the offset from the start of a collection of the supplied length. + /// The length of the collection. + /// The offset from the start of the collection. + internal int GetOffset(int length) + { + var offset = _value; + if (IsFromEnd) + { + offset += length + 1; + } + + return offset; + } +} + +#endif diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/IsExternalInit.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/IsExternalInit.cs new file mode 100644 index 00000000..b8afe37e --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/IsExternalInit.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. + +// Polyfill implementation adapted from SimonCropp/Polyfill +// https://github.com/SimonCropp/Polyfill +#if !NET +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; + +namespace System.Runtime.CompilerServices; + +/// Reserved to be used by the compiler for tracking metadata. This class should not be used by developers in source code. +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[SuppressMessage("Design", "SST1436:Empty type", Justification = "The compiler requires this exact empty type to emit init accessors on targets that do not ship it.")] +internal static class IsExternalInit; + +#else +[assembly: TypeForwardedTo(typeof(IsExternalInit))] +#endif diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/NotNullWhenAttribute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/NotNullWhenAttribute.cs new file mode 100644 index 00000000..8b6f0e51 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/NotNullWhenAttribute.cs @@ -0,0 +1,29 @@ +// 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. + +// Polyfill implementation adapted from SimonCropp/Polyfill +// https://github.com/SimonCropp/Polyfill +#if !NETCOREAPP3_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER +using System.Diagnostics; + +namespace System.Diagnostics.CodeAnalysis; + +/// Specifies that when a method returns , the parameter will not be even if the corresponding type allows it. +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Parameter)] +internal sealed class NotNullWhenAttribute : Attribute +{ + /// Initializes a new instance of the class. + /// The return value after which the parameter is not null. + public NotNullWhenAttribute(bool returnValue) => + ReturnValue = returnValue; + + /// Gets the return value after which the parameter is not null. + public bool ReturnValue { get; } +} + +#else +[assembly: TypeForwardedTo(typeof(NotNullWhenAttribute))] +#endif diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/Range.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/Range.cs new file mode 100644 index 00000000..def9f8b4 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/Range.cs @@ -0,0 +1,86 @@ +// 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. + +// Polyfill implementation adapted from SimonCropp/Polyfill +// https://github.com/SimonCropp/Polyfill +#if !NET +using System.Diagnostics.CodeAnalysis; + +namespace System; + +/// +/// Represents a range with a start and an end index. +/// Polyfill for the framework targets that predate System.Range, enabling the .. range operator. +/// +[ExcludeFromCodeCoverage] +internal readonly struct Range : IEquatable +{ + /// Initializes a new instance of the struct. + /// The inclusive start index of the range. + /// The exclusive end index of the range. + public Range(Index start, Index end) + { + Start = start; + End = end; + } + + /// Gets a that covers the entire collection. + internal static Range All => new(Index.Start, Index.End); + + /// Gets the inclusive start index of the range. + internal Index Start { get; } + + /// Gets the exclusive end index of the range. + internal Index End { get; } + + /// Determines whether two ranges are equal. + /// The first range. + /// The second range. + /// if the ranges are equal; otherwise . + public static bool operator ==(Range left, Range right) => left.Equals(right); + + /// Determines whether two ranges are not equal. + /// The first range. + /// The second range. + /// if the ranges are not equal; otherwise . + public static bool operator !=(Range left, Range right) => !left.Equals(right); + + /// + public bool Equals(Range other) => Start.Equals(other.Start) && End.Equals(other.End); + + /// + public override bool Equals(object? obj) => obj is Range other && Equals(other); + + /// + public override int GetHashCode() => Start.GetHashCode() ^ End.GetHashCode(); + + /// Creates a range that starts at the supplied index and runs to the end of the collection. + /// The inclusive start index. + /// The created . + internal static Range StartAt(Index start) => new(start, Index.End); + + /// Creates a range that starts at the beginning of the collection and ends at the supplied index. + /// The exclusive end index. + /// The created . + internal static Range EndAt(Index end) => new(Index.Start, end); + + /// Calculates the start offset and length of the range for a collection of the supplied length. + /// The length of the collection. + /// A tuple containing the start offset and the length of the range. + /// The range falls outside a collection of elements. + internal (int Offset, int Length) GetOffsetAndLength(int length) + { + var start = Start.GetOffset(length); + var end = End.GetOffset(length); + + if ((uint)end > (uint)length || (uint)start > (uint)end) + { + throw new ArgumentOutOfRangeException(nameof(length)); + } + + return (start, end - start); + } +} + +#endif diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/UnscopedRefAttribute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/UnscopedRefAttribute.cs new file mode 100644 index 00000000..a2356ce5 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Polyfills/UnscopedRefAttribute.cs @@ -0,0 +1,24 @@ +// 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. + +// Polyfill implementation adapted from SimonCropp/Polyfill +// https://github.com/SimonCropp/Polyfill +#if !NET7_0_OR_GREATER +using System.Diagnostics; + +namespace System.Diagnostics.CodeAnalysis; + +/// Lets a to a member of , or a parameter, escape the method. +/// +/// Polyfill for the targets that predate UnscopedRefAttribute. The compiler honours the attribute by name, so +/// the internal copy has the same effect as the framework type. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] +internal sealed class UnscopedRefAttribute : Attribute; + +#else +[assembly: TypeForwardedTo(typeof(UnscopedRefAttribute))] +#endif diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems index 359333fb..00f31510 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems @@ -42,12 +42,6 @@ - - - - - - From 6176f54b2813c69555b753a98e8b761fa12e8fae Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:18:40 +1000 Subject: [PATCH 09/30] refactor: write [Reactive] properties through an indentation-aware writer SourceWriter and PooledBuilder come from the ReactiveUI.Binding generators: the writer indents each line from its level, so nested types, properties and accessors land at the right depth without spelling out whitespace, and it rents its StringBuilder from a per-thread free list instead of building every fragment as its own string. SourceWriterExtensions names the constructs the generators share: file header, namespace, containing types, partial type, doc comments. The generated properties are token-for-token the same; only whitespace changes, most visibly in nested types, which are now indented by depth. --- .../RG.Basic#TestNs.TestVM.Props.verified.cs | 5 +- ...alledValue#TestNs.TestVM.Props.verified.cs | 5 +- ...AlsoNotify#TestNs.TestVM.Props.verified.cs | 3 +- .../RG.WAcc#TestNs.TestVM.Props.verified.cs | 5 +- ...AccInherit#TestNs.TestVM.Props.verified.cs | 7 +- .../RG.WAttrs#TestNs.TestVM.Props.verified.cs | 5 +- ...icalClass#TestNs1.TestVM.Props.verified.cs | 7 +- ...icalClass#TestNs2.TestVM.Props.verified.cs | 7 +- .../RG.WInit#TestNs.TestVM.Props.verified.cs | 5 +- ....TestVm3+TestInnerClass1.Props.verified.cs | 40 ++- ...erClass2+TestInnerClass3.Props.verified.cs | 50 ++- ....TestVm3+TestInnerClass2.Props.verified.cs | 40 ++- ...estClass#TestNs1.TestVm3.Props.verified.cs | 7 +- ...RGE.Arrays#TestNs.TestVM.Props.verified.cs | 15 +- ...GE.CplxGen#TestNs.TestVM.Props.verified.cs | 15 +- ...el2+Level3+Level4+Level5.Props.verified.cs | 40 ++- ...el1+Level2+Level3+Level4.Props.verified.cs | 34 +- ...tNs.Level1+Level2+Level3.Props.verified.cs | 28 +- ...est#TestNs.Level1+Level2.Props.verified.cs | 22 +- ...E.DeepNest#TestNs.Level1.Props.verified.cs | 5 +- ....Delegates#TestNs.TestVM.Props.verified.cs | 15 +- .../RGE.Enums#TestNs.TestVM.Props.verified.cs | 9 +- .../RGE.Gen#TestNs.TestVM.Props.verified.cs | 15 +- ....GenClass#TestNs.GenVM`1.Props.verified.cs | 9 +- ....GenClass#TestNs.GenVM`2.Props.verified.cs | 11 +- ...Interfaces#TestNs.TestVM.Props.verified.cs | 15 +- .../RGE.Lazy#TestNs.TestVM.Props.verified.cs | 11 +- ...E.MixedAcc#TestNs.TestVM.Props.verified.cs | 27 +- ....MultiAlso#TestNs.TestVM.Props.verified.cs | 9 +- ....MultiAttr#TestNs.TestVM.Props.verified.cs | 11 +- ...ltiPartial#TestNs.TestVM.Props.verified.cs | 13 +- ...RGE.NewMod#TestNs.BaseVM.Props.verified.cs | 7 +- ....NewMod#TestNs.DerivedVM.Props.verified.cs | 7 +- .../RGE.Null#TestNs.TestVM.Props.verified.cs | 11 +- ...E.Override#TestNs.BaseVM.Props.verified.cs | 7 +- ...verride#TestNs.DerivedVM.Props.verified.cs | 7 +- ...cord#TestNs.TestVMRecord.Props.verified.cs | 9 +- .../RGE.Ro#TestNs.TestVM.Props.verified.cs | 7 +- ...RGE.Struct#TestNs.TestVM.Props.verified.cs | 7 +- .../RGE.Time#TestNs.TestVM.Props.verified.cs | 15 +- ...RGE.Tuples#TestNs.TestVM.Props.verified.cs | 11 +- .../Core/CodeGeneration/PooledBuilder.cs | 93 +++++ .../Core/CodeGeneration/SourceWriter.cs | 317 ++++++++++++++++++ .../CodeGeneration/SourceWriterExtensions.cs | 146 ++++++++ .../Reactive/ReactiveGenerator.Execute.cs | 261 +++++--------- .../Reactive/ReactiveGenerator.cs | 4 +- 46 files changed, 906 insertions(+), 493 deletions(-) create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/PooledBuilder.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/SourceWriter.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/SourceWriterExtensions.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs index 37a57da2..16fca858 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test1 @@ -23,4 +22,4 @@ public int Test1 } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs index 3cfe3ae9..8e4e96a9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string Value @@ -24,4 +23,4 @@ public string Value } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs index 08bcda60..2f0db6cd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test4 diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs index 879a38c2..8023d78b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test2 @@ -23,4 +22,4 @@ protected set } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs index f245c5aa..49e00838 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs @@ -7,15 +7,14 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] public virtual string? Name - { + { get => _name; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_name")] protected set @@ -26,4 +25,4 @@ protected set } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs index 08bad5ca..cafd48e5 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] @@ -25,4 +24,4 @@ public int Test3 } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs index e98728f0..59ba85bd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs @@ -7,15 +7,14 @@ namespace TestNs1 { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] public virtual string? Name - { + { get => _name; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_name")] protected set @@ -26,4 +25,4 @@ protected set } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs index 21637b26..28449793 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs @@ -7,15 +7,14 @@ namespace TestNs2 { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] public virtual string? Name - { + { get => _name; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_name")] protected set @@ -26,4 +25,4 @@ protected set } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs index 2f60d617..def79e1f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public required string MustBeSet @@ -24,4 +23,4 @@ public required string MustBeSet } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs index f5625319..e5590c67 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs @@ -8,34 +8,32 @@ namespace TestNs1 { public partial class TestViewModel3 -{ - public partial class TestInnerClass1 { - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestInner1 + public partial class TestInnerClass1 { - get => _testInner1; - set + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner1 { - this.RaiseAndSetIfChanged(ref _testInner1, value); + get => _testInner1; + set + { + this.RaiseAndSetIfChanged(ref _testInner1, value); + } } - } - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestInner11 - { - get => _testInner11; - set + + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner11 { - this.RaiseAndSetIfChanged(ref _testInner11, value); + get => _testInner11; + set + { + this.RaiseAndSetIfChanged(ref _testInner11, value); + } } } } } - -} #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs index 2c39569a..e79b345b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs @@ -8,37 +8,35 @@ namespace TestNs1 { public partial class TestViewModel3 -{ -public partial class TestInnerClass2 -{ - public partial class TestInnerClass3 { - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestInner3 - { - get => _testInner3; - set - { - this.RaiseAndSetIfChanged(ref _testInner3, value); - } - } - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestInner33 + public partial class TestInnerClass2 { - get => _testInner33; - set + public partial class TestInnerClass3 { - this.RaiseAndSetIfChanged(ref _testInner33, value); + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner3 + { + get => _testInner3; + set + { + this.RaiseAndSetIfChanged(ref _testInner3, value); + } + } + + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner33 + { + get => _testInner33; + set + { + this.RaiseAndSetIfChanged(ref _testInner33, value); + } + } } } } -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs index 476fef6a..788f6722 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs @@ -8,34 +8,32 @@ namespace TestNs1 { public partial class TestViewModel3 -{ - public partial class TestInnerClass2 { - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestInner2 + public partial class TestInnerClass2 { - get => _testInner2; - set + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner2 { - this.RaiseAndSetIfChanged(ref _testInner2, value); + get => _testInner2; + set + { + this.RaiseAndSetIfChanged(ref _testInner2, value); + } } - } - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int TestInner22 - { - get => _testInner22; - set + + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner22 { - this.RaiseAndSetIfChanged(ref _testInner22, value); + get => _testInner22; + set + { + this.RaiseAndSetIfChanged(ref _testInner22, value); + } } } } } - -} #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs index 796ad8b7..c7112404 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs1 { - public partial class TestViewModel3 + public partial class TestViewModel3 { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public float TestVM3Property @@ -20,7 +19,7 @@ public float TestVM3Property this.RaiseAndSetIfChanged(ref _testVM3Property, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public float TestVM3Property2 @@ -34,4 +33,4 @@ public float TestVM3Property2 } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs index 9670978a..09d7bf41 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public byte[]? Bytes - { + { get => _bytes; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_bytes")] set @@ -21,11 +20,11 @@ public byte[]? Bytes this.RaiseAndSetIfChanged(ref _bytes, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string[]? Strings - { + { get => _strings; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_strings")] set @@ -33,11 +32,11 @@ public string[]? Strings this.RaiseAndSetIfChanged(ref _strings, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int[][]? JaggedArray - { + { get => _jaggedArray; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_jaggedArray")] set @@ -48,4 +47,4 @@ public int[][]? JaggedArray } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs index b1031499..8a6cebfa 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.Generic.Dictionary>? NestedGenerics - { + { get => _nestedGenerics; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_nestedGenerics")] set @@ -21,11 +20,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _nestedGenerics, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.Generic.IReadOnlyDictionary>? ReadOnlyNestedGenerics - { + { get => _readOnlyNestedGenerics; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_readOnlyNestedGenerics")] set @@ -33,11 +32,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _readOnlyNestedGenerics, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Func>, bool>? ComplexFunc - { + { get => _complexFunc; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_complexFunc")] set @@ -48,4 +47,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs index 9e2acfd0..3e6c9297 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs @@ -8,32 +8,30 @@ namespace TestNs { public partial class Level1 -{ -public partial class Level2 -{ -public partial class Level3 -{ -public partial class Level4 -{ - public partial class Level5 { - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Level5Prop + public partial class Level2 { - get => _level5Prop; - set + public partial class Level3 { - this.RaiseAndSetIfChanged(ref _level5Prop, value); + public partial class Level4 + { + public partial class Level5 + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int Level5Prop + { + get => _level5Prop; + set + { + this.RaiseAndSetIfChanged(ref _level5Prop, value); + } + } + } + } } } } -} -} -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs index 3225bd06..d29f1ffd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs @@ -8,29 +8,27 @@ namespace TestNs { public partial class Level1 -{ -public partial class Level2 -{ -public partial class Level3 -{ - public partial class Level4 { - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Level4Prop + public partial class Level2 { - get => _level4Prop; - set + public partial class Level3 { - this.RaiseAndSetIfChanged(ref _level4Prop, value); + public partial class Level4 + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int Level4Prop + { + get => _level4Prop; + set + { + this.RaiseAndSetIfChanged(ref _level4Prop, value); + } + } + } } } } -} -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs index 7c55edd6..31e0f191 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs @@ -8,26 +8,24 @@ namespace TestNs { public partial class Level1 -{ -public partial class Level2 -{ - public partial class Level3 { - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Level3Prop + public partial class Level2 { - get => _level3Prop; - set + public partial class Level3 { - this.RaiseAndSetIfChanged(ref _level3Prop, value); + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int Level3Prop + { + get => _level3Prop; + set + { + this.RaiseAndSetIfChanged(ref _level3Prop, value); + } + } } } } -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs index ff0fa217..64c47f74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs @@ -8,23 +8,21 @@ namespace TestNs { public partial class Level1 -{ - public partial class Level2 { - - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public int Level2Prop + public partial class Level2 { - get => _level2Prop; - set + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int Level2Prop { - this.RaiseAndSetIfChanged(ref _level2Prop, value); + get => _level2Prop; + set + { + this.RaiseAndSetIfChanged(ref _level2Prop, value); + } } } } } - -} #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs index 3a658eaf..dfa1e337 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class Level1 + public partial class Level1 { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Level1Prop @@ -23,4 +22,4 @@ public int Level1Prop } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs index 7bd0d773..75723baf 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Action? Action - { + { get => _action; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_action")] set @@ -21,11 +20,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _action, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Func? Func - { + { get => _func; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_func")] set @@ -33,11 +32,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _func, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.EventHandler? Handler - { + { get => _handler; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_handler")] set @@ -48,4 +47,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs index 0836b98c..2b384e01 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::TestNs.Status Status @@ -20,7 +19,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _status, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::TestNs.Status? NullableStatus @@ -31,7 +30,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _nullableStatus, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::TestNs.Permissions Permissions @@ -45,4 +44,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs index 1ee48c6e..c383ebd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.Generic.List? Items - { + { get => _items; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_items")] set @@ -21,11 +20,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _items, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.Generic.Dictionary? Mappings - { + { get => _mappings; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_mappings")] set @@ -33,11 +32,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _mappings, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.Generic.IEnumerable? Numbers - { + { get => _numbers; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_numbers")] set @@ -48,4 +47,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs index 5f998cc5..52b01c2b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class GenericVM + public partial class GenericVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public T? Item - { + { get => _item; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_item")] set @@ -21,7 +20,7 @@ public T? Item this.RaiseAndSetIfChanged(ref _item, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Count @@ -35,4 +34,4 @@ public int Count } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs index 632aceed..ddfc05e0 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class GenericVM + public partial class GenericVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public TKey? Key - { + { get => _key; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_key")] set @@ -21,11 +20,11 @@ public TKey? Key this.RaiseAndSetIfChanged(ref _key, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public TValue? Value - { + { get => _value; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_value")] set @@ -36,4 +35,4 @@ public TValue? Value } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs index a4885aed..abea0baf 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::TestNs.IItem? Item - { + { get => _item; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_item")] set @@ -21,11 +20,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _item, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.IDisposable? Disposable - { + { get => _disposable; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_disposable")] set @@ -33,11 +32,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _disposable, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.Generic.IList? List - { + { get => _list; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_list")] set @@ -48,4 +47,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs index 14ec21ae..0f31136d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Lazy? LazyString - { + { get => _lazyString; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_lazyString")] set @@ -21,11 +20,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _lazyString, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Lazy? LazyInt - { + { get => _lazyInt; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_lazyInt")] set @@ -36,4 +35,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs index 7b7f6496..a4762196 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? PublicSet - { + { get => _publicSet; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_publicSet")] set @@ -21,11 +20,11 @@ public string? PublicSet this.RaiseAndSetIfChanged(ref _publicSet, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? ProtectedSet - { + { get => _protectedSet; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_protectedSet")] protected set @@ -33,11 +32,11 @@ protected set this.RaiseAndSetIfChanged(ref _protectedSet, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? InternalSet - { + { get => _internalSet; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_internalSet")] internal set @@ -45,11 +44,11 @@ internal set this.RaiseAndSetIfChanged(ref _internalSet, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? PrivateSet - { + { get => _privateSet; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_privateSet")] private set @@ -57,11 +56,11 @@ private set this.RaiseAndSetIfChanged(ref _privateSet, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? InternalProtectedSet - { + { get => _internalProtectedSet; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_internalProtectedSet")] protected internal set @@ -69,11 +68,11 @@ protected internal set this.RaiseAndSetIfChanged(ref _internalProtectedSet, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? PrivateProtectedSet - { + { get => _privateProtectedSet; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_privateProtectedSet")] private protected set @@ -84,4 +83,4 @@ private protected set } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs index c3bb08ee..f96197d0 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? FirstName - { + { get => _firstName; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_firstName")] set @@ -23,11 +22,11 @@ public string? FirstName this.RaisePropertyChanged(nameof(DisplayName)); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? LastName - { + { get => _lastName; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_lastName")] set diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs index e64a89c4..07f24b9a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs @@ -7,16 +7,15 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute(Name="userName")] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] [global::System.Text.Json.Serialization.JsonPropertyNameAttribute("user_name")] public string? UserName - { + { get => _userName; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_userName")] set @@ -24,13 +23,13 @@ public string? UserName this.RaiseAndSetIfChanged(ref _userName, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.IgnoreDataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIgnoreAttribute()] public string? Password - { + { get => _password; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_password")] set @@ -41,4 +40,4 @@ public string? Password } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs index 6df2a26c..0dbe8d60 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? FirstName - { + { get => _firstName; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_firstName")] set @@ -21,11 +20,11 @@ public string? FirstName this.RaiseAndSetIfChanged(ref _firstName, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? LastName - { + { get => _lastName; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_lastName")] set @@ -33,7 +32,7 @@ public string? LastName this.RaiseAndSetIfChanged(ref _lastName, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Age @@ -47,4 +46,4 @@ public int Age } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs index 586b18ce..315a2359 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class BaseVM + public partial class BaseVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? ShadowedProp - { + { get => _shadowedProp; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_shadowedProp")] set @@ -24,4 +23,4 @@ public string? ShadowedProp } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs index 0203a84f..d22156bd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class DerivedVM + public partial class DerivedVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public new string? ShadowedProp - { + { get => _shadowedProp; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_shadowedProp")] set @@ -24,4 +23,4 @@ public partial class DerivedVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs index 3b367fdf..0b18ba41 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int? NullableInt @@ -20,7 +19,7 @@ public int? NullableInt this.RaiseAndSetIfChanged(ref _nullableInt, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.DateTime? NullableDateTime @@ -31,7 +30,7 @@ public int? NullableInt this.RaiseAndSetIfChanged(ref _nullableDateTime, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Guid? NullableGuid @@ -42,7 +41,7 @@ public int? NullableInt this.RaiseAndSetIfChanged(ref _nullableGuid, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public decimal? NullableDecimal @@ -56,4 +55,4 @@ public decimal? NullableDecimal } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs index e00794ce..96515258 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class BaseVM + public partial class BaseVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public virtual string? BaseName - { + { get => _baseName; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_baseName")] set @@ -24,4 +23,4 @@ public virtual string? BaseName } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs index ae72ca05..43294976 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial class DerivedVM + public partial class DerivedVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public override string? BaseName - { + { get => _baseName; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_baseName")] set @@ -24,4 +23,4 @@ public override string? BaseName } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs index 60bc9612..e6152226 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs @@ -7,13 +7,12 @@ namespace TestNs { - public partial record TestVMRecord + public partial record TestVMRecord { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string? Name - { + { get => _name; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_name")] set @@ -21,7 +20,7 @@ public string? Name this.RaiseAndSetIfChanged(ref _name, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Age @@ -35,4 +34,4 @@ public int Age } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs index 1f0b57aa..2b07667b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::TestNs.ImmutablePoint Point @@ -20,7 +19,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _point, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::TestNs.ImmutablePoint? OptionalPoint @@ -34,4 +33,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs index 5825ffbd..506d7e63 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::TestNs.Point Location @@ -20,7 +19,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _location, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::TestNs.Point? OptionalLocation @@ -34,4 +33,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs index a7da656c..6f778bd6 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.TimeSpan Duration @@ -20,7 +19,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _duration, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.TimeSpan? OptionalDuration @@ -31,7 +30,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _optionalDuration, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.DateTimeOffset Timestamp @@ -42,7 +41,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _timestamp, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.DateTimeOffset? OptionalTimestamp @@ -53,7 +52,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _optionalTimestamp, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.TimeOnly TimeOnly @@ -64,7 +63,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _timeOnly, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.DateOnly DateOnly @@ -78,4 +77,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs index 356dd00c..2017ab34 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs @@ -7,9 +7,8 @@ namespace TestNs { - public partial class TestVM + public partial class TestVM { - /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public (int Id, string Name)? NamedTuple @@ -20,11 +19,11 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _namedTuple, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Tuple? Tuple - { + { get => _tuple; [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_tuple")] set @@ -32,7 +31,7 @@ public partial class TestVM this.RaiseAndSetIfChanged(ref _tuple, value); } } - + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public (string, int, bool) ValueTuple @@ -46,4 +45,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/PooledBuilder.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/PooledBuilder.cs new file mode 100644 index 00000000..bfd49f41 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/PooledBuilder.cs @@ -0,0 +1,93 @@ +// 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.Text; + +namespace ReactiveUI.SourceGenerators.CodeGeneration; + +/// Hands out reusable string builders so a generation pass reuses buffers instead of allocating per file. +/// +/// +/// Each generated file was built in its own fresh builder, so a pass allocated a builder and its grown chunk +/// chain per file and threw them away. Renting from a per-thread free list lets one pass reuse the same +/// buffers, and a builder that has already grown to fit one file starts large enough for the next. +/// +/// +/// The free list is a list rather than a single slot because the emitters nest: a grouping key is built while +/// the file it belongs to is still open. A single slot would hand the same builder to both. +/// +/// +/// Thread-static because source-output callbacks can run concurrently, and because renting must not need a +/// lock to be worth doing. A builder is only reused after hands it back, so two +/// live rents never share one. +/// +/// +internal static class PooledBuilder +{ + /// How many builders to keep per thread, covering the emitters' nesting depth. + private const int MaxPooled = 8; + + /// + /// The largest builder worth keeping. One outsized file would otherwise pin its whole chunk chain for the + /// life of the thread, which in a build host outlives the compilation that needed it. + /// + private const int MaxRetainedCapacity = 256 * 1024; + + /// The per-thread free list. + [ThreadStatic] + private static StringBuilder?[]? _pool; + + /// The number of populated slots in . + [ThreadStatic] + private static int _pooledCount; + + /// Rents a builder, empty and ready to write. + /// The capacity the caller expects to need. + /// An empty builder. + internal static StringBuilder Rent(int capacity) + { + var pool = _pool; + if (pool is not null && _pooledCount > 0) + { + _pooledCount--; + var pooled = pool[_pooledCount]!; + pool[_pooledCount] = null; + _ = pooled.EnsureCapacity(capacity); + return pooled; + } + + return new(capacity); + } + + /// Materializes a rented builder's content and hands the builder back for reuse. + /// The rented builder, which the caller must not touch afterwards. + /// The accumulated string. + internal static string ToStringAndReturn(StringBuilder builder) + { + var result = builder.ToString(); + Return(builder); + return result; + } + + /// Hands a rented builder back without materializing it. + /// The rented builder, which the caller must not touch afterwards. + internal static void Return(StringBuilder builder) + { + if (builder.Capacity > MaxRetainedCapacity) + { + return; + } + + var pool = _pool ??= new StringBuilder?[MaxPooled]; + if (_pooledCount >= MaxPooled) + { + return; + } + + _ = builder.Clear(); + pool[_pooledCount] = builder; + _pooledCount++; + } +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/SourceWriter.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/SourceWriter.cs new file mode 100644 index 00000000..284455db --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/SourceWriter.cs @@ -0,0 +1,317 @@ +// 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.Runtime.CompilerServices; +using System.Text; + +namespace ReactiveUI.SourceGenerators.CodeGeneration; + +/// Writes generated C# source, tracking the indentation level so emitters never spell it out. +/// +/// +/// The writer owns the layout rules: a line is indented when its first character is written, a blank line +/// carries no trailing whitespace, and every line ends with \n. Emitters say what they write - a line, a +/// block, a nested argument list - and the level follows from the structure, so a fragment written by one emitter +/// lands at the right depth whichever emitter called it. +/// +/// +/// The text accumulates in a , which grows in chunks rather than by copying. +/// Indentation comes from a table of precomputed strings, so indenting a line is one append. Escaped literals are +/// written in runs straight from the source text rather than through an intermediate string. +/// +/// +/// A writer is used by one source-output callback at a time and never outlives it. takes its +/// builder from 's per-thread free list, because source-output callbacks can run +/// concurrently and a builder grown to fit one file is large enough for the next. Nothing a writer holds reaches a +/// pipeline model, so it has no bearing on incremental caching. +/// +/// +internal sealed class SourceWriter +{ + /// The number of spaces one indentation level adds. + internal const int IndentWidth = 4; + + /// The capacity a new writer starts with. + private const int DefaultCapacity = 4 * 1024; + + /// The number of indentation levels served from the precomputed table. + private const int CachedIndentLevels = 16; + + /// The indentation for each level, indexed by level. + private static readonly string[] Indents = BuildIndents(); + + /// The builder the text accumulates in. + private readonly StringBuilder _builder; + + /// The length of the text when the current line began; equal to the length while nothing is on it. + private int _lineStart; + + /// Initializes a new instance of the class. + /// The capacity to allocate up front. + internal SourceWriter(int capacity = DefaultCapacity) + : this(new StringBuilder(capacity)) + { + } + + /// Initializes a new instance of the class over an empty builder. + /// The builder to write into. + private SourceWriter(StringBuilder builder) => _builder = builder; + + /// Gets the current indentation level. + internal int Level { get; private set; } + + /// Gets the number of characters written so far. + internal int Length => _builder.Length; + + /// Materializes the text written so far, leaving the writer usable. + /// The accumulated text. + public override string ToString() => _builder.ToString(); + + /// Rents an empty writer at level zero, over a builder from the thread's free list. + /// The capacity the caller expects to need. + /// An empty writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static SourceWriter Rent(int capacity = DefaultCapacity) => new(PooledBuilder.Rent(capacity)); + + /// Materializes the text and hands the builder back for reuse. + /// The accumulated text. + /// The caller must not touch the writer afterwards. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal string ToStringAndReturn() => PooledBuilder.ToStringAndReturn(_builder); + + /// Hands the builder back without materializing it. + /// The caller must not touch the writer afterwards. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal void Return() => PooledBuilder.Return(_builder); + + /// Empties the writer and returns it to level zero. + /// This writer. + internal SourceWriter Reset() + { + _ = _builder.Clear(); + _lineStart = 0; + Level = 0; + return this; + } + + /// Moves one level deeper. + /// This writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter Indent() + { + Level++; + return this; + } + + /// Moves one level shallower. + /// This writer. + /// The writer is already at level zero. + internal SourceWriter Outdent() + { + if (Level == 0) + { + throw new InvalidOperationException("The writer is already at the outermost level."); + } + + Level--; + return this; + } + + /// Writes text, indenting it when it starts a line. + /// The text, which must not contain a line break. + /// This writer. + internal SourceWriter Append(string? text) + { + if (string.IsNullOrEmpty(text)) + { + return this; + } + + StartLine(); + _ = _builder.Append(text); + return this; + } + + /// Writes part of a string, indenting it when it starts a line. + /// The text to copy from. + /// The index of the first character to write. + /// The number of characters to write. + /// This writer. + internal SourceWriter Append(string text, int start, int count) + { + if (count == 0) + { + return this; + } + + StartLine(); + _ = _builder.Append(text, start, count); + return this; + } + + /// Writes one character, indenting it when it starts a line. + /// The character, which must not be a line break. + /// This writer. + internal SourceWriter Append(char value) + { + StartLine(); + _ = _builder.Append(value); + return this; + } + + /// Writes the invariant decimal rendering of an integer. + /// The value to write. + /// This writer. + /// The builder formats straight into its buffer, so no string is built for the number. + internal SourceWriter Append(int value) + { + StartLine(); + _ = _builder.Append(value); + return this; + } + + /// Writes a boolean as a C# literal. + /// The value to write. + /// This writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter AppendLiteral(bool value) => Append(value ? "true" : "false"); + + /// Writes text escaped for the inside of a regular C# string literal. + /// The raw text. + /// This writer. + /// Copies the text in runs between the characters that need escaping, allocating nothing. + internal SourceWriter AppendEscaped(string text) + { + StartLine(); + var runStart = 0; + for (var i = 0; i < text.Length; i++) + { + var character = text[i]; + if (character is not ('\\' or '"')) + { + continue; + } + + _ = _builder.Append(text, runStart, i - runStart).Append('\\').Append(character); + runStart = i + 1; + } + + _ = _builder.Append(text, runStart, text.Length - runStart); + return this; + } + + /// Writes a regular C# string literal: quoted and escaped. + /// The raw text. + /// This writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter AppendQuoted(string text) => Append('"').AppendEscaped(text).Append('"'); + + /// Ends the current line; at the start of a line, writes a blank one. + /// This writer. + internal SourceWriter EndLine() + { + _ = _builder.Append('\n'); + _lineStart = _builder.Length; + return this; + } + + /// Writes a blank line. + /// This writer. + /// The same character as ; the name says the line is meant to be empty. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter BlankLine() => EndLine(); + + /// Writes text and ends the line. + /// The text, which must not contain a line break. + /// This writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter Line(string text) => Append(text).EndLine(); + + /// Writes a block of lines, each at the current level plus the indentation it carries itself. + /// The lines, separated by \n or \r\n; the last line need not be terminated. + /// This writer. + /// + /// For fixed text written as a raw string literal. The literal's own indentation is relative to the level it is + /// written at, so the same block reads correctly wherever an emitter places it. + /// + internal SourceWriter Lines(string block) + { + var start = 0; + while (start < block.Length) + { + var end = block.IndexOf('\n', start); + var next = end < 0 ? block.Length : end + 1; + var contentEnd = end < 0 ? block.Length : end; + if (contentEnd > start && block[contentEnd - 1] == '\r') + { + contentEnd--; + } + + _ = Append(block, start, contentEnd - start).EndLine(); + start = next; + } + + return this; + } + + /// Opens a brace block on its own line and moves one level deeper. + /// This writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter OpenBlock() => Line("{").Indent(); + + /// Moves one level shallower and closes the brace block on its own line. + /// This writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter CloseBlock() => Outdent().Line("}"); + + /// Moves one level shallower and closes the brace block, followed by text on the same line. + /// What follows the brace, such as ); or ,. + /// This writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter CloseBlock(string trailer) => Outdent().Append('}').Line(trailer); + + /// Moves one level shallower and writes the closing brace, leaving the line open. + /// This writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter CloseBlockInline() => Outdent().Append('}'); + + /// Builds the indentation table. + /// The indentation for each cached level. + private static string[] BuildIndents() + { + var indents = new string[CachedIndentLevels]; + for (var i = 0; i < indents.Length; i++) + { + indents[i] = new(' ', i * IndentWidth); + } + + return indents; + } + + /// Writes the indentation when nothing has been written on the current line yet. + /// + /// A line that has started is longer than its start, so the test needs no flag of its own. At level zero the + /// indentation is empty and the line stays unstarted until its first character, which is harmless. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void StartLine() + { + if (_builder.Length != _lineStart || Level == 0) + { + return; + } + + WriteIndent(); + } + + /// Writes the indentation for the current level. + private void WriteIndent() + { + var level = Level; + _ = level < CachedIndentLevels + ? _builder.Append(Indents[level]) + : _builder.Append(' ', level * IndentWidth); + } +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/SourceWriterExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/SourceWriterExtensions.cs new file mode 100644 index 00000000..ce7308f7 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/CodeGeneration/SourceWriterExtensions.cs @@ -0,0 +1,146 @@ +// 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.CompilerServices; +using ReactiveUI.SourceGenerators.Models; + +namespace ReactiveUI.SourceGenerators.CodeGeneration; + +/// The C# constructs generated code is built from, each written through a . +/// +/// Each member names one construct - a file header, a namespace, a partial type, a doc comment - and writes its fixed +/// text and its braces, so an emitter says what it builds and the layout follows from the writer's level. Every +/// generated file is block-scoped and free of file-scoped namespaces, so it compiles at the consumer's minimum C# version. +/// +internal static class SourceWriterExtensions +{ + /// The marker that tells analyzers and the IDE a file is generated. + internal const string AutoGeneratedMarker = "// "; + + /// The attribute that keeps generated members out of the consumer's code coverage. + internal const string ExcludeFromCodeCoverageAttribute = "[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]"; + + /// Writes C# constructs through a writer. + /// The writer the construct is written to. + extension(SourceWriter writer) + { + /// Writes // <auto-generated/>. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter AutoGenerated() => writer.Line(AutoGeneratedMarker); + + /// Writes a using directive. + /// The imported namespace. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter Using(string namespaceName) => writer.Append("using ").Append(namespaceName).Line(";"); + + /// Writes #pragma warning disable and #nullable enable, which open most generated files. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter DisableWarningsEnableNullable() => writer.Line("#pragma warning disable").Line("#nullable enable"); + + /// Writes #nullable restore and #pragma warning restore, which close most generated files. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter RestoreNullableAndWarnings() => writer.Line("#nullable restore").Line("#pragma warning restore"); + + /// Opens a block-scoped namespace, the only form C# 7.3 parses; the global namespace opens nothing. + /// The namespace, or an empty string for the global namespace. + /// The number of blocks opened: one, or zero for the global namespace. + internal int OpenNamespace(string namespaceName) + { + if (namespaceName.Length == 0) + { + return 0; + } + + _ = writer.Append("namespace ").Line(namespaceName).OpenBlock(); + return 1; + } + + /// Opens the partial declarations of every type containing a nested target, outermost first. + /// The target's containing type, or for a top-level target. + /// The number of blocks opened. + internal int OpenContainingTypes(TargetInfo? containingType) + { + if (containingType is null) + { + return 0; + } + + var depth = writer.OpenContainingTypes(containingType.ParentInfo); + _ = writer.OpenPartialType(containingType); + return depth + 1; + } + + /// Opens a target type's partial declaration, {visibility} partial {kind} {name}. + /// The target type. + /// The writer, inside the type's body. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter OpenPartialType(TargetInfo target) => writer.BeginPartialType(target).EndLine().OpenBlock(); + + /// Opens a target type's partial declaration with a base list, {visibility} partial {kind} {name} : {baseList}. + /// The target type. + /// The base types and interfaces, without the colon. + /// The writer, inside the type's body. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter OpenPartialType(TargetInfo target, string baseList) => + writer.BeginPartialType(target).Append(" : ").Line(baseList).OpenBlock(); + + /// Starts a target type's partial declaration, for the caller to finish the line. + /// The target type. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter BeginPartialType(TargetInfo target) => + writer.Append(target.TargetVisibility).Append(" partial ").Append(target.TargetType).Append(' ').Append(target.TargetName); + + /// Closes the given number of brace blocks. + /// The number of blocks to close. + /// The writer. + internal SourceWriter CloseBlocks(int count) + { + for (var i = 0; i < count; i++) + { + _ = writer.CloseBlock(); + } + + return writer; + } + + /// Writes a one-line summary doc comment. + /// The summary, already XML-safe. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter Summary(string text) => writer.Line("/// ").Append("/// ").Line(text).Line("/// "); + + /// Writes /// <inheritdoc/>. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter InheritDoc() => writer.Line("/// "); + + /// Writes /// <inheritdoc cref="..."/>. + /// The referenced member. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter InheritDoc(string cref) => writer.Append("/// "); + + /// Ends a statement. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter EndStatement() => writer.Line(";"); + + /// Writes the attribute that keeps a generated member out of code coverage. + /// The writer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal SourceWriter ExcludeFromCodeCoverage() => writer.Line(ExcludeFromCodeCoverageAttribute); + } + + /// Builds the GeneratedCode attribute line a generator stamps on its members. + /// The generator's full type name. + /// The generator assembly's version. + /// The attribute, built once per generator rather than once per member. + internal static string GeneratedCodeAttribute(string generatorName, string generatorVersion) => + $"[global::System.CodeDom.Compiler.GeneratedCode(\"{generatorName}\", \"{generatorVersion}\")]"; +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs index 2aa122c6..fc086cd1 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs @@ -10,6 +10,7 @@ using Microsoft.CodeAnalysis.CSharp; #endif using Microsoft.CodeAnalysis.CSharp.Syntax; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -48,6 +49,8 @@ public sealed partial class ReactiveGenerator /// The inheritance value for a new property. private const int NewInheritanceModifier = 3; + /// The GeneratedCode attribute stamped on every generated property, built once. + private static readonly string GeneratedCodeAttribute = SourceWriterExtensions.GeneratedCodeAttribute(GeneratorName, GeneratorVersion); #if ROSYLN_412 || ROSYLN_500 /// Gets metadata for an attributed partial property. /// The generator attribute context. @@ -182,15 +185,20 @@ private static string GetXmlDocumentation(ISymbol symbol, CancellationToken toke return string.Empty; } - var formattedDocumentation = new System.Text.StringBuilder(); + // The first and the last two lines are the envelope around the documentation. const int XmlMemberEnvelopeLineCount = 2; + var builder = PooledBuilder.Rent(xmlDocumentation.Length); for (var index = 1; index < lines.Length - XmlMemberEnvelopeLineCount; index++) { - _ = formattedDocumentation.Append(" /// ") - .AppendLine(lines[index].TrimStart()); + if (index > 1) + { + _ = builder.Append('\n'); + } + + _ = builder.Append("/// ").Append(lines[index].Trim()); } - return formattedDocumentation.ToString().TrimEnd(); + return PooledBuilder.ToStringAndReturn(builder); } #endif @@ -296,214 +304,111 @@ private static string GetFieldInheritance(AttributeData attributeData) => _ => string.Empty, }; - /// Generates the source code. - /// The contain type name. - /// The containing namespace. - /// The containing class visibility. - /// The containing type. - /// The properties. + /// Generates the partial declaration holding one type's reactive properties. + /// The properties the type declares, all sharing one . /// The selected ReactiveUI API surface. - /// The value. - private static string GenerateSource( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - PropertyInfo[] properties, - ReactiveUiIntegration integration) - { - var parentTypes = new TargetInfo?[properties.Length]; - for (var index = 0; index < properties.Length; index++) - { - parentTypes[index] = properties[index].TargetInfo.ParentInfo; - } - - var (parentClassDeclarationsString, closingBrackets) = TargetInfo.GenerateParentClassDeclarations(parentTypes); - - var classes = GenerateClassWithProperties(containingTypeName, containingClassVisibility, containingType, properties); - - return -$$""" -// -{{integration.UsingDirectives}} - -#pragma warning disable -#nullable enable - -namespace {{containingNamespace}} -{ - {{parentClassDeclarationsString}}{{classes}}{{closingBrackets}} -} -#nullable restore -#pragma warning restore -"""; - } - - /// Generates the source code. - /// The contain type name. - /// The containing class visibility. - /// The containing type. - /// The properties. - /// The value. - private static string GenerateClassWithProperties(string containingTypeName, string containingClassVisibility, string containingType, PropertyInfo[] properties) + /// The file's text. + private static string GenerateSource(List properties, ReactiveUiIntegration integration) { - var propertyDeclarationsBuilder = new System.Text.StringBuilder(); - foreach (var property in properties) + var target = properties[0].TargetInfo; + var writer = SourceWriter.Rent() + .AutoGenerated() + .Lines(integration.UsingDirectives) + .BlankLine() + .DisableWarningsEnableNullable() + .BlankLine(); + + var depth = writer.OpenNamespace(target.TargetNamespace) + writer.OpenContainingTypes(target.ParentInfo); + _ = writer.OpenPartialType(target); + for (var i = 0; i < properties.Count; i++) { - if (propertyDeclarationsBuilder.Length > 0) + if (i > 0) { - _ = propertyDeclarationsBuilder.AppendLine(); + _ = writer.BlankLine(); } - _ = propertyDeclarationsBuilder.Append(GetPropertySyntax(property)); + WriteProperty(writer, properties[i]); } - var propertyDeclarations = propertyDeclarationsBuilder.ToString(); - - return -$$""" - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} - { -{{propertyDeclarations}} - } -"""; + return writer.CloseBlock() + .CloseBlocks(depth) + .RestoreNullableAndWarnings() + .ToStringAndReturn(); } - /// Generates property declarations for the given observable method information. - /// Metadata about the observable property. - /// A string containing the generated code for the property. - private static string GetPropertySyntax(PropertyInfo propertyInfo) + /// Writes one reactive property, and the backing field a partial property needs below C# 14. + /// The writer, at the level of the type's members. + /// The property. + private static void WriteProperty(SourceWriter writer, PropertyInfo propertyInfo) { - if (propertyInfo.PropertyName is null) - { - return string.Empty; - } - - var partialModifier = propertyInfo.IsProperty ? "partial " : string.Empty; var getFieldName = propertyInfo.FieldName; var setFieldName = getFieldName == "value" ? "this.value" : getFieldName; - var memberNotNullAttribute = GetMemberNotNullAttribute(propertyInfo, setFieldName); - var propertyDeclaration = GetPropertyDeclaration(propertyInfo, partialModifier); - var openingBrace = memberNotNullAttribute.Length > 0 - && propertyInfo.TypeNameWithNullabilityAnnotations.EndsWith("?", StringComparison.Ordinal) - ? "{ " - : "{"; - return $$""" - {{GetFieldSyntax(propertyInfo)}} -{{GetDocumentationSyntax(propertyInfo, getFieldName)}} - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - {{GetPropertyAttributes(propertyInfo)}} - {{propertyDeclaration}} - {{openingBrace}} - get => {{getFieldName}}; -{{memberNotNullAttribute}} {{propertyInfo.SetAccessModifier}} - { - this.RaiseAndSetIfChanged(ref {{setFieldName}}, value);{{GetAlsoNotifyStatements(propertyInfo.AlsoNotify)}} - } - } -"""; - } - /// Gets the optional backing-field declaration for a generated property. - /// The generated property metadata. - /// The field declaration, or an empty string. - private static string GetFieldSyntax(PropertyInfo propertyInfo) => - !propertyInfo.IsProperty || propertyInfo.FieldName == "field" - ? string.Empty - : $$""" -{{JoinIndentedLines(propertyInfo.ForwardedAttributes)}} - private {{propertyInfo.TypeNameWithNullabilityAnnotations}} {{propertyInfo.FieldName}}; -"""; - - /// Gets the declaration line for a generated property. - /// The generated property metadata. - /// The partial modifier, when applicable. - /// The generated property declaration. - private static string GetPropertyDeclaration(PropertyInfo propertyInfo, string partialModifier) - { - var modifiers = $"{propertyInfo.PropertyAccessModifier}{propertyInfo.Inheritance} {propertyInfo.UseRequired}{partialModifier}"; - return $"{modifiers}{propertyInfo.TypeNameWithNullabilityAnnotations} {propertyInfo.PropertyName}"; - } + if (propertyInfo.IsProperty && getFieldName != "field") + { + WriteLines(writer, propertyInfo.ForwardedAttributes); + _ = writer.Append("private ").Append(propertyInfo.TypeNameWithNullabilityAnnotations).Append(' ').Append(getFieldName).EndStatement(); + } - /// Gets the documentation declaration for a generated property. - /// The generated property metadata. - /// The generated getter field name. - /// The documentation declaration. - private static string GetDocumentationSyntax(PropertyInfo propertyInfo, string getFieldName) - { + WriteDocumentation(writer, propertyInfo, getFieldName); + _ = writer.Line(GeneratedCodeAttribute).ExcludeFromCodeCoverage(); if (!propertyInfo.IsProperty) { - return $$""" /// """; + WriteLines(writer, propertyInfo.ForwardedAttributes); } - return string.IsNullOrWhiteSpace(propertyInfo.XmlComment) - ? $$""" /// """ - : propertyInfo.XmlComment!; - } + _ = writer.Append(propertyInfo.PropertyAccessModifier).Append(propertyInfo.Inheritance).Append(' ').Append(propertyInfo.UseRequired); + if (propertyInfo.IsProperty) + { + _ = writer.Append("partial "); + } - /// Gets the attributes applied to a generated property. - /// The generated property metadata. - /// The formatted attribute list. - private static string GetPropertyAttributes(PropertyInfo propertyInfo) - { - var builder = new System.Text.StringBuilder(); - AppendIndentedLines(builder, AttributeDefinitions.ExcludeFromCodeCoverage); - if (!propertyInfo.IsProperty) + _ = writer.Append(propertyInfo.TypeNameWithNullabilityAnnotations).Append(' ').Line(propertyInfo.PropertyName) + .OpenBlock() + .Append("get => ").Append(getFieldName).EndStatement(); + + if (propertyInfo.IncludeMemberNotNullOnSetAccessor || propertyInfo.IsReferenceTypeOrUnconstrainedTypeParameter) { - AppendIndentedLines(builder, propertyInfo.ForwardedAttributes); + _ = writer.Append("[global::System.Diagnostics.CodeAnalysis.MemberNotNull(\"").Append(setFieldName).Line("\")]"); } - return builder.ToString(); - } + _ = writer.Line(propertyInfo.SetAccessModifier) + .OpenBlock() + .Append("this.RaiseAndSetIfChanged(ref ").Append(setFieldName).Line(", value);"); - /// Gets the optional member-not-null accessor attribute. - /// The generated property metadata. - /// The field assigned by the setter. - /// The formatted attribute prefix, or an empty string. - private static string GetMemberNotNullAttribute(PropertyInfo propertyInfo, string setFieldName) => - propertyInfo.IncludeMemberNotNullOnSetAccessor || propertyInfo.IsReferenceTypeOrUnconstrainedTypeParameter - ? $" [global::System.Diagnostics.CodeAnalysis.MemberNotNull(\"{setFieldName}\")]\n" - : string.Empty; - - /// Gets property-changed statements for additional notifications. - /// The additional property names. - /// The generated statements. - private static string GetAlsoNotifyStatements(EquatableArray alsoNotify) - { - var builder = new System.Text.StringBuilder(); - foreach (var propertyName in alsoNotify.AsImmutableArray()) + foreach (var propertyName in propertyInfo.AlsoNotify.AsImmutableArray()) { - _ = builder.Append("\n this.RaisePropertyChanged(nameof(") - .Append(propertyName) - .Append("));"); + _ = writer.Append("this.RaisePropertyChanged(nameof(").Append(propertyName).Line("));"); } - return builder.ToString(); + _ = writer.CloseBlock().CloseBlock(); } - /// Joins source lines with generated-property indentation. - /// The source lines. - /// The joined and indented lines. - private static string JoinIndentedLines(IEnumerable lines) + /// Writes a property's documentation: the partial property's own, or an inheritdoc of its source member. + /// The writer. + /// The property. + /// The field the getter reads. + private static void WriteDocumentation(SourceWriter writer, PropertyInfo propertyInfo, string getFieldName) { - var builder = new System.Text.StringBuilder(); - AppendIndentedLines(builder, lines); - return builder.ToString(); + if (!propertyInfo.IsProperty) + { + _ = writer.InheritDoc(getFieldName); + return; + } + + _ = string.IsNullOrWhiteSpace(propertyInfo.XmlComment) + ? writer.InheritDoc(propertyInfo.PropertyName) + : writer.Lines(propertyInfo.XmlComment!); } - /// Appends generated-property source lines with indentation. - /// The destination builder. - /// The source lines. - private static void AppendIndentedLines(System.Text.StringBuilder builder, IEnumerable lines) + /// Writes each line on its own line at the writer's level. + /// The writer. + /// The lines, such as forwarded attributes. + private static void WriteLines(SourceWriter writer, EquatableArray lines) { - foreach (var line in lines) + foreach (var line in lines.AsImmutableArray()) { - if (builder.Length > 0) - { - _ = builder.Append("\n "); - } - - _ = builder.Append(line); + _ = writer.Line(line); } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs index b9915780..cee37c6f 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs @@ -90,7 +90,7 @@ private static void RunReactiveFromField(in IncrementalGeneratorInitializationCo foreach (var grouping in groupedPropertyInfo) { - var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, grouping.Value.ToArray(), input.Right); + var source = GenerateSource(grouping.Value, input.Right); context.AddSource($"{grouping.Key.FileHintName}.Properties.g.cs", source); } }); @@ -149,7 +149,7 @@ private static void RunReactiveFromProperty(in IncrementalGeneratorInitializatio foreach (var grouping in groupedPropertyInfo) { - var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, grouping.Value.ToArray(), input.Right); + var source = GenerateSource(grouping.Value, input.Right); context.AddSource($"{grouping.Key.FileHintName}.PartialProperties.g.cs", source); } }); From 0360590b8ded2b8012bf434fbcd68199a2666074 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:25:37 +1000 Subject: [PATCH 10/30] perf: cut allocations in shared extraction - IsTargetTypeValid stops at the first check that holds; the attribute check, which makes the compiler bind every base type's attributes, runs last instead of always. - HasFullyQualifiedMetadataName compares segment by segment instead of building the name for every base type and interface it walks. - TargetInfo.From uses a plain type's name directly and only rewrites the hint name when it has angle brackets. - Generated property and field names are cased in one pooled buffer. - [Reactive] reads AlsoNotify names in place, and its syntax fallback skips named arguments rather than evaluating them. - Each injected attribute's source text is built once per process instead of on every access. --- .../AttributeDefinitions.cs | 24 +++-- .../Core/Extensions/FieldSyntaxExtensions.cs | 42 +++++---- .../Core/Extensions/ITypeSymbolExtensions.cs | 92 +++++++++++++++++-- .../Core/Models/TargetInfo.cs | 17 +++- .../Reactive/ReactiveGenerator.Execute.cs | 22 ++++- 5 files changed, 160 insertions(+), 37 deletions(-) diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs index 95177df1..e36f553a 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs @@ -18,7 +18,7 @@ internal static class AttributeDefinitions public static string[] ExcludeFromCodeCoverage = ["[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]"]; - public static string GetAccessModifierEnum() => $$""" + 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. @@ -70,9 +70,11 @@ internal enum InheritanceModifier #pragma warning restore """; + public static string GetAccessModifierEnum() => AccessModifierEnumText; + public const string ReactiveObjectAttributeType = "ReactiveUI.SourceGenerators.IReactiveObjectAttribute"; - public static string ReactiveObjectAttribute => $$""" + 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. @@ -102,7 +104,7 @@ internal sealed class IReactiveObjectAttribute : global::System.Attribute; /// /// The reactive command attribute. /// - public static string ReactiveCommandAttribute => $$""" + 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. @@ -166,7 +168,7 @@ internal sealed class ReactiveCommandAttribute : global::System.Attribute /// The reactive attribute. /// #if ROSYLN_412 || ROSYLN_500 - public static string ReactiveAttribute => $$""" + 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. @@ -220,7 +222,7 @@ public ReactiveAttribute(params string[] alsoNotify) #pragma warning restore """; #else - public static string ReactiveAttribute => $$""" + 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. @@ -277,7 +279,7 @@ public ReactiveAttribute(params string[] alsoNotify) public const string IViewForAttributeType = "ReactiveUI.SourceGenerators.IViewForAttribute"; - public static string IViewForAttribute => $$""" + public static string IViewForAttribute { 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. @@ -317,7 +319,7 @@ internal sealed class IViewForAttribute(string? viewModelType) : global::System. public const string ViewModelControlHostAttributeType = "ReactiveUI.SourceGenerators.WinForms.ViewModelControlHostAttribute"; - public static string 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. @@ -345,7 +347,7 @@ internal sealed class ViewModelControlHostAttribute(string? baseType) : global:: public const string RoutedControlHostAttributeType = "ReactiveUI.SourceGenerators.WinForms.RoutedControlHostAttribute"; - public static string GetRoutedControlHostAttribute() => $$""" + 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. @@ -371,9 +373,11 @@ internal sealed class RoutedControlHostAttribute(string? baseType) : global::Sys #pragma warning restore """; + public static string GetRoutedControlHostAttribute() => RoutedControlHostAttributeText; + public const string BindableDerivedListAttributeType = "ReactiveUI.SourceGenerators.BindableDerivedListAttribute"; - public static string 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. @@ -406,7 +410,7 @@ internal sealed class BindableDerivedListAttribute : global::System.Attribute public const string ReactiveCollectionAttributeType = "ReactiveUI.SourceGenerators.ReactiveCollectionAttribute"; - public static string 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. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/FieldSyntaxExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/FieldSyntaxExtensions.cs index 51aba332..dd164dca 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/FieldSyntaxExtensions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/FieldSyntaxExtensions.cs @@ -4,6 +4,7 @@ using System.Globalization; using Microsoft.CodeAnalysis; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Helpers; namespace ReactiveUI.SourceGenerators.Extensions; @@ -28,18 +29,24 @@ internal static class FieldSyntaxExtensions /// The generated property name. internal string GetGeneratedPropertyName() { - var propertyName = fieldSymbol.Name; - - if (propertyName.StartsWith("m_", System.StringComparison.Ordinal)) + var fieldName = fieldSymbol.Name; + var start = 0; + if (fieldName.StartsWith("m_", System.StringComparison.Ordinal)) { - propertyName = propertyName[FieldPrefixLength..]; + start = FieldPrefixLength; } - else if (propertyName.StartsWith("_", System.StringComparison.Ordinal)) + else { - propertyName = propertyName.TrimStart('_'); + while (start < fieldName.Length && fieldName[start] == '_') + { + start++; + } } - return $"{char.ToUpper(propertyName[0], CultureInfo.InvariantCulture)}{propertyName[1..]}"; + // Built in one pooled buffer: the name is cased and trimmed without intermediate strings. + var builder = PooledBuilder.Rent(fieldName.Length - start); + _ = builder.Append(char.ToUpper(fieldName[start], CultureInfo.InvariantCulture)).Append(fieldName, start + 1, fieldName.Length - start - 1); + return PooledBuilder.ToStringAndReturn(builder); } /// Gets nullability information for a generated property. @@ -75,8 +82,9 @@ internal void GetNullabilityInfo( internal string GetGeneratedFieldName() { var propertyName = propertySymbol.Name; - - return $"_{char.ToLower(propertyName[0], CultureInfo.InvariantCulture)}{propertyName[1..]}"; + var builder = PooledBuilder.Rent(propertyName.Length + 1); + _ = builder.Append('_').Append(char.ToLower(propertyName[0], CultureInfo.InvariantCulture)).Append(propertyName, 1, propertyName.Length - 1); + return PooledBuilder.ToStringAndReturn(builder); } /// Gets nullability information for a generated property. @@ -97,14 +105,14 @@ internal void GetNullabilityInfo( /// Determines whether a containing type supports ReactiveUI-generated members. /// The type that owns the annotated member. /// Whether the containing type is a supported ReactiveUI observable type. - private static bool IsTargetTypeValid(INamedTypeSymbol containingType) - { - var isObservableObject = containingType.InheritsFromFullyQualifiedMetadataName(ReactiveObjectTypeName); - var isIObservableObject = containingType.ImplementsFullyQualifiedMetadataName(ReactiveObjectInterfaceTypeName); - var hasObservableObjectAttribute = containingType.HasOrInheritsAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.ReactiveObjectAttributeType); - - return isIObservableObject || isObservableObject || hasObservableObjectAttribute; - } + /// + /// The checks run cheapest first and stop at the first that holds. The attribute check comes last: it reads the + /// attributes of every base type, which makes the compiler bind them. + /// + private static bool IsTargetTypeValid(INamedTypeSymbol containingType) => + containingType.InheritsFromFullyQualifiedMetadataName(ReactiveObjectTypeName) + || containingType.ImplementsFullyQualifiedMetadataName(ReactiveObjectInterfaceTypeName) + || containingType.HasOrInheritsAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.ReactiveObjectAttributeType); /// Gets nullability information for a property generated from a type. /// The member type to evaluate. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ITypeSymbolExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ITypeSymbolExtensions.cs index 1fe0c944..46b9a668 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ITypeSymbolExtensions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ITypeSymbolExtensions.cs @@ -123,13 +123,14 @@ internal bool HasOrInheritsAttributeWithFullyQualifiedMetadataName(string name) /// Checks whether or not a given type symbol has a specified fully qualified metadata name. /// The full name to check. /// Whether the type symbol has a full name equal to . + /// + /// The name is compared segment by segment against the symbol chain rather than built first: this runs for every + /// base type and interface a validity check walks, so building the name would allocate for each of them. + /// internal bool HasFullyQualifiedMetadataName(string name) { - using var builder = ImmutableArrayBuilder.Rent(); - - AppendFullyQualifiedMetadataName(typeSymbol, builder); - - return builder.WrittenSpan.StartsWith(name.AsSpan()); + var position = 0; + return MatchMetadataName(typeSymbol, name, ref position) && position == name.Length; } /// Checks whether a type symbol's metadata name contains a given value. @@ -141,7 +142,7 @@ internal bool ContainsFullyQualifiedMetadataName(string name) AppendFullyQualifiedMetadataName(typeSymbol, builder); - return builder.WrittenSpan.ToString().Contains(name); + return builder.WrittenSpan.IndexOf(name.AsSpan()) >= 0; } /// Gets the fully qualified metadata name for a given instance. @@ -261,6 +262,85 @@ internal bool IsObservableBoolType() } + /// Matches the start of a name against the metadata name a symbol would build, without building it. + /// The symbol, walked outermost namespace first. + /// The name to compare with. + /// The number of characters of matched so far. + /// at the first character that differs; otherwise . + /// Mirrors , character for character. + private static bool MatchMetadataName(ISymbol? current, string name, ref int position) => current switch + { + INamespaceSymbol namespaceSymbol => MatchNamespaceName(namespaceSymbol, name, ref position), + ITypeSymbol typeSymbol => MatchTypeName(typeSymbol, name, ref position), + _ => true, + }; + + /// Matches the start of a name against a namespace's dotted name. + /// The namespace. + /// The name to compare with. + /// The number of characters of matched so far. + /// at the first character that differs; otherwise . + private static bool MatchNamespaceName(INamespaceSymbol namespaceSymbol, string name, ref int position) => + namespaceSymbol.IsGlobalNamespace + || ((namespaceSymbol.ContainingNamespace.IsGlobalNamespace + || (MatchNamespaceName(namespaceSymbol.ContainingNamespace, name, ref position) && MatchCharacter('.', name, ref position))) + && MatchText(namespaceSymbol.MetadataName, name, ref position)); + + /// Matches the start of a name against a type's metadata name, containing types joined by +. + /// The type. + /// The name to compare with. + /// The number of characters of matched so far. + /// at the first character that differs; otherwise . + private static bool MatchTypeName(ITypeSymbol currentType, string name, ref int position) + { + var containerMatches = currentType.ContainingSymbol switch + { + ITypeSymbol containingType => MatchMetadataName(containingType, name, ref position) && MatchCharacter('+', name, ref position), + INamespaceSymbol { IsGlobalNamespace: false } containingNamespace => MatchMetadataName(containingNamespace, name, ref position) && MatchCharacter('.', name, ref position), + _ => true, + }; + + return containerMatches && MatchText(currentType.MetadataName, name, ref position); + } + + /// Matches one segment of a metadata name; once the name is exhausted, everything further matches. + /// The segment. + /// The name to compare with. + /// The number of characters of matched so far. + /// Whether the segment matches. + private static bool MatchText(string text, string name, ref int position) + { + var count = Math.Min(text.Length, name.Length - position); + if (count > 0 && string.CompareOrdinal(text, 0, name, position, count) != 0) + { + return false; + } + + position += count; + return true; + } + + /// Matches one separator character of a metadata name; once the name is exhausted, everything further matches. + /// The separator. + /// The name to compare with. + /// The number of characters of matched so far. + /// Whether the separator matches. + private static bool MatchCharacter(char character, string name, ref int position) + { + if (position >= name.Length) + { + return true; + } + + if (name[position] != character) + { + return false; + } + + position++; + return true; + } + /// Appends the fully qualified metadata name for a given symbol to a target builder. /// The input instance. /// The target instance. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs index 7c1e779d..7f7176f0 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; @@ -31,8 +32,12 @@ internal sealed record TargetInfo( /// The generated target information. internal static TargetInfo From(INamedTypeSymbol namedTypeSymbol) { - var targetHintName = namedTypeSymbol.GetFullyQualifiedMetadataName().Replace("<", "_").Replace(">", "_"); - var targetName = namedTypeSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat); + var targetHintName = ToHintName(namedTypeSymbol.GetFullyQualifiedMetadataName()); + + // A plain type's display name is its name; only a generic or a keyword-named type needs the display format. + var targetName = namedTypeSymbol.IsGenericType || SyntaxFacts.GetKeywordKind(namedTypeSymbol.Name) != SyntaxKind.None + ? namedTypeSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat) + : namedTypeSymbol.Name; var targetNamespace = namedTypeSymbol.ContainingNamespace.ToDisplayString(SymbolHelpers.DefaultDisplay); var targetNameWithNamespace = namedTypeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); var targetAccessibility = namedTypeSymbol.GetAccessibilityString(); @@ -127,4 +132,12 @@ private static string GenerateClosingBrackets(int numberOfBrackets) return closingBrackets; } + + /// Makes a metadata name safe for a hint name, replacing angle brackets only when there are any. + /// The fully qualified metadata name. + /// The hint name. + private static string ToHintName(string metadataName) => + metadataName.IndexOf('<') < 0 && metadataName.IndexOf('>') < 0 + ? metadataName + : metadataName.Replace('<', '_').Replace('>', '_'); } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs index fc086cd1..b5a32ab4 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs @@ -421,9 +421,20 @@ private static void WriteLines(SourceWriter writer, EquatableArray lines private static EquatableArray GetAlsoNotifyValues(AttributeData attributeData, string propertyName, SemanticModel semanticModel, CancellationToken token) { using var builder = ImmutableArrayBuilder.Rent(); - foreach (var notify in attributeData.GetConstructorArguments()) + + // Read in place rather than through an iterator: the names arrive as the params array's elements. + foreach (var argument in attributeData.ConstructorArguments) { - AddAlsoNotifyValue(builder, notify, propertyName); + if (argument.Kind != TypedConstantKind.Array) + { + AddAlsoNotifyValue(builder, argument.Value as string, propertyName); + continue; + } + + foreach (var item in argument.Values) + { + AddAlsoNotifyValue(builder, item.Value as string, propertyName); + } } if (builder.Count == 0 && attributeData.ApplicationSyntaxReference?.GetSyntax(token) is AttributeSyntax attributeSyntax) @@ -454,6 +465,13 @@ private static void AddAlsoNotifySyntaxArguments( foreach (var argument in arguments) { + // Named arguments such as SetModifier are settings, never notified property names; evaluating them + // would make the compiler bind and flow-analyse each one. + if (argument.NameEquals is not null) + { + continue; + } + var constantValue = semanticModel.GetConstantValue(argument.Expression, token); AddAlsoNotifyValue(builder, constantValue.HasValue ? constantValue.Value as string : null, propertyName); } From 3a9891b03a244fa4125d02df97abe2c2a7a04a91 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:24:24 +1000 Subject: [PATCH 11/30] refactor: write [BindableDerivedList] properties through the indentation-aware writer Emission now appends straight into a rented SourceWriter, opening the containing types once per type group instead of building raw strings and joined declarations. Generated output is token-identical; snapshots change in whitespace only. --- ...DLG.FRxProps#TestNs.TestVM.Bdl.verified.cs | 3 +- .../DLE.AccMods#TestNs.TestVM.Bdl.verified.cs | 1 - .../DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs | 3 +- ...LE.DateTimeT#TestNs.TestVM.Bdl.verified.cs | 3 +- .../DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs | 3 +- .../DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs | 3 +- .../DLE.EnumT#TestNs.TestVM.Bdl.verified.cs | 3 +- ...LE.GenClass#TestNs.GenVM`1.Bdl.verified.cs | 3 +- .../DLE.GuidT#TestNs.TestVM.Bdl.verified.cs | 3 +- ...assGenPublicProp#TestNs.Vm.Bdl.verified.cs | 1 - ...E.InterfaceT#TestNs.TestVM.Bdl.verified.cs | 3 +- ...E.MultiLists#TestNs.TestVM.Bdl.verified.cs | 3 +- ...uterVM+InnerVM+DeepInnerVM.Bdl.verified.cs | 22 +-- ...ass#TestNs.OuterVM+InnerVM.Bdl.verified.cs | 16 +- ...E.NestClass#TestNs.OuterVM.Bdl.verified.cs | 3 +- ...NullElements#TestNs.TestVM.Bdl.verified.cs | 3 +- ...dClass#TestNs.TestVMRecord.Bdl.verified.cs | 3 +- .../DLE.StructT#TestNs.TestVM.Bdl.verified.cs | 3 +- .../DLE.TupleT#TestNs.TestVM.Bdl.verified.cs | 3 +- .../DLE.WRx#TestNs.TestVM.Bdl.verified.cs | 3 +- .../BindableDerivedListGenerator.Execute.cs | 175 ++++-------------- .../BindableDerivedListGenerator.cs | 2 +- 22 files changed, 72 insertions(+), 193 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 a59391be..de17dfde 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 51b6f37c..32f52fce 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// 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 ca5f4775..5248b963 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 2ed8ef7f..531d7ba9 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -21,4 +20,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 15396e56..0286f182 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 @@ -9,7 +9,6 @@ namespace Namespace1 { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 2e67d3f4..ede555ee 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 @@ -9,7 +9,6 @@ namespace Namespace2 { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 33eeeff8..e7df159d 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 201d33d6..bed3a1e7 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class GenericVM { /// @@ -18,4 +17,4 @@ public partial class GenericVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 5d417e5a..2a431a08 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 666ec0d0..bc7a8534 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 @@ -9,7 +9,6 @@ namespace TestNs { - internal partial class ViewModel { /// 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 1d65ddce..914c3081 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -21,4 +20,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 e20ef2ea..c18c7584 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -24,4 +23,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 4f05c1b9..937ad1ef 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 @@ -10,19 +10,17 @@ namespace TestNs { public partial class OuterVM -{ -public partial class InnerVM -{ - - public partial class DeepInnerVM { - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.ObjectModel.ReadOnlyObservableCollection? DeepList => _deepList; + public partial class InnerVM + { + public partial class DeepInnerVM + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::System.Collections.ObjectModel.ReadOnlyObservableCollection? DeepList => _deepList; + } + } } -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 fd893abb..1195c9dd 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 @@ -10,16 +10,14 @@ namespace TestNs { public partial class OuterVM -{ - - public partial class InnerVM { - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.ObjectModel.ReadOnlyObservableCollection? InnerList => _innerList; + public partial class InnerVM + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::System.Collections.ObjectModel.ReadOnlyObservableCollection? InnerList => _innerList; + } } } - -} #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 b44a1099..2d5b3509 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class OuterVM { /// @@ -18,4 +17,4 @@ public partial class OuterVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 9ddf0bfe..189f4304 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 4146e6ba..50cdba36 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial record TestVMRecord { /// @@ -21,4 +20,4 @@ public partial record TestVMRecord } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 b4825acb..9624109c 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 54ab92b1..96ac3433 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -18,4 +17,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore 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 feec854c..15230a9f 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 @@ -9,7 +9,6 @@ namespace TestNs { - public partial class TestVM { /// @@ -21,4 +20,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs index 9db694e9..3c6b635e 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs @@ -3,12 +3,13 @@ // See the LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; using System.Collections.Immutable; -using System.Text; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; using ReactiveUI.SourceGenerators.BindableDerivedList.Models; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -37,6 +38,9 @@ public sealed partial class BindableDerivedListGenerator /// Represents the private-protected accessibility option. private const int PrivateProtectedAccessModifier = 5; + /// The GeneratedCode attribute stamped on the generated properties, built once. + private static readonly string GeneratedCodeAttribute = SourceWriterExtensions.GeneratedCodeAttribute(GeneratorName, GeneratorVersion); + /// Creates metadata for a BindableDerivedList-annotated field. /// The attribute syntax context for the field. /// The cancellation token for the generator operation. @@ -170,152 +174,49 @@ private static (bool IsReferenceType, bool IncludeMemberNotNull) GetNullabilityI return (isReferenceTypeOrUnconstraindTypeParameter, includeMemberNotNullOnSetAccessor); } - /// Generates the complete source document for a BindableDerivedList declaration. - /// The name of the containing type. - /// The containing namespace. - /// The containing type visibility. - /// The containing type kind. - /// The generated property metadata. - /// The generated source document. - private static string GenerateSource( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - BindableDerivedListInfo[] properties) - { - // Get Parent class details from properties.ParentInfo - var (parentClassDeclarationsString, closingBrackets) = TargetInfo.GenerateParentClassDeclarations(GetParentInfos(properties)); - - var classes = GenerateClassWithProperties(containingTypeName, containingClassVisibility, containingType, properties); - - return -$$""" -// -using System.Collections.ObjectModel; -using DynamicData; -using ReactiveUI; - -#pragma warning disable -#nullable enable - -namespace {{containingNamespace}} -{ - {{parentClassDeclarationsString}}{{classes}}{{closingBrackets}} -} -#nullable restore -#pragma warning restore -"""; - } - - /// Generates the source code. - /// The contain type name. - /// The containing class visibility. - /// The containing type. - /// The properties. - /// The value. - private static string GenerateClassWithProperties( - string containingTypeName, - string containingClassVisibility, - string containingType, - BindableDerivedListInfo[] properties) - { - // Includes 2 tabs from the property declarations so no need to add them here. - var propertyDeclarations = GetPropertyDeclarations(properties); - - return -$$""" - - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} - { - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] -{{propertyDeclarations}} - } -"""; - } - - /// Generates property declarations for the given observable method information. - /// Metadata about the observable property. - /// A string containing the generated code for the property. - private static string GetPropertySyntax(BindableDerivedListInfo propertyInfo) - { - if (propertyInfo.PropertyName is null) - { - return string.Empty; - } - - var propertyAttributes = GetPropertyAttributes(propertyInfo); - - return -$$""" - /// - {{propertyAttributes}} - {{propertyInfo.AccessModifier}} {{propertyInfo.TypeNameWithNullabilityAnnotations}} {{propertyInfo.PropertyName}} => {{propertyInfo.FieldName}}; -"""; - } - - /// Gets parent information for each generated property. - /// The generated property metadata. - /// The parent information for the generated properties. - private static TargetInfo?[] GetParentInfos(BindableDerivedListInfo[] properties) - { - var parentInfos = new TargetInfo?[properties.Length]; - for (var index = 0; index < properties.Length; index++) - { - parentInfos[index] = properties[index].TargetInfo.ParentInfo; - } - - return parentInfos; - } - - /// Gets the generated property declarations. - /// The generated property metadata. - /// The generated property declarations. - private static string GetPropertyDeclarations(BindableDerivedListInfo[] properties) + /// Generates the partial declaration holding one type's bindable derived list properties. + /// The properties the type declares, all sharing one . + /// The file's text. + private static string GenerateSource(List properties) { - var builder = new StringBuilder(); - for (var index = 0; index < properties.Length; index++) + var target = properties[0].TargetInfo; + var writer = SourceWriter.Rent() + .AutoGenerated() + .Using("System.Collections.ObjectModel") + .Using("DynamicData") + .Using("ReactiveUI") + .BlankLine() + .DisableWarningsEnableNullable() + .BlankLine(); + + var depth = writer.OpenNamespace(target.TargetNamespace) + writer.OpenContainingTypes(target.ParentInfo); + + // The GeneratedCode attribute has always been stamped once, ahead of the first property. + _ = writer.OpenPartialType(target).Line(GeneratedCodeAttribute); + for (var i = 0; i < properties.Count; i++) { - if (index > 0) - { - _ = builder.Append('\n'); - } - - _ = builder.Append(GetPropertySyntax(properties[index])); + WriteProperty(writer, properties[i]); } - return builder.ToString(); + return writer.CloseBlock() + .CloseBlocks(depth) + .RestoreNullableAndWarnings() + .ToStringAndReturn(); } - /// Gets attributes applied to a generated property. - /// The source field metadata. - /// The property attributes separated by generated-code indentation. - private static string GetPropertyAttributes(BindableDerivedListInfo propertyInfo) + /// Writes one read-only property exposing a bindable derived list field. + /// The writer, at the level of the type's members. + /// The property. + private static void WriteProperty(SourceWriter writer, BindableDerivedListInfo propertyInfo) { - var builder = new StringBuilder(); - foreach (var attribute in AttributeDefinitions.ExcludeFromCodeCoverage) - { - AppendPropertyAttribute(builder, attribute); - } - + _ = writer.InheritDoc(propertyInfo.FieldName).ExcludeFromCodeCoverage(); foreach (var attribute in propertyInfo.ForwardedAttributes.AsImmutableArray()) { - AppendPropertyAttribute(builder, attribute); - } - - return builder.ToString(); - } - - /// Appends a generated property attribute with the required separator. - /// The destination builder. - /// The attribute source. - private static void AppendPropertyAttribute(StringBuilder builder, string attribute) - { - if (builder.Length > 0) - { - _ = builder.Append("\n "); + _ = writer.Line(attribute); } - _ = builder.Append(attribute); + _ = writer.Append(propertyInfo.AccessModifier).Append(' ') + .Append(propertyInfo.TypeNameWithNullabilityAnnotations).Append(' ') + .Append(propertyInfo.PropertyName).Append(" => ").Append(propertyInfo.FieldName).EndStatement(); } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs index 2d638e54..878cfbbd 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs @@ -75,7 +75,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) foreach (var grouping in groupedPropertyInfo) { - var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, grouping.Value.ToArray()); + var source = GenerateSource(grouping.Value); context.AddSource($"{grouping.Key.FileHintName}.BindableDerivedList.g.cs", source); } }); From 78e394a5648140d06f73735b8162f6d14734e6cf Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:24:24 +1000 Subject: [PATCH 12/30] refactor: write [ReactiveCollection] properties through the indentation-aware writer Emission now appends straight into a rented SourceWriter, opening the containing types once per type group instead of building raw strings and joined declarations. Generated output is token-identical; snapshots change in whitespace only. --- ...yteArray#TestNs.TestVM.RxColls.verified.cs | 3 +- ...CE.CplxT#TestNs.TestVM.RxColls.verified.cs | 3 +- ...DateTime#TestNs.TestVM.RxColls.verified.cs | 3 +- .../RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs | 3 +- .../RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs | 3 +- ...RCE.Enum#TestNs.TestVM.RxColls.verified.cs | 3 +- ...RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs | 3 +- ...RCE.Guid#TestNs.TestVM.RxColls.verified.cs | 3 +- ...nterface#TestNs.TestVM.RxColls.verified.cs | 3 +- ...CE.Multi#TestNs.TestVM.RxColls.verified.cs | 3 +- ...VM+InnerVM+DeepInnerVM.RxColls.verified.cs | 52 ++-- ...TestNs.OuterVM+InnerVM.RxColls.verified.cs | 46 ++-- ...CE.Nest#TestNs.OuterVM.RxColls.verified.cs | 3 +- ...RCE.Null#TestNs.TestVM.RxColls.verified.cs | 3 +- ...rd#TestNs.TestVMRecord.RxColls.verified.cs | 3 +- ...E.Struct#TestNs.TestVM.RxColls.verified.cs | 3 +- ...CE.Tuple#TestNs.TestVM.RxColls.verified.cs | 3 +- .../RCE.WRx#TestNs.TestVM.RxColls.verified.cs | 3 +- ...sicField#TestNs.TestVM.RxColls.verified.cs | 3 +- .../ReactiveCollectionGenerator.Execute.cs | 238 ++++++------------ .../ReactiveCollectionGenerator.cs | 8 +- 21 files changed, 141 insertions(+), 254 deletions(-) diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs index fb69f668..eaea604b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs index 5b8d9e77..a6ae1e4f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs index d9acf853..63bddba1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -63,4 +62,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs index 8c346c16..e328a26f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace Namespace1 { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs index a5322851..d94072c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace Namespace2 { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs index 4d09aae3..e7f7289b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs index f8c9330a..0b2cd394 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class GenericVM { /// @@ -39,4 +38,4 @@ public partial class GenericVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs index 31ee6c89..58f90dca 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs index c5a86a70..a32660ad 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -63,4 +62,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs index 8e142ad6..45bb19b4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -87,4 +86,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs index 8ab4a46b..089725b4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs @@ -7,43 +7,41 @@ namespace TestNs { public partial class OuterVM -{ -public partial class InnerVM -{ - - public partial class DeepInnerVM { - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.ObjectModel.ObservableCollection? DeepCollection + public partial class InnerVM { - get => _deepCollection; - set + public partial class DeepInnerVM { - if (value == null) + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::System.Collections.ObjectModel.ObservableCollection? DeepCollection { - DeepCollection.CollectionChanged -= CollectionChanged(this, nameof(DeepCollection)); - } + get => _deepCollection; + set + { + if (value == null) + { + DeepCollection.CollectionChanged -= CollectionChanged(this, nameof(DeepCollection)); + } - _deepCollection = value; - this.RaisePropertyChanged(nameof(DeepCollection)); + _deepCollection = value; + this.RaisePropertyChanged(nameof(DeepCollection)); - if (_deepCollection != null) - { - // Remove the old handler if it exists - DeepCollection.CollectionChanged -= CollectionChanged(this, nameof(DeepCollection)); + if (_deepCollection != null) + { + // Remove the old handler if it exists + DeepCollection.CollectionChanged -= CollectionChanged(this, nameof(DeepCollection)); - DeepCollection.CollectionChanged += CollectionChanged(this, nameof(DeepCollection)); + DeepCollection.CollectionChanged += CollectionChanged(this, nameof(DeepCollection)); + } + } } + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs index fac04909..8b38c25f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs @@ -7,40 +7,38 @@ namespace TestNs { public partial class OuterVM -{ - - public partial class InnerVM { - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::System.Collections.ObjectModel.ObservableCollection? InnerCollection + public partial class InnerVM { - get => _innerCollection; - set + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::System.Collections.ObjectModel.ObservableCollection? InnerCollection { - if (value == null) + get => _innerCollection; + set { - InnerCollection.CollectionChanged -= CollectionChanged(this, nameof(InnerCollection)); - } + if (value == null) + { + InnerCollection.CollectionChanged -= CollectionChanged(this, nameof(InnerCollection)); + } - _innerCollection = value; - this.RaisePropertyChanged(nameof(InnerCollection)); + _innerCollection = value; + this.RaisePropertyChanged(nameof(InnerCollection)); - if (_innerCollection != null) - { - // Remove the old handler if it exists - InnerCollection.CollectionChanged -= CollectionChanged(this, nameof(InnerCollection)); + if (_innerCollection != null) + { + // Remove the old handler if it exists + InnerCollection.CollectionChanged -= CollectionChanged(this, nameof(InnerCollection)); - InnerCollection.CollectionChanged += CollectionChanged(this, nameof(InnerCollection)); + InnerCollection.CollectionChanged += CollectionChanged(this, nameof(InnerCollection)); + } } } - } - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); + } } } - -} #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs index 212c810d..ab2e11a4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class OuterVM { /// @@ -39,4 +38,4 @@ public partial class OuterVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs index 60bc3de0..093633b0 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -63,4 +62,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs index b3f5e61a..85eb0671 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial record TestVMRecord { /// @@ -63,4 +62,4 @@ public partial record TestVMRecord } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs index a7ee5a8b..7c7131fe 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs index 244d9f41..fe4bde17 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs index 6b7f5f58..e79dd374 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -63,4 +62,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs index 52dbc418..24730ea9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs @@ -6,7 +6,6 @@ #nullable enable namespace TestNs { - public partial class TestVM { /// @@ -39,4 +38,4 @@ public partial class TestVM } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs index d186b401..23c5cb30 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs @@ -3,11 +3,12 @@ // See the LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; using System.Collections.Immutable; -using System.Text; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -18,6 +19,20 @@ namespace ReactiveUI.SourceGenerators; /// Implements ReactiveCollection source generation. public sealed partial class ReactiveCollectionGenerator { + /// Gets the generator type name used in generated-code metadata. + internal static readonly string GeneratorName = typeof(ReactiveCollectionGenerator).FullName!; + + /// Gets the generator assembly version used in generated-code metadata. + internal static readonly string GeneratorVersion = typeof(ReactiveCollectionGenerator).Assembly.GetName().Version.ToString(); + + /// The helper that turns a collection's changes into property changes, kept on the one line it has always been. + private const string CollectionChangedDeclaration = + "private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler " + + "CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName);"; + + /// The GeneratedCode attribute stamped on the generated properties, built once. + private static readonly string GeneratedCodeAttribute = SourceWriterExtensions.GeneratedCodeAttribute(GeneratorName, GeneratorVersion); + /// Creates metadata for a ReactiveCollection-annotated field. /// The attribute syntax context for the field. /// The cancellation token for the generator operation. @@ -161,179 +176,78 @@ private static (bool IsReferenceType, bool IncludeMemberNotNull) GetNullabilityI return variables.Count > 0 ? variables[0].Initializer?.ToFullString() : null; } - /// Generates the complete source document for reactive collection declarations. - /// The name of the containing type. - /// The containing namespace. - /// The containing type visibility. - /// The containing type kind. - /// The generated property metadata. - /// The selected ReactiveUI integration metadata. - /// The generated source document. - private static string GenerateSource( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - ReactiveCollectionFieldInfo[] properties, - ReactiveUiIntegration integration) - { - // Get Parent class details from properties.ParentInfo - var (parentClassDeclarationsString, closingBrackets) = TargetInfo.GenerateParentClassDeclarations(GetParentInfos(properties)); - - var classes = GenerateClassWithProperties(containingTypeName, containingClassVisibility, containingType, properties); - - return $$""" -// -{{integration.UsingDirectives}} - -#pragma warning disable -#nullable enable -namespace {{containingNamespace}} -{ - {{parentClassDeclarationsString}}{{classes}}{{closingBrackets}} -} -#nullable restore -#pragma warning restore -"""; - } - - /// Generates the source code. - /// The contain type name. - /// The containing class visibility. - /// The containing type. - /// The properties. - /// The value. - private static string GenerateClassWithProperties( - string containingTypeName, - string containingClassVisibility, - string containingType, - ReactiveCollectionFieldInfo[] properties) - { - // Includes 2 tabs from the property declarations so no need to add them here. - var propertyDeclarations = GetPropertyDeclarations(properties); - var collectionChangedDeclaration = GetCollectionChangedDeclaration(); - - return -$$""" - - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} - { - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] -{{propertyDeclarations}} - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] -{{collectionChangedDeclaration}} - } -"""; - } - - /// Creates the collection-change helper while preserving its generated one-line format. - /// The generated collection-change helper declaration. - private static string GetCollectionChangedDeclaration() - { - var builder = new StringBuilder(" private static global::System.Collections.Specialized."); - _ = builder.Append("NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, "); - _ = builder.Append("string propName)=> (_, _) => @this.RaisePropertyChanged(propName);"); - return builder.ToString(); - } - - /// Generates a property declaration for a reactive collection field. - /// The source field metadata. - /// The generated property declaration. - private static string GetPropertySyntax(ReactiveCollectionFieldInfo propertyInfo) - { - var propertyAttributes = GetPropertyAttributes(propertyInfo); - - return $$""" - /// - {{propertyAttributes}} - public {{propertyInfo.TypeNameWithNullabilityAnnotations}} {{propertyInfo.PropertyName}} - { - get => {{propertyInfo.FieldName}}; - set - { - if (value == null) - { - {{propertyInfo.PropertyName}}.CollectionChanged -= CollectionChanged(this, nameof({{propertyInfo.PropertyName}})); - } - - {{propertyInfo.FieldName}} = value; - this.RaisePropertyChanged(nameof({{propertyInfo.PropertyName}})); - - if ({{propertyInfo.FieldName}} != null) - { - // Remove the old handler if it exists - {{propertyInfo.PropertyName}}.CollectionChanged -= CollectionChanged(this, nameof({{propertyInfo.PropertyName}})); - - {{propertyInfo.PropertyName}}.CollectionChanged += CollectionChanged(this, nameof({{propertyInfo.PropertyName}})); - } - } - } -"""; - } - - /// Gets parent information for each generated property. - /// The generated property metadata. - /// The parent information for the generated properties. - private static TargetInfo?[] GetParentInfos(ReactiveCollectionFieldInfo[] properties) - { - var parentInfos = new TargetInfo?[properties.Length]; - for (var index = 0; index < properties.Length; index++) - { - parentInfos[index] = properties[index].TargetInfo.ParentInfo; - } - - return parentInfos; - } - - /// Gets the generated property declarations. - /// The generated property metadata. - /// The generated property declarations. - private static string GetPropertyDeclarations(ReactiveCollectionFieldInfo[] properties) + /// Generates the partial declaration holding one type's reactive collection properties. + /// The properties the type declares, all sharing one . + /// The selected ReactiveUI API surface. + /// The file's text. + private static string GenerateSource(List properties, ReactiveUiIntegration integration) { - var builder = new StringBuilder(); - for (var index = 0; index < properties.Length; index++) + var target = properties[0].TargetInfo; + var writer = SourceWriter.Rent() + .AutoGenerated() + .Lines(integration.UsingDirectives) + .BlankLine() + .DisableWarningsEnableNullable(); + + var depth = writer.OpenNamespace(target.TargetNamespace) + writer.OpenContainingTypes(target.ParentInfo); + + // The GeneratedCode attribute has always been stamped once, ahead of the first property. + _ = writer.OpenPartialType(target).Line(GeneratedCodeAttribute); + for (var i = 0; i < properties.Count; i++) { - if (index > 0) - { - _ = builder.Append('\n'); - } - - _ = builder.Append(GetPropertySyntax(properties[index])); + WriteProperty(writer, properties[i]); } - return builder.ToString(); + return writer.BlankLine() + .ExcludeFromCodeCoverage() + .Line(CollectionChangedDeclaration) + .CloseBlock() + .CloseBlocks(depth) + .RestoreNullableAndWarnings() + .ToStringAndReturn(); } - /// Gets attributes applied to a generated property. - /// The source field metadata. - /// The property attributes separated by generated-code indentation. - private static string GetPropertyAttributes(ReactiveCollectionFieldInfo propertyInfo) + /// Writes one reactive collection property, which re-raises the collection's changes as property changes. + /// The writer, at the level of the type's members. + /// The property. + private static void WriteProperty(SourceWriter writer, ReactiveCollectionFieldInfo propertyInfo) { - var builder = new StringBuilder(); - foreach (var attribute in AttributeDefinitions.ExcludeFromCodeCoverage) - { - AppendPropertyAttribute(builder, attribute); - } + var fieldName = propertyInfo.FieldName; + var propertyName = propertyInfo.PropertyName; + _ = writer.InheritDoc(fieldName).ExcludeFromCodeCoverage(); foreach (var attribute in propertyInfo.ForwardedAttributes.AsImmutableArray()) { - AppendPropertyAttribute(builder, attribute); + _ = writer.Line(attribute); } - return builder.ToString(); + _ = writer.Append("public ").Append(propertyInfo.TypeNameWithNullabilityAnnotations).Append(' ').Line(propertyName) + .OpenBlock() + .Append("get => ").Append(fieldName).EndStatement() + .Line("set") + .OpenBlock() + .Line("if (value == null)") + .OpenBlock(); + WriteCollectionChangedHandler(writer, propertyName, " -= "); + _ = writer.CloseBlock() + .BlankLine() + .Append(fieldName).Line(" = value;") + .Append("this.RaisePropertyChanged(nameof(").Append(propertyName).Line("));") + .BlankLine() + .Append("if (").Append(fieldName).Line(" != null)") + .OpenBlock() + .Line("// Remove the old handler if it exists"); + WriteCollectionChangedHandler(writer, propertyName, " -= "); + _ = writer.BlankLine(); + WriteCollectionChangedHandler(writer, propertyName, " += "); + _ = writer.CloseBlock().CloseBlock().CloseBlock(); } - /// Appends a generated property attribute with the required separator. - /// The destination builder. - /// The attribute source. - private static void AppendPropertyAttribute(StringBuilder builder, string attribute) - { - if (builder.Length > 0) - { - _ = builder.Append("\n "); - } - - _ = builder.Append(attribute); - } + /// Writes a statement that subscribes or unsubscribes the property's collection-changed handler. + /// The writer. + /// The generated property name. + /// The event operator, += or -= , with its surrounding spaces. + private static void WriteCollectionChangedHandler(SourceWriter writer, string propertyName, string assignment) => + _ = writer.Append(propertyName).Append(".CollectionChanged").Append(assignment) + .Append("CollectionChanged(this, nameof(").Append(propertyName).Line("));"); } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs index 7e190911..e31b2819 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs @@ -17,12 +17,6 @@ namespace ReactiveUI.SourceGenerators; [Generator(LanguageNames.CSharp)] public sealed partial class ReactiveCollectionGenerator : IIncrementalGenerator { - /// Gets the generator type name used in generated-code metadata. - internal static readonly string GeneratorName = typeof(ReactiveCollectionGenerator).FullName!; - - /// Gets the generator assembly version used in generated-code metadata. - internal static readonly string GeneratorVersion = typeof(ReactiveCollectionGenerator).Assembly.GetName().Version.ToString(); - /// public void Initialize(IncrementalGeneratorInitializationContext context) { @@ -89,7 +83,7 @@ private static void RunReactiveCollectionFromField(in IncrementalGeneratorInitia foreach (var grouping in groupedPropertyInfo) { - var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, grouping.Value.ToArray(), input.Right); + var source = GenerateSource(grouping.Value, input.Right); context.AddSource($"{grouping.Key.FileHintName}.ReactiveCollections.g.cs", source); } }); From 6ccfd11071f8de477404e1dcdd87d15cd3f8ff55 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:24:38 +1000 Subject: [PATCH 13/30] refactor: write [ReactiveCommand] commands through the indentation-aware writer Commands are emitted straight into SourceWriter instead of nested raw strings and StringBuilders; command and field names are written from the method name without intermediate strings, and XML docs are stored unindented. Generated output is token-identical; only whitespace changes. --- ...ltiRxCmds#TestNs.TestVM.RxCmds.verified.cs | 12 +- ...er+Middle+Inner+Deepest.RxCmds.verified.cs | 29 +- ...stNs.Outer+Middle+Inner.RxCmds.verified.cs | 25 +- ...ass#TestNs.Outer+Middle.RxCmds.verified.cs | 19 +- ...yNestClass#TestNs.Outer.RxCmds.verified.cs | 6 +- ...GenClass#TestNs.GenVM`1.RxCmds.verified.cs | 6 +- ...ass#TestNs.TestVMRecord.RxCmds.verified.cs | 8 +- ...rrayParam#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...anExecute#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...uteMethod#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...Scheduler#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...lxGenRetT#TestNs.TestVM.RxCmds.verified.cs | 8 +- ...FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...dWCtParam#TestNs.TestVM.RxCmds.verified.cs | 4 +- ...gateParam#TestNs.TestVM.RxCmds.verified.cs | 8 +- ...EnumParam#TestNs.TestVM.RxCmds.verified.cs | 8 +- ...ltiParams#TestNs.TestVM.RxCmds.verified.cs | 4 +- ...NullParam#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...mdWObsRet#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...rivateAcc#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...tectedAcc#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...OfNullRet#TestNs.TestVM.RxCmds.verified.cs | 8 +- ...TupleRetT#TestNs.TestVM.RxCmds.verified.cs | 8 +- ...ValueTask#TestNs.TestVM.RxCmds.verified.cs | 8 +- ...larations#TestNs.TestVM.RxCmds.verified.cs | 8 +- ...RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...yncWParam#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...MDG.Basic#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...xAsyncCmd#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...TestVm3+TestInnerClass1.RxCmds.verified.cs | 19 +- ...rClass2+TestInnerClass3.RxCmds.verified.cs | 25 +- ...TestVm3+TestInnerClass2.RxCmds.verified.cs | 19 +- ...MDG.Nest#TestNs.TestVm3.RxCmds.verified.cs | 6 +- ....NullTRet#TestNs.TestVM.RxCmds.verified.cs | 4 +- ...ackground#TestNs.TestVM.RxCmds.verified.cs | 10 +- ...Scheduler#TestNs.TestVM.RxCmds.verified.cs | 6 +- ...DG.WParam#TestNs.TestVM.RxCmds.verified.cs | 4 +- .../ReactiveCommandGenerator.Execute.cs | 343 +++++++++--------- .../ReactiveCommandGenerator.cs | 8 +- 39 files changed, 294 insertions(+), 397 deletions(-) diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs index c8c0ea6a..573e825b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,30 +6,28 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _createCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand CreateCommand { get => _createCommand ??= global::ReactiveUI.ReactiveCommand.Create(Create); } - private global::ReactiveUI.ReactiveCommand? _saveCommand; + private global::ReactiveUI.ReactiveCommand? _saveCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand SaveCommand { get => _saveCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(Save, CanExecuteSave); } - private global::ReactiveUI.ReactiveCommand? _deleteCommand; + private global::ReactiveUI.ReactiveCommand? _deleteCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand DeleteCommand { get => _deleteCommand ??= global::ReactiveUI.ReactiveCommand.Create(Delete, CanExecuteDelete); } - private global::ReactiveUI.ReactiveCommand? _calculateCommand; + private global::ReactiveUI.ReactiveCommand? _calculateCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal global::ReactiveUI.ReactiveCommand CalculateCommand { get => _calculateCommand ??= global::ReactiveUI.ReactiveCommand.Create(Calculate); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs index decaca19..bc2f2ec9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs @@ -7,24 +7,21 @@ namespace TestNs { public partial class Outer -{ -public partial class Middle -{ -public partial class Inner -{ - - public partial class Deepest { - private global::ReactiveUI.ReactiveCommand? _deepestCommandCommand; - + public partial class Middle + { + public partial class Inner + { + public partial class Deepest + { + private global::ReactiveUI.ReactiveCommand? _deepestCommandCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::ReactiveUI.ReactiveCommand DeepestCommandCommand { get => _deepestCommandCommand ??= global::ReactiveUI.ReactiveCommand.Create(DeepestCommand); } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand DeepestCommandCommand { get => _deepestCommandCommand ??= global::ReactiveUI.ReactiveCommand.Create(DeepestCommand); } + } + } + } } -} -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs index e64eaf9b..fe903e80 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Outer+Middle+Inner.ReactiveCommands.g.cs +//HintName: TestNs.Outer+Middle+Inner.ReactiveCommands.g.cs // #pragma warning disable @@ -7,21 +7,18 @@ namespace TestNs { public partial class Outer -{ -public partial class Middle -{ - - public partial class Inner { - private global::ReactiveUI.ReactiveCommand? _innerCommandCommand; - + public partial class Middle + { + public partial class Inner + { + private global::ReactiveUI.ReactiveCommand? _innerCommandCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::ReactiveUI.ReactiveCommand InnerCommandCommand { get => _innerCommandCommand ??= global::ReactiveUI.ReactiveCommand.Create(InnerCommand); } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand InnerCommandCommand { get => _innerCommandCommand ??= global::ReactiveUI.ReactiveCommand.Create(InnerCommand); } + } + } } -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs index 81731555..6e03df0b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Outer+Middle.ReactiveCommands.g.cs +//HintName: TestNs.Outer+Middle.ReactiveCommands.g.cs // #pragma warning disable @@ -7,18 +7,15 @@ namespace TestNs { public partial class Outer -{ - - public partial class Middle { - private global::ReactiveUI.ReactiveCommand? _middleCommandCommand; - + public partial class Middle + { + private global::ReactiveUI.ReactiveCommand? _middleCommandCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::ReactiveUI.ReactiveCommand MiddleCommandCommand { get => _middleCommandCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(MiddleCommand); } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand MiddleCommandCommand { get => _middleCommandCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(MiddleCommand); } + } } } - -} #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs index 3b0b8370..251cda70 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Outer.ReactiveCommands.g.cs +//HintName: TestNs.Outer.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class Outer { private global::ReactiveUI.ReactiveCommand? _outerCommandCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand OuterCommandCommand { get => _outerCommandCommand ??= global::ReactiveUI.ReactiveCommand.Create(OuterCommand); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs index 33a9bda8..411adef0 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs @@ -6,20 +6,18 @@ namespace TestNs { - public partial class GenericVM { private global::ReactiveUI.ReactiveCommand? _processItemCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ProcessItemCommand { get => _processItemCommand ??= global::ReactiveUI.ReactiveCommand.Create(ProcessItem); } - private global::ReactiveUI.ReactiveCommand? _processItemLaterCommand; + private global::ReactiveUI.ReactiveCommand? _processItemLaterCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ProcessItemLaterCommand { get => _processItemLaterCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(ProcessItemLater); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs index 906549b5..8abd2895 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVMRecord.ReactiveCommands.g.cs +//HintName: TestNs.TestVMRecord.ReactiveCommands.g.cs // #pragma warning disable @@ -6,20 +6,18 @@ namespace TestNs { - public partial record TestVMRecord { private global::ReactiveUI.ReactiveCommand? _doSomethingCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand DoSomethingCommand { get => _doSomethingCommand ??= global::ReactiveUI.ReactiveCommand.Create(DoSomething); } - private global::ReactiveUI.ReactiveCommand? _getValueCommand; + private global::ReactiveUI.ReactiveCommand? _getValueCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand GetValueCommand { get => _getValueCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(GetValueAsync); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs index 1ed31895..c11b97b7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _sumArrayCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand SumArrayCommand { get => _sumArrayCommand ??= global::ReactiveUI.ReactiveCommand.Create(SumArray); } - private global::ReactiveUI.ReactiveCommand? _processStringsCommand; + private global::ReactiveUI.ReactiveCommand? _processStringsCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ProcessStringsCommand { get => _processStringsCommand ??= global::ReactiveUI.ReactiveCommand.Create(ProcessStrings); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs index a08b7075..0db5499e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _doWorkCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand DoWorkCommand { get => _doWorkCommand ??= global::ReactiveUI.ReactiveCommand.Create(DoWork, CanDoWork); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs index b764dc1c..a8dc8d9f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _runCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand RunCommand { get => _runCommand ??= global::ReactiveUI.ReactiveCommand.Create(Run, CanRun()); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs index 948e72ac..9c4fd7fa 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _executeWithSchedulerCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ExecuteWithSchedulerCommand { get => _executeWithSchedulerCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(ExecuteWithScheduler, CanExecuteCommand); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs index b914bdac..78b6e229 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand>>? _getComplexDataCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand>> GetComplexDataCommand { get => _getComplexDataCommand ??= global::ReactiveUI.ReactiveCommand.Create(GetComplexData); } - private global::ReactiveUI.ReactiveCommand>? _getAsyncComplexDataCommand; + private global::ReactiveUI.ReactiveCommand>? _getAsyncComplexDataCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand> GetAsyncComplexDataCommand { get => _getAsyncComplexDataCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(GetAsyncComplexData); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs index 93779cd4..085d8670 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _longRunningOperationCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand LongRunningOperationCommand { get => _longRunningOperationCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(LongRunningOperation); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs index ea062d14..757b8307 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _processWithCancellationCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ProcessWithCancellationCommand { get => _processWithCancellationCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(ProcessWithCancellation); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs index dd6df93d..ce32b26f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _executeActionCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ExecuteActionCommand { get => _executeActionCommand ??= global::ReactiveUI.ReactiveCommand.Create(ExecuteAction); } - private global::ReactiveUI.ReactiveCommand?, int>? _executeFuncCommand; + private global::ReactiveUI.ReactiveCommand?, int>? _executeFuncCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand?, int> ExecuteFuncCommand { get => _executeFuncCommand ??= global::ReactiveUI.ReactiveCommand.Create?, int>(ExecuteFunc); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs index 12abdb57..b32455a8 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _getStatusMessageCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand GetStatusMessageCommand { get => _getStatusMessageCommand ??= global::ReactiveUI.ReactiveCommand.Create(GetStatusMessage); } - private global::ReactiveUI.ReactiveCommand? _setStatusCommand; + private global::ReactiveUI.ReactiveCommand? _setStatusCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand SetStatusCommand { get => _setStatusCommand ??= global::ReactiveUI.ReactiveCommand.Create(SetStatus); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs index 8fdc3ae3..16070d66 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand<(int number, string text), string>? _combineValuesCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand<(int number, string text), string> CombineValuesCommand { get => _combineValuesCommand ??= global::ReactiveUI.ReactiveCommand.Create<(int number, string text), string>(CombineValues); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs index d1300a08..0db0c621 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _processNullableCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ProcessNullableCommand { get => _processNullableCommand ??= global::ReactiveUI.ReactiveCommand.Create(ProcessNullable); } - private global::ReactiveUI.ReactiveCommand? _processNullableIntCommand; + private global::ReactiveUI.ReactiveCommand? _processNullableIntCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ProcessNullableIntCommand { get => _processNullableIntCommand ??= global::ReactiveUI.ReactiveCommand.Create(ProcessNullableInt); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs index b8cc49f3..6dc9ea19 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _getObservableSequenceCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand GetObservableSequenceCommand { get => _getObservableSequenceCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromObservable(GetObservableSequence); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs index a58ae7e2..8261d489 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _privateCommandCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] private global::ReactiveUI.ReactiveCommand PrivateCommandCommand { get => _privateCommandCommand ??= global::ReactiveUI.ReactiveCommand.Create(PrivateCommand); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs index 92c96a39..4995a3be 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _protectedCommandCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected global::ReactiveUI.ReactiveCommand ProtectedCommandCommand { get => _protectedCommandCommand ??= global::ReactiveUI.ReactiveCommand.Create(ProtectedCommand); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs index 63b877ed..5d8d5108 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _getNullableStringCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand GetNullableStringCommand { get => _getNullableStringCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(GetNullableStringAsync); } - private global::ReactiveUI.ReactiveCommand? _getNullableIntCommand; + private global::ReactiveUI.ReactiveCommand? _getNullableIntCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand GetNullableIntCommand { get => _getNullableIntCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(GetNullableIntAsync); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs index dd6f90f7..bd4bc2d4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _getNamedTupleCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand GetNamedTupleCommand { get => _getNamedTupleCommand ??= global::ReactiveUI.ReactiveCommand.Create(GetNamedTuple); } - private global::ReactiveUI.ReactiveCommand? _getAsyncTupleCommand; + private global::ReactiveUI.ReactiveCommand? _getAsyncTupleCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand GetAsyncTupleCommand { get => _getAsyncTupleCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(GetAsyncTuple); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs index 2d607288..787316cc 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _doValueTaskWorkCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand DoValueTaskWorkCommand { get => _doValueTaskWorkCommand ??= global::ReactiveUI.ReactiveCommand.Create(DoValueTaskWork); } - private global::ReactiveUI.ReactiveCommand>? _getValueTaskResultCommand; + private global::ReactiveUI.ReactiveCommand>? _getValueTaskResultCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand> GetValueTaskResultCommand { get => _getValueTaskResultCommand ??= global::ReactiveUI.ReactiveCommand.Create(GetValueTaskResult); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs index 88ee9a07..b30f9c79 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,20 +6,18 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _createCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand CreateCommand { get => _createCommand ??= global::ReactiveUI.ReactiveCommand.Create(Create); } - private global::ReactiveUI.ReactiveCommand? _loadCommand; + private global::ReactiveUI.ReactiveCommand? _loadCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand LoadCommand { get => _loadCommand ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(LoadAsync); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs index 1d9a3fe9..512b74e4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _test1Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal global::ReactiveUI.ReactiveCommand Test1Command { get => _test1Command ??= global::ReactiveUI.ReactiveCommand.Create(Test1); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs index 0d1250a0..8f192a33 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _test3Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand Test3Command { get => _test3Command ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(Test3); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs index 76df3c5a..86617821 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _test1Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand Test1Command { get => _test1Command ??= global::ReactiveUI.ReactiveCommand.Create(Test1); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs index 805de3be..3abc67a9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _test1Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand Test1Command { get => _test1Command ??= global::ReactiveUI.ReactiveCommand.CreateFromTask(Test1); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs index 6eed3de1..e527ae32 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewModel3+TestInnerClass1.ReactiveCommands.g.cs +//HintName: TestNs.TestViewModel3+TestInnerClass1.ReactiveCommands.g.cs // #pragma warning disable @@ -7,18 +7,15 @@ namespace TestNs { public partial class TestViewModel3 -{ - - public partial class TestInnerClass1 { - private global::ReactiveUI.ReactiveCommand? _testI1Command; - + public partial class TestInnerClass1 + { + private global::ReactiveUI.ReactiveCommand? _testI1Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::ReactiveUI.ReactiveCommand TestI1Command { get => _testI1Command ??= global::ReactiveUI.ReactiveCommand.Create(TestI1); } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand TestI1Command { get => _testI1Command ??= global::ReactiveUI.ReactiveCommand.Create(TestI1); } + } } } - -} #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs index 59f9102a..9b552362 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewModel3+TestInnerClass2+TestInnerClass3.ReactiveCommands.g.cs +//HintName: TestNs.TestViewModel3+TestInnerClass2+TestInnerClass3.ReactiveCommands.g.cs // #pragma warning disable @@ -7,21 +7,18 @@ namespace TestNs { public partial class TestViewModel3 -{ -public partial class TestInnerClass2 -{ - - public partial class TestInnerClass3 { - private global::ReactiveUI.ReactiveCommand? _testI3Command; - + public partial class TestInnerClass2 + { + public partial class TestInnerClass3 + { + private global::ReactiveUI.ReactiveCommand? _testI3Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::ReactiveUI.ReactiveCommand TestI3Command { get => _testI3Command ??= global::ReactiveUI.ReactiveCommand.Create(TestI3); } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand TestI3Command { get => _testI3Command ??= global::ReactiveUI.ReactiveCommand.Create(TestI3); } + } + } } -} -} - } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs index 01895dd3..af037cd8 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewModel3+TestInnerClass2.ReactiveCommands.g.cs +//HintName: TestNs.TestViewModel3+TestInnerClass2.ReactiveCommands.g.cs // #pragma warning disable @@ -7,18 +7,15 @@ namespace TestNs { public partial class TestViewModel3 -{ - - public partial class TestInnerClass2 { - private global::ReactiveUI.ReactiveCommand? _testI2Command; - + public partial class TestInnerClass2 + { + private global::ReactiveUI.ReactiveCommand? _testI2Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public global::ReactiveUI.ReactiveCommand TestI2Command { get => _testI2Command ??= global::ReactiveUI.ReactiveCommand.Create(TestI2); } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::ReactiveUI.ReactiveCommand TestI2Command { get => _testI2Command ??= global::ReactiveUI.ReactiveCommand.Create(TestI2); } + } } } - -} #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs index a05aefdb..1f475af8 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewModel3.ReactiveCommands.g.cs +//HintName: TestNs.TestViewModel3.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestViewModel3 { private global::ReactiveUI.ReactiveCommand? _test1Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand Test1Command { get => _test1Command ??= global::ReactiveUI.ReactiveCommand.Create(Test1); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs index 4fceb7d2..725d0362 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _test1Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand Test1Command { get => _test1Command ??= global::ReactiveUI.ReactiveCommand.Create(Test1); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs index 29ff9c03..ece1d26b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs @@ -6,30 +6,28 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _saveCommand; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand SaveCommand { get => _saveCommand ??= global::ReactiveUI.ReactiveCommand.CreateRunInBackground(Save); } - private global::ReactiveUI.ReactiveCommand? _calculateCommand; + private global::ReactiveUI.ReactiveCommand? _calculateCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand CalculateCommand { get => _calculateCommand ??= global::ReactiveUI.ReactiveCommand.CreateRunInBackground(Calculate); } - private global::ReactiveUI.ReactiveCommand? _formatCommand; + private global::ReactiveUI.ReactiveCommand? _formatCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand FormatCommand { get => _formatCommand ??= global::ReactiveUI.ReactiveCommand.CreateRunInBackground(Format, CanRun, backgroundScheduler: null, outputScheduler: global::ReactiveUI.RxSchedulers.MainThreadScheduler); } - private global::ReactiveUI.ReactiveCommand? _foregroundCommand; + private global::ReactiveUI.ReactiveCommand? _foregroundCommand; [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand ForegroundCommand { get => _foregroundCommand ??= global::ReactiveUI.ReactiveCommand.Create(Foreground); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs index 76df3c5a..86617821 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _test1Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand Test1Command { get => _test1Command ??= global::ReactiveUI.ReactiveCommand.Create(Test1); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs index c8e086dd..34d6aad1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs @@ -6,15 +6,13 @@ namespace TestNs { - public partial class TestVM { private global::ReactiveUI.ReactiveCommand? _test3Command; - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::ReactiveUI.ReactiveCommand Test3Command { get => _test3Command ??= global::ReactiveUI.ReactiveCommand.Create(Test3); } } } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs index 3c47e001..c10c633f 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs @@ -10,6 +10,7 @@ using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -65,6 +66,15 @@ public partial class ReactiveCommandGenerator /// The length of the conventional m_ field prefix. private const int CommandNamePrefixLength = 2; + /// The suffix an asynchronous method's name drops in its command's name. + private const string AsyncSuffix = "Async"; + + /// The suffix every generated command property and field name ends with. + private const string CommandSuffix = "Command"; + + /// The GeneratedCode attribute stamped on every generated command, built once. + private static readonly string GeneratedCodeAttribute = SourceWriterExtensions.GeneratedCodeAttribute(GeneratorName, GeneratorVersion); + /// Gets the metadata needed to generate a command for an attributed method. /// The generator attribute context. /// The cancellation token. @@ -203,7 +213,7 @@ private static string GetAccessModifier(AttributeData attributeData) => private static string GetXmlDocumentation(IMethodSymbol methodSymbol, CancellationToken token) { var xmlDocumentation = methodSymbol.GetDocumentationCommentXml(cancellationToken: token) ?? string.Empty; - if (string.IsNullOrEmpty(xmlDocumentation)) + if (xmlDocumentation.Length == 0) { return string.Empty; } @@ -214,162 +224,141 @@ private static string GetXmlDocumentation(IMethodSymbol methodSymbol, Cancellati return string.Empty; } - var formattedDocumentation = new System.Text.StringBuilder(); + // The first and the last two lines are the envelope around the documentation. const int XmlMemberEnvelopeLineCount = 2; + var builder = PooledBuilder.Rent(xmlDocumentation.Length); for (var index = 1; index < lines.Length - XmlMemberEnvelopeLineCount; index++) { - _ = formattedDocumentation.Append(" /// ") - .AppendLine(lines[index].TrimStart()); + if (index > 1) + { + _ = builder.Append('\n'); + } + + _ = builder.Append("/// ").Append(lines[index].Trim()); } - return formattedDocumentation.ToString().TrimEnd(); + return PooledBuilder.ToStringAndReturn(builder); } - /// Generates the complete source file for a target type's commands. - /// The containing type name. - /// The containing namespace. - /// The containing type visibility. - /// The containing type keyword. - /// The command metadata. + /// Generates the partial declaration holding one type's commands. + /// The commands the type declares, all sharing one . /// The selected ReactiveUI API surface. - /// The generated source file. - private static string GenerateSource( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - CommandInfo[] commands, - ReactiveUiIntegration integration) + /// The file's text. + private static string GenerateSource(List commands, ReactiveUiIntegration integration) { - // Get Parent class details from properties.ParentInfo - var parentTypes = new TargetInfo?[commands.Length]; - for (var index = 0; index < commands.Length; index++) - { - parentTypes[index] = commands[index].TargetInfo.ParentInfo; - } - - var (parentClassDeclarationsString, closingBrackets) = TargetInfo.GenerateParentClassDeclarations(parentTypes); - - var classes = GenerateClassWithCommands(containingTypeName, containingClassVisibility, containingType, commands, integration); - - return -$$""" -// + var target = commands[0].TargetInfo; + var writer = SourceWriter.Rent() + .AutoGenerated() + .BlankLine() + .DisableWarningsEnableNullable() + .BlankLine(); + + var depth = writer.OpenNamespace(target.TargetNamespace) + writer.OpenContainingTypes(target.ParentInfo); + _ = writer.OpenPartialType(target); + for (var i = 0; i < commands.Count; i++) + { + if (i > 0) + { + _ = writer.BlankLine(); + } -#pragma warning disable -#nullable enable + WriteCommand(writer, commands[i], integration); + } -namespace {{containingNamespace}} -{ - {{parentClassDeclarationsString}}{{classes}}{{closingBrackets}} -} -#nullable restore -#pragma warning restore -"""; + return writer.CloseBlock() + .CloseBlocks(depth) + .RestoreNullableAndWarnings() + .ToStringAndReturn(); } - /// Generates the source code. - /// The contain type name. - /// The containing class visibility. - /// The containing type. - /// The commands. + /// Writes one command: its lazily-created backing field and the property exposing it. + /// The writer, at the level of the type's members. + /// The command. /// The selected ReactiveUI API surface. - /// The value. - private static string GenerateClassWithCommands( - string containingTypeName, - string containingClassVisibility, - string containingType, - CommandInfo[] commands, - ReactiveUiIntegration integration) + private static void WriteCommand(SourceWriter writer, CommandInfo commandInfo, ReactiveUiIntegration integration) { - // Includes 2 tabs from the property declarations so no need to add them here. - var commandDeclarationsBuilder = new System.Text.StringBuilder(); - foreach (var command in commands) - { - if (commandDeclarationsBuilder.Length > 0) - { - _ = commandDeclarationsBuilder.AppendLine(); - } - - _ = commandDeclarationsBuilder.Append(GetCommandSyntax(command, integration)); - } + var outputType = commandInfo.GetOutputTypeText(integration.VoidTypeName); + var inputType = commandInfo.GetInputTypeText(integration.VoidTypeName); + var methodName = commandInfo.MethodName; + var stemStart = GetCommandNameStem(methodName, commandInfo.IsTask, out var stemLength); - var commandDeclarations = commandDeclarationsBuilder.ToString(); + _ = writer.Append("private "); + WriteCommandType(writer, integration, inputType, outputType); + _ = writer.Append("? "); + WriteFieldName(writer, methodName, stemStart, stemLength); + _ = writer.EndStatement().BlankLine(); - return -$$""" + if (!string.IsNullOrEmpty(commandInfo.XmlComment)) + { + _ = writer.Lines(commandInfo.XmlComment!); + } - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} - { -{{commandDeclarations}} - } -"""; + _ = writer.Line(GeneratedCodeAttribute).ExcludeFromCodeCoverage(); + foreach (var attribute in commandInfo.ForwardedPropertyAttributes.AsImmutableArray()) + { + _ = writer.Line(attribute); + } + + _ = writer.Append(commandInfo.AccessModifier).Append(' '); + WriteCommandType(writer, integration, inputType, outputType); + _ = writer.Append(' '); + WriteCommandName(writer, methodName, stemStart, stemLength); + _ = writer.Append(" { get => "); + 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); + WriteCanExecuteArgument(writer, commandInfo); + WriteOutputSchedulerArgument(writer, commandInfo); + _ = writer.Line("); }"); } - /// Generates the property declaration for a command. - /// The command metadata. + /// Writes the closed command type, {namespace}.ReactiveCommand<{input}, {output}>. + /// The writer. /// The selected ReactiveUI API surface. - /// The generated property declaration. - private static string GetCommandSyntax(CommandInfo commandExtensionInfo, ReactiveUiIntegration integration) + /// The command input type. + /// The command output type. + private static void WriteCommandType(SourceWriter writer, ReactiveUiIntegration integration, string inputType, string outputType) => + _ = writer.Append(integration.Namespace).Append('.').Append(ReactiveCommand) + .Append('<').Append(inputType).Append(", ").Append(outputType).Append('>'); + + /// Writes the factory call's type arguments, which only a command taking a parameter needs. + /// The writer. + /// The command. + /// The command input type. + /// The command output type. + private static void WriteGenericTypeArguments(SourceWriter writer, CommandInfo commandInfo, string inputType, string outputType) { - var outputType = commandExtensionInfo.GetOutputTypeText(integration.VoidTypeName); - var inputType = commandExtensionInfo.GetInputTypeText(integration.VoidTypeName); - var rxCmd = $"{integration.Namespace}.{ReactiveCommand}"; - var commandName = GetGeneratedCommandName(commandExtensionInfo.MethodName, commandExtensionInfo.IsTask); - var fieldName = GetGeneratedFieldName(commandName); - - var initializer = GetCommandInitializer(commandExtensionInfo, fieldName, outputType, inputType, rxCmd); - - // Prepare any forwarded property attributes - var forwardedPropertyAttributesString = GetForwardedPropertyAttributes(commandExtensionInfo); - - return -$$""" - private {{rxCmd}}<{{inputType}}, {{outputType}}>? {{fieldName}}; - -{{commandExtensionInfo.XmlComment}} - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - {{forwardedPropertyAttributesString}} - {{commandExtensionInfo.AccessModifier}} {{rxCmd}}<{{inputType}}, {{outputType}}> {{commandName}} { get => {{initializer}} } -"""; - } + if (commandInfo.ArgumentType is null) + { + return; + } - /// Creates the initializer expression for a generated command. - /// The command metadata. - /// The backing-field name. - /// The generated command output type. - /// The generated command input type. - /// The fully-qualified reactive command type name. - /// The lazy-initializer expression. - private static string GetCommandInitializer(CommandInfo commandInfo, string fieldName, string outputType, string inputType, string commandTypeName) - { - var genericTypeArguments = string.Empty; - if (commandInfo.ArgumentType is not null) + _ = writer.Append('<').Append(inputType); + if (!commandInfo.IsReturnTypeVoid) { - genericTypeArguments = commandInfo.IsReturnTypeVoid - ? $"<{inputType}>" - : $"<{inputType}, {outputType}>"; + _ = writer.Append(", ").Append(outputType); } - var commandType = GetCommandFactoryMethod(commandInfo); - var canExecuteArgument = GetCanExecuteArgument(commandInfo); - var schedulerArgument = GetOutputSchedulerArgument(commandInfo); - return $"{fieldName} ??= {commandTypeName}{commandType}{genericTypeArguments}({commandInfo.MethodName}{canExecuteArgument}{schedulerArgument});"; + _ = writer.Append('>'); } - /// Gets the optional output-scheduler arguments for a command factory call. - /// The command metadata. - /// The formatted scheduler arguments, or an empty string. - private static string GetOutputSchedulerArgument(CommandInfo commandInfo) + /// Writes the optional output-scheduler arguments of a command factory call. + /// The writer. + /// The command. + private static void WriteOutputSchedulerArgument(SourceWriter writer, CommandInfo commandInfo) { if (string.IsNullOrEmpty(commandInfo.OutputScheduler)) { - return string.Empty; + return; } - return commandInfo.RunInBackground && !commandInfo.IsTask && !commandInfo.IsObservable - ? $", backgroundScheduler: null, outputScheduler: {commandInfo.OutputScheduler}" - : $", outputScheduler: {commandInfo.OutputScheduler}"; + if (commandInfo.RunInBackground && !commandInfo.IsTask && !commandInfo.IsObservable) + { + _ = writer.Append(", backgroundScheduler: null"); + } + + _ = writer.Append(", outputScheduler: ").Append(commandInfo.OutputScheduler); } /// Gets the ReactiveCommand factory method for the command shape. @@ -390,50 +379,19 @@ private static string GetCommandFactoryMethod(CommandInfo commandInfo) return commandInfo.RunInBackground ? CreateB : Create; } - /// Gets the optional can-execute argument for a command factory call. - /// The command metadata. - /// The formatted can-execute argument, or an empty string. - private static string GetCanExecuteArgument(CommandInfo commandInfo) + /// Writes the optional can-execute argument of a command factory call. + /// The writer. + /// The command. + private static void WriteCanExecuteArgument(SourceWriter writer, CommandInfo commandInfo) { if (string.IsNullOrEmpty(commandInfo.CanExecuteObservableName)) { - return string.Empty; - } - - var invocationSuffix = commandInfo.CanExecuteTypeInfo == CanExecuteTypeInfo.MethodObservable ? "()" : string.Empty; - return $", {commandInfo.CanExecuteObservableName}{invocationSuffix}"; - } - - /// Formats the attributes forwarded to a generated command property. - /// The command metadata. - /// The formatted attribute list. - private static string GetForwardedPropertyAttributes(CommandInfo commandInfo) - { - var builder = new System.Text.StringBuilder(); - foreach (var attribute in AttributeDefinitions.ExcludeFromCodeCoverage) - { - AppendForwardedAttribute(builder, attribute); - } - - foreach (var attribute in commandInfo.ForwardedPropertyAttributes.AsImmutableArray()) - { - AppendForwardedAttribute(builder, attribute); - } - - return builder.ToString(); - } - - /// Appends an indented forwarded attribute to a source builder. - /// The target builder. - /// The attribute text. - private static void AppendForwardedAttribute(System.Text.StringBuilder builder, string attribute) - { - if (builder.Length > 0) - { - _ = builder.Append("\n "); + return; } - _ = builder.Append(attribute); + _ = writer.Append(", ") + .Append(commandInfo.CanExecuteObservableName) + .Append(commandInfo.CanExecuteTypeInfo == CanExecuteTypeInfo.MethodObservable ? "()" : null); } /// Tries to get the expression type for the "CanExecute" property, if available. @@ -690,34 +648,59 @@ private static bool HasReactiveAttribute(ISymbol symbol) return false; } - /// Gets the generated command property name for a method. + /// Locates the stem of a method name that the command's property and field names are built from. /// The source method name. /// Whether the method is asynchronous. - /// The generated command property name. - private static string GetGeneratedCommandName(string methodName, bool isAsync) + /// The stem's length. + /// The index the stem starts at. + /// The stem drops an m_ or leading-underscore prefix, and an Async suffix on an asynchronous method. + private static int GetCommandNameStem(string methodName, bool isAsync, out int length) { - var commandName = methodName; - - if (commandName.StartsWith("m_", System.StringComparison.Ordinal)) + var start = 0; + if (methodName.StartsWith("m_", StringComparison.Ordinal)) { - commandName = commandName[CommandNamePrefixLength..]; + start = CommandNamePrefixLength; } - else if (commandName.StartsWith("_", System.StringComparison.Ordinal)) + else { - commandName = commandName.TrimStart('_'); + while (start < methodName.Length && methodName[start] == '_') + { + start++; + } } - if (commandName.EndsWith("Async", System.StringComparison.Ordinal) && isAsync) + length = methodName.Length - start; + if (isAsync + && length >= AsyncSuffix.Length + && string.CompareOrdinal(methodName, methodName.Length - AsyncSuffix.Length, AsyncSuffix, 0, AsyncSuffix.Length) == 0) { - commandName = commandName.Substring(0, commandName.Length - "Async".Length); + length -= AsyncSuffix.Length; } - return $"{char.ToUpper(commandName[0], CultureInfo.InvariantCulture)}{commandName[1..]}Command"; + return start; } - /// Gets the generated backing-field name for a command property. - /// The generated command property name. - /// The generated backing-field name. - private static string GetGeneratedFieldName(string generatedCommandName) => - $"_{char.ToLower(generatedCommandName[0], CultureInfo.InvariantCulture)}{generatedCommandName[1..]}"; + /// Writes the generated command property's name: the stem, capitalized, and Command. + /// The writer. + /// The source method name. + /// The index the stem starts at. + /// The stem's length. + private static void WriteCommandName(SourceWriter writer, string methodName, int stemStart, int stemLength) => + _ = writer.Append(char.ToUpper(methodName[stemStart], CultureInfo.InvariantCulture)) + .Append(methodName, stemStart + 1, stemLength - 1) + .Append(CommandSuffix); + + /// Writes the generated backing field's name: the command property's name, camel-cased behind an underscore. + /// The writer. + /// The source method name. + /// The index the stem starts at. + /// The stem's length. + private static void WriteFieldName(SourceWriter writer, string methodName, int stemStart, int stemLength) + { + var first = char.ToUpper(methodName[stemStart], CultureInfo.InvariantCulture); + _ = writer.Append('_') + .Append(char.ToLower(first, CultureInfo.InvariantCulture)) + .Append(methodName, stemStart + 1, stemLength - 1) + .Append(CommandSuffix); + } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs index 87a5fbd7..7966af29 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs @@ -57,13 +57,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) foreach (var grouping in groupedCommandInfo) { - var source = GenerateSource( - grouping.Key.TargetName, - grouping.Key.TargetNamespace, - grouping.Key.TargetVisibility, - grouping.Key.TargetType, - grouping.Value.ToArray(), - input.Right); + var source = GenerateSource(grouping.Value, input.Right); context.AddSource($"{grouping.Key.FileHintName}.ReactiveCommands.g.cs", source); } }); From 3ad1a747a5c84ac03ac6db4590677770f6296e75 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:25:47 +1000 Subject: [PATCH 14/30] refactor: write [RoutedControlHost] hosts through the indentation-aware writer The routed control host is emitted through SourceWriter instead of one interpolated raw string: fixed stretches are written with Lines, and the type name, base type, namespace and exception handler are appended between them, so no intermediate strings are built. The GeneratedCode attribute is built once per generator, and the renderer delegate becomes GenerateSource split into Write* methods. Generated output is token-identical; only whitespace changed (the trailing spaces after the final pragma are gone and the file ends with a newline). --- .../RoutedControlHostGenerator.Execute.cs | 610 ++++++++++-------- .../RoutedControlHostGenerator.cs | 9 +- 2 files changed, 346 insertions(+), 273 deletions(-) diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs index 661e5716..932d20ab 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs @@ -7,6 +7,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -23,6 +24,9 @@ public partial class RoutedControlHostGenerator /// The generator assembly version written to generated-code attributes. private static readonly string GeneratorVersion = typeof(RoutedControlHostGenerator).Assembly.GetName().Version.ToString(); + /// The GeneratedCode attribute stamped on every generated host, built once. + private static readonly string GeneratedCodeAttribute = SourceWriterExtensions.GeneratedCodeAttribute(GeneratorName, GeneratorVersion); + /// Gets generation metadata for an attributed routed control host. private static readonly RoutedControlHostInfoFactory GetClassInfo = static ( in GeneratorAttributeSyntaxContext context, @@ -73,192 +77,277 @@ public partial class RoutedControlHostGenerator baseTypeName); }; - /// Gets the routed control host source renderer. - private static readonly RoutedControlHostRenderer GetRoutedControlHost = static ( - containingTypeName, - containingNamespace, - containingClassVisibility, - containingType, - vmcInfo, - integration) => + /// Gets routed control host metadata from a generator attribute context. + /// The generator attribute context. + /// The cancellation token. + /// The routed control host metadata, or when the target is invalid. + private delegate RoutedControlHostInfo? RoutedControlHostInfoFactory( + in GeneratorAttributeSyntaxContext context, + CancellationToken token); + + /// Gets the first string constructor argument from an attribute. + /// The attribute data. + /// The first string argument, or when none exists. + private static string? GetFirstConstructorArgument(AttributeData attributeData) + { + using var arguments = attributeData.GetConstructorArguments().GetEnumerator(); + return arguments.MoveNext() ? arguments.Current : null; + } + + /// Generates the partial declaration that turns the target into a routed control host. + /// The routed control host metadata. + /// The detected ReactiveUI integration. + /// The file's text. + private static string GenerateSource(RoutedControlHostInfo info, ReactiveUiIntegration integration) { - var generatedAttributesString = string.Join("\n ", AttributeDefinitions.ExcludeFromCodeCoverage); var exceptionHandler = integration.IsNewerThan22 ? "RxState.DefaultExceptionHandler!.OnNext" : "RxApp.DefaultExceptionHandler!.OnNext"; - return -$$""" -// -// 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. - -{{integration.UsingDirectives}} -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows.Forms; + var writer = SourceWriter.Rent(); + WriteFileHeader(writer, integration); -#pragma warning disable -#nullable enable -namespace {{containingNamespace}} -{ - {{generatedAttributesString}} - [DefaultProperty("ViewModel")] - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} : {{vmcInfo.BaseTypeName}}, IReactiveObject - { - private readonly DisposableCollection _disposables = new(); - private RoutingState? _router; - private Control? _defaultContent; - private Control? _routedView; - private IObservable? _viewContractObservable; - - /// - /// Initializes a new instance of the class. - /// - public {{containingTypeName}}() + // 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) { - InitializeComponent(); - _disposables.Add(this.WhenAny(x => x.DefaultContent, x => x.Value).Subscribe(new ValueObserver(x => + _ = writer.Line(attribute); + } + + _ = writer.Line("[DefaultProperty(\"ViewModel\")]") + .Line(GeneratedCodeAttribute) + .Append(info.TargetVisibility).Append(" partial ").Append(info.TargetType).Append(' ').Append(info.TargetName) + .Append(" : ").Append(info.BaseTypeName).Line(", IReactiveObject") + .OpenBlock(); + + WriteConstructor(writer, info.TargetName, exceptionHandler); + WriteProperties(writer.BlankLine()); + WriteRouting(writer.BlankLine()); + WriteObservableHelpers(writer.BlankLine()); + WriteCombineLatestSubscription(writer.BlankLine()); + WriteDisposableCollection(writer.BlankLine()); + WriteSubscriptionSlot(writer.BlankLine()); + WriteEmptyDisposable(writer.BlankLine()); + + return writer.CloseBlock() + .CloseBlock() + .RestoreNullableAndWarnings() + .ToStringAndReturn(); + } + + /// Writes the file header: the generated marker, the license, the usings, and the pragmas. + /// The writer, at the start of the file. + /// The detected ReactiveUI integration, which picks the ReactiveUI usings. + private static void WriteFileHeader(SourceWriter writer, ReactiveUiIntegration integration) => + _ = writer.AutoGenerated() + .Append("// Copyright (c) ").Append(DateTime.Now.Year).Line(" .NET Foundation and Contributors. All rights reserved.") + .Lines(""" + // 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. + """) + .BlankLine() + .Lines(integration.UsingDirectives) + .Lines(""" + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.Windows.Forms; + """) + .BlankLine() + .DisableWarningsEnableNullable(); + + /// Writes the host's fields and its constructor, which wires the default content and the routed view. + /// The writer, at the level of the host's members. + /// The host type's name. + /// The ReactiveUI default exception handler subscriptions report to. + private static void WriteConstructor(SourceWriter writer, string typeName, string exceptionHandler) => + _ = writer.Lines(""" + private readonly DisposableCollection _disposables = new(); + private RoutingState? _router; + private Control? _defaultContent; + private Control? _routedView; + private IObservable? _viewContractObservable; + + /// + """) + .Append("/// Initializes a new instance of the class.") + .Line("/// ") + .Append("public ").Append(typeName).Line("()") + .OpenBlock() + .Lines(""" + InitializeComponent(); + _disposables.Add(this.WhenAny(x => x.DefaultContent, x => x.Value).Subscribe(new ValueObserver(x => + { + if (x is not null && Controls.Count == 0) + { + Controls.Add(InitView(x)); + components?.Add(DefaultContent); + } + """) + .Append("}, ").Append(exceptionHandler).Line(")));") + .Lines(""" + ViewContractObservable = new ReturnObservable(default!); + var routeSubscription = new CombineLatestSubscription( + UpdateRoutedContent, + """) + .Indent().Append(exceptionHandler).Line(");").Outdent() + .Lines(""" + _disposables.Add(routeSubscription); + routeSubscription.Connect( + this.WhenAnyObservable(x => x.Router!.CurrentViewModel!), + this.WhenAnyObservable(x => x.ViewContractObservable!)); + """) + .CloseBlock(); + + /// Writes the host's events and properties, and its IReactiveObject implementation. + /// The writer, at the level of the host's members. + private static void WriteProperties(SourceWriter writer) => + _ = writer.Lines(""" + /// + public event PropertyChangingEventHandler? PropertyChanging; + + /// + public event PropertyChangedEventHandler? PropertyChanged; + + /// + /// Gets or sets the default content. + /// + /// + /// The default content. + /// + [Category("ReactiveUI")] + [Description("The default control when no viewmodel is specified")] + public Control? DefaultContent { get => _defaultContent; set => this.RaiseAndSetIfChanged(ref _defaultContent, value); } + + /// + /// Gets or sets the of the view model stack. + /// + [Category("ReactiveUI")] + [Description("The router.")] + public RoutingState? Router { get => _router; set => this.RaiseAndSetIfChanged(ref _router, value); } + + /// + /// Gets or sets the view contract observable. + /// + [Browsable(false)] + public IObservable? ViewContractObservable { get => _viewContractObservable; set => this.RaiseAndSetIfChanged(ref _viewContractObservable, value); } + + /// + /// Gets or sets the view locator. + /// + [Browsable(false)] + public IViewLocator? ViewLocator { get; set; } + + /// + void IReactiveObject.RaisePropertyChanging(PropertyChangingEventArgs args) => PropertyChanging?.Invoke(this, args); + + /// + void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args) => PropertyChanged?.Invoke(this, args); + """); + + /// Writes the host's disposal and the methods that swap the routed view in and out. + /// The writer, at the level of the host's members. + private static void WriteRouting(SourceWriter writer) => + _ = writer.Lines(""" + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { - if (x is not null && Controls.Count == 0) + if (disposing) { - Controls.Add(InitView(x)); - components?.Add(DefaultContent); + _disposables.Dispose(); + _routedView?.Dispose(); + _routedView = null; + components?.Dispose(); } - }, {{exceptionHandler}}))); - ViewContractObservable = new ReturnObservable(default!); - var routeSubscription = new CombineLatestSubscription( - UpdateRoutedContent, - {{exceptionHandler}}); - _disposables.Add(routeSubscription); - routeSubscription.Connect( - this.WhenAnyObservable(x => x.Router!.CurrentViewModel!), - this.WhenAnyObservable(x => x.ViewContractObservable!)); - } - /// - public event PropertyChangingEventHandler? PropertyChanging; - - /// - public event PropertyChangedEventHandler? PropertyChanged; - - /// - /// Gets or sets the default content. - /// - /// - /// The default content. - /// - [Category("ReactiveUI")] - [Description("The default control when no viewmodel is specified")] - public Control? DefaultContent { get => _defaultContent; set => this.RaiseAndSetIfChanged(ref _defaultContent, value); } - - /// - /// Gets or sets the of the view model stack. - /// - [Category("ReactiveUI")] - [Description("The router.")] - public RoutingState? Router { get => _router; set => this.RaiseAndSetIfChanged(ref _router, value); } - - /// - /// Gets or sets the view contract observable. - /// - [Browsable(false)] - public IObservable? ViewContractObservable { get => _viewContractObservable; set => this.RaiseAndSetIfChanged(ref _viewContractObservable, value); } - - /// - /// Gets or sets the view locator. - /// - [Browsable(false)] - public IViewLocator? ViewLocator { get; set; } - - /// - void IReactiveObject.RaisePropertyChanging(PropertyChangingEventArgs args) => PropertyChanging?.Invoke(this, args); - - /// - void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args) => PropertyChanged?.Invoke(this, args); - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing) - { - _disposables.Dispose(); - _routedView?.Dispose(); - _routedView = null; - components?.Dispose(); + base.Dispose(disposing); } - base.Dispose(disposing); - } - - private void UpdateRoutedContent(IRoutableViewModel? viewModel, string contract) - { - SuspendLayout(); - try + private void UpdateRoutedContent(IRoutableViewModel? viewModel, string contract) { - Controls.Clear(); - _routedView?.Dispose(); - _routedView = null; - - if (viewModel is null) + SuspendLayout(); + try { - if (DefaultContent is not null) + Controls.Clear(); + _routedView?.Dispose(); + _routedView = null; + + if (viewModel is null) { - Controls.Add(InitView(DefaultContent)); + if (DefaultContent is not null) + { + Controls.Add(InitView(DefaultContent)); + } + + return; } - return; + var viewLocator = ViewLocator ?? ReactiveUI.ViewLocator.Current; + var view = viewLocator.ResolveView(viewModel, contract); + if (view is not null) + { + view.ViewModel = viewModel; + _routedView = InitView((Control)view); + Controls.Add(_routedView); + } } - - var viewLocator = ViewLocator ?? ReactiveUI.ViewLocator.Current; - var view = viewLocator.ResolveView(viewModel, contract); - if (view is not null) + finally { - view.ViewModel = viewModel; - _routedView = InitView((Control)view); - Controls.Add(_routedView); + ResumeLayout(); } } - finally + + private static Control InitView(Control view) { - ResumeLayout(); + view.Dock = DockStyle.Fill; + return view; } - } + """); - private static Control InitView(Control view) - { - view.Dock = DockStyle.Fill; - return view; - } - - private sealed class ReturnObservable(T value) : IObservable - { - public IDisposable Subscribe(IObserver observer) + /// Writes the nested observable and observer the host subscribes with, so it needs no Rx dependency. + /// The writer, at the level of the host's members. + private static void WriteObservableHelpers(SourceWriter writer) => + _ = writer.Lines(""" + private sealed class ReturnObservable(T value) : IObservable { - observer.OnNext(value); - observer.OnCompleted(); - return EmptyDisposable.Instance; + public IDisposable Subscribe(IObserver observer) + { + observer.OnNext(value); + observer.OnCompleted(); + return EmptyDisposable.Instance; + } } - } - private sealed class ValueObserver(Action onNext, Action onError, Action? onCompleted = null) : IObserver - { - public void OnCompleted() => onCompleted?.Invoke(); + private sealed class ValueObserver(Action onNext, Action onError, Action? onCompleted = null) : IObserver + { + public void OnCompleted() => onCompleted?.Invoke(); - public void OnError(Exception error) => onError(error); + public void OnError(Exception error) => onError(error); - public void OnNext(T value) => onNext(value); - } + public void OnNext(T value) => onNext(value); + } + """); - private sealed class CombineLatestSubscription : IDisposable - { + /// Writes the nested subscription that combines the latest router and contract values. + /// The writer, at the level of the host's members. + private static void WriteCombineLatestSubscription(SourceWriter writer) + { + _ = writer.Line("private sealed class CombineLatestSubscription : IDisposable").OpenBlock(); + WriteCombineLatestState(writer); + WriteCombineLatestValues(writer.BlankLine()); + WriteCombineLatestCompletion(writer.BlankLine()); + WriteCombineLatestFailure(writer.BlankLine()); + _ = writer.CloseBlock(); + } + + /// Writes the combined subscription's state, its constructor, and how it connects and disposes. + /// The writer, at the level of the subscription's members. + private static void WriteCombineLatestState(SourceWriter writer) => + _ = writer.Lines(""" private readonly object _gate = new(); private readonly Action _onNext; private readonly Action _onError; @@ -301,7 +390,12 @@ public void Dispose() _leftSubscription.Dispose(); _rightSubscription.Dispose(); } + """); + /// Writes the combined subscription's value callbacks, which publish once both sides have a value. + /// The writer, at the level of the subscription's members. + private static void WriteCombineLatestValues(SourceWriter writer) => + _ = writer.Lines(""" private void SetLeft(TLeft value) { lock (_gate) @@ -341,7 +435,12 @@ private void SetRight(TRight value) _onNext(_left, value); } } + """); + /// Writes the combined subscription's completion callbacks. + /// The writer, at the level of the subscription's members. + private static void WriteCombineLatestCompletion(SourceWriter writer) => + _ = writer.Lines(""" private void CompleteLeft() { var shouldStop = false; @@ -385,7 +484,12 @@ private void CompleteRight() _rightSubscription.Dispose(); } } + """); + /// Writes the combined subscription's error callback and its stopped check. + /// The writer, at the level of the subscription's members. + private static void WriteCombineLatestFailure(SourceWriter writer) => + _ = writer.Lines(""" private void Fail(Exception error) { lock (_gate) @@ -416,145 +520,121 @@ private bool IsStopped() return _isStopped; } } - } + """); - private sealed class DisposableCollection : IDisposable - { - private readonly object _gate = new(); - private readonly List _items = new(); - private bool _isDisposed; - - public void Add(IDisposable item) + /// Writes the nested collection that disposes the host's subscriptions together. + /// The writer, at the level of the host's members. + private static void WriteDisposableCollection(SourceWriter writer) => + _ = writer.Lines(""" + private sealed class DisposableCollection : IDisposable { - var disposeItem = false; - lock (_gate) + private readonly object _gate = new(); + private readonly List _items = new(); + private bool _isDisposed; + + public void Add(IDisposable item) { - disposeItem = _isDisposed; - if (!disposeItem) + var disposeItem = false; + lock (_gate) { - _items.Add(item); + disposeItem = _isDisposed; + if (!disposeItem) + { + _items.Add(item); + } } - } - if (disposeItem) - { - item.Dispose(); + if (disposeItem) + { + item.Dispose(); + } } - } - public void Dispose() - { - IDisposable[] items; - lock (_gate) + public void Dispose() { - if (_isDisposed) + IDisposable[] items; + lock (_gate) { - return; + if (_isDisposed) + { + return; + } + + _isDisposed = true; + items = _items.ToArray(); + _items.Clear(); } - _isDisposed = true; - items = _items.ToArray(); - _items.Clear(); - } - - foreach (var item in items) - { - item.Dispose(); + foreach (var item in items) + { + item.Dispose(); + } } } - } - - private sealed class SubscriptionSlot : IDisposable - { - private readonly object _gate = new(); - private IDisposable? _subscription; - private bool _isDisposed; + """); - public void Set(IDisposable subscription) + /// Writes the nested slot holding one replaceable subscription. + /// The writer, at the level of the host's members. + private static void WriteSubscriptionSlot(SourceWriter writer) => + _ = writer.Lines(""" + private sealed class SubscriptionSlot : IDisposable { - IDisposable? previous; - var disposeSubscription = false; - lock (_gate) + private readonly object _gate = new(); + private IDisposable? _subscription; + private bool _isDisposed; + + public void Set(IDisposable subscription) { - disposeSubscription = _isDisposed; - previous = _subscription; - if (!disposeSubscription) + IDisposable? previous; + var disposeSubscription = false; + lock (_gate) { - _subscription = subscription; + disposeSubscription = _isDisposed; + previous = _subscription; + if (!disposeSubscription) + { + _subscription = subscription; + } } - } - previous?.Dispose(); - if (disposeSubscription) - { - subscription.Dispose(); + previous?.Dispose(); + if (disposeSubscription) + { + subscription.Dispose(); + } } - } - public void Dispose() - { - IDisposable? subscription; - lock (_gate) + public void Dispose() { - if (_isDisposed) + IDisposable? subscription; + lock (_gate) { - return; + if (_isDisposed) + { + return; + } + + _isDisposed = true; + subscription = _subscription; + _subscription = null; } - _isDisposed = true; - subscription = _subscription; - _subscription = null; + subscription?.Dispose(); } - - subscription?.Dispose(); } - } - - private sealed class EmptyDisposable : IDisposable - { - public static EmptyDisposable Instance { get; } = new(); + """); - public void Dispose() + /// Writes the nested disposable that does nothing. + /// The writer, at the level of the host's members. + private static void WriteEmptyDisposable(SourceWriter writer) => + _ = writer.Lines(""" + private sealed class EmptyDisposable : IDisposable { - } - } - } -} -#nullable restore -#pragma warning restore -"""; - }; - - /// Gets routed control host metadata from a generator attribute context. - /// The generator attribute context. - /// The cancellation token. - /// The routed control host metadata, or when the target is invalid. - private delegate RoutedControlHostInfo? RoutedControlHostInfoFactory( - in GeneratorAttributeSyntaxContext context, - CancellationToken token); - - /// Renders routed control host source from gathered metadata. - /// The containing type name. - /// The containing namespace. - /// The containing type visibility. - /// The containing type keyword. - /// The routed control host metadata. - /// The detected ReactiveUI integration. - /// The generated routed control host source. - private delegate string RoutedControlHostRenderer( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - RoutedControlHostInfo vmcInfo, - ReactiveUiIntegration integration); + public static EmptyDisposable Instance { get; } = new(); - /// Gets the first string constructor argument from an attribute. - /// The attribute data. - /// The first string argument, or when none exists. - private static string? GetFirstConstructorArgument(AttributeData attributeData) - { - using var arguments = attributeData.GetConstructorArguments().GetEnumerator(); - return arguments.MoveNext() ? arguments.Current : null; - } + public void Dispose() + { + } + } + """); } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs index 6086a0f7..930236ba 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs @@ -40,14 +40,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) { foreach (var info in input.Left) { - var source = GetRoutedControlHost( - info.TargetName, - info.TargetNamespace, - info.TargetVisibility, - info.TargetType, - info, - input.Right); - context.AddSource($"{info.FileHintName}.RoutedControlHost.g.cs", source); + context.AddSource($"{info.FileHintName}.RoutedControlHost.g.cs", GenerateSource(info, input.Right)); } }); } From bd1a06865b7125870695103aa176a0b93f4e59eb Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:25:47 +1000 Subject: [PATCH 15/30] refactor: write [ViewModelControlHost] hosts through the indentation-aware writer The view-model control host is emitted through SourceWriter instead of one interpolated raw string: fixed stretches are written with Lines, and the type name, view-model base type, namespace and exception handler are appended between them, so no intermediate strings are built. The GeneratedCode attribute is built once per generator, and the renderer delegate becomes GenerateSource split into Write* methods. Generated output is token-identical; only whitespace changed (the file now ends with a newline). --- .../ViewModelControlHostGenerator.Execute.cs | 726 ++++++++++-------- .../ViewModelControlHostGenerator.cs | 9 +- 2 files changed, 414 insertions(+), 321 deletions(-) diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs index 5b4dba80..f62d13a0 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs @@ -7,6 +7,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -23,6 +24,9 @@ public partial class ViewModelControlHostGenerator /// The generator assembly version written to generated-code attributes. private static readonly string GeneratorVersion = typeof(ViewModelControlHostGenerator).Assembly.GetName().Version.ToString(); + /// The GeneratedCode attribute stamped on every generated host, built once. + private static readonly string GeneratedCodeAttribute = SourceWriterExtensions.GeneratedCodeAttribute(GeneratorName, GeneratorVersion); + /// Gets generation metadata for an attributed view-model control host. private static readonly ViewModelControlHostInfoFactory GetClassInfo = static ( in GeneratorAttributeSyntaxContext context, @@ -67,244 +71,349 @@ public partial class ViewModelControlHostGenerator viewModelTypeName!); }; - /// Gets the view-model control host source renderer. - private static readonly ViewModelControlHostRenderer GetViewModelControlHost = static ( - containingTypeName, - containingNamespace, - containingClassVisibility, - containingType, - vmcInfo, - integration) => + /// Gets view-model control host metadata from a generator attribute context. + /// The generator attribute context. + /// The cancellation token. + /// The view-model control host metadata, or when the target is invalid. + private delegate ViewModelControlHostInfo? ViewModelControlHostInfoFactory( + in GeneratorAttributeSyntaxContext context, + CancellationToken token); + + /// Gets the first string constructor argument from an attribute. + /// The attribute data. + /// The first string argument, or when none exists. + private static string? GetFirstConstructorArgument(AttributeData attributeData) + { + using var arguments = attributeData.GetConstructorArguments().GetEnumerator(); + return arguments.MoveNext() ? arguments.Current : null; + } + + /// Generates the partial declaration that turns the target into a view-model control host. + /// The view-model control host metadata. + /// The detected ReactiveUI integration. + /// The file's text. + private static string GenerateSource(ViewModelControlHostInfo info, ReactiveUiIntegration integration) { - var generatedAttributesString = string.Join("\n ", AttributeDefinitions.ExcludeFromCodeCoverage); var exceptionHandler = integration.IsNewerThan22 ? "RxState.DefaultExceptionHandler!.OnNext" : "RxApp.DefaultExceptionHandler!.OnNext"; - return -$$""" -// -// 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. + var writer = SourceWriter.Rent(); + WriteFileHeader(writer, integration); -{{integration.UsingDirectives}} -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows.Forms; - -#pragma warning disable -#nullable enable -namespace {{containingNamespace}} -{ - {{generatedAttributesString}} - [DefaultProperty("ViewModel")] - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} : {{vmcInfo.ViewModelTypeName}}, IReactiveObject, IViewFor - { - private readonly DisposableCollection _disposables = new(); - private Control? _defaultContent; - private IObservable? _viewContractObservable; - private object? _viewModel; - private object? _content; - private bool _cacheViews; - - /// - /// Initializes a new instance of the class. - /// - public {{containingTypeName}}() + // 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) { - InitializeComponent(); - _cacheViews = DefaultCacheViewsEnabled; - SetupBindings(); + _ = writer.Line(attribute); } - /// - public event PropertyChangingEventHandler? PropertyChanging; - - /// - public event PropertyChangedEventHandler? PropertyChanged; - - /// - /// Gets or sets a value indicating whether [default cache views enabled]. - /// - public static bool DefaultCacheViewsEnabled { get; set; } - - /// - /// Gets the current view. - /// - public Control? CurrentView => _content as Control; - - /// - /// Gets or sets the default content. - /// - [Category("ReactiveUI")] - [Description("The default control when no viewmodel is specified")] - public Control? DefaultContent { get => _defaultContent; set => this.RaiseAndSetIfChanged(ref _defaultContent, value); } - - /// - /// Gets or sets the view contract observable. - /// - /// - /// The view contract observable. - /// - [Browsable(false)] - public IObservable? ViewContractObservable { get => _viewContractObservable; set => this.RaiseAndSetIfChanged(ref _viewContractObservable, value); } - - /// - /// Gets or sets the view locator. - /// - [Browsable(false)] - public IViewLocator? ViewLocator { get; set; } - - /// - [Category("ReactiveUI")] - [Description("The viewmodel to host.")] - [Bindable(true)] - public object? ViewModel { get => _viewModel; set => this.RaiseAndSetIfChanged(ref _viewModel, value); } - - /// - /// Gets or sets the content. - /// - [Category("ReactiveUI")] - [Description("The Current View")] - [Bindable(true)] - public object? Content { get => _content; protected set => this.RaiseAndSetIfChanged(ref _content, value); } - - /// - /// Gets or sets a value indicating whether to cache views. - /// - [Category("ReactiveUI")] - [Description("Cache Views")] - [Bindable(true)] - [DefaultValue(true)] - public bool CacheViews { get => _cacheViews; set => this.RaiseAndSetIfChanged(ref _cacheViews, value); } - - /// - void IReactiveObject.RaisePropertyChanging(PropertyChangingEventArgs args) => PropertyChanging?.Invoke(this, args); - - /// - void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args) => PropertyChanged?.Invoke(this, args); - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing) - { - _disposables.Dispose(); - components?.Dispose(); - } - - base.Dispose(disposing); - } + _ = writer.Line("[DefaultProperty(\"ViewModel\")]") + .Line(GeneratedCodeAttribute) + .Append(info.TargetVisibility).Append(" partial ").Append(info.TargetType).Append(' ').Append(info.TargetName) + .Append(" : ").Append(info.ViewModelTypeName).Line(", IReactiveObject, IViewFor") + .OpenBlock(); + + WriteConstructor(writer, info.TargetName); + WriteProperties(writer.BlankLine()); + WriteBindableProperties(writer.BlankLine()); + WriteDispose(writer.BlankLine()); + WriteSetupBindings(writer.BlankLine(), exceptionHandler); + WriteUpdateContent(writer.BlankLine()); + WriteObservableHelpers(writer.BlankLine()); + WriteCombineLatestSubscription(writer.BlankLine()); + WriteDisposableCollection(writer.BlankLine()); + WriteSubscriptionSlot(writer.BlankLine()); + WriteEmptyDisposable(writer.BlankLine()); + + return writer.CloseBlock() + .CloseBlock() + .RestoreNullableAndWarnings() + .ToStringAndReturn(); + } - private void SetupBindings() - { - AddSubscription(this.WhenAnyValue(x => x!.Content), new ValueObserver(x => + /// Writes the file header: the generated marker, the license, the usings, and the pragmas. + /// The writer, at the start of the file. + /// The detected ReactiveUI integration, which picks the ReactiveUI usings. + private static void WriteFileHeader(SourceWriter writer, ReactiveUiIntegration integration) => + _ = writer.AutoGenerated() + .Append("// Copyright (c) ").Append(DateTime.Now.Year).Line(" .NET Foundation and Contributors. All rights reserved.") + .Lines(""" + // 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. + """) + .BlankLine() + .Lines(integration.UsingDirectives) + .Lines(""" + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.Windows.Forms; + """) + .BlankLine() + .DisableWarningsEnableNullable(); + + /// Writes the host's fields and its constructor. + /// The writer, at the level of the host's members. + /// The host type's name. + private static void WriteConstructor(SourceWriter writer, string typeName) => + _ = writer.Lines(""" + private readonly DisposableCollection _disposables = new(); + private Control? _defaultContent; + private IObservable? _viewContractObservable; + private object? _viewModel; + private object? _content; + private bool _cacheViews; + + /// + """) + .Append("/// Initializes a new instance of the class.") + .Line("/// ") + .Append("public ").Append(typeName).Line("()") + .OpenBlock() + .Lines(""" + InitializeComponent(); + _cacheViews = DefaultCacheViewsEnabled; + SetupBindings(); + """) + .CloseBlock(); + + /// Writes the host's events and its content and view-location properties. + /// The writer, at the level of the host's members. + private static void WriteProperties(SourceWriter writer) => + _ = writer.Lines(""" + /// + public event PropertyChangingEventHandler? PropertyChanging; + + /// + public event PropertyChangedEventHandler? PropertyChanged; + + /// + /// Gets or sets a value indicating whether [default cache views enabled]. + /// + public static bool DefaultCacheViewsEnabled { get; set; } + + /// + /// Gets the current view. + /// + public Control? CurrentView => _content as Control; + + /// + /// Gets or sets the default content. + /// + [Category("ReactiveUI")] + [Description("The default control when no viewmodel is specified")] + public Control? DefaultContent { get => _defaultContent; set => this.RaiseAndSetIfChanged(ref _defaultContent, value); } + + /// + /// Gets or sets the view contract observable. + /// + /// + /// The view contract observable. + /// + [Browsable(false)] + public IObservable? ViewContractObservable { get => _viewContractObservable; set => this.RaiseAndSetIfChanged(ref _viewContractObservable, value); } + + /// + /// Gets or sets the view locator. + /// + [Browsable(false)] + public IViewLocator? ViewLocator { get; set; } + """); + + /// Writes the host's bindable view-model properties and its IReactiveObject implementation. + /// The writer, at the level of the host's members. + private static void WriteBindableProperties(SourceWriter writer) => + _ = writer.Lines(""" + /// + [Category("ReactiveUI")] + [Description("The viewmodel to host.")] + [Bindable(true)] + public object? ViewModel { get => _viewModel; set => this.RaiseAndSetIfChanged(ref _viewModel, value); } + + /// + /// Gets or sets the content. + /// + [Category("ReactiveUI")] + [Description("The Current View")] + [Bindable(true)] + public object? Content { get => _content; protected set => this.RaiseAndSetIfChanged(ref _content, value); } + + /// + /// Gets or sets a value indicating whether to cache views. + /// + [Category("ReactiveUI")] + [Description("Cache Views")] + [Bindable(true)] + [DefaultValue(true)] + public bool CacheViews { get => _cacheViews; set => this.RaiseAndSetIfChanged(ref _cacheViews, value); } + + /// + void IReactiveObject.RaisePropertyChanging(PropertyChangingEventArgs args) => PropertyChanging?.Invoke(this, args); + + /// + void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args) => PropertyChanged?.Invoke(this, args); + """); + + /// Writes the host's disposal. + /// The writer, at the level of the host's members. + private static void WriteDispose(SourceWriter writer) => + _ = writer.Lines(""" + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { - if (x is not Control control) + if (disposing) { - return; + _disposables.Dispose(); + components?.Dispose(); } - // change the view in the ui - SuspendLayout(); - // clear out existing visible control view - foreach (Control? c in Controls) + base.Dispose(disposing); + } + """); + + /// Writes the bindings that swap the hosted view as the content, default content, and view model change. + /// The writer, at the level of the host's members. + /// The ReactiveUI default exception handler subscriptions report to. + private static void WriteSetupBindings(SourceWriter writer, string exceptionHandler) => + _ = writer.Line("private void SetupBindings()") + .OpenBlock() + .Lines(""" + AddSubscription(this.WhenAnyValue(x => x!.Content), new ValueObserver(x => { - c?.Dispose(); - Controls.Remove(c); - } + if (x is not Control control) + { + return; + } - control.Dock = DockStyle.Fill; - Controls.Add(control); - ResumeLayout(); - }, {{exceptionHandler}})); - AddSubscription(this.WhenAnyValue(x => x.DefaultContent), new ValueObserver(x => - { - if (x is not null) - { - Content = DefaultContent; - } - }, {{exceptionHandler}})); - ViewContractObservable = new ReturnObservable(string.Empty); - var viewModelSubscription = new CombineLatestSubscription( - UpdateContent, - {{exceptionHandler}}); - _disposables.Add(viewModelSubscription); - viewModelSubscription.Connect( - this.WhenAnyValue(x => x.ViewModel), - this.WhenAnyObservable(x => x.ViewContractObservable!)); - } + // change the view in the ui + SuspendLayout(); + // clear out existing visible control view + foreach (Control? c in Controls) + { + c?.Dispose(); + Controls.Remove(c); + } - private void AddSubscription(IObservable observable, IObserver observer) - { - var slot = new SubscriptionSlot(); - _disposables.Add(slot); - slot.Set(observable.Subscribe(observer)); - } + control.Dock = DockStyle.Fill; + Controls.Add(control); + ResumeLayout(); + """) + .Append("}, ").Append(exceptionHandler).Line("));") + .Lines(""" + AddSubscription(this.WhenAnyValue(x => x.DefaultContent), new ValueObserver(x => + { + if (x is not null) + { + Content = DefaultContent; + } + """) + .Append("}, ").Append(exceptionHandler).Line("));") + .Lines(""" + ViewContractObservable = new ReturnObservable(string.Empty); + var viewModelSubscription = new CombineLatestSubscription( + UpdateContent, + """) + .Indent().Append(exceptionHandler).Line(");").Outdent() + .Lines(""" + _disposables.Add(viewModelSubscription); + viewModelSubscription.Connect( + this.WhenAnyValue(x => x.ViewModel), + this.WhenAnyObservable(x => x.ViewContractObservable!)); + """) + .CloseBlock(); + + /// Writes the methods that register a subscription and resolve the view for a new view model. + /// The writer, at the level of the host's members. + private static void WriteUpdateContent(SourceWriter writer) => + _ = writer.Lines(""" + private void AddSubscription(IObservable observable, IObserver observer) + { + var slot = new SubscriptionSlot(); + _disposables.Add(slot); + slot.Set(observable.Subscribe(observer)); + } - private void UpdateContent(object? viewModel, string contract) - { - // set content to default when viewmodel is null - if (viewModel is null) + private void UpdateContent(object? viewModel, string contract) { - if (DefaultContent is not null) + // set content to default when viewmodel is null + if (viewModel is null) { - Content = DefaultContent; + if (DefaultContent is not null) + { + Content = DefaultContent; + } + + return; } - return; - } + if (CacheViews) + { + // when caching views, check the current viewmodel and type + var currentView = _content as IViewFor; + if (currentView?.ViewModel is not null && currentView.ViewModel.GetType() == viewModel.GetType()) + { + currentView.ViewModel = viewModel; + // return early here after setting the viewmodel + // allowing the view to update its bindings + return; + } + } - if (CacheViews) - { - // when caching views, check the current viewmodel and type - var currentView = _content as IViewFor; - if (currentView?.ViewModel is not null && currentView.ViewModel.GetType() == viewModel.GetType()) + var viewLocator = ViewLocator ?? ReactiveUI.ViewLocator.Current; + var view = viewLocator.ResolveView(viewModel, contract); + if (view is not null) { - currentView.ViewModel = viewModel; - // return early here after setting the viewmodel - // allowing the view to update its bindings - return; + view.ViewModel = viewModel; + Content = view; } } + """); - var viewLocator = ViewLocator ?? ReactiveUI.ViewLocator.Current; - var view = viewLocator.ResolveView(viewModel, contract); - if (view is not null) + /// Writes the nested observable and observer the host subscribes with, so it needs no Rx dependency. + /// The writer, at the level of the host's members. + private static void WriteObservableHelpers(SourceWriter writer) => + _ = writer.Lines(""" + private sealed class ReturnObservable(T value) : IObservable { - view.ViewModel = viewModel; - Content = view; + public IDisposable Subscribe(IObserver observer) + { + observer.OnNext(value); + observer.OnCompleted(); + return EmptyDisposable.Instance; + } } - } - private sealed class ReturnObservable(T value) : IObservable - { - public IDisposable Subscribe(IObserver observer) + private sealed class ValueObserver(Action onNext, Action onError, Action? onCompleted = null) : IObserver { - observer.OnNext(value); - observer.OnCompleted(); - return EmptyDisposable.Instance; - } - } + public void OnCompleted() => onCompleted?.Invoke(); - private sealed class ValueObserver(Action onNext, Action onError, Action? onCompleted = null) : IObserver - { - public void OnCompleted() => onCompleted?.Invoke(); + public void OnError(Exception error) => onError(error); - public void OnError(Exception error) => onError(error); + public void OnNext(T value) => onNext(value); + } + """); - public void OnNext(T value) => onNext(value); - } + /// Writes the nested subscription that combines the latest view model and contract values. + /// The writer, at the level of the host's members. + private static void WriteCombineLatestSubscription(SourceWriter writer) + { + _ = writer.Line("private sealed class CombineLatestSubscription : IDisposable").OpenBlock(); + WriteCombineLatestState(writer); + WriteCombineLatestValues(writer.BlankLine()); + WriteCombineLatestCompletion(writer.BlankLine()); + WriteCombineLatestFailure(writer.BlankLine()); + _ = writer.CloseBlock(); + } - private sealed class CombineLatestSubscription : IDisposable - { + /// Writes the combined subscription's state, its constructor, and how it connects and disposes. + /// The writer, at the level of the subscription's members. + private static void WriteCombineLatestState(SourceWriter writer) => + _ = writer.Lines(""" private readonly object _gate = new(); private readonly Action _onNext; private readonly Action _onError; @@ -347,7 +456,12 @@ public void Dispose() _leftSubscription.Dispose(); _rightSubscription.Dispose(); } + """); + /// Writes the combined subscription's value callbacks, which publish once both sides have a value. + /// The writer, at the level of the subscription's members. + private static void WriteCombineLatestValues(SourceWriter writer) => + _ = writer.Lines(""" private void SetLeft(TLeft value) { lock (_gate) @@ -387,7 +501,12 @@ private void SetRight(TRight value) _onNext(_left, value); } } + """); + /// Writes the combined subscription's completion callbacks. + /// The writer, at the level of the subscription's members. + private static void WriteCombineLatestCompletion(SourceWriter writer) => + _ = writer.Lines(""" private void CompleteLeft() { var shouldStop = false; @@ -431,7 +550,12 @@ private void CompleteRight() _rightSubscription.Dispose(); } } + """); + /// Writes the combined subscription's error callback and its stopped check. + /// The writer, at the level of the subscription's members. + private static void WriteCombineLatestFailure(SourceWriter writer) => + _ = writer.Lines(""" private void Fail(Exception error) { lock (_gate) @@ -462,145 +586,121 @@ private bool IsStopped() return _isStopped; } } - } + """); - private sealed class DisposableCollection : IDisposable - { - private readonly object _gate = new(); - private readonly List _items = new(); - private bool _isDisposed; - - public void Add(IDisposable item) + /// Writes the nested collection that disposes the host's subscriptions together. + /// The writer, at the level of the host's members. + private static void WriteDisposableCollection(SourceWriter writer) => + _ = writer.Lines(""" + private sealed class DisposableCollection : IDisposable { - var disposeItem = false; - lock (_gate) + private readonly object _gate = new(); + private readonly List _items = new(); + private bool _isDisposed; + + public void Add(IDisposable item) { - disposeItem = _isDisposed; - if (!disposeItem) + var disposeItem = false; + lock (_gate) { - _items.Add(item); + disposeItem = _isDisposed; + if (!disposeItem) + { + _items.Add(item); + } } - } - if (disposeItem) - { - item.Dispose(); + if (disposeItem) + { + item.Dispose(); + } } - } - public void Dispose() - { - IDisposable[] items; - lock (_gate) + public void Dispose() { - if (_isDisposed) + IDisposable[] items; + lock (_gate) { - return; + if (_isDisposed) + { + return; + } + + _isDisposed = true; + items = _items.ToArray(); + _items.Clear(); } - _isDisposed = true; - items = _items.ToArray(); - _items.Clear(); - } - - foreach (var item in items) - { - item.Dispose(); + foreach (var item in items) + { + item.Dispose(); + } } } - } + """); - private sealed class SubscriptionSlot : IDisposable - { - private readonly object _gate = new(); - private IDisposable? _subscription; - private bool _isDisposed; - - public void Set(IDisposable subscription) + /// Writes the nested slot holding one replaceable subscription. + /// The writer, at the level of the host's members. + private static void WriteSubscriptionSlot(SourceWriter writer) => + _ = writer.Lines(""" + private sealed class SubscriptionSlot : IDisposable { - IDisposable? previous; - var disposeSubscription = false; - lock (_gate) + private readonly object _gate = new(); + private IDisposable? _subscription; + private bool _isDisposed; + + public void Set(IDisposable subscription) { - disposeSubscription = _isDisposed; - previous = _subscription; - if (!disposeSubscription) + IDisposable? previous; + var disposeSubscription = false; + lock (_gate) { - _subscription = subscription; + disposeSubscription = _isDisposed; + previous = _subscription; + if (!disposeSubscription) + { + _subscription = subscription; + } } - } - previous?.Dispose(); - if (disposeSubscription) - { - subscription.Dispose(); + previous?.Dispose(); + if (disposeSubscription) + { + subscription.Dispose(); + } } - } - public void Dispose() - { - IDisposable? subscription; - lock (_gate) + public void Dispose() { - if (_isDisposed) + IDisposable? subscription; + lock (_gate) { - return; + if (_isDisposed) + { + return; + } + + _isDisposed = true; + subscription = _subscription; + _subscription = null; } - _isDisposed = true; - subscription = _subscription; - _subscription = null; + subscription?.Dispose(); } - - subscription?.Dispose(); } - } - - private sealed class EmptyDisposable : IDisposable - { - public static EmptyDisposable Instance { get; } = new(); + """); - public void Dispose() + /// Writes the nested disposable that does nothing. + /// The writer, at the level of the host's members. + private static void WriteEmptyDisposable(SourceWriter writer) => + _ = writer.Lines(""" + private sealed class EmptyDisposable : IDisposable { - } - } - } -} -#nullable restore -#pragma warning restore -"""; - }; + public static EmptyDisposable Instance { get; } = new(); - /// Gets view-model control host metadata from a generator attribute context. - /// The generator attribute context. - /// The cancellation token. - /// The view-model control host metadata, or when the target is invalid. - private delegate ViewModelControlHostInfo? ViewModelControlHostInfoFactory( - in GeneratorAttributeSyntaxContext context, - CancellationToken token); - - /// Renders view-model control host source from gathered metadata. - /// The containing type name. - /// The containing namespace. - /// The containing type visibility. - /// The containing type keyword. - /// The view-model control host metadata. - /// The detected ReactiveUI integration. - /// The generated view-model control host source. - private delegate string ViewModelControlHostRenderer( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - ViewModelControlHostInfo vmcInfo, - ReactiveUiIntegration integration); - - /// Gets the first string constructor argument from an attribute. - /// The attribute data. - /// The first string argument, or when none exists. - private static string? GetFirstConstructorArgument(AttributeData attributeData) - { - using var arguments = attributeData.GetConstructorArguments().GetEnumerator(); - return arguments.MoveNext() ? arguments.Current : null; - } + public void Dispose() + { + } + } + """); } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs index 5770bfaf..767aba28 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs @@ -40,14 +40,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) { foreach (var info in input.Left) { - var source = GetViewModelControlHost( - info.TargetName, - info.TargetNamespace, - info.TargetVisibility, - info.TargetType, - info, - input.Right); - context.AddSource($"{info.FileHintName}.ViewModelControlHost.g.cs", source); + context.AddSource($"{info.FileHintName}.ViewModelControlHost.g.cs", GenerateSource(info, input.Right)); } }); } From 1c521a66395dca5b06822c60d41dc77893389ce5 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:26:49 +1000 Subject: [PATCH 16/30] refactor: write IViewFor implementations through the indentation-aware writer Each UI platform's view file (WPF/WinUI/Uno, WinForms, Avalonia, MAUI) is now written through SourceWriter instead of raw-string templates and StringBuilder fragments, so containing types nest at their depth and no intermediate string is built per member. Output is token-for-token identical; only whitespace changes. --- ...r+MiddleContainer+NestView.Ivf.verified.cs | 49 +- .../IViewFor/IViewForGenerator.Execute.cs | 430 ++++++++---------- .../IViewFor/IViewForGenerator.cs | 6 +- 3 files changed, 223 insertions(+), 262 deletions(-) diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs index 1da30ec8..c0c882c9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs @@ -8,35 +8,34 @@ namespace TestNs { -public partial class OuterContainer -{ -public partial class MiddleContainer -{ - /// - /// Partial class for the NestedView which contains ReactiveUI IViewFor initialization. - /// - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public partial class NestedView : IViewFor + public partial class OuterContainer { - /// - /// The view model dependency property. - /// - public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel), typeof(TestNs.TestViewModel), typeof(NestedView), new PropertyMetadata(null)); + public partial class MiddleContainer + { + /// + /// Partial class for the NestedView which contains ReactiveUI IViewFor initialization. + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public partial class NestedView : IViewFor + { + /// + /// The view model dependency property. + /// + public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel), typeof(TestNs.TestViewModel), typeof(NestedView), new PropertyMetadata(null)); - /// - /// Gets the binding root view model. - /// - public TestNs.TestViewModel BindingRoot => ViewModel; + /// + /// Gets the binding root view model. + /// + public TestNs.TestViewModel BindingRoot => ViewModel; - /// - public TestNs.TestViewModel ViewModel { get => (TestNs.TestViewModel)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } + /// + public TestNs.TestViewModel ViewModel { get => (TestNs.TestViewModel)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (TestNs.TestViewModel)value; } + /// + object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (TestNs.TestViewModel)value; } + } + } } - -} -} } #nullable restore -#pragma warning restore \ No newline at end of file +#pragma warning restore diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs index d058665c..ba6da83e 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs @@ -2,11 +2,11 @@ // 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.Text; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -23,6 +23,15 @@ public partial class IViewForGenerator /// Gets the fully qualified name used in generated-code metadata. internal static readonly string GeneratorName = typeof(IViewForGenerator).FullName!; + /// The namespace every view file imports IViewFor from. + private const string ReactiveUINamespace = "ReactiveUI"; + + /// The modifier that opens each generated public member. + private const string PublicModifier = "public "; + + /// The GeneratedCode attribute stamped on the generated view model property, built once. + private static readonly string GeneratedCodeAttribute = SourceWriterExtensions.GeneratedCodeAttribute(GeneratorName, GeneratorVersion); + /// Creates the generation model for an annotated class declaration. /// The Roslyn context for the annotated declaration. /// The cancellation token. @@ -115,259 +124,212 @@ private static IViewForBaseType GetBaseType(INamedTypeSymbol classSymbol) } /// Generates the partial type source for a supported IViewFor target. - /// The generation model. - /// The enclosing type model, when the target is nested. - /// The generated source, or an empty string for unsupported types. - private static string GenerateSource( - IViewForInfo viewForInfo, - TargetInfo? parentInfo = null) + /// The generation model. + /// The generated source, or for unsupported types. + private static string? GenerateSource(IViewForInfo info) { - var forwardedAttributesString = string.Join("\n ", AttributeDefinitions.ExcludeFromCodeCoverage); - var (parentDeclarations, parentClosing) = parentInfo is null - ? (string.Empty, string.Empty) - : Models.TargetInfo.GenerateParentClassDeclarations([parentInfo]); - return viewForInfo.BaseType switch + var writer = info.BaseType switch { - IViewForBaseType.Wpf or IViewForBaseType.WinUI or IViewForBaseType.Uno => GenerateDependencyPropertyViewSource(viewForInfo, parentDeclarations, parentClosing, forwardedAttributesString), - IViewForBaseType.WinForms => GenerateWinFormsViewSource(viewForInfo, parentDeclarations, parentClosing, forwardedAttributesString), - IViewForBaseType.Avalonia => GenerateAvaloniaViewSource(viewForInfo, parentDeclarations, parentClosing, forwardedAttributesString), - IViewForBaseType.Maui => GenerateMauiViewSource(viewForInfo, parentDeclarations, parentClosing, forwardedAttributesString), - _ => string.Empty, + IViewForBaseType.Wpf => BeginDependencyPropertyFile("System.Windows"), + IViewForBaseType.WinUI => BeginDependencyPropertyFile("Microsoft.UI.Xaml"), + IViewForBaseType.Uno => BeginDependencyPropertyFile("Windows.UI.Xaml"), + IViewForBaseType.WinForms => BeginFile().Using(ReactiveUINamespace).Using("System.ComponentModel"), + IViewForBaseType.Avalonia => BeginFile().Using("System").Using(ReactiveUINamespace).Using("Avalonia").Using("Avalonia.Controls"), + IViewForBaseType.Maui => BeginFile().Using("System").Using(ReactiveUINamespace).Using("Microsoft.Maui.Controls"), + _ => null, }; - } - /// Generates source for WPF, WinUI, and Uno views. - /// The IViewFor generation model. - /// The enclosing type declarations. - /// The enclosing type closures. - /// The forwarded attributes. - /// The generated source. - private static string GenerateDependencyPropertyViewSource(IViewForInfo info, string parents, string closingParents, string attributes) - { - var usings = info.BaseType switch + if (writer is null) { - IViewForBaseType.Wpf => "using ReactiveUI;\nusing System.Windows;", - IViewForBaseType.WinUI => "using ReactiveUI;\nusing Microsoft.UI.Xaml;", - IViewForBaseType.Uno => "using ReactiveUI;\nusing Windows.UI.Xaml;", - _ => string.Empty, - }; - var viewModelPropertyDeclaration = GetDependencyPropertyDeclaration(info); - - return $$""" -// -{{usings}} + return null; + } -#pragma warning disable -#nullable enable + // Only the dependency-property file opens with the usual pragma pair; the others restore nullability first. + if (info.BaseType is not (IViewForBaseType.Wpf or IViewForBaseType.WinUI or IViewForBaseType.Uno)) + { + _ = writer.Line("#nullable restore").Line("#pragma warning disable").BlankLine(); + } -namespace {{info.TargetInfo.TargetNamespace}} -{ -{{parents}} /// - /// Partial class for the {{info.TargetInfo.TargetName}} which contains ReactiveUI IViewFor initialization. - /// - {{attributes}} - {{info.TargetInfo.TargetVisibility}} partial {{info.TargetInfo.TargetType}} {{info.TargetInfo.TargetName}} : IViewFor<{{info.ViewModelTypeName}}> - { - /// - /// The view model dependency property. - /// - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] -{{viewModelPropertyDeclaration}} - - /// - /// Gets the binding root view model. - /// - public {{info.ViewModelTypeName}} BindingRoot => ViewModel; - - /// - public {{info.ViewModelTypeName}} ViewModel { get => ({{info.ViewModelTypeName}})GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = ({{info.ViewModelTypeName}})value; } - } -{{closingParents}}} -#nullable restore -#pragma warning restore -"""; - } + var target = info.TargetInfo; + var depth = writer.OpenNamespace(target.TargetNamespace) + writer.OpenContainingTypes(target.ParentInfo); + WriteTypeDeclaration(writer, info, info.BaseType != IViewForBaseType.Maui); + if (info.BaseType == IViewForBaseType.WinForms) + { + WriteWinFormsMembers(writer, info.ViewModelTypeName); + } + else if (info.BaseType == IViewForBaseType.Avalonia) + { + WriteAvaloniaMembers(writer, info); + } + else if (info.BaseType == IViewForBaseType.Maui) + { + WriteMauiMembers(writer, info.ViewModelTypeName); + } + else + { + WriteDependencyPropertyMembers(writer, info); + } - /// Creates the dependency-property declaration while preserving its generated one-line format. - /// The IViewFor generation model. - /// The generated dependency-property declaration. - private static string GetDependencyPropertyDeclaration(IViewForInfo info) - { - var builder = new StringBuilder(" public static readonly DependencyProperty ViewModelProperty = "); - _ = builder.Append("DependencyProperty.Register(nameof(ViewModel), typeof("); - _ = builder.Append(info.ViewModelTypeName).Append("), typeof("); - _ = builder.Append(info.TargetInfo.TargetName).Append("), new PropertyMetadata(null));"); - return builder.ToString(); + return writer.CloseBlock() + .CloseBlocks(depth) + .RestoreNullableAndWarnings() + .ToStringAndReturn(); } - /// Generates source for Windows Forms views. - /// The IViewFor generation model. - /// The enclosing type declarations. - /// The enclosing type closures. - /// The forwarded attributes. - /// The generated source. - private static string GenerateWinFormsViewSource(IViewForInfo info, string parents, string closingParents, string attributes) => - $$""" -// -using ReactiveUI; -using System.ComponentModel; -#nullable restore -#pragma warning disable - -namespace {{info.TargetInfo.TargetNamespace}} -{ -{{parents}} /// - /// Partial class for the {{info.TargetInfo.TargetName}} which contains ReactiveUI IViewFor initialization. - /// - {{attributes}} - {{info.TargetInfo.TargetVisibility}} partial {{info.TargetInfo.TargetType}} {{info.TargetInfo.TargetName}} : IViewFor<{{info.ViewModelTypeName}}> + /// Rents a writer and writes the auto-generated marker every view file starts with. + /// The writer. + private static SourceWriter BeginFile() => SourceWriter.Rent().AutoGenerated(); + + /// Starts a WPF, WinUI or Uno view file, whose imports differ only in the XAML namespace. + /// The namespace declaring DependencyProperty. + /// The writer, after the file's header. + private static SourceWriter BeginDependencyPropertyFile(string xamlNamespace) => + BeginFile() + .Using(ReactiveUINamespace) + .Using(xamlNamespace) + .BlankLine() + .DisableWarningsEnableNullable() + .BlankLine(); + + /// Opens the view's partial declaration implementing IViewFor. + /// The writer, at the level of the view's declaration. + /// The generation model. + /// Whether the declaration carries a summary doc comment. + private static void WriteTypeDeclaration(SourceWriter writer, IViewForInfo info, bool includeSummary) { - /// - [Category("ReactiveUI")] - [Description("The ViewModel.")] - [Bindable(true)] - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] - public {{info.ViewModelTypeName}}? ViewModel {get; set; } - - /// - object? IViewFor.ViewModel {get => ViewModel; set => ViewModel = ({{info.ViewModelTypeName}}? )value; } - } -{{closingParents}}} -#nullable restore -#pragma warning restore -"""; - - /// Generates source for Avalonia views. - /// The IViewFor generation model. - /// The enclosing type declarations. - /// The enclosing type closures. - /// The forwarded attributes. - /// The generated source. - private static string GenerateAvaloniaViewSource(IViewForInfo info, string parents, string closingParents, string attributes) => - $$""" -// -using System; -using ReactiveUI; -using Avalonia; -using Avalonia.Controls; -#nullable restore -#pragma warning disable - -namespace {{info.TargetInfo.TargetNamespace}} -{ -{{parents}} /// - /// Partial class for the {{info.TargetInfo.TargetName}} which contains ReactiveUI IViewFor initialization. - /// - {{attributes}} - {{info.TargetInfo.TargetVisibility}} partial {{info.TargetInfo.TargetType}} {{info.TargetInfo.TargetName}} : IViewFor<{{info.ViewModelTypeName}}> - { - /// - /// The view model dependency property. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1002", Justification = "Generic avalonia property is expected here.")] - public static readonly StyledProperty<{{info.ViewModelTypeName}}?> ViewModelProperty = AvaloniaProperty.Register<{{info.TargetInfo.TargetName}}, {{info.ViewModelTypeName}}>(nameof(ViewModel)); - - /// - /// Gets the binding root view model. - /// - public {{info.ViewModelTypeName}}? BindingRoot => ViewModel; - - /// - public {{info.ViewModelTypeName}}? ViewModel { get => ({{info.ViewModelTypeName}}?)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = ({{info.ViewModelTypeName}}?)value; } - - protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + var target = info.TargetInfo; + if (includeSummary) { - base.OnPropertyChanged(change); - - if (change.Property == DataContextProperty) - { - if (ReferenceEquals(change.OldValue, ViewModel) && change.NewValue is null or {{info.ViewModelTypeName}}) - { - SetCurrentValue(ViewModelProperty, change.NewValue); - } - } - else if (change.Property == ViewModelProperty) - { - if (ReferenceEquals(change.OldValue, DataContext)) - { - SetCurrentValue(DataContextProperty, change.NewValue); - } - } + _ = writer.Line("/// ") + .Append("/// Partial class for the ").Append(target.TargetName).Line(" which contains ReactiveUI IViewFor initialization.") + .Line("/// "); } - } -{{closingParents}}} -#nullable restore -#pragma warning restore -"""; - - /// Generates source for MAUI views. - /// The IViewFor generation model. - /// The enclosing type declarations. - /// The enclosing type closures. - /// The forwarded attributes. - /// The generated source. - private static string GenerateMauiViewSource(IViewForInfo info, string parents, string closingParents, string attributes) - { - var viewModelPropertyDeclaration = GetMauiViewModelPropertyDeclaration(info); - return $$""" -// -using System; -using ReactiveUI; -using Microsoft.Maui.Controls; -#nullable restore -#pragma warning disable - -namespace {{info.TargetInfo.TargetNamespace}} -{ -{{parents}} {{attributes}} - {{info.TargetInfo.TargetVisibility}} partial {{info.TargetInfo.TargetType}} {{info.TargetInfo.TargetName}} : IViewFor<{{info.ViewModelTypeName}}> - { -{{viewModelPropertyDeclaration}} - - /// - /// Gets the binding root view model. - /// - public {{info.ViewModelTypeName}}? BindingRoot => ViewModel; - - /// - public {{info.ViewModelTypeName}}? ViewModel { get => ({{info.ViewModelTypeName}}?)GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); } - /// - object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = ({{info.ViewModelTypeName}}?)value; } - - /// - protected override void OnBindingContextChanged() + foreach (var attribute in AttributeDefinitions.ExcludeFromCodeCoverage) { - base.OnBindingContextChanged(); - ViewModel = BindingContext as {{info.ViewModelTypeName}}; + _ = writer.Line(attribute); } - private static void OnViewModelChanged(BindableObject bindableObject, object oldValue, object newValue) => bindableObject.BindingContext = newValue; + _ = writer.BeginPartialType(target).Append(" : IViewFor<").Append(info.ViewModelTypeName).Line(">").OpenBlock(); + } + + /// Writes the members of a WPF, WinUI or Uno view, backed by a dependency property. + /// The writer, at the level of the view's members. + /// The generation model. + private static void WriteDependencyPropertyMembers(SourceWriter writer, IViewForInfo info) + { + var viewModelType = info.ViewModelTypeName; + _ = writer.Lines(""" + /// + /// The view model dependency property. + /// + """) + .Line(GeneratedCodeAttribute) + .Append("public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel), typeof(") + .Append(viewModelType).Append("), typeof(").Append(info.TargetInfo.TargetName).Line("), new PropertyMetadata(null));") + .BlankLine(); + WriteViewModelMembers(writer, viewModelType, string.Empty); } -{{closingParents}}} -#nullable restore -#pragma warning restore -"""; + + /// Writes the members of a Windows Forms view, backed by an auto-property. + /// The writer, at the level of the view's members. + /// The view model's type name. + private static void WriteWinFormsMembers(SourceWriter writer, string viewModelType) => + _ = writer.Lines(""" + /// + [Category("ReactiveUI")] + [Description("The ViewModel.")] + [Bindable(true)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + """) + .Line(GeneratedCodeAttribute) + .Append(PublicModifier).Append(viewModelType).Line("? ViewModel {get; set; }") + .BlankLine() + .InheritDoc() + .Append("object? IViewFor.ViewModel {get => ViewModel; set => ViewModel = (").Append(viewModelType).Line("? )value; }"); + + /// Writes the members of an Avalonia view, backed by a styled property kept in step with the data context. + /// The writer, at the level of the view's members. + /// The generation model. + private static void WriteAvaloniaMembers(SourceWriter writer, IViewForInfo info) + { + var viewModelType = info.ViewModelTypeName; + _ = writer.Lines(""" + /// + /// The view model dependency property. + /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1002", Justification = "Generic avalonia property is expected here.")] + """) + .Append("public static readonly StyledProperty<").Append(viewModelType) + .Append("?> ViewModelProperty = AvaloniaProperty.Register<").Append(info.TargetInfo.TargetName).Append(", ").Append(viewModelType) + .Line(">(nameof(ViewModel));") + .BlankLine(); + WriteViewModelMembers(writer, viewModelType, "?"); + _ = writer.BlankLine() + .Lines(""" + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { + base.OnPropertyChanged(change); + + if (change.Property == DataContextProperty) + { + """) + .Indent().Indent() + .Append("if (ReferenceEquals(change.OldValue, ViewModel) && change.NewValue is null or ").Append(viewModelType).Line(")") + .Outdent().Outdent() + .Lines(""" + { + SetCurrentValue(ViewModelProperty, change.NewValue); + } + } + else if (change.Property == ViewModelProperty) + { + if (ReferenceEquals(change.OldValue, DataContext)) + { + SetCurrentValue(DataContextProperty, change.NewValue); + } + } + } + """); } - /// Creates the MAUI bindable-property declaration while preserving its generated one-line format. - /// The IViewFor generation model. - /// The generated bindable-property declaration. - private static string GetMauiViewModelPropertyDeclaration(IViewForInfo info) + /// Writes the members of a MAUI view, backed by a bindable property kept in step with the binding context. + /// The writer, at the level of the view's members. + /// The view model's type name. + private static void WriteMauiMembers(SourceWriter writer, string viewModelType) { - var builder = new StringBuilder(" public static readonly BindableProperty ViewModelProperty = "); - _ = builder.Append("BindableProperty.Create(nameof(ViewModel), typeof("); - _ = builder.Append(info.ViewModelTypeName).Append("), typeof(IViewFor<"); - _ = builder.Append(info.ViewModelTypeName).Append(">), default("); - _ = builder.Append(info.ViewModelTypeName); - _ = builder.Append("), BindingMode.OneWay, propertyChanged: OnViewModelChanged);"); - return builder.ToString(); + _ = writer.Append("public static readonly BindableProperty ViewModelProperty = BindableProperty.Create(nameof(ViewModel), typeof(") + .Append(viewModelType).Append("), typeof(IViewFor<").Append(viewModelType).Append(">), default(").Append(viewModelType) + .Line("), BindingMode.OneWay, propertyChanged: OnViewModelChanged);") + .BlankLine(); + WriteViewModelMembers(writer, viewModelType, "?"); + _ = writer.BlankLine() + .InheritDoc() + .Line("protected override void OnBindingContextChanged()") + .OpenBlock() + .Line("base.OnBindingContextChanged();") + .Append("ViewModel = BindingContext as ").Append(viewModelType).EndStatement() + .CloseBlock() + .BlankLine() + .Line("private static void OnViewModelChanged(BindableObject bindableObject, object oldValue, object newValue) => bindableObject.BindingContext = newValue;"); } + + /// Writes the binding root and the typed and untyped ViewModel properties over ViewModelProperty. + /// The writer, at the level of the view's members. + /// The view model's type name. + /// The annotation after the view model type: ?, or empty. + private static void WriteViewModelMembers(SourceWriter writer, string viewModelType, string nullableSuffix) => + _ = writer.Lines(""" + /// + /// Gets the binding root view model. + /// + """) + .Append(PublicModifier).Append(viewModelType).Append(nullableSuffix).Line(" BindingRoot => ViewModel;") + .BlankLine() + .InheritDoc() + .Append(PublicModifier).Append(viewModelType).Append(nullableSuffix).Append(" ViewModel { get => (").Append(viewModelType).Append(nullableSuffix) + .Line(")GetValue(ViewModelProperty); set => SetValue(ViewModelProperty, value); }") + .BlankLine() + .InheritDoc() + .Append("object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (").Append(viewModelType).Append(nullableSuffix).Line(")value; }"); } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs index 4540d144..b4016103 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs @@ -43,10 +43,10 @@ public void Initialize(IncrementalGeneratorInitializationContext context) foreach (var grouping in groupedPropertyInfo.Values) { var info = grouping[0]; - var source = GenerateSource(info, info.TargetInfo.ParentInfo); + var source = GenerateSource(info); - // Only add source if it's not empty (i.e., a supported UI framework base type was detected) - if (!string.IsNullOrWhiteSpace(source)) + // Only add source when a supported UI framework base type was detected + if (source is not null) { context.AddSource($"{info.TargetInfo.FileHintName}.IViewFor.g.cs", source); } From 49de210c636eaacc25ffb62b1e7de04692910e46 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:26:49 +1000 Subject: [PATCH 17/30] refactor: write IReactiveObject implementations through the indentation-aware writer The file header, namespace and partial type are written through SourceWriter and the fixed members through Lines, replacing the raw-string template and the per-character re-indenting copy. Output is token-for-token identical; only whitespace changes. --- .../ReactiveObjectGenerator.Execute.cs | 76 ++++++------------- .../ReactiveObject/ReactiveObjectGenerator.cs | 2 +- 2 files changed, 25 insertions(+), 53 deletions(-) diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.Execute.cs index 39b9b36b..3d4cedb7 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.Execute.cs @@ -2,11 +2,11 @@ // 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.Text; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Models; namespace ReactiveUI.SourceGenerators; @@ -49,60 +49,32 @@ public partial class ReactiveObjectGenerator } /// Generates the complete source document for a ReactiveObject declaration. - /// The name of the containing type. - /// The containing namespace. - /// The containing type visibility. - /// The containing type kind. + /// The type that implements IReactiveObject. /// The selected ReactiveUI integration metadata. /// The generated source document. - private static string GenerateSource( - string containingTypeName, - string containingNamespace, - string containingClassVisibility, - string containingType, - ReactiveUiIntegration integration) => - $$""" -// -#pragma warning disable -#nullable enable -using System; -using System.Diagnostics.CodeAnalysis; -using System.ComponentModel; -{{integration.UsingDirectives}} - -namespace {{containingNamespace}} -{ - /// - /// Partial class for the {{containingTypeName}} which contains ReactiveUI IReactiveObject initialization. - /// - {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} : IReactiveObject + private static string GenerateSource(TargetInfo target, ReactiveUiIntegration integration) { -{{IndentGeneratedMembers(ReactiveObjectSource.Members)}} - } -} -#nullable restore -#pragma warning restore -"""; - - /// Indents reusable generated members within their containing type. - /// The generated members to indent. - /// The indented generated members. - private static string IndentGeneratedMembers(string members) - { - var builder = new StringBuilder(members.Length); - var atLineStart = true; - foreach (var character in members) - { - if (atLineStart && character is not '\r' and not '\n') - { - _ = builder.Append(" "); - } - - _ = builder.Append(character); - atLineStart = character == '\n'; - } - - return builder.ToString(); + var writer = SourceWriter.Rent() + .AutoGenerated() + .DisableWarningsEnableNullable() + .Using("System") + .Using("System.Diagnostics.CodeAnalysis") + .Using("System.ComponentModel") + .Lines(integration.UsingDirectives) + .BlankLine(); + + // Only the namespace encloses the type: containing types have never been declared around it. + var depth = writer.OpenNamespace(target.TargetNamespace); + _ = writer.Line("/// ") + .Append("/// Partial class for the ").Append(target.TargetName).Line(" which contains ReactiveUI IReactiveObject initialization.") + .Line("/// ") + .OpenPartialType(target, "IReactiveObject") + .Lines(ReactiveObjectSource.Members); + + return writer.CloseBlock() + .CloseBlocks(depth) + .RestoreNullableAndWarnings() + .ToStringAndReturn(); } /// Contains reusable generated ReactiveObject source fragments. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs index d7276ad2..393f7f8d 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs @@ -54,7 +54,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) foreach (var grouping in groupedPropertyInfo) { - var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, input.Right); + var source = GenerateSource(grouping.Value.TargetInfo, input.Right); context.AddSource($"{grouping.Key.FileHintName}.IReactiveObject.g.cs", source); } }); From ba37e2a603f799b0d478379e487ddd2e58ea77fa Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:28:42 +1000 Subject: [PATCH 18/30] refactor: remove TargetInfo's string-built containing-type declarations Every generator now opens containing types through the writer, so the declaration and closing-brace strings TargetInfo built are unused. --- .../Core/Models/TargetInfo.cs | 77 ------------------- 1 file changed, 77 deletions(-) diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs index 7f7176f0..74710e44 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs @@ -2,7 +2,6 @@ // 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.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using ReactiveUI.SourceGenerators.Extensions; @@ -57,82 +56,6 @@ internal static TargetInfo From(INamedTypeSymbol namedTypeSymbol) parentInfo); } - /// Generates the containing type declarations and corresponding closing braces. - /// The target types whose parents should be generated. - /// The declarations and closing braces. - internal static (string Declarations, string ClosingBrackets) GenerateParentClassDeclarations(TargetInfo?[] targetInfos) - { - var parentClassDeclarations = new List(); - foreach (var targetInfo in targetInfos) - { - GetParentClasses(parentClassDeclarations, targetInfo); - } - - var parentClassDeclarationsString = GenerateParentClassDeclarations(parentClassDeclarations); - var closingBrackets = GenerateClosingBrackets(parentClassDeclarations.Count); - return (parentClassDeclarationsString, closingBrackets); - } - - /// Adds all containing type declarations for a target type. - /// The declarations to populate. - /// The target whose parents are processed. - private static void GetParentClasses(List parentClassDeclarations, TargetInfo? targetInfo) - { - if (targetInfo is null) - { - return; - } - - var parentClassDeclaration = $"{targetInfo.TargetVisibility} partial {targetInfo.TargetType} {targetInfo.TargetName}"; - - // Add the parent class declaration if it does not exist in the list - if (!parentClassDeclarations.Contains(parentClassDeclaration)) - { - parentClassDeclarations.Add(parentClassDeclaration); - } - - if (targetInfo.ParentInfo is null) - { - return; - } - - // Recursively get the parent classes - GetParentClasses(parentClassDeclarations, targetInfo.ParentInfo); - } - - /// Generates the text for the supplied containing type declarations. - /// The containing type declarations. - /// The generated declaration text. - private static string GenerateParentClassDeclarations(List parentClassDeclarations) - { - // Reverse the list to get the parent classes in the correct order - parentClassDeclarations.Reverse(); - - // Generate the parent class declarations - var parentClassDeclarationsString = string.Join("\n{\n", parentClassDeclarations); - if (!string.IsNullOrWhiteSpace(parentClassDeclarationsString)) - { - parentClassDeclarationsString += "\n{\n"; - } - - return parentClassDeclarationsString; - } - - /// Generates closing braces for a nesting depth. - /// The nesting depth. - /// The generated closing brace text. - private static string GenerateClosingBrackets(int numberOfBrackets) - { - var closingBrackets = new string('}', numberOfBrackets); - closingBrackets = closingBrackets.Replace("}", "}\n"); - if (!string.IsNullOrWhiteSpace(closingBrackets)) - { - closingBrackets = $"\n{closingBrackets}"; - } - - return closingBrackets; - } - /// Makes a metadata name safe for a hint name, replacing angle brackets only when there are any. /// The fully qualified metadata name. /// The hint name. From 9f010320a9bae222baf64d1b6a63c8887faa79f4 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:30:45 +1000 Subject: [PATCH 19/30] docs: point [ObservableAsProperty] and view registration at ReactiveUI.Binding The README drops the removed [ObservableAsProperty] forms, InitializeOAPH and the IViewFor Splat registration options, and adds a 'Moved to ReactiveUI.Binding' section with the replacement for each, including hand-written equivalents for projects without ReactiveUI.Binding. CLAUDE.md now describes writing through SourceWriter, the snapshot helper that replaced Verify, the benchmarks, and the current Roslyn bands. --- CLAUDE.md | 109 +++++++++++++++-------- README.md | 258 +++++++++--------------------------------------------- 2 files changed, 112 insertions(+), 255 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 1093faea..8e2e5980 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,8 +14,8 @@ The repository ships **three versioned generator assemblies** built from a singl | Project | Roslyn version | Preprocessor constant | Extra features | |---------|---------------|-----------------------|----------------| -| `ReactiveUI.SourceGenerators.Roslyn480` | 4.8.x (baseline) | _(none)_ | Field-based `[Reactive]`, `[ObservableAsProperty]`, `[ReactiveCommand]`, etc. | -| `ReactiveUI.SourceGenerators.Roslyn4120` | 4.12.0 | `ROSYLN_412` | + partial-property `[Reactive]` and `[ObservableAsProperty]` | +| `ReactiveUI.SourceGenerators.Roslyn480` | 4.8.x (baseline) | _(none)_ | Field-based `[Reactive]`, `[ReactiveCommand]`, etc. | +| `ReactiveUI.SourceGenerators.Roslyn4140` | 4.14.0 | `ROSYLN_412` | + partial-property `[Reactive]` | | `ReactiveUI.SourceGenerators.Roslyn5000` | 5.0.0 | `ROSYLN_500` | + same partial-property support on Roslyn 5 | Each versioned project links all `.cs` files from `ReactiveUI.SourceGenerators.Roslyn/` via: @@ -26,7 +26,7 @@ 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.12/cs`, and `analyzers/dotnet/roslyn5.0/cs` paths, so NuGet/MSBuild automatically selects the right build based on the host compiler. +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. Diagnostics are **not** reported by generators. All `RXUISG*` diagnostics live in the separate `ReactiveUI.SourceGenerators.Analyzers.CodeFixes` project. @@ -38,7 +38,6 @@ src/ │ ├── AttributeDefinitions.cs # Injected attribute source texts │ ├── Reactive/ # [Reactive] generator + Execute + models │ ├── ReactiveCommand/ # [ReactiveCommand] generator + Execute + models -│ ├── ObservableAsProperty/ # [ObservableAsProperty] generator + Execute + models │ ├── IViewFor/ # [IViewFor] generator + Execute + models │ ├── RoutedControlHost/ # [RoutedControlHost] generator │ ├── ViewModelControlHost/ # [ViewModelControlHost] generator @@ -46,46 +45,63 @@ src/ │ ├── ReactiveCollection/ # [ReactiveCollection] generator │ ├── ReactiveObject/ # [IReactiveObject] generator │ ├── Diagnostics/ # DiagnosticDescriptors, SuppressionDescriptors +│ ├── Polyfills/ # netstandard2.0 polyfills, also linked into the code fixes │ └── Core/ +│ ├── CodeGeneration/ # SourceWriter, PooledBuilder, SourceWriterExtensions │ ├── 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.Roslyn4120/ # Roslyn 4.12 build (ROSYLN_412) +├── 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.SourceGenerator.Tests/ # TUnit + Verify snapshot tests +├── ReactiveUI.SourceGenerator.Tests/ # TUnit tests with generator snapshots (GeneratorSnapshot) +├── benchmarks/ # BenchmarkDotNet generation benchmarks with EventPipe tracing ├── ReactiveUI.SourceGenerators.Execute*/ # Compile-time execution verification projects └── TestApps/ # Manual test applications (WPF, WinForms, MAUI, Avalonia) ``` ## Code Generation Strategy -All generated C# source is produced using **raw string literals** (`$$"""..."""`). Do **not** use `StringBuilder` or `SyntaxFactory` for code generation. +Generated source is written through `SourceWriter` (`Core/CodeGeneration`), an indentation-aware writer adopted from +the ReactiveUI.Binding generators. The writer indents each line from its level when the line's first character is +written, so an emitter says what it builds - a namespace, a containing type, a block - and the layout follows. It +rents its `StringBuilder` from a per-thread free list (`PooledBuilder`), so a generation pass reuses buffers. ```csharp -// CORRECT — raw string literal with $$ interpolation -internal static string GenerateProperty(string name, string type) => $$""" - public {{type}} {{name}} +// CORRECT - append pieces straight into the writer; braces move the level +var writer = SourceWriter.Rent().AutoGenerated().DisableWarningsEnableNullable().BlankLine(); +var depth = writer.OpenNamespace(target.TargetNamespace) + writer.OpenContainingTypes(target.ParentInfo); +_ = writer.OpenPartialType(target) + .Append("public ").Append(property.Type).Append(' ').Line(property.Name) + .OpenBlock() + .Append("get => ").Append(property.FieldName).EndStatement() + .CloseBlock(); +return writer.CloseBlock().CloseBlocks(depth).RestoreNullableAndWarnings().ToStringAndReturn(); + +// Fixed multi-line text: Lines() with a raw literal, no interpolation, indented relative to the current level +_ = writer.Lines(""" + protected override void Dispose(bool disposing) { - get => _{{char.ToLower(name[0])}{{name.Substring(1)}}}; - set => this.RaiseAndSetIfChanged(ref _{{char.ToLower(name[0])}{{name.Substring(1)}}}, value); + base.Dispose(disposing); } - """; + """); -// WRONG — do not use StringBuilder -var sb = new StringBuilder(); -sb.AppendLine($"public {type} {name}"); -// ... - -// WRONG — do not use SyntaxFactory -SyntaxFactory.PropertyDeclaration(...) +// WRONG - $"" / $$"""...""" interpolation, string.Join, StringBuilder or SyntaxFactory in an emitter: +// each builds intermediate strings per member, and spelled-out indentation breaks in nested types. ``` -Raw string literals preserve formatting intent, are trivially diffable in code review, and do not require the overhead of SyntaxFactory node construction. +`SourceWriterExtensions` names the constructs the generators share: `AutoGenerated`, `Using`, +`DisableWarningsEnableNullable`/`RestoreNullableAndWarnings`, `OpenNamespace` (block-scoped; the global namespace opens +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. -The injected attribute source texts (in `AttributeDefinitions.cs`) also use `$$"""..."""` raw string literals. +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. ## Roslyn Incremental Pipeline Pattern @@ -94,7 +110,7 @@ Each generator follows this structure: 1. **`Initialize`** — registers post-initialization output (inject attribute source), then calls one or more `Run*` methods. 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 converts model → raw string source text. No Roslyn symbols allowed here. +4. **`GenerateSource` (Execute file)** — pure function that writes a model through `SourceWriter`. No Roslyn symbols allowed here. ``` Initialize() @@ -116,14 +132,16 @@ Initialize() |-----------------|-----------|--------------| | `ReactiveGenerator` | `[Reactive]` | Field (all Roslyn) or partial property (ROSYLN_412+) | | `ReactiveCommandGenerator` | `[ReactiveCommand]` | Method | -| `ObservableAsPropertyGenerator` | `[ObservableAsProperty]` | Field or observable method | -| `IViewForGenerator` | `[IViewFor]` | Class | +| `IViewForGenerator` | `[IViewFor]` | Class (the `IViewFor` implementation; view registration belongs to ReactiveUI.Binding) | | `RoutedControlHostGenerator` | `[RoutedControlHost]` | Class | | `ViewModelControlHostGenerator` | `[ViewModelControlHost]` | Class | | `BindableDerivedListGenerator` | `[BindableDerivedList]` | Field (`ReadOnlyObservableCollection`) | | `ReactiveCollectionGenerator` | `[ReactiveCollection]` | Field (`ObservableCollection`) | | `ReactiveObjectGenerator` | `[IReactiveObject]` | Class | +`[ObservableAsProperty]` and IViewFor view registration moved to ReactiveUI.Binding (ReactiveUI's binding engine) and +were removed here. Do not reintroduce features ReactiveUI.Binding provides. + ## Analyzers & Suppressors All diagnostics use the `RXUISG` prefix. All suppressions use the `RXUISPR` prefix. @@ -148,7 +166,7 @@ Suppressors silence noisy Roslyn/Roslynator diagnostics that are expected for ge ### Framework - **TUnit** — test runner and assertion library (replaces xUnit/NUnit). -- **Verify.SourceGenerators** — snapshot-based verification of generated source output. +- **`GeneratorSnapshot`** (in the test project) — compares each generated file with a stored snapshot. No Verify packages. - **Microsoft.Testing.Platform** — native test execution (configured via `testconfig.json`). ### Test project targets @@ -157,14 +175,18 @@ The test project multi-targets `net8.0;net9.0;net10.0` (controlled by `$(TestTfm ### Snapshot tests -Generator tests extend `TestBase` and call `TestHelper.TestPass(sourceCode)`. Verify saves `.verified.txt` snapshots in the appropriate subdirectory (`REACTIVE/`, `REACTIVECMD/`, `OAPH/`, `IVIEWFOR/`, `DERIVEDLIST/`, `REACTIVECOLL/`, `REACTIVEOBJ/`). +Generator tests extend `TestBase` and call `TestHelper.TestPass(sourceCode)`. Each generated file is stored +as `{FOLDER}/{class}.{method}#{hint}.verified.cs` in the generator's folder (`REACTIVE/`, `REACTIVECMD/`, `IVIEWFOR/`, +`DERIVEDLIST/`, `REACTIVECOLL/`, `REACTIVEOBJ/`). The class segment is the test class's capitals, and common words in the +method and hint segments are abbreviated, so every path stays well inside the Windows path limit. A mismatch writes +`*.received.cs` beside the snapshot and fails; a snapshot the run no longer produces also fails. Generated-code +attribute lines, which carry the assembly version, are left out of the snapshots. #### Accepting snapshot changes -1. Enable `VerifierSettings.AutoVerify()` in `ModuleInitializer.cs`. -2. Run `dotnet test --project src/ReactiveUI.SourceGenerator.Tests -c Release`. -3. Disable `VerifierSettings.AutoVerify()`. -4. Re-run tests to confirm all pass without AutoVerify. +1. Run `ACCEPT_SNAPSHOTS=1 dotnet test --project ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj -c Release -f net10.0` from `src`. +2. Review the snapshot diff; for a refactor, confirm the changes are whitespace only. +3. Re-run the tests without `ACCEPT_SNAPSHOTS` to confirm all pass. ### Test source language version @@ -179,11 +201,12 @@ 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` using a `$$"""..."""` raw string literal. +2. Add attribute source text to `AttributeDefinitions.cs` as a `$$"""..."""` raw string property initialised once. 3. Create `Generator.cs` with `Initialize` wiring up `ForAttributeWithMetadataName`. -4. Create `Generator.Execute.cs` with `Get*Info` (extraction) and `GenerateSource` (raw string template). +4. Create `Generator.Execute.cs` with `Get*Info` (extraction) and `GenerateSource` (writes through `SourceWriter`). 5. Add snapshot tests in `ReactiveUI.SourceGenerator.Tests/UnitTests/`. -6. Accept snapshots using the AutoVerify trick above. +6. Accept snapshots with `ACCEPT_SNAPSHOTS=1` as above. +7. Add a mock to `src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks` and the generator to `GeneratorCatalog`. ### Adding a New Analyzer Diagnostic @@ -198,6 +221,18 @@ Analyzer and helper tests use direct `CSharpCompilation` / `CompilationWithAnaly dotnet test src/ReactiveUI.SourceGenerator.Tests --configuration Release ``` +### Measuring allocations + +```pwsh +cd src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks +dotnet run -c Release -- --smoke # every corpus generates and compiles +dotnet run -c Release -- --filter '*' --artifacts +dotnet run ~/source/rxui/tools/nettrace-analyzer.cs -- --top 40 /*.nettrace +``` + +Each run records an EventPipe trace per corpus; its AllocationTick events give the allocated types, sites and +inclusive frames. Set `BENCHMARK_PROFILERS=false` for timings only. + ### Building ```pwsh @@ -207,8 +242,8 @@ dotnet build src/ReactiveUI.SourceGenerators.sln ## What to Avoid - **`ISymbol` / `SyntaxNode` in pipeline output models** — breaks incremental caching; use value-equatable data records instead. -- **`SyntaxFactory` for code generation** — use `$$"""..."""` raw string literals. -- **`StringBuilder` for code generation** — use `$$"""..."""` raw string literals. +- **`SyntaxFactory` for code generation** — write through `SourceWriter`. +- **`StringBuilder`, `string.Join` or interpolation in emitters** — append into `SourceWriter`. - **Diagnostics reported inside generators** — use the separate analyzer project for all `RXUISG*` diagnostics. - **LINQ in hot Roslyn pipeline paths** — use `foreach` loops (Roslyn convention for incremental generators). - **Non-value-equatable models** in the incremental pipeline — will defeat caching and cause unnecessary regeneration. @@ -222,7 +257,7 @@ dotnet build src/ReactiveUI.SourceGenerators.sln - **Required .NET SDKs:** .NET 8.0, 9.0, and 10.0 (all required for multi-targeting the test project). - **Generator + Analyzer targets:** `netstandard2.0` (Roslyn host requirement). - **Test project targets:** `net8.0;net9.0;net10.0`. -- **No shallow clones:** The repository uses Nerdbank.GitVersioning; a full `git clone` is required for correct versioning. +- **No shallow clones:** The repository uses MinVer; a full `git clone` with tags is required for correct versioning. - **NuGet packaging:** The `ReactiveUI.SourceGenerators` project bundles all three versioned generator DLLs at different `analyzers/dotnet/roslyn*/cs` paths. - **Cross-platform tests:** On non-Windows platforms, WPF/WinForms types are injected as source stubs so generator tests compile cross-platform. - **`SyntaxFactory` helper:** https://roslynquoter.azurewebsites.net/ — useful for inspecting how Roslyn models a given syntax construct (reference only; do not use SyntaxFactory in code-gen paths). diff --git a/README.md b/README.md index d16c074a..8eb7213b 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,11 @@ This documentation covers using ReactiveUI Source Generators to simplify and enh - [Supported Attributes & Features](#supported-attributes) - [Detailed Usage](#welcome-to-a-new-way---source-generators) - [Reactive](#reactive) - - [ObservableAsProperty](#observableasproperty) - [ReactiveCommand](#reactivecommand) - [IViewFor](#iviewfor) - [BindableDerivedList](#usage-readonlyobservablecollection) - [Platform-Specific Attributes](#platform-specific-attributes) +- [Moved to ReactiveUI.Binding](#moved-to-reactiveuibinding) - [Compatibility Notes](#compatibility-notes) - [Credits](#credits) @@ -40,10 +40,7 @@ ReactiveUI Source Generators automatically generate ReactiveUI objects to stream - `[Reactive(Inheritance = InheritanceModifier.Virtual)]` With field and access modifiers. This will generate a virtual property. - `[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. -- `[ObservableAsProperty]` With field, method, Observable property and partial property support (C# 13 Visual Studio Version 17.12.0) -- `[ObservableAsProperty(ReadOnly = false)]` Removes readonly keyword from the generated helper field -- `[ObservableAsProperty(PropertyName = "ReadOnlyPropertyName")]` -- `[ObservableAsProperty(InitialValue = "Default Value")]` Only valid for partial properties using (C# 13 Visual Studio Version 17.12.0) + - `[ReactiveCommand]` - `[ReactiveCommand(RunInBackground = true)]` runs a synchronous command on ReactiveUI's background scheduler - `[ReactiveCommand(CanExecute = nameof(IObservableBoolName))]` with CanExecute @@ -54,25 +51,13 @@ ReactiveUI Source Generators automatically generate ReactiveUI objects to stream - `[IViewFor(nameof(ViewModelName))]` - `[IViewFor]` - `[IViewFor("YourNameSpace.YourGenericViewModel")]` Generic -- `[IViewFor(RegistrationType = SplatRegistrationType.PerRequest)]` with Splat Registration Type for IViewFor registration. -- `[IViewFor(RegistrationType = SplatRegistrationType.LazySingleton)]` Generic with Splat Registration Type for IViewFor registration. -- `[IViewFor(RegistrationType = SplatRegistrationType.Constant)]` Generic with Splat Registration Type for IViewFor registration. -- `[IViewFor(ViewModelRegistrationType = SplatRegistrationType.PerRequest)]` Generic with Splat Registration Type for ViewModel registration. -- `[IViewFor(ViewModelRegistrationType = SplatRegistrationType.LazySingleton)]` Generic with Splat Registration Type for ViewModel registration. -- `[IViewFor(ViewModelRegistrationType = SplatRegistrationType.Constant)]` Generic with Splat Registration Type for ViewModel registration. - `[RoutedControlHost("YourNameSpace.CustomControl")]` - `[ViewModelControlHost("YourNameSpace.CustomControl")]` - `[BindableDerivedList]` Generates a derived list from a ReadOnlyObservableCollection backing field - `[ReactiveCollection]` Generates property changed notifications on add, remove, new actions on a ObservableCollection backing field - `[IReactiveObject]` Generates IReactiveObject implementation for classes not able to inherit from ReactiveObject -#### IViewFor Registration generator - -To register all views for view models registered via the IViewFor Source Generator with a specified `RegistrationType`, call the following method during application startup: -```csharp -Splat.Locator.CurrentMutable.RegisterViewsForViewModelsSourceGenerated(); -``` - +`[ObservableAsProperty]` and IViewFor view registration moved to ReactiveUI.Binding; see [Moved to ReactiveUI.Binding](#moved-to-reactiveuibinding). ### Compatibility Notes - For **.NET Framework 4.8 and older**, add [Polyfill by Simon Cropp](https://github.com/SimonCropp/Polyfill) or [PolySharp by Sergio Pedri](https://github.com/Sergio0694/PolySharp) to your project and set the `LangVersion` to 12.0 or later in your project file. @@ -105,14 +90,11 @@ For more information on analyzer codes, see the [analyzer codes documentation](h ### `[Reactive]` Marks properties as reactive, generating getter and setter code. -### `[ObservableAsProperty]` -Generates read-only properties backed by an `ObservableAsPropertyHelper` based on an `IObservable`. - ### `[ReactiveCommand]` Generates commands, with options to add attributes or enable `CanExecute` functionality. ### `[IViewFor]` -Links a view to a view model for data binding. Supports generic types and Splat registration. +Links a view to a view model for data binding. Supports generic types. ### `[RoutedControlHost]` and `[ViewModelControlHost]` Platform-specific attributes for control hosting in WinForms applications. @@ -148,31 +130,6 @@ With ReactiveUI.Fody the `[Reactive]` Attribute was placed on a Public Property public string Name { get; set; } ``` -## ObservableAsPropertyHelper properties -Similarly, to declare output properties, the code looks like this: -```csharp -public partial class MyReactiveClass : ReactiveObject -{ - ObservableAsPropertyHelper _firstName; - - public MyReactiveClass() - { - _firstName = firstNameObservable - .ToProperty(this, x => x.FirstName); - } - - public string FirstName => _firstName.Value; - - private IObservable firstNameObservable() => Observable.Return("Test"); -} -``` - -With ReactiveUI.Fody, you can simply declare a read-only property using the [ObservableAsProperty] attribute, using either option of the two options shown below. -```csharp -[ObservableAsProperty] -public string FirstName { get; } -``` - ## Migration from ReactiveUI.Fody To migrate from ReactiveUI.Fody to ReactiveUI.SourceGenerators, follow these steps: 1. **Remove ReactiveUI.Fody**: Uninstall the ReactiveUI.Fody NuGet package from your project. @@ -181,7 +138,7 @@ Remove the Fody support files from the project directory - FodyWeaver.xml - FodyWeavers.xsd 2. **Install ReactiveUI.SourceGenerators**: Add the ReactiveUI.SourceGenerators NuGet package -3. **Update Property Declarations**: Place `[Reactive]` and `[ObservableAsProperty]` attributes on your properties as shown in the examples below and ensure that your classes and properties are declared as `partial`. You can also use field backing for `[Reactive]` properties as shown in the examples. This is a change from ReactiveUI.Fody which only supported property backing. +3. **Update Property Declarations**: Place `[Reactive]` attributes on your properties as shown in the examples below and ensure that your classes and properties are declared as `partial`. You can also use field backing for `[Reactive]` properties as shown in the examples. This is a change from ReactiveUI.Fody which only supported property backing. Remove using directives for `ReactiveUI.Fody.Helpers` and add using directives for `ReactiveUI.SourceGenerators`. 4. **Rebuild Your Project**: Ensure that your project builds successfully and that the generated code behaves as expected. @@ -267,177 +224,74 @@ Define types with `[Reactive]` properties in assembly `A`, and then define the `System.Text.Json.JsonSerializerContext` source generation context in assembly `B`, and let `B` reference `A`. -## Usage ObservableAsPropertyHelper `[ObservableAsProperty]` +## Moved to ReactiveUI.Binding -ObservableAsPropertyHelper is used to create a read-only property from an IObservable. The generated code will create a backing field and a property that returns the value of the backing field. The backing field is initialized with the value of the IObservable when the class is instantiated. +ReactiveUI's binding engine, [ReactiveUI.Binding](https://github.com/reactiveui/ReactiveUI.Binding.SourceGenerators), +now provides two features this package used to generate. They have been removed from ReactiveUI.SourceGenerators. -A private field is created with the name of the property prefixed with an underscore. The field is initialized with the value of the IObservable when the class is instantiated. The property is created with the same name as the field without the underscore. The property returns the value of the field until initialized, then it returns the value of the IObservable. +| Removed | Use instead | +| --- | --- | +| `[ObservableAsProperty]` on a field, method, observable property or partial property, and the generated `InitializeOAPH()` | ReactiveUI.Binding's `[ObservableAsProperty]` on a `partial` property, assigned with `ToProperty` | +| `RegisterViewsForViewModelsSourceGenerated()`, the `RegistrationType` and `ViewModelRegistrationType` options of `[IViewFor]`, and `SplatRegistrationType` | ReactiveUI.Binding's view locator, which registers views at compile time | +| RXUISG0014, RXUISG0017 and the RXUISPR0002 suppression | Nothing: they only applied to `[ObservableAsProperty]` | -You can define the name of the property by using the PropertyName parameter. If you do not define the PropertyName, the property name will be the same as the field name without the underscore. +`[IViewFor]` still generates the `ViewModel` property and the `IViewFor` implementation for each UI platform. -### Usage ObservableAsPropertyHelper with Field -```csharp -using ReactiveUI.SourceGenerators; +### A read-only property backed by an observable -public partial class MyReactiveClass : ReactiveObject -{ - [ObservableAsProperty] - private string _myProperty = "Default Value"; +With ReactiveUI.Binding, mark a `partial` property `[ObservableAsProperty]` (C# 13 or later). The generator writes the +property's body and a helper field named after it, which you assign with `ToProperty`: - public MyReactiveClass() - { - _myPrpertyHelper = MyPropertyObservable() - .ToProperty(this, x => x.MyProperty); - } - - IObservable MyPropertyObservable() => Observable.Return("Test Value"); -} -``` - -### Usage ObservableAsPropertyHelper with Field and non readonly nullable OAPH field ```csharp -using ReactiveUI.SourceGenerators; +using ReactiveUI.Binding; -public partial class MyReactiveClass : ReactiveObject, IActivatableViewModel +public partial class MyReactiveClass : ReactiveObject { - [ObservableAsProperty(ReadOnly = false)] - private string _myProperty = "Default Value"; + public MyReactiveClass() => + _myPropertyHelper = MyPropertyObservable().ToProperty(this, x => x.MyProperty, initialValue: "Default Value"); - public MyReactiveClass() - { - this.WhenActivated(disposables => - { - _myPrpertyHelper = MyPropertyObservable() - .ToProperty(this, x => x.MyProperty) - .DisposeWith(disposables); - }); - } + [ObservableAsProperty] + public partial string MyProperty { get; } - IObservable MyPropertyObservable() => Observable.Return("Test Value"); + private IObservable MyPropertyObservable() => Observable.Return("Test Value"); } ``` -### Usage ObservableAsPropertyHelper with Observable Property and specific PropertyName -```csharp -using ReactiveUI.SourceGenerators; - -public partial class MyReactiveClass : ReactiveObject -{ - [ObservableAsProperty(ReadOnly = false)] - private string _myProperty = "Default Value"; - - public MyReactiveClass() - { - this.WhenActivated(disposables => - { - _myPrpertyHelper = MyPropertyObservable() - .ToProperty(this, x => x.MyProperty) - .DisposeWith(disposables); - }); - } - - IObservable MyPropertyObservable() => Observable.Return("Test Value"); -} -``` +Without ReactiveUI.Binding, write the helper with ReactiveUI's `ToProperty`: -### Usage ObservableAsPropertyHelper with Observable Property and protected OAPH field ```csharp -using ReactiveUI.SourceGenerators; - public partial class MyReactiveClass : ReactiveObject { - [ObservableAsProperty(UseProtected = true)] - private string _myProperty = "Default Value"; + private readonly ObservableAsPropertyHelper _myPropertyHelper; - public MyReactiveClass() - { - _myPrpertyHelper = MyPropertyObservable() - .ToProperty(this, x => x.MyProperty); - } + public MyReactiveClass() => + _myPropertyHelper = MyPropertyObservable().ToProperty(this, x => x.MyProperty, initialValue: "Default Value"); - IObservable MyPropertyObservable() => Observable.Return("Test Value"); -} -``` - -### Usage ObservableAsPropertyHelper with Observable Method - -NOTE: This does not currently support methods with parameters -```csharp -using ReactiveUI.SourceGenerators; - -public partial class MyReactiveClass : ReactiveObject -{ - public MyReactiveClass() - { - // Initialize generated _myObservablePropertyHelper - // for the generated MyObservableProperty - InitializeOAPH(); - } + public string MyProperty => _myPropertyHelper.Value; - [ObservableAsProperty] - IObservable MyObservable() => Observable.Return("Test Value"); + private IObservable MyPropertyObservable() => Observable.Return("Test Value"); } ``` -### Usage ObservableAsPropertyHelper with Observable Method and specific PropertyName -```csharp -using ReactiveUI.SourceGenerators; - -public partial class MyReactiveClass : ReactiveObject -{ - public MyReactiveClass() - { - // Initialize generated _testValuePropertyHelper - // for the generated TestValueProperty - InitializeOAPH(); - } +### Registering views - [ObservableAsProperty(PropertyName = TestValueProperty)] - IObservable MyObservable() => Observable.Return("Test Value"); -} -``` +ReactiveUI.Binding's view locator registers every class whose declaration implements `IViewFor`. Source generators +cannot see each other's output, so the view locator does not see the interface `[IViewFor]` adds. List the interface +on the class as well; the generated members still implement it: -### Usage ObservableAsPropertyHelper with Observable Method and protected OAPH field ```csharp -using ReactiveUI.SourceGenerators; - -public partial class MyReactiveClass : ReactiveObject -{ - public MyReactiveClass() - { - // Initialize generated _myObservablePropertyHelper - // for the generated MyObservableProperty - InitializeOAPH(); - } - - [ObservableAsProperty(UseProtected = true)] - IObservable MyObservable() => Observable.Return("Test Value"); +[IViewFor] +public partial class LoginView : UserControl, IViewFor +{ } ``` -### Usage ObservableAsPropertyHelper with partial Property and a default value -```csharp -using ReactiveUI.SourceGenerators; - -public partial class MyReactiveClass : ReactiveObject -{ - public MyReactiveClass() - { - // The value of MyProperty will be "Default Value" until the Observable is initialized - _myPrpertyHelper = MyPropertyObservable() - .ToProperty(this, nameof(MyProperty)); - } - - [ObservableAsProperty(InitialValue = "Default Value")] - public partial string MyProperty { get; } +Without ReactiveUI.Binding, register each view with Splat: - public IObservable MyPropertyObservable() => Observable.Return("Test Value"); -} +```csharp +AppLocator.CurrentMutable.Register>(static () => new LoginView()); ``` -String values are automatically quoted, so `InitialValue = ""` produces an empty string initial value. -Non nullable `string` properties are initialized with `string.Empty` when no `InitialValue` is provided. - ## Usage ReactiveCommand `[ReactiveCommand]` ### Usage ReactiveCommand without parameter @@ -638,35 +492,6 @@ The class must inherit from a UI Control from any of the following platforms and - Avalonia (Avalonia) - Uno (Windows.UI.Xaml). -### IViewFor with Splat Registration Type - -Choose from the following Splat Registration Types, option for IViewFor Registration and / or ViewModel Registration: -- `SplatRegistrationType.PerRequest` -- `SplatRegistrationType.LazySingleton` -- `SplatRegistrationType.Constant` -- `SplatRegistrationType.None` (Default if not specified - no registration is performed) - -```csharp -using ReactiveUI.SourceGenerators; -using Splat; -[IViewFor(RegistrationType = SplatRegistrationType.PerRequest, ViewModelRegistrationType = SplatRegistrationType.LazySingleton)] -public partial class MyReactiveControl : UserControl -{ - public MyReactiveControl() - { - InitializeComponent(); - ViewModel = AppLocator.Current.GetService(); - } -} -``` - -this will generate the following code to enable you register the marked Views as `IViewFor` with Splat: -```csharp -using ReactiveUI.SourceGenerators; - -Splat.AppLocator.CurrentMutable.RegisterViewsForViewModelsSourceGenerated(); -``` - ### Usage IViewFor with ViewModel Name - Generic Types should be used with the fully qualified name, otherwise use nameof(ViewModelTypeName) ```csharp using ReactiveUI.SourceGenerators; @@ -762,9 +587,6 @@ public partial class MyReactiveClass } ``` -### TODO: -- Add ObservableAsProperty to generate from a IObservable method with parameters. - # Credits Portions of this code base are based on and derived from From 30ed9916d3dd8430d533fc2c8cd39d7d37767fef Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:48:17 +1000 Subject: [PATCH 20/30] perf: discover [IViewFor] and [IReactiveObject] with ForAttributeWithMetadataName, and bind less in extraction - [IViewFor] and [IReactiveObject] used a syntax provider that bound every attribute of every attributed class to find their own; they now use ForAttributeWithMetadataName, one registration per IViewFor attribute form (IViewForAttribute and IViewForAttribute`1), and their predicates reject non-partial classes from syntax. - Transforms read the attribute ForAttributeWithMetadataName matched instead of searching the symbol's attributes again. - TargetInfo is built once per type symbol rather than once per member. - Task, observable and scheduler checks compare symbols structurally instead of building display strings for every base type. - XML documentation is only requested when the declaration has a documentation comment. - The fully qualified, nullable-annotated display format is built once. --- .../AttributeDefinitions.cs | 1 + .../BindableDerivedListGenerator.Execute.cs | 5 +- .../Core/Extensions/ISymbolExtensions.cs | 8 +- .../Core/Extensions/ITypeSymbolExtensions.cs | 130 +++++++++++++----- .../Core/Extensions/SyntaxNodeExtensions.cs | 36 +++++ .../SyntaxValueProviderExtensions.cs | 79 ----------- .../GenericGeneratorAttributeSyntaxContext.cs | 74 ---------- .../Core/Models/TargetInfo.cs | 16 ++- .../IViewFor/IViewForGenerator.Execute.cs | 14 +- .../IViewFor/IViewForGenerator.cs | 47 +++++-- .../Reactive/ReactiveGenerator.Execute.cs | 12 +- .../ReactiveCollectionGenerator.Execute.cs | 6 - .../ReactiveCommandGenerator.Execute.cs | 2 +- .../ReactiveObjectGenerator.Execute.cs | 2 +- .../ReactiveObject/ReactiveObjectGenerator.cs | 5 +- ...activeUI.SourceGenerators.Roslyn.projitems | 2 - .../RoutedControlHostGenerator.Execute.cs | 5 +- .../ViewModelControlHostGenerator.Execute.cs | 5 +- 18 files changed, 204 insertions(+), 245 deletions(-) create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/SyntaxNodeExtensions.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/SyntaxValueProviderExtensions.cs delete mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/GenericGeneratorAttributeSyntaxContext.cs diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs index e36f553a..c94862ff 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs @@ -278,6 +278,7 @@ public ReactiveAttribute(params string[] alsoNotify) #endif public const string IViewForAttributeType = "ReactiveUI.SourceGenerators.IViewForAttribute"; + public const string IViewForGenericAttributeType = "ReactiveUI.SourceGenerators.IViewForAttribute`1"; public static string IViewForAttribute { get; } = $$""" // Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs index 3c6b635e..aa1221ac 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs @@ -50,10 +50,7 @@ public sealed partial class BindableDerivedListGenerator using var builder = ImmutableArrayBuilder.Rent(); var symbol = context.TargetSymbol; - if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.BindableDerivedListAttributeType, out var attributeData)) - { - return default; - } + var attributeData = context.Attributes[0]; if (symbol is not IFieldSymbol fieldSymbol) { diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ISymbolExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ISymbolExtensions.cs index 6e8fbfc5..bee27920 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ISymbolExtensions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ISymbolExtensions.cs @@ -11,6 +11,10 @@ namespace ReactiveUI.SourceGenerators.Extensions; /// Extension methods for the type. internal static class ISymbolExtensions { + /// The fully qualified format with nullable reference type annotations, built once rather than per call. + private static readonly SymbolDisplayFormat FullyQualifiedWithNullabilityFormat = + SymbolDisplayFormat.FullyQualifiedFormat.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier); + /// Provides extension members for symbols. /// The symbol to extend. extension(ISymbol symbol) @@ -23,9 +27,7 @@ internal string GetFullyQualifiedName() => /// Gets the fully qualified name for this symbol, including nullability annotations. /// The fully qualified name for this symbol. internal string GetFullyQualifiedNameWithNullabilityAnnotations() => - symbol.ToDisplayString( - SymbolDisplayFormat.FullyQualifiedFormat.AddMiscellaneousOptions( - SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier)); + symbol.ToDisplayString(FullyQualifiedWithNullabilityFormat); /// Checks whether this symbol has an attribute with the specified fully qualified metadata name. /// The attribute name to look for. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ITypeSymbolExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ITypeSymbolExtensions.cs index 46b9a668..9b87b63f 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ITypeSymbolExtensions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/ITypeSymbolExtensions.cs @@ -12,6 +12,12 @@ namespace ReactiveUI.SourceGenerators.Extensions; /// Extension methods for the type. internal static class ITypeSymbolExtensions { + /// The root namespace of the framework types the classifiers look for. + private const string SystemNamespace = "System"; + + /// The name of System.IObservable<T>. + private const string ObservableTypeName = "IObservable"; + /// Provides metadata-name and hierarchy operations for a type symbol. /// The type symbol receiving the extension operation. extension(ITypeSymbol typeSymbol) @@ -163,41 +169,39 @@ internal string GetFullyQualifiedMetadataName() extension(ITypeSymbol? typeSymbol) { /// Determines whether a type symbol represents a task return type. - /// Whether the type symbol or a base type represents a task. + /// Whether the type symbol or a base type is System.Threading.Tasks.Task. + /// Compares names structurally rather than through display strings, so no string is built per base type. internal bool IsTaskReturnType() { - var nameFormat = SymbolDisplayFormat.FullyQualifiedFormat; - do + for (var current = typeSymbol; current is not null; current = current.BaseType) { - var typeName = typeSymbol?.ToDisplayString(nameFormat); - if (typeName == "global::System.Threading.Tasks.Task") + if (current is INamedTypeSymbol { Name: "Task", Arity: 0, ContainingType: null } task + && IsNamespace(task.ContainingNamespace, "Tasks", "Threading", SystemNamespace)) { return true; } - - typeSymbol = typeSymbol?.BaseType; } - while (typeSymbol is not null); return false; } /// Determines whether a type symbol represents an observable return type. - /// Whether the type symbol or a base type represents an observable. + /// Whether the type symbol or a base type mentions System.IObservable anywhere in its name. + /// + /// Matches what the fully qualified display string containing global::System.IObservable matched - the type, + /// its type arguments, array elements and containing types - without building the string. + /// internal bool IsObservableReturnType() { - var nameFormat = SymbolDisplayFormat.FullyQualifiedFormat; - do + for (var current = typeSymbol; current is not null; current = current.BaseType) { - var typeName = typeSymbol?.ToDisplayString(nameFormat); - if (typeName?.Contains("global::System.IObservable") == true) + if (MentionsType( + current, + static named => named.Name.StartsWith(ObservableTypeName, StringComparison.Ordinal) && IsNamespace(named.ContainingNamespace, SystemNamespace))) { return true; } - - typeSymbol = typeSymbol?.BaseType; } - while (typeSymbol is not null); return false; } @@ -207,40 +211,39 @@ internal bool IsObservableReturnType() /// Whether the type symbol or a base type represents that scheduler API. internal bool IsSchedulerType(ReactiveUiApi api) { - var expectedTypeName = api == ReactiveUiApi.Primitives - ? "global::ReactiveUI.Primitives.Concurrency.ISequencer" - : "global::System.Reactive.Concurrency.IScheduler"; - var nameFormat = SymbolDisplayFormat.FullyQualifiedFormat; - do + for (var current = typeSymbol; current is not null; current = current.BaseType) { - var typeName = typeSymbol?.ToDisplayString(nameFormat); - if (typeName == expectedTypeName) + if (current is not INamedTypeSymbol { Arity: 0, ContainingType: null } named) { - return true; + continue; } - typeSymbol = typeSymbol?.BaseType; + var matches = api == ReactiveUiApi.Primitives + ? named.Name == "ISequencer" && IsNamespace(named.ContainingNamespace, "Concurrency", "Primitives", "ReactiveUI") + : named.Name == "IScheduler" && IsNamespace(named.ContainingNamespace, "Concurrency", "Reactive", SystemNamespace); + if (matches) + { + return true; + } } - while (typeSymbol is not null); + return false; } /// Determines whether a type symbol represents an observable Boolean value. - /// Whether the type symbol or a base type represents an observable Boolean. + /// Whether the type symbol or a base type mentions System.IObservable<bool> anywhere in its name. internal bool IsObservableBoolType() { - var nameFormat = SymbolDisplayFormat.FullyQualifiedFormat; - do + for (var current = typeSymbol; current is not null; current = current.BaseType) { - var typeName = typeSymbol?.ToDisplayString(nameFormat); - if (typeName?.Contains("global::System.IObservable") == true) + if (MentionsType( + current, + static named => named is { Name: ObservableTypeName, TypeArguments: [{ SpecialType: SpecialType.System_Boolean }] } + && IsNamespace(named.ContainingNamespace, SystemNamespace))) { return true; } - - typeSymbol = typeSymbol?.BaseType; } - while (typeSymbol is not null); return false; } @@ -385,4 +388,63 @@ static void BuildFrom(ISymbol? current, ImmutableArrayBuilder target) BuildFrom(symbol, builder); } + + /// Determines whether a type, or any type named in its display form, satisfies a check. + /// The type. + /// The check applied to each named type. + /// Whether any named type in the type's display form satisfies the check. + /// + /// Walks what a fully qualified display string would spell out: the type itself, its containing types, its type + /// arguments (tuple elements included) and array and pointer element types. + /// + private static bool MentionsType(ITypeSymbol type, Func check) => type switch + { + INamedTypeSymbol named => check(named) + || (named.ContainingType is { } containing && MentionsType(containing, check)) + || AnyTypeArgument(named, check), + IArrayTypeSymbol array => MentionsType(array.ElementType, check), + IPointerTypeSymbol pointer => MentionsType(pointer.PointedAtType, check), + _ => false, + }; + + /// Determines whether any type argument of a named type satisfies a check. + /// The named type. + /// The check applied to each named type. + /// Whether any type argument, at any depth, satisfies the check. + private static bool AnyTypeArgument(INamedTypeSymbol named, Func check) + { + foreach (var argument in named.TypeArguments) + { + if (MentionsType(argument, check)) + { + return true; + } + } + + return false; + } + + /// Determines whether a namespace is exactly a top-level namespace. + /// The namespace. + /// The namespace's name. + /// Whether the namespace matches. + private static bool IsNamespace(INamespaceSymbol? namespaceSymbol, string name) => + namespaceSymbol is { IsGlobalNamespace: false, ContainingNamespace.IsGlobalNamespace: true } && namespaceSymbol.Name == name; + + /// Determines whether a namespace is exactly a two-part dotted name. + /// The namespace. + /// The innermost segment. + /// The outermost segment. + /// Whether the namespace matches. + private static bool IsNamespace(INamespaceSymbol? namespaceSymbol, string inner, string outer) => + namespaceSymbol is { IsGlobalNamespace: false } && namespaceSymbol.Name == inner && IsNamespace(namespaceSymbol.ContainingNamespace, outer); + + /// Determines whether a namespace is exactly a three-part dotted name. + /// The namespace. + /// The innermost segment. + /// The middle segment. + /// The outermost segment. + /// Whether the namespace matches. + private static bool IsNamespace(INamespaceSymbol? namespaceSymbol, string inner, string middle, string outer) => + namespaceSymbol is { IsGlobalNamespace: false } && namespaceSymbol.Name == inner && IsNamespace(namespaceSymbol.ContainingNamespace, middle, outer); } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/SyntaxNodeExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/SyntaxNodeExtensions.cs new file mode 100644 index 00000000..ecab7a50 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/SyntaxNodeExtensions.cs @@ -0,0 +1,36 @@ +// 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 Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; + +namespace ReactiveUI.SourceGenerators.Extensions; + +/// Syntax-only checks that let a transform skip semantic work it would find empty. +internal static class SyntaxNodeExtensions +{ + /// Provides extension members for a syntax node. + /// The syntax node to extend. + extension(SyntaxNode syntaxNode) + { + /// Determines whether a declaration carries a documentation comment, from its leading trivia alone. + /// Whether the declaration has a /// or /** */ documentation comment. + /// + /// Asking the symbol for its documentation parses and formats the comment's XML, allocating even when there is + /// none; reading the trivia first skips that for the common undocumented member. + /// + internal bool HasDocumentationComment() + { + foreach (var trivia in syntaxNode.GetLeadingTrivia()) + { + if (trivia.IsKind(SyntaxKind.SingleLineDocumentationCommentTrivia) || trivia.IsKind(SyntaxKind.MultiLineDocumentationCommentTrivia)) + { + return true; + } + } + + return false; + } + } +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/SyntaxValueProviderExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/SyntaxValueProviderExtensions.cs deleted file mode 100644 index 16981da9..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/SyntaxValueProviderExtensions.cs +++ /dev/null @@ -1,79 +0,0 @@ -// 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.Threading; -using ReactiveUI.SourceGenerators.Extensions; - -namespace Microsoft.CodeAnalysis; - -/// Extension methods for the type. -internal static class SyntaxValueProviderExtensions -{ - /// Provides extension members for syntax value providers. - /// The syntax value provider to extend. - extension(in SyntaxValueProvider syntaxValueProvider) - { - /// Creates a provider for nodes with an attribute matching the supplied metadata name. - /// The generated value type. - /// The fully qualified metadata name of the attribute to look for. - /// Determines whether a syntax node should be inspected. - /// Transforms a matching attribute context into a result. - /// A provider that produces the transformed matching attribute contexts. - internal IncrementalValuesProvider ForAttributeWithMetadataNameWithGenerics( - string fullyQualifiedMetadataName, - Func predicate, - Func transform) => syntaxValueProvider - .CreateSyntaxProvider( - predicate, - (context, token) => - { - var symbol = context.SemanticModel.GetDeclaredSymbol(context.Node, token); - - // If the syntax node doesn't have a declared symbol, just skip this node. This would be - // the case for eg. lambda attributes, but those are not supported by the MVVM Toolkit. - if (symbol is null) - { - return null; - } - - // Skip symbols without the target attribute - if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(fullyQualifiedMetadataName, out var attributeData)) - { - return null; - } - - // Edge case: if the symbol is a partial method, skip the implementation part and only process the partial method - // definition. This is needed because attributes will be reported as available on both the definition and the - // implementation part. To avoid generating duplicate files, we only give priority to the definition part. - // On Roslyn 4.3+, ForAttributeWithMetadataName will already only return the symbol the attribute was located on. - if (symbol is IMethodSymbol { IsPartialDefinition: false, PartialDefinitionPart: not null }) - { - return null; - } - - // Create the GeneratorAttributeSyntaxContext value to pass to the input transform. The attributes array - // will only ever have a single value, but that's fine with the attributes the various generators look for. -#if ROSYLN_412 || ROSYLN_500 - System.Collections.Immutable.ImmutableArray attributes = [attributeData]; -#else - var attributes = System.Collections.Immutable.ImmutableArray.Create(attributeData); -#endif - GenericGeneratorAttributeSyntaxContext syntaxContext = new( - targetNode: context.Node, - targetSymbol: symbol, - semanticModel: context.SemanticModel, - attributes); - - return new Option(transform(syntaxContext, token)); - }) - .Where(static item => item is not null) - .Select(static (item, _) => item!.Value)!; - } - - /// A simple record to wrap a value that might be missing. - /// The type of values to wrap. - /// The wrapped value, if it exists. - private sealed record Option(T? Value); -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/GenericGeneratorAttributeSyntaxContext.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/GenericGeneratorAttributeSyntaxContext.cs deleted file mode 100644 index be584762..00000000 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/GenericGeneratorAttributeSyntaxContext.cs +++ /dev/null @@ -1,74 +0,0 @@ -// 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.Collections.Immutable; -using HashCode = System.HashCode; - -namespace Microsoft.CodeAnalysis; - -/// A type containing information for a match from . -internal readonly struct GenericGeneratorAttributeSyntaxContext : IEquatable -{ - /// Initializes a new instance of the struct. - /// The syntax node the attribute is attached to. - /// The symbol that the attribute is attached to. - /// Semantic model for the file that is contained within. - /// The collection of matching attributes. - internal GenericGeneratorAttributeSyntaxContext( - SyntaxNode targetNode, - ISymbol targetSymbol, - SemanticModel semanticModel, - ImmutableArray attributes) - { - TargetNode = targetNode; - TargetSymbol = targetSymbol; - SemanticModel = semanticModel; - Attributes = attributes; - } - - /// - /// Gets the syntax node the attribute is attached to. For example, with [CLSCompliant] class C { } this would the class declaration node. - /// - internal SyntaxNode TargetNode { get; } - - /// - /// Gets the symbol that the attribute is attached to. For example, with [CLSCompliant] class C { } this would be the for "C". - /// - internal ISymbol TargetSymbol { get; } - - /// Gets semantic model for the file that is contained within. - internal SemanticModel SemanticModel { get; } - - /// - /// Gets the matching attributes on . This collection is always non-empty. Each attribute has an - /// whose fully qualified metadata name matches the requested name. - /// - /// To get the entire list of attributes, use on . - /// - /// - internal ImmutableArray Attributes { get; } - - /// - public bool Equals(GenericGeneratorAttributeSyntaxContext other) => - ReferenceEquals(TargetNode, other.TargetNode) - && SymbolEqualityComparer.Default.Equals(TargetSymbol, other.TargetSymbol) - && ReferenceEquals(SemanticModel, other.SemanticModel) - && Attributes.Equals(other.Attributes); - - /// - public override bool Equals(object? obj) => - obj is GenericGeneratorAttributeSyntaxContext other && Equals(other); - - /// - public override int GetHashCode() - { - HashCode hashCode = default; - hashCode.Add(TargetNode); - hashCode.Add(SymbolEqualityComparer.Default.GetHashCode(TargetSymbol)); - hashCode.Add(SemanticModel); - hashCode.Add(Attributes); - return hashCode.ToHashCode(); - } -} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs index 74710e44..549ac454 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Models/TargetInfo.cs @@ -2,6 +2,7 @@ // 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.CompilerServices; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using ReactiveUI.SourceGenerators.Extensions; @@ -26,10 +27,23 @@ internal sealed record TargetInfo( string TargetType, TargetInfo? ParentInfo) { + /// The target information already built for a type symbol in the current compilation. + /// + /// Every attributed member of a type needs its type's information, and each member is extracted separately, so without + /// this the same display strings were built once per member. The table holds its keys weakly, so it never keeps an + /// old compilation's symbols alive, and the values hold no symbols. + /// + private static readonly ConditionalWeakTable Cache = new(); + + /// Gets the target information for a named type symbol, building it once per symbol. + /// The target type symbol. + /// The generated target information. + internal static TargetInfo From(INamedTypeSymbol namedTypeSymbol) => Cache.GetValue(namedTypeSymbol, Create); + /// Creates target information from a named type symbol. /// The target type symbol. /// The generated target information. - internal static TargetInfo From(INamedTypeSymbol namedTypeSymbol) + private static TargetInfo Create(INamedTypeSymbol namedTypeSymbol) { var targetHintName = ToHintName(namedTypeSymbol.GetFullyQualifiedMetadataName()); diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs index ba6da83e..a70f56a9 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.Execute.cs @@ -4,8 +4,6 @@ using System.Threading; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; using ReactiveUI.SourceGenerators.CodeGeneration; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; @@ -36,20 +34,12 @@ public partial class IViewForGenerator /// The Roslyn context for the annotated declaration. /// The cancellation token. /// The generation model, or when the target is unsupported. - private static IViewForInfo? GetClassInfo(in GenericGeneratorAttributeSyntaxContext context, CancellationToken token) + private static IViewForInfo? GetClassInfo(in GeneratorAttributeSyntaxContext context, CancellationToken token) { - if (!(context.TargetNode is ClassDeclarationSyntax declaredClass && declaredClass.Modifiers.Any(SyntaxKind.PartialKeyword))) - { - return default; - } - var symbol = context.TargetSymbol; token.ThrowIfCancellationRequested(); - if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.IViewForAttributeType, out var attributeData)) - { - return default; - } + var attributeData = context.Attributes[0]; token.ThrowIfCancellationRequested(); if (symbol is not INamedTypeSymbol classSymbol) diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs index b4016103..b7e293e3 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs @@ -2,10 +2,13 @@ // 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.Collections.Generic; using System.Collections.Immutable; using System.Text; +using System.Threading; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using ReactiveUI.SourceGenerators.Helpers; @@ -24,15 +27,15 @@ public void Initialize(IncrementalGeneratorInitializationContext context) ctx.AddSource($"{AttributeDefinitions.IViewForAttributeType}.g.cs", SourceText.From(AttributeDefinitions.IViewForAttribute, Encoding.UTF8))); // Gather info for all annotated IViewFor Classes - var viewForInfo = - context.SyntaxProvider - .ForAttributeWithMetadataNameWithGenerics( - AttributeDefinitions.IViewForAttributeType, - static (node, _) => node is ClassDeclarationSyntax { AttributeLists.Count: > 0 }, - static (context, token) => GetClassInfo(context, token)) - .Where(static x => x is not null) - .Select(static (x, _) => x!) - .Collect(); + // The generic IViewFor and the IViewFor(string) forms are different metadata names, so each has its own + // ForAttributeWithMetadataName; both share one predicate and one transform. Only a partial class can take the + // generated members, so anything else is rejected from syntax before any binding. + Func predicate = static (node, _) => + node is ClassDeclarationSyntax { AttributeLists.Count: > 0 } declaration && declaration.Modifiers.Any(SyntaxKind.PartialKeyword); + Func transform = static (context, token) => GetClassInfo(context, token); + var named = context.SyntaxProvider.ForAttributeWithMetadataName(AttributeDefinitions.IViewForAttributeType, predicate, transform).Collect(); + var generic = context.SyntaxProvider.ForAttributeWithMetadataName(AttributeDefinitions.IViewForGenericAttributeType, predicate, transform).Collect(); + var viewForInfo = named.Combine(generic).Select(static (pair, _) => Join(pair.Left, pair.Right)); // Generate the requested properties and methods for IViewFor context.RegisterSourceOutput(viewForInfo, static (context, input) => @@ -54,6 +57,32 @@ public void Initialize(IncrementalGeneratorInitializationContext context) }); } + /// Joins the views found through each attribute form, dropping the targets that were declined. + /// The views marked [IViewFor("...")]. + /// The views marked [IViewFor<T>]. + /// The views. + private static ImmutableArray Join(ImmutableArray named, ImmutableArray generic) + { + var builder = ImmutableArray.CreateBuilder(named.Length + generic.Length); + foreach (var info in named) + { + if (info is not null) + { + builder.Add(info); + } + } + + foreach (var info in generic) + { + if (info is not null) + { + builder.Add(info); + } + } + + return builder.ToImmutable(); + } + /// Groups source-generation inputs by their annotated target type. /// The discovered IViewFor targets. /// The targets grouped by their generated file identity. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs index b5a32ab4..343cfe09 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs @@ -60,10 +60,7 @@ public sealed partial class ReactiveGenerator { using var builder = ImmutableArrayBuilder.Rent(); var symbol = context.TargetSymbol; - if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.ReactiveAttributeType, out var attributeData)) - { - return default; - } + var attributeData = context.Attributes[0]; if (symbol is not IPropertySymbol propertySymbol || !propertySymbol.IsPartialDefinition || propertySymbol.IsStatic) { @@ -119,7 +116,7 @@ private static PropertyInfo CreatePartialPropertyInfo( true, propertyAccessModifier, GetAlsoNotifyValues(attributeData, propertySymbol.Name, context.SemanticModel, token), - GetXmlDocumentation(propertySymbol, token)); + context.TargetNode.HasDocumentationComment() ? GetXmlDocumentation(propertySymbol, token) : string.Empty); } /// Gets normalized C# accessibility text. @@ -211,10 +208,7 @@ private static string GetXmlDocumentation(ISymbol symbol, CancellationToken toke private static Result? GetVariableInfo(in GeneratorAttributeSyntaxContext context, CancellationToken token) { using var builder = ImmutableArrayBuilder.Rent(); - if (!context.TargetSymbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.ReactiveAttributeType, out var attributeData)) - { - return default; - } + var attributeData = context.Attributes[0]; if (context.TargetSymbol is not IFieldSymbol fieldSymbol || !fieldSymbol.IsTargetTypeValid()) { diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs index 23c5cb30..dc473fbb 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs @@ -43,12 +43,6 @@ public sealed partial class ReactiveCollectionGenerator var symbol = context.TargetSymbol; token.ThrowIfCancellationRequested(); - // Skip symbols without the target attribute - if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.ReactiveCollectionAttributeType, out _)) - { - return default; - } - if (symbol is not IFieldSymbol fieldSymbol) { return default; diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs index c10c633f..9140dd09 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs @@ -142,7 +142,7 @@ context.TargetSymbol is IMethodSymbol methodSymbol runInBackground, forwardedPropertyAttributes, accessModifier, - GetXmlDocumentation(methodSymbol, token)); + context.TargetNode.HasDocumentationComment() ? GetXmlDocumentation(methodSymbol, token) : string.Empty); } /// Gets the relevant return-type details for a command method. diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.Execute.cs index 3d4cedb7..cdbe4b5f 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.Execute.cs @@ -24,7 +24,7 @@ public partial class ReactiveObjectGenerator /// The attribute syntax context for the class. /// The cancellation token for the generator operation. /// The class metadata, or when not applicable. - private static ReactiveObjectInfo? GetClassInfo(in GenericGeneratorAttributeSyntaxContext context, CancellationToken token) + private static ReactiveObjectInfo? GetClassInfo(in GeneratorAttributeSyntaxContext context, CancellationToken token) { if (!(context.TargetNode is ClassDeclarationSyntax declaredClass && declaredClass.Modifiers.Any(SyntaxKind.PartialKeyword))) { diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs index 393f7f8d..99737f60 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Text; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using ReactiveUI.SourceGenerators.Extensions; @@ -26,9 +27,9 @@ public void Initialize(IncrementalGeneratorInitializationContext context) // Gather info for all annotated IReactiveObject Classes var reactiveObjectInfo = context.SyntaxProvider - .ForAttributeWithMetadataNameWithGenerics( + .ForAttributeWithMetadataName( AttributeDefinitions.ReactiveObjectAttributeType, - static (node, _) => node is ClassDeclarationSyntax { AttributeLists.Count: > 0 }, + static (node, _) => node is ClassDeclarationSyntax { AttributeLists.Count: > 0 } declaration && declaration.Modifiers.Any(SyntaxKind.PartialKeyword), static (context, token) => GetClassInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems index 00f31510..2d1f8ac8 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems @@ -22,7 +22,6 @@ - @@ -31,7 +30,6 @@ - diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs index 932d20ab..d28fe20c 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.Execute.cs @@ -40,10 +40,7 @@ public partial class RoutedControlHostGenerator token.ThrowIfCancellationRequested(); var symbol = context.TargetSymbol; - if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.RoutedControlHostAttributeType, out var attributeData)) - { - return default; - } + var attributeData = context.Attributes[0]; token.ThrowIfCancellationRequested(); diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs index f62d13a0..07cc3e32 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.Execute.cs @@ -39,10 +39,7 @@ public partial class ViewModelControlHostGenerator token.ThrowIfCancellationRequested(); var symbol = context.TargetSymbol; - if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.ViewModelControlHostAttributeType, out var attributeData)) - { - return default; - } + var attributeData = context.Attributes[0]; token.ThrowIfCancellationRequested(); if (symbol is not INamedTypeSymbol classSymbol) From 6cbc44f7d88f2bacf642d87deb980a743c444397 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:54:04 +1000 Subject: [PATCH 21/30] perf: write each type's file from its own output so unchanged types stay cached Each generator collected every model and wrote every file from one callback, so a change to any model rewrote every file. Models are now grouped per type into value-equatable arrays and each type is written by its own source output; the driver compares a type's models with the last run's and skips it when they are equal. Diagnostics are reported by an output of their own. Pipeline steps carry tracking names, and tests assert that an unrelated edit reuses every type and that an edit to one type reruns only that type. --- .../UnitTests/IncrementalCachingTests.cs | 209 ++++++++++++++++++ .../BindableDerivedListGenerator.Execute.cs | 3 +- .../BindableDerivedListGenerator.cs | 49 +--- .../IncrementalPipelineExtensions.cs | 91 ++++++++ .../Core/Helpers/TrackingNames.cs | 51 +++++ .../IViewFor/IViewForGenerator.cs | 51 ++--- .../Reactive/ReactiveGenerator.Execute.cs | 3 +- .../Reactive/ReactiveGenerator.cs | 105 +++------ .../ReactiveCollectionGenerator.Execute.cs | 3 +- .../ReactiveCollectionGenerator.cs | 49 +--- .../ReactiveCommandGenerator.Execute.cs | 2 +- .../ReactiveCommandGenerator.cs | 40 +--- .../ReactiveObject/ReactiveObjectGenerator.cs | 33 +-- .../RoutedControlHostGenerator.cs | 19 +- .../ViewModelControlHostGenerator.cs | 19 +- 15 files changed, 443 insertions(+), 284 deletions(-) create mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/IncrementalCachingTests.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/IncrementalPipelineExtensions.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/Core/Helpers/TrackingNames.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IncrementalCachingTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IncrementalCachingTests.cs new file mode 100644 index 00000000..bf4d22db --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IncrementalCachingTests.cs @@ -0,0 +1,209 @@ +// 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.Helpers; +using ReactiveUI.SourceGenerators.WinForms; + +namespace ReactiveUI.SourceGenerator.Tests; + +/// Verifies that an edit reruns only the per-type steps whose models it changed. +/// +/// Each generator groups its models per type and writes each type's file from its own output, so the driver can compare a +/// type's models with the last run's and skip the type when they are equal. The tests run a driver with step tracking, +/// edit one tree, and read the reason each tracked output was produced. +/// +public class IncrementalCachingTests +{ + /// A file no generator reads, edited to show unrelated edits cache every step. + private const string UnrelatedSource = "namespace Other { public class Unrelated { public int Value => 1; } }"; + + /// The number of types each test source declares for the generator. + private const int TypeCount = 2; + + /// An unrelated edit leaves every [Reactive] type cached; editing one type reruns only that type. + /// A task to monitor the async. + [Test] + public Task ReactiveCachesPerType() => AssertCachesPerType( + new ReactiveGenerator(), + TrackingNames.ReactiveFieldTypes, + """ + using ReactiveUI; + using ReactiveUI.SourceGenerators; + namespace TestNs; + public partial class First : ReactiveObject { [Reactive] private int _alpha; } + public partial class Second : ReactiveObject { [Reactive] private int _beta; } + """, + "_alpha;", + "_gamma;"); + + /// An unrelated edit leaves every [ReactiveCommand] type cached; editing one type reruns only that type. + /// A task to monitor the async. + [Test] + public Task ReactiveCommandCachesPerType() => AssertCachesPerType( + new ReactiveCommandGenerator(), + TrackingNames.ReactiveCommandTypes, + """ + using ReactiveUI; + using ReactiveUI.SourceGenerators; + namespace TestNs; + public partial class First : ReactiveObject { [ReactiveCommand] private void Save() { } } + public partial class Second : ReactiveObject { [ReactiveCommand] private void Load() { } } + """, + "Save()", + "Store()"); + + /// An unrelated edit leaves every [ReactiveCollection] type cached; editing one type reruns only that type. + /// A task to monitor the async. + [Test] + public Task ReactiveCollectionCachesPerType() => AssertCachesPerType( + new ReactiveCollectionGenerator(), + TrackingNames.ReactiveCollectionTypes, + """ + using System.Collections.ObjectModel; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + namespace TestNs; + public partial class First : ReactiveObject { [ReactiveCollection] private ObservableCollection _alpha = []; } + public partial class Second : ReactiveObject { [ReactiveCollection] private ObservableCollection _beta = []; } + """, + "_alpha", + "_gamma"); + + /// An unrelated edit leaves every [BindableDerivedList] type cached; editing one type reruns only that type. + /// A task to monitor the async. + [Test] + public Task BindableDerivedListCachesPerType() => AssertCachesPerType( + new BindableDerivedListGenerator(), + TrackingNames.BindableDerivedListTypes, + """ + using System.Collections.ObjectModel; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + namespace TestNs; + public partial class First : ReactiveObject { [BindableDerivedList] private ReadOnlyObservableCollection? _alpha; } + public partial class Second : ReactiveObject { [BindableDerivedList] private ReadOnlyObservableCollection? _beta; } + """, + "_alpha", + "_gamma"); + + /// An unrelated edit leaves every [IReactiveObject] type cached; editing one type reruns only that type. + /// A task to monitor the async. + [Test] + public Task ReactiveObjectCachesPerType() => AssertCachesPerType( + new ReactiveObjectGenerator(), + TrackingNames.ReactiveObjectTypes, + """ + using ReactiveUI.SourceGenerators; + namespace TestNs; + [IReactiveObject] public partial class First { } + [IReactiveObject] public partial class Second { } + """, + "partial class First", + "partial class Third"); + + /// An unrelated edit leaves every [IViewFor] type cached; editing one type reruns only that type. + /// A task to monitor the async. + [Test] + public Task ViewForCachesPerType() => AssertCachesPerType( + new IViewForGenerator(), + TrackingNames.ViewForTypes, + """ + using ReactiveUI.SourceGenerators; + namespace TestNs; + public sealed class FirstViewModel { } + public sealed class SecondViewModel { } + [IViewFor] public partial class FirstView : System.Windows.Window { } + [IViewFor] public partial class SecondView : System.Windows.Window { } + """, + "partial class FirstView", + "partial class ThirdView"); + + /// An unrelated edit leaves every [RoutedControlHost] host cached. + /// A task to monitor the async. + [Test] + public Task RoutedControlHostCachesPerType() => AssertCachesPerType( + new RoutedControlHostGenerator(), + TrackingNames.RoutedControlHosts, + """ + using ReactiveUI.SourceGenerators.WinForms; + namespace TestNs; + [RoutedControlHost("System.Windows.Forms.UserControl")] public partial class FirstHost { } + [RoutedControlHost("System.Windows.Forms.UserControl")] public partial class SecondHost { } + """, + "partial class FirstHost", + "partial class ThirdHost"); + + /// Runs a generator, then reruns it after an unrelated edit and after an edit to one of two types. + /// The generator. + /// The tracking name of the generator's per-type step. + /// Source declaring two types the generator writes for, the first of which is edited. + /// Text in the first type to change. + /// Its replacement, which changes the first type's model. + /// A task to monitor the async. + private static async Task AssertCachesPerType(IIncrementalGenerator generator, string stepName, string source, string find, string replace) + { + var parseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13); + var generated = CSharpSyntaxTree.ParseText(source, parseOptions, path: "Types.cs"); + var unrelated = CSharpSyntaxTree.ParseText(UnrelatedSource, parseOptions, path: "Unrelated.cs"); + var stubs = CSharpSyntaxTree.ParseText(TestCompilationReferences.WindowsDesktopStubs, parseOptions, path: "Stubs.cs"); + Compilation compilation = CSharpCompilation.Create( + "IncrementalCaching", + [generated, unrelated, stubs], + TestCompilationReferences.CreatePortableDefault(), + new(OutputKind.DynamicallyLinkedLibrary)); + + GeneratorDriver driver = CSharpGeneratorDriver.Create( + [generator.AsSourceGenerator()], + parseOptions: parseOptions, + driverOptions: new(IncrementalGeneratorOutputKind.None, trackIncrementalGeneratorSteps: true)); + driver = driver.RunGenerators(compilation); + await Assert.That(Reasons(driver, stepName).Count).IsEqualTo(TypeCount); + + // An edit to a tree no generator reads: every per-type output is reused as it was. + var editedUnrelated = Microsoft.CodeAnalysis.Text.SourceText.From(UnrelatedSource.Replace("=> 1", "=> 2", StringComparison.Ordinal)); + var unrelatedEdit = compilation.ReplaceSyntaxTree(unrelated, unrelated.WithChangedText(editedUnrelated)); + var afterUnrelated = Reasons(driver.RunGenerators(unrelatedEdit), stepName); + await Assert.That(CountReused(afterUnrelated)).IsEqualTo(TypeCount); + + // An edit that changes the first type's model: the second type's output is still reused. + var relatedEdit = compilation.ReplaceSyntaxTree(generated, generated.WithChangedText(Microsoft.CodeAnalysis.Text.SourceText.From(source.Replace(find, replace, StringComparison.Ordinal)))); + var afterRelated = Reasons(driver.RunGenerators(relatedEdit), stepName); + await Assert.That(CountReused(afterRelated)).IsEqualTo(TypeCount - 1); + } + + /// Counts the outputs the driver reused rather than produced again. + /// The reasons each output was produced. + /// The number that were cached or unchanged. + private static int CountReused(List reasons) + { + var reused = 0; + foreach (var reason in reasons) + { + if (reason is IncrementalStepRunReason.Cached or IncrementalStepRunReason.Unchanged) + { + reused++; + } + } + + return reused; + } + + /// Reads the reason each output of a tracked step was produced in the driver's last run. + /// The driver. + /// The step's tracking name. + /// One reason per output. + private static List Reasons(GeneratorDriver driver, string stepName) + { + var reasons = new List(); + foreach (var step in driver.GetRunResult().Results[0].TrackedSteps[stepName]) + { + foreach (var (_, reason) in step.Outputs) + { + reasons.Add(reason); + } + } + + return reasons; + } +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs index aa1221ac..11f04b3c 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.Execute.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for full license information. using System; -using System.Collections.Generic; using System.Collections.Immutable; using System.Threading; using Microsoft.CodeAnalysis; @@ -174,7 +173,7 @@ private static (bool IsReferenceType, bool IncludeMemberNotNull) GetNullabilityI /// Generates the partial declaration holding one type's bindable derived list properties. /// The properties the type declares, all sharing one . /// The file's text. - private static string GenerateSource(List properties) + private static string GenerateSource(EquatableArray properties) { var target = properties[0].TargetInfo; var writer = SourceWriter.Rent() diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs index 878cfbbd..817ff72f 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/BindableDerivedList/BindableDerivedListGenerator.cs @@ -2,12 +2,11 @@ // 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.Collections.Generic; using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; -using ReactiveUI.SourceGenerators.BindableDerivedList.Models; +using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; namespace ReactiveUI.SourceGenerators; @@ -26,7 +25,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) }); // Gather info for all annotated variable with at least one attribute. - var bindableDerivedListInfo = + var results = context.SyntaxProvider .ForAttributeWithMetadataName( AttributeDefinitions.BindableDerivedListAttributeType, @@ -41,43 +40,17 @@ public void Initialize(IncrementalGeneratorInitializationContext context) static (context, token) => GetVariableInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) - .Collect(); + .WithTrackingName(TrackingNames.BindableDerivedLists); - // Generate the requested properties - context.RegisterSourceOutput(bindableDerivedListInfo, static (context, input) => - { - Dictionary< - (string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), - List> groupedPropertyInfo = []; - - foreach (var result in input) - { - foreach (var diagnostic in result.Errors.AsImmutableArray()) - { - context.ReportDiagnostic(diagnostic.ToDiagnostic()); - } - - if (result.Value is not BindableDerivedListInfo propertyInfo) - { - continue; - } - - var targetInfo = propertyInfo.TargetInfo; - var key = (targetInfo.FileHintName, targetInfo.TargetName, targetInfo.TargetNamespace, targetInfo.TargetVisibility, targetInfo.TargetType); - if (!groupedPropertyInfo.TryGetValue(key, out var properties)) - { - properties = []; - groupedPropertyInfo.Add(key, properties); - } + context.RegisterDiagnostics(results); - properties.Add(propertyInfo); - } + var types = results + .Where(static result => result.Value is not null) + .Select(static (result, _) => result.Value!) + .GroupByTarget(static property => property.TargetInfo) + .WithTrackingName(TrackingNames.BindableDerivedListTypes); - foreach (var grouping in groupedPropertyInfo) - { - var source = GenerateSource(grouping.Value); - context.AddSource($"{grouping.Key.FileHintName}.BindableDerivedList.g.cs", source); - } - }); + context.RegisterSourceOutput(types, static (context, properties) => + context.AddSource($"{properties[0].TargetInfo.FileHintName}.BindableDerivedList.g.cs", GenerateSource(properties))); } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/IncrementalPipelineExtensions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/IncrementalPipelineExtensions.cs new file mode 100644 index 00000000..a0fbf750 --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Extensions/IncrementalPipelineExtensions.cs @@ -0,0 +1,91 @@ +// 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.Collections.Generic; +using System.Collections.Immutable; +using Microsoft.CodeAnalysis; +using ReactiveUI.SourceGenerators.Helpers; +using ReactiveUI.SourceGenerators.Models; + +namespace ReactiveUI.SourceGenerators.Extensions; + +/// Pipeline shapes the generators share: per-type grouping and diagnostics as their own output. +/// +/// A generator that collects every model and writes every file from one callback rewrites every file whenever any model +/// changes. Grouping the collected models into one value per type, and registering the source output per value, lets +/// the driver compare each type's models with the last run's and skip the types that did not change. +/// +internal static class IncrementalPipelineExtensions +{ + /// Provides extension members for the generator initialization context. + /// The generator initialization context. + extension(in IncrementalGeneratorInitializationContext context) + { + /// Reports each result's diagnostics as their own output, apart from the sources. + /// The result's value type. + /// The extraction results. + internal void RegisterDiagnostics(IncrementalValuesProvider> results) + where T : IEquatable? => + context.RegisterSourceOutput( + results.Where(static result => !result.Errors.IsEmpty).Select(static (result, _) => result.Errors), + static (context, errors) => + { + foreach (var error in errors.AsImmutableArray()) + { + context.ReportDiagnostic(error.ToDiagnostic()); + } + }); + } + + /// Provides extension members for a provider of models. + /// The model type. + /// The models. + extension(IncrementalValuesProvider models) + where T : IEquatable + { + /// Groups the models by the type they belong to, one value-equatable array per type. + /// Reads a model's type. + /// One array per type, in the order the types were first seen. + internal IncrementalValuesProvider> GroupByTarget(Func target) => + models.Collect().SelectMany((all, _) => Group(all, target)); + } + + /// Groups models by their type's hint name, which is unique within a compilation. + /// The model type. + /// Every model. + /// Reads a model's type. + /// One array per type, in first-seen order. + private static ImmutableArray> Group(ImmutableArray all, Func target) + where T : IEquatable + { + if (all.IsEmpty) + { + return ImmutableArray>.Empty; + } + + var indexByType = new Dictionary(StringComparer.Ordinal); + var groups = new List.Builder>(); + foreach (var model in all) + { + var hintName = target(model).FileHintName; + if (!indexByType.TryGetValue(hintName, out var index)) + { + index = groups.Count; + indexByType.Add(hintName, index); + groups.Add(ImmutableArray.CreateBuilder()); + } + + groups[index].Add(model); + } + + var result = ImmutableArray.CreateBuilder>(groups.Count); + foreach (var group in groups) + { + result.Add(group.ToImmutable()); + } + + return result.MoveToImmutable(); + } +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Core/Helpers/TrackingNames.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Helpers/TrackingNames.cs new file mode 100644 index 00000000..1845933f --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Core/Helpers/TrackingNames.cs @@ -0,0 +1,51 @@ +// 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.Helpers; + +/// The names the generators' pipeline steps are tracked under, so tests can assert what the driver cached. +internal static class TrackingNames +{ + /// The models extracted from [Reactive] fields. + internal const string ReactiveFields = nameof(ReactiveFields); + + /// The [Reactive] field models grouped per type. + internal const string ReactiveFieldTypes = nameof(ReactiveFieldTypes); + + /// The models extracted from [Reactive] partial properties. + internal const string ReactivePartialProperties = nameof(ReactivePartialProperties); + + /// The [Reactive] partial property models grouped per type. + internal const string ReactivePartialPropertyTypes = nameof(ReactivePartialPropertyTypes); + + /// The models extracted from [ReactiveCommand] methods. + internal const string ReactiveCommands = nameof(ReactiveCommands); + + /// The [ReactiveCommand] models grouped per type. + internal const string ReactiveCommandTypes = nameof(ReactiveCommandTypes); + + /// The models extracted from [BindableDerivedList] fields. + internal const string BindableDerivedLists = nameof(BindableDerivedLists); + + /// The [BindableDerivedList] models grouped per type. + internal const string BindableDerivedListTypes = nameof(BindableDerivedListTypes); + + /// The models extracted from [ReactiveCollection] fields. + internal const string ReactiveCollections = nameof(ReactiveCollections); + + /// The [ReactiveCollection] models grouped per type. + internal const string ReactiveCollectionTypes = nameof(ReactiveCollectionTypes); + + /// The [IViewFor] view models grouped per type. + internal const string ViewForTypes = nameof(ViewForTypes); + + /// The [IReactiveObject] models grouped per type. + internal const string ReactiveObjectTypes = nameof(ReactiveObjectTypes); + + /// The [RoutedControlHost] models. + internal const string RoutedControlHosts = nameof(RoutedControlHosts); + + /// The [ViewModelControlHost] models. + internal const string ViewModelControlHosts = nameof(ViewModelControlHosts); +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs index b7e293e3..6733d61d 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/IViewFor/IViewForGenerator.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for full license information. using System; -using System.Collections.Generic; using System.Collections.Immutable; using System.Text; using System.Threading; @@ -11,6 +10,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; +using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; using ReactiveUI.SourceGenerators.Models; @@ -35,25 +35,23 @@ public void Initialize(IncrementalGeneratorInitializationContext context) Func transform = static (context, token) => GetClassInfo(context, token); var named = context.SyntaxProvider.ForAttributeWithMetadataName(AttributeDefinitions.IViewForAttributeType, predicate, transform).Collect(); var generic = context.SyntaxProvider.ForAttributeWithMetadataName(AttributeDefinitions.IViewForGenericAttributeType, predicate, transform).Collect(); - var viewForInfo = named.Combine(generic).Select(static (pair, _) => Join(pair.Left, pair.Right)); + var types = named.Combine(generic) + .SelectMany(static (pair, _) => Join(pair.Left, pair.Right)) + .GroupByTarget(static info => info.TargetInfo) + .WithTrackingName(TrackingNames.ViewForTypes); - // Generate the requested properties and methods for IViewFor - context.RegisterSourceOutput(viewForInfo, static (context, input) => + // View registration is not generated here: ReactiveUI.Binding's view locator registers every IViewFor. + context.RegisterSourceOutput(types, static (context, infos) => { - var groupedPropertyInfo = GroupByTarget(input); + var info = infos[0]; - // View registration is not generated here: ReactiveUI.Binding's view locator registers every IViewFor. - foreach (var grouping in groupedPropertyInfo.Values) + // Only a supported UI framework base type gets a source. + if (GenerateSource(info) is not { } source) { - var info = grouping[0]; - var source = GenerateSource(info); - - // Only add source when a supported UI framework base type was detected - if (source is not null) - { - context.AddSource($"{info.TargetInfo.FileHintName}.IViewFor.g.cs", source); - } + return; } + + context.AddSource($"{info.TargetInfo.FileHintName}.IViewFor.g.cs", source); }); } @@ -82,27 +80,4 @@ private static ImmutableArray Join(ImmutableArray n return builder.ToImmutable(); } - - /// Groups source-generation inputs by their annotated target type. - /// The discovered IViewFor targets. - /// The targets grouped by their generated file identity. - private static Dictionary<(string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), List> GroupByTarget( - ImmutableArray input) - { - Dictionary<(string, string, string, string, string), List> result = []; - foreach (var info in input) - { - var target = info.TargetInfo; - var key = (target.FileHintName, target.TargetName, target.TargetNamespace, target.TargetVisibility, target.TargetType); - if (!result.TryGetValue(key, out var values)) - { - values = []; - result.Add(key, values); - } - - values.Add(info); - } - - return result; - } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs index 343cfe09..2969bf82 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for full license information. using System; -using System.Collections.Generic; using System.Threading; using Microsoft.CodeAnalysis; #if ROSYLN_412 || ROSYLN_500 @@ -302,7 +301,7 @@ private static string GetFieldInheritance(AttributeData attributeData) => /// The properties the type declares, all sharing one . /// The selected ReactiveUI API surface. /// The file's text. - private static string GenerateSource(List properties, ReactiveUiIntegration integration) + private static string GenerateSource(EquatableArray properties, ReactiveUiIntegration integration) { var target = properties[0].TargetInfo; var writer = SourceWriter.Rent() diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs index cee37c6f..c11f3642 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.cs @@ -2,7 +2,6 @@ // 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.Collections.Generic; using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -43,7 +42,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) private static void RunReactiveFromField(in IncrementalGeneratorInitializationContext context) { // Gather info for all annotated variable with at least one attribute. - var propertyInfo = + var results = context.SyntaxProvider .ForAttributeWithMetadataName( AttributeDefinitions.ReactiveAttributeType, @@ -55,45 +54,9 @@ private static void RunReactiveFromField(in IncrementalGeneratorInitializationCo static (context, token) => GetVariableInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) - .Collect() - .Combine(context.ReactiveUiIntegration()); + .WithTrackingName(TrackingNames.ReactiveFields); - // Generate the requested properties - context.RegisterSourceOutput(propertyInfo, static (context, input) => - { - Dictionary< - (string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), - List> groupedPropertyInfo = []; - - foreach (var result in input.Left) - { - foreach (var diagnostic in result.Errors.AsImmutableArray()) - { - context.ReportDiagnostic(diagnostic.ToDiagnostic()); - } - - if (result.Value is not PropertyInfo propertyInfo) - { - continue; - } - - var targetInfo = propertyInfo.TargetInfo; - var key = (targetInfo.FileHintName, targetInfo.TargetName, targetInfo.TargetNamespace, targetInfo.TargetVisibility, targetInfo.TargetType); - if (!groupedPropertyInfo.TryGetValue(key, out var properties)) - { - properties = []; - groupedPropertyInfo.Add(key, properties); - } - - properties.Add(propertyInfo); - } - - foreach (var grouping in groupedPropertyInfo) - { - var source = GenerateSource(grouping.Value, input.Right); - context.AddSource($"{grouping.Key.FileHintName}.Properties.g.cs", source); - } - }); + RegisterOutputs(context, results, ".Properties.g.cs", TrackingNames.ReactiveFieldTypes); } #if ROSYLN_412 || ROSYLN_500 @@ -102,7 +65,7 @@ private static void RunReactiveFromField(in IncrementalGeneratorInitializationCo private static void RunReactiveFromProperty(in IncrementalGeneratorInitializationContext context) { // Gather info for all annotated variable with at least one attribute. - var propertyInfo = + var results = context.SyntaxProvider .ForAttributeWithMetadataName( AttributeDefinitions.ReactiveAttributeType, @@ -114,45 +77,35 @@ private static void RunReactiveFromProperty(in IncrementalGeneratorInitializatio static (context, token) => GetPropertyInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) - .Collect() - .Combine(context.ReactiveUiIntegration()); - - // Generate the requested properties - context.RegisterSourceOutput(propertyInfo, static (context, input) => - { - Dictionary< - (string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), - List> groupedPropertyInfo = []; - - foreach (var result in input.Left) - { - foreach (var diagnostic in result.Errors.AsImmutableArray()) - { - context.ReportDiagnostic(diagnostic.ToDiagnostic()); - } + .WithTrackingName(TrackingNames.ReactivePartialProperties); - if (result.Value is not PropertyInfo propertyInfo) - { - continue; - } + RegisterOutputs(context, results, ".PartialProperties.g.cs", TrackingNames.ReactivePartialPropertyTypes); + } +#endif - var targetInfo = propertyInfo.TargetInfo; - var key = (targetInfo.FileHintName, targetInfo.TargetName, targetInfo.TargetNamespace, targetInfo.TargetVisibility, targetInfo.TargetType); - if (!groupedPropertyInfo.TryGetValue(key, out var properties)) - { - properties = []; - groupedPropertyInfo.Add(key, properties); - } + /// Reports the extraction diagnostics and writes one file per type, each cached on its own. + /// The incremental generator initialization context. + /// The extraction results. + /// The suffix of each type's file name. + /// The tracking name of the per-type step. + private static void RegisterOutputs( + in IncrementalGeneratorInitializationContext context, + IncrementalValuesProvider> results, + string hintSuffix, + string trackingName) + { + context.RegisterDiagnostics(results); - properties.Add(propertyInfo); - } + var types = results + .Where(static result => result.Value is not null) + .Select(static (result, _) => result.Value!) + .GroupByTarget(static property => property.TargetInfo) + .WithTrackingName(trackingName); - foreach (var grouping in groupedPropertyInfo) - { - var source = GenerateSource(grouping.Value, input.Right); - context.AddSource($"{grouping.Key.FileHintName}.PartialProperties.g.cs", source); - } + context.RegisterSourceOutput(types.Combine(context.ReactiveUiIntegration()), (context, input) => + { + var properties = input.Left; + context.AddSource(properties[0].TargetInfo.FileHintName + hintSuffix, GenerateSource(properties, input.Right)); }); } -#endif } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs index dc473fbb..24aea7c5 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for full license information. using System; -using System.Collections.Generic; using System.Collections.Immutable; using System.Threading; using Microsoft.CodeAnalysis; @@ -174,7 +173,7 @@ private static (bool IsReferenceType, bool IncludeMemberNotNull) GetNullabilityI /// The properties the type declares, all sharing one . /// The selected ReactiveUI API surface. /// The file's text. - private static string GenerateSource(List properties, ReactiveUiIntegration integration) + private static string GenerateSource(EquatableArray properties, ReactiveUiIntegration integration) { var target = properties[0].TargetInfo; var writer = SourceWriter.Rent() diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs index e31b2819..dd61a4ca 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs @@ -2,14 +2,12 @@ // 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.Collections.Generic; using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; -using ReactiveUI.SourceGenerators.Models; namespace ReactiveUI.SourceGenerators; @@ -33,7 +31,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) /// The incremental generator initialization context. private static void RunReactiveCollectionFromField(in IncrementalGeneratorInitializationContext context) { - var propertyInfo = + var results = context.SyntaxProvider .ForAttributeWithMetadataName( AttributeDefinitions.ReactiveCollectionAttributeType, @@ -48,44 +46,17 @@ private static void RunReactiveCollectionFromField(in IncrementalGeneratorInitia static (context, token) => GetVariableInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) - .Collect() - .Combine(context.ReactiveUiIntegration()); + .WithTrackingName(TrackingNames.ReactiveCollections); - // Generate the requested properties and methods - context.RegisterSourceOutput(propertyInfo, static (context, input) => - { - Dictionary< - (string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), - List> groupedPropertyInfo = []; - - foreach (var result in input.Left) - { - foreach (var diagnostic in result.Errors.AsImmutableArray()) - { - context.ReportDiagnostic(diagnostic.ToDiagnostic()); - } - - if (result.Value is not ReactiveCollectionFieldInfo propertyInfo) - { - continue; - } - - var targetInfo = propertyInfo.TargetInfo; - var key = (targetInfo.FileHintName, targetInfo.TargetName, targetInfo.TargetNamespace, targetInfo.TargetVisibility, targetInfo.TargetType); - if (!groupedPropertyInfo.TryGetValue(key, out var properties)) - { - properties = []; - groupedPropertyInfo.Add(key, properties); - } + context.RegisterDiagnostics(results); - properties.Add(propertyInfo); - } + var types = results + .Where(static result => result.Value is not null) + .Select(static (result, _) => result.Value!) + .GroupByTarget(static property => property.TargetInfo) + .WithTrackingName(TrackingNames.ReactiveCollectionTypes); - foreach (var grouping in groupedPropertyInfo) - { - var source = GenerateSource(grouping.Value, input.Right); - context.AddSource($"{grouping.Key.FileHintName}.ReactiveCollections.g.cs", source); - } - }); + context.RegisterSourceOutput(types.Combine(context.ReactiveUiIntegration()), static (context, input) => + context.AddSource($"{input.Left[0].TargetInfo.FileHintName}.ReactiveCollections.g.cs", GenerateSource(input.Left, input.Right))); } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs index 9140dd09..09bff0eb 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs @@ -244,7 +244,7 @@ private static string GetXmlDocumentation(IMethodSymbol methodSymbol, Cancellati /// The commands the type declares, all sharing one . /// The selected ReactiveUI API surface. /// The file's text. - private static string GenerateSource(List commands, ReactiveUiIntegration integration) + private static string GenerateSource(EquatableArray commands, ReactiveUiIntegration integration) { var target = commands[0].TargetInfo; var writer = SourceWriter.Rent() diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs index 7966af29..38466868 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.cs @@ -2,14 +2,12 @@ // 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.Collections.Generic; using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using ReactiveUI.SourceGenerators.Extensions; using ReactiveUI.SourceGenerators.Helpers; -using ReactiveUI.SourceGenerators.Models; namespace ReactiveUI.SourceGenerators; @@ -23,8 +21,9 @@ public void Initialize(IncrementalGeneratorInitializationContext context) context.RegisterPostInitializationOutput(static ctx => ctx.AddSource($"{AttributeDefinitions.ReactiveCommandAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ReactiveCommandAttribute, Encoding.UTF8))); - // Gather info for all annotated command methods (starting from method declarations with at least one attribute) - var commandInfo = + // 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 = context.SyntaxProvider .ForAttributeWithMetadataName( AttributeDefinitions.ReactiveCommandAttributeType, @@ -32,34 +31,11 @@ public void Initialize(IncrementalGeneratorInitializationContext context) static (context, token) => GetMethodInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) - .Collect() - .Combine(context.ReactiveUiIntegration()); + .WithTrackingName(TrackingNames.ReactiveCommands) + .GroupByTarget(static command => command.TargetInfo) + .WithTrackingName(TrackingNames.ReactiveCommandTypes); - // Generate the requested properties and methods - context.RegisterSourceOutput(commandInfo, static (context, input) => - { - Dictionary< - (string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), - List> groupedCommandInfo = []; - - foreach (var command in input.Left) - { - var targetInfo = command.TargetInfo; - var key = (targetInfo.FileHintName, targetInfo.TargetName, targetInfo.TargetNamespace, targetInfo.TargetVisibility, targetInfo.TargetType); - if (!groupedCommandInfo.TryGetValue(key, out var commands)) - { - commands = []; - groupedCommandInfo.Add(key, commands); - } - - commands.Add(command); - } - - foreach (var grouping in groupedCommandInfo) - { - var source = GenerateSource(grouping.Value, input.Right); - context.AddSource($"{grouping.Key.FileHintName}.ReactiveCommands.g.cs", source); - } - }); + context.RegisterSourceOutput(types.Combine(context.ReactiveUiIntegration()), static (context, input) => + context.AddSource($"{input.Left[0].TargetInfo.FileHintName}.ReactiveCommands.g.cs", GenerateSource(input.Left, input.Right))); } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs index 99737f60..7e8d22d0 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveObject/ReactiveObjectGenerator.cs @@ -2,7 +2,6 @@ // 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.Collections.Generic; using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; @@ -24,8 +23,8 @@ public void Initialize(IncrementalGeneratorInitializationContext context) context.RegisterPostInitializationOutput(static ctx => ctx.AddSource($"{AttributeDefinitions.ReactiveObjectAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ReactiveObjectAttribute, Encoding.UTF8))); - // Gather info for all annotated IReactiveObject Classes - var reactiveObjectInfo = + // Gather info for all annotated IReactiveObject Classes, one output per type. + var types = context.SyntaxProvider .ForAttributeWithMetadataName( AttributeDefinitions.ReactiveObjectAttributeType, @@ -33,31 +32,13 @@ public void Initialize(IncrementalGeneratorInitializationContext context) static (context, token) => GetClassInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) - .Collect() - .Combine(context.ReactiveUiIntegration()); + .GroupByTarget(static info => info.TargetInfo) + .WithTrackingName(TrackingNames.ReactiveObjectTypes); - // Generate the requested properties and methods for IReactiveObject - context.RegisterSourceOutput(reactiveObjectInfo, static (context, input) => + context.RegisterSourceOutput(types.Combine(context.ReactiveUiIntegration()), static (context, input) => { - Dictionary< - (string FileHintName, string TargetName, string TargetNamespace, string TargetVisibility, string TargetType), - ReactiveObjectInfo> groupedPropertyInfo = []; - - foreach (var reactiveObjectInfo in input.Left) - { - var targetInfo = reactiveObjectInfo.TargetInfo; - var key = (targetInfo.FileHintName, targetInfo.TargetName, targetInfo.TargetNamespace, targetInfo.TargetVisibility, targetInfo.TargetType); - if (!groupedPropertyInfo.ContainsKey(key)) - { - groupedPropertyInfo.Add(key, reactiveObjectInfo); - } - } - - foreach (var grouping in groupedPropertyInfo) - { - var source = GenerateSource(grouping.Value.TargetInfo, input.Right); - context.AddSource($"{grouping.Key.FileHintName}.IReactiveObject.g.cs", source); - } + var target = input.Left[0].TargetInfo; + context.AddSource($"{target.FileHintName}.IReactiveObject.g.cs", GenerateSource(target, input.Right)); }); } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs index 930236ba..de6d3c1e 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/RoutedControlHost/RoutedControlHostGenerator.cs @@ -21,10 +21,8 @@ public void Initialize(IncrementalGeneratorInitializationContext context) context.RegisterPostInitializationOutput(static ctx => ctx.AddSource($"{AttributeDefinitions.RoutedControlHostAttributeType}.g.cs", SourceText.From(AttributeDefinitions.GetRoutedControlHostAttribute(), Encoding.UTF8))); - var reactiveUiIntegrationProvider = context.ReactiveUiIntegration(); - - // Gather info for all annotated IViewFor Classes - var rchInfo = + // One model per annotated class, each written by its own output so it caches on its own. + var hosts = context.SyntaxProvider .ForAttributeWithMetadataName( AttributeDefinitions.RoutedControlHostAttributeType, @@ -32,16 +30,9 @@ public void Initialize(IncrementalGeneratorInitializationContext context) static (context, token) => GetClassInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) - .Collect() - .Combine(reactiveUiIntegrationProvider); + .WithTrackingName(TrackingNames.RoutedControlHosts); - // Generate the requested properties and methods for IViewFor - context.RegisterSourceOutput(rchInfo, static (context, input) => - { - foreach (var info in input.Left) - { - context.AddSource($"{info.FileHintName}.RoutedControlHost.g.cs", GenerateSource(info, input.Right)); - } - }); + context.RegisterSourceOutput(hosts.Combine(context.ReactiveUiIntegration()), static (context, input) => + context.AddSource($"{input.Left.FileHintName}.RoutedControlHost.g.cs", GenerateSource(input.Left, input.Right))); } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs index 767aba28..b3d245be 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ViewModelControlHost/ViewModelControlHostGenerator.cs @@ -21,10 +21,8 @@ public void Initialize(IncrementalGeneratorInitializationContext context) context.RegisterPostInitializationOutput(static ctx => ctx.AddSource($"{AttributeDefinitions.ViewModelControlHostAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ViewModelControlHostAttribute, Encoding.UTF8))); - var reactiveUiIntegrationProvider = context.ReactiveUiIntegration(); - - // Gather info for all annotated IViewFor Classes - var vmcInfo = + // One model per annotated class, each written by its own output so it caches on its own. + var hosts = context.SyntaxProvider .ForAttributeWithMetadataName( AttributeDefinitions.ViewModelControlHostAttributeType, @@ -32,16 +30,9 @@ public void Initialize(IncrementalGeneratorInitializationContext context) static (context, token) => GetClassInfo(context, token)) .Where(static x => x is not null) .Select(static (x, _) => x!) - .Collect() - .Combine(reactiveUiIntegrationProvider); + .WithTrackingName(TrackingNames.ViewModelControlHosts); - // Generate the requested properties and methods for IViewFor - context.RegisterSourceOutput(vmcInfo, static (context, input) => - { - foreach (var info in input.Left) - { - context.AddSource($"{info.FileHintName}.ViewModelControlHost.g.cs", GenerateSource(info, input.Right)); - } - }); + context.RegisterSourceOutput(hosts.Combine(context.ReactiveUiIntegration()), static (context, input) => + context.AddSource($"{input.Left.FileHintName}.ViewModelControlHost.g.cs", GenerateSource(input.Left, input.Right))); } } From f8df7c42dd79fabc694af054acaa892739899b3f Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 02:08:28 +1000 Subject: [PATCH 22/30] fix: stop generated [ReactiveCollection] properties leaking a handler on every set The generated setter built a new CollectionChanged handler for every subscribe and unsubscribe, so the unsubscribe never matched: each set left one more handler on the new collection, never removed the handler from the collection being replaced, allocated three delegates, and threw a NullReferenceException when set to null while empty. The setter now creates one handler per property, kept in a field, unsubscribes it from the old collection and subscribes it to the new one. Each generated property carries the GeneratedCode attribute, rather than only the first. Tests compile and run the generated property to prove a replaced collection no longer notifies and that setting null does not throw. --- ...yteArray#TestNs.TestVM.RxColls.verified.cs | 17 ++-- ...CE.CplxT#TestNs.TestVM.RxColls.verified.cs | 17 ++-- ...DateTime#TestNs.TestVM.RxColls.verified.cs | 32 +++---- .../RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs | 17 ++-- .../RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs | 17 ++-- ...RCE.Enum#TestNs.TestVM.RxColls.verified.cs | 17 ++-- ...RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs | 17 ++-- ...RCE.Guid#TestNs.TestVM.RxColls.verified.cs | 17 ++-- ...nterface#TestNs.TestVM.RxColls.verified.cs | 32 +++---- ...CE.Multi#TestNs.TestVM.RxColls.verified.cs | 47 +++++----- ...VM+InnerVM+DeepInnerVM.RxColls.verified.cs | 17 ++-- ...TestNs.OuterVM+InnerVM.RxColls.verified.cs | 17 ++-- ...CE.Nest#TestNs.OuterVM.RxColls.verified.cs | 17 ++-- ...RCE.Null#TestNs.TestVM.RxColls.verified.cs | 32 +++---- ...rd#TestNs.TestVMRecord.RxColls.verified.cs | 32 +++---- ...E.Struct#TestNs.TestVM.RxColls.verified.cs | 17 ++-- ...CE.Tuple#TestNs.TestVM.RxColls.verified.cs | 17 ++-- .../RCE.WRx#TestNs.TestVM.RxColls.verified.cs | 32 +++---- ...sicField#TestNs.TestVM.RxColls.verified.cs | 17 ++-- .../ReactiveCollectionBehaviourTests.cs | 92 +++++++++++++++++++ .../ReactiveCollectionGenerator.Execute.cs | 62 +++++++------ 21 files changed, 314 insertions(+), 268 deletions(-) create mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCollectionBehaviourTests.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs index eaea604b..28c41a97 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _binaryDataCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? BinaryData @@ -15,26 +17,21 @@ public partial class TestVM get => _binaryData; set { - if (value == null) + var handler = _binaryDataCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(BinaryData)); + if (_binaryData != null) { - BinaryData.CollectionChanged -= CollectionChanged(this, nameof(BinaryData)); + _binaryData.CollectionChanged -= handler; } _binaryData = value; this.RaisePropertyChanged(nameof(BinaryData)); - if (_binaryData != null) + if (value != null) { - // Remove the old handler if it exists - BinaryData.CollectionChanged -= CollectionChanged(this, nameof(BinaryData)); - - BinaryData.CollectionChanged += CollectionChanged(this, nameof(BinaryData)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs index a6ae1e4f..3ff5c27d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _itemsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Items @@ -15,26 +17,21 @@ public partial class TestVM get => _items; set { - if (value == null) + var handler = _itemsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Items)); + if (_items != null) { - Items.CollectionChanged -= CollectionChanged(this, nameof(Items)); + _items.CollectionChanged -= handler; } _items = value; this.RaisePropertyChanged(nameof(Items)); - if (_items != null) + if (value != null) { - // Remove the old handler if it exists - Items.CollectionChanged -= CollectionChanged(this, nameof(Items)); - - Items.CollectionChanged += CollectionChanged(this, nameof(Items)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs index 63bddba1..09dc5b11 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _datesCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Dates @@ -15,23 +17,24 @@ public partial class TestVM get => _dates; set { - if (value == null) + var handler = _datesCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Dates)); + if (_dates != null) { - Dates.CollectionChanged -= CollectionChanged(this, nameof(Dates)); + _dates.CollectionChanged -= handler; } _dates = value; this.RaisePropertyChanged(nameof(Dates)); - if (_dates != null) + if (value != null) { - // Remove the old handler if it exists - Dates.CollectionChanged -= CollectionChanged(this, nameof(Dates)); - - Dates.CollectionChanged += CollectionChanged(this, nameof(Dates)); + value.CollectionChanged += handler; } } } + + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _timestampsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Timestamps @@ -39,26 +42,21 @@ public partial class TestVM get => _timestamps; set { - if (value == null) + var handler = _timestampsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Timestamps)); + if (_timestamps != null) { - Timestamps.CollectionChanged -= CollectionChanged(this, nameof(Timestamps)); + _timestamps.CollectionChanged -= handler; } _timestamps = value; this.RaisePropertyChanged(nameof(Timestamps)); - if (_timestamps != null) + if (value != null) { - // Remove the old handler if it exists - Timestamps.CollectionChanged -= CollectionChanged(this, nameof(Timestamps)); - - Timestamps.CollectionChanged += CollectionChanged(this, nameof(Timestamps)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs index e328a26f..e5b2935f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace Namespace1 { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _numbersCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Numbers @@ -15,26 +17,21 @@ public partial class TestVM get => _numbers; set { - if (value == null) + var handler = _numbersCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Numbers)); + if (_numbers != null) { - Numbers.CollectionChanged -= CollectionChanged(this, nameof(Numbers)); + _numbers.CollectionChanged -= handler; } _numbers = value; this.RaisePropertyChanged(nameof(Numbers)); - if (_numbers != null) + if (value != null) { - // Remove the old handler if it exists - Numbers.CollectionChanged -= CollectionChanged(this, nameof(Numbers)); - - Numbers.CollectionChanged += CollectionChanged(this, nameof(Numbers)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs index d94072c7..98aa21b9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace Namespace2 { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _namesCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Names @@ -15,26 +17,21 @@ public partial class TestVM get => _names; set { - if (value == null) + var handler = _namesCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Names)); + if (_names != null) { - Names.CollectionChanged -= CollectionChanged(this, nameof(Names)); + _names.CollectionChanged -= handler; } _names = value; this.RaisePropertyChanged(nameof(Names)); - if (_names != null) + if (value != null) { - // Remove the old handler if it exists - Names.CollectionChanged -= CollectionChanged(this, nameof(Names)); - - Names.CollectionChanged += CollectionChanged(this, nameof(Names)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs index e7f7289b..66209f94 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _statusesCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Statuses @@ -15,26 +17,21 @@ public partial class TestVM get => _statuses; set { - if (value == null) + var handler = _statusesCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Statuses)); + if (_statuses != null) { - Statuses.CollectionChanged -= CollectionChanged(this, nameof(Statuses)); + _statuses.CollectionChanged -= handler; } _statuses = value; this.RaisePropertyChanged(nameof(Statuses)); - if (_statuses != null) + if (value != null) { - // Remove the old handler if it exists - Statuses.CollectionChanged -= CollectionChanged(this, nameof(Statuses)); - - Statuses.CollectionChanged += CollectionChanged(this, nameof(Statuses)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs index 0b2cd394..6784dc4a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class GenericVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _itemsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Items @@ -15,26 +17,21 @@ public partial class GenericVM get => _items; set { - if (value == null) + var handler = _itemsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Items)); + if (_items != null) { - Items.CollectionChanged -= CollectionChanged(this, nameof(Items)); + _items.CollectionChanged -= handler; } _items = value; this.RaisePropertyChanged(nameof(Items)); - if (_items != null) + if (value != null) { - // Remove the old handler if it exists - Items.CollectionChanged -= CollectionChanged(this, nameof(Items)); - - Items.CollectionChanged += CollectionChanged(this, nameof(Items)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs index 58f90dca..52177b0e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _idsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Ids @@ -15,26 +17,21 @@ public partial class TestVM get => _ids; set { - if (value == null) + var handler = _idsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Ids)); + if (_ids != null) { - Ids.CollectionChanged -= CollectionChanged(this, nameof(Ids)); + _ids.CollectionChanged -= handler; } _ids = value; this.RaisePropertyChanged(nameof(Ids)); - if (_ids != null) + if (value != null) { - // Remove the old handler if it exists - Ids.CollectionChanged -= CollectionChanged(this, nameof(Ids)); - - Ids.CollectionChanged += CollectionChanged(this, nameof(Ids)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs index a32660ad..0f371f75 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _itemsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Items @@ -15,23 +17,24 @@ public partial class TestVM get => _items; set { - if (value == null) + var handler = _itemsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Items)); + if (_items != null) { - Items.CollectionChanged -= CollectionChanged(this, nameof(Items)); + _items.CollectionChanged -= handler; } _items = value; this.RaisePropertyChanged(nameof(Items)); - if (_items != null) + if (value != null) { - // Remove the old handler if it exists - Items.CollectionChanged -= CollectionChanged(this, nameof(Items)); - - Items.CollectionChanged += CollectionChanged(this, nameof(Items)); + value.CollectionChanged += handler; } } } + + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _disposablesCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Disposables @@ -39,26 +42,21 @@ public partial class TestVM get => _disposables; set { - if (value == null) + var handler = _disposablesCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Disposables)); + if (_disposables != null) { - Disposables.CollectionChanged -= CollectionChanged(this, nameof(Disposables)); + _disposables.CollectionChanged -= handler; } _disposables = value; this.RaisePropertyChanged(nameof(Disposables)); - if (_disposables != null) + if (value != null) { - // Remove the old handler if it exists - Disposables.CollectionChanged -= CollectionChanged(this, nameof(Disposables)); - - Disposables.CollectionChanged += CollectionChanged(this, nameof(Disposables)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs index 45bb19b4..8be917cf 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _namesCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Names @@ -15,23 +17,24 @@ public partial class TestVM get => _names; set { - if (value == null) + var handler = _namesCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Names)); + if (_names != null) { - Names.CollectionChanged -= CollectionChanged(this, nameof(Names)); + _names.CollectionChanged -= handler; } _names = value; this.RaisePropertyChanged(nameof(Names)); - if (_names != null) + if (value != null) { - // Remove the old handler if it exists - Names.CollectionChanged -= CollectionChanged(this, nameof(Names)); - - Names.CollectionChanged += CollectionChanged(this, nameof(Names)); + value.CollectionChanged += handler; } } } + + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _numbersCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Numbers @@ -39,23 +42,24 @@ public partial class TestVM get => _numbers; set { - if (value == null) + var handler = _numbersCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Numbers)); + if (_numbers != null) { - Numbers.CollectionChanged -= CollectionChanged(this, nameof(Numbers)); + _numbers.CollectionChanged -= handler; } _numbers = value; this.RaisePropertyChanged(nameof(Numbers)); - if (_numbers != null) + if (value != null) { - // Remove the old handler if it exists - Numbers.CollectionChanged -= CollectionChanged(this, nameof(Numbers)); - - Numbers.CollectionChanged += CollectionChanged(this, nameof(Numbers)); + value.CollectionChanged += handler; } } } + + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _valuesCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Values @@ -63,26 +67,21 @@ public partial class TestVM get => _values; set { - if (value == null) + var handler = _valuesCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Values)); + if (_values != null) { - Values.CollectionChanged -= CollectionChanged(this, nameof(Values)); + _values.CollectionChanged -= handler; } _values = value; this.RaisePropertyChanged(nameof(Values)); - if (_values != null) + if (value != null) { - // Remove the old handler if it exists - Values.CollectionChanged -= CollectionChanged(this, nameof(Values)); - - Values.CollectionChanged += CollectionChanged(this, nameof(Values)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs index 089725b4..4ccf8a1c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs @@ -12,6 +12,8 @@ public partial class InnerVM { public partial class DeepInnerVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _deepCollectionCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? DeepCollection @@ -19,26 +21,21 @@ public partial class DeepInnerVM get => _deepCollection; set { - if (value == null) + var handler = _deepCollectionCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(DeepCollection)); + if (_deepCollection != null) { - DeepCollection.CollectionChanged -= CollectionChanged(this, nameof(DeepCollection)); + _deepCollection.CollectionChanged -= handler; } _deepCollection = value; this.RaisePropertyChanged(nameof(DeepCollection)); - if (_deepCollection != null) + if (value != null) { - // Remove the old handler if it exists - DeepCollection.CollectionChanged -= CollectionChanged(this, nameof(DeepCollection)); - - DeepCollection.CollectionChanged += CollectionChanged(this, nameof(DeepCollection)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs index 8b38c25f..c576ef1e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs @@ -10,6 +10,8 @@ public partial class OuterVM { public partial class InnerVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _innerCollectionCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? InnerCollection @@ -17,26 +19,21 @@ public partial class InnerVM get => _innerCollection; set { - if (value == null) + var handler = _innerCollectionCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(InnerCollection)); + if (_innerCollection != null) { - InnerCollection.CollectionChanged -= CollectionChanged(this, nameof(InnerCollection)); + _innerCollection.CollectionChanged -= handler; } _innerCollection = value; this.RaisePropertyChanged(nameof(InnerCollection)); - if (_innerCollection != null) + if (value != null) { - // Remove the old handler if it exists - InnerCollection.CollectionChanged -= CollectionChanged(this, nameof(InnerCollection)); - - InnerCollection.CollectionChanged += CollectionChanged(this, nameof(InnerCollection)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs index ab2e11a4..49975ded 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class OuterVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _outerCollectionCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? OuterCollection @@ -15,26 +17,21 @@ public partial class OuterVM get => _outerCollection; set { - if (value == null) + var handler = _outerCollectionCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(OuterCollection)); + if (_outerCollection != null) { - OuterCollection.CollectionChanged -= CollectionChanged(this, nameof(OuterCollection)); + _outerCollection.CollectionChanged -= handler; } _outerCollection = value; this.RaisePropertyChanged(nameof(OuterCollection)); - if (_outerCollection != null) + if (value != null) { - // Remove the old handler if it exists - OuterCollection.CollectionChanged -= CollectionChanged(this, nameof(OuterCollection)); - - OuterCollection.CollectionChanged += CollectionChanged(this, nameof(OuterCollection)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs index 093633b0..02906711 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _nullableStringsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? NullableStrings @@ -15,23 +17,24 @@ public partial class TestVM get => _nullableStrings; set { - if (value == null) + var handler = _nullableStringsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(NullableStrings)); + if (_nullableStrings != null) { - NullableStrings.CollectionChanged -= CollectionChanged(this, nameof(NullableStrings)); + _nullableStrings.CollectionChanged -= handler; } _nullableStrings = value; this.RaisePropertyChanged(nameof(NullableStrings)); - if (_nullableStrings != null) + if (value != null) { - // Remove the old handler if it exists - NullableStrings.CollectionChanged -= CollectionChanged(this, nameof(NullableStrings)); - - NullableStrings.CollectionChanged += CollectionChanged(this, nameof(NullableStrings)); + value.CollectionChanged += handler; } } } + + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _nullableIntsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? NullableInts @@ -39,26 +42,21 @@ public partial class TestVM get => _nullableInts; set { - if (value == null) + var handler = _nullableIntsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(NullableInts)); + if (_nullableInts != null) { - NullableInts.CollectionChanged -= CollectionChanged(this, nameof(NullableInts)); + _nullableInts.CollectionChanged -= handler; } _nullableInts = value; this.RaisePropertyChanged(nameof(NullableInts)); - if (_nullableInts != null) + if (value != null) { - // Remove the old handler if it exists - NullableInts.CollectionChanged -= CollectionChanged(this, nameof(NullableInts)); - - NullableInts.CollectionChanged += CollectionChanged(this, nameof(NullableInts)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs index 85eb0671..07a51fcb 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial record TestVMRecord { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _numbersCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Numbers @@ -15,23 +17,24 @@ public partial record TestVMRecord get => _numbers; set { - if (value == null) + var handler = _numbersCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Numbers)); + if (_numbers != null) { - Numbers.CollectionChanged -= CollectionChanged(this, nameof(Numbers)); + _numbers.CollectionChanged -= handler; } _numbers = value; this.RaisePropertyChanged(nameof(Numbers)); - if (_numbers != null) + if (value != null) { - // Remove the old handler if it exists - Numbers.CollectionChanged -= CollectionChanged(this, nameof(Numbers)); - - Numbers.CollectionChanged += CollectionChanged(this, nameof(Numbers)); + value.CollectionChanged += handler; } } } + + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _namesCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Names @@ -39,26 +42,21 @@ public partial record TestVMRecord get => _names; set { - if (value == null) + var handler = _namesCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Names)); + if (_names != null) { - Names.CollectionChanged -= CollectionChanged(this, nameof(Names)); + _names.CollectionChanged -= handler; } _names = value; this.RaisePropertyChanged(nameof(Names)); - if (_names != null) + if (value != null) { - // Remove the old handler if it exists - Names.CollectionChanged -= CollectionChanged(this, nameof(Names)); - - Names.CollectionChanged += CollectionChanged(this, nameof(Names)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs index 7c7131fe..051b2d04 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _pointsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Points @@ -15,26 +17,21 @@ public partial class TestVM get => _points; set { - if (value == null) + var handler = _pointsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Points)); + if (_points != null) { - Points.CollectionChanged -= CollectionChanged(this, nameof(Points)); + _points.CollectionChanged -= handler; } _points = value; this.RaisePropertyChanged(nameof(Points)); - if (_points != null) + if (value != null) { - // Remove the old handler if it exists - Points.CollectionChanged -= CollectionChanged(this, nameof(Points)); - - Points.CollectionChanged += CollectionChanged(this, nameof(Points)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs index fe4bde17..64882926 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _tuplesCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection<(int Id, string Name)>? Tuples @@ -15,26 +17,21 @@ public partial class TestVM get => _tuples; set { - if (value == null) + var handler = _tuplesCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Tuples)); + if (_tuples != null) { - Tuples.CollectionChanged -= CollectionChanged(this, nameof(Tuples)); + _tuples.CollectionChanged -= handler; } _tuples = value; this.RaisePropertyChanged(nameof(Tuples)); - if (_tuples != null) + if (value != null) { - // Remove the old handler if it exists - Tuples.CollectionChanged -= CollectionChanged(this, nameof(Tuples)); - - Tuples.CollectionChanged += CollectionChanged(this, nameof(Tuples)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs index e79dd374..3ca380ec 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _itemsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? Items @@ -15,23 +17,24 @@ public partial class TestVM get => _items; set { - if (value == null) + var handler = _itemsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(Items)); + if (_items != null) { - Items.CollectionChanged -= CollectionChanged(this, nameof(Items)); + _items.CollectionChanged -= handler; } _items = value; this.RaisePropertyChanged(nameof(Items)); - if (_items != null) + if (value != null) { - // Remove the old handler if it exists - Items.CollectionChanged -= CollectionChanged(this, nameof(Items)); - - Items.CollectionChanged += CollectionChanged(this, nameof(Items)); + value.CollectionChanged += handler; } } } + + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _selectedIdsCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? SelectedIds @@ -39,26 +42,21 @@ public partial class TestVM get => _selectedIds; set { - if (value == null) + var handler = _selectedIdsCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(SelectedIds)); + if (_selectedIds != null) { - SelectedIds.CollectionChanged -= CollectionChanged(this, nameof(SelectedIds)); + _selectedIds.CollectionChanged -= handler; } _selectedIds = value; this.RaisePropertyChanged(nameof(SelectedIds)); - if (_selectedIds != null) + if (value != null) { - // Remove the old handler if it exists - SelectedIds.CollectionChanged -= CollectionChanged(this, nameof(SelectedIds)); - - SelectedIds.CollectionChanged += CollectionChanged(this, nameof(SelectedIds)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs index 24730ea9..5a038f31 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs @@ -8,6 +8,8 @@ namespace TestNs { public partial class TestVM { + private global::System.Collections.Specialized.NotifyCollectionChangedEventHandler? _publicObservableCollectionTestCollectionChangedHandler; + /// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public global::System.Collections.ObjectModel.ObservableCollection? PublicObservableCollectionTest @@ -15,26 +17,21 @@ public partial class TestVM get => _publicObservableCollectionTest; set { - if (value == null) + var handler = _publicObservableCollectionTestCollectionChangedHandler ??= (_, _) => this.RaisePropertyChanged(nameof(PublicObservableCollectionTest)); + if (_publicObservableCollectionTest != null) { - PublicObservableCollectionTest.CollectionChanged -= CollectionChanged(this, nameof(PublicObservableCollectionTest)); + _publicObservableCollectionTest.CollectionChanged -= handler; } _publicObservableCollectionTest = value; this.RaisePropertyChanged(nameof(PublicObservableCollectionTest)); - if (_publicObservableCollectionTest != null) + if (value != null) { - // Remove the old handler if it exists - PublicObservableCollectionTest.CollectionChanged -= CollectionChanged(this, nameof(PublicObservableCollectionTest)); - - PublicObservableCollectionTest.CollectionChanged += CollectionChanged(this, nameof(PublicObservableCollectionTest)); + value.CollectionChanged += handler; } } } - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); } } #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCollectionBehaviourTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCollectionBehaviourTests.cs new file mode 100644 index 00000000..396e1bf7 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCollectionBehaviourTests.cs @@ -0,0 +1,92 @@ +// 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.Collections; +using System.ComponentModel; +using System.Reflection; +using System.Runtime.Loader; + +namespace ReactiveUI.SourceGenerator.Tests; + +/// Runs a generated [ReactiveCollection] property to check what its setter subscribes. +public class ReactiveCollectionBehaviourTests +{ + /// A view model with one generated collection property. + private const string Source = """ + using System.Collections.ObjectModel; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + + namespace Behaviour; + + public partial class ViewModel : ReactiveObject + { + [ReactiveCollection] + private ObservableCollection? _items; + } + """; + + /// Replacing the collection unsubscribes the one it replaced, so only the current collection notifies. + /// A task to monitor the async. + [Test] + public async Task ReplacingTheCollectionUnsubscribesTheOldOne() + { + var (viewModel, property, collectionType) = CreateViewModel(); + var first = (IList)Activator.CreateInstance(collectionType)!; + var second = (IList)Activator.CreateInstance(collectionType)!; + var notifications = 0; + ((INotifyPropertyChanged)viewModel).PropertyChanged += (_, _) => notifications++; + + property.SetValue(viewModel, first); + property.SetValue(viewModel, second); + property.SetValue(viewModel, first); + property.SetValue(viewModel, second); + notifications = 0; + + _ = first.Add(1); + await Assert.That(notifications).IsEqualTo(0); + + _ = second.Add(1); + await Assert.That(notifications).IsEqualTo(1); + } + + /// Clearing a collection property that holds nothing does not throw. + /// A task to monitor the async. + [Test] + public async Task SettingNullWhenEmptyDoesNotThrow() + { + var (viewModel, property, _) = CreateViewModel(); + + await Assert.That(() => property.SetValue(viewModel, null)).ThrowsNothing(); + } + + /// Generates, compiles and loads the view model. + /// An instance, its generated collection property, and the collection type. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SES1402", Justification = "The test loads the assembly it has just compiled from its own source.")] + private static (object ViewModel, PropertyInfo Property, Type CollectionType) CreateViewModel() + { + var parseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13); + var compilation = CSharpCompilation.Create( + "ReactiveCollectionBehaviour", + [CSharpSyntaxTree.ParseText(Source, parseOptions)], + TestCompilationReferences.CreatePortableDefault(), + new(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable)); + _ = CSharpGeneratorDriver + .Create([new ReactiveGenerator().AsSourceGenerator(), new ReactiveCollectionGenerator().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(ReactiveCollectionBehaviourTests), isCollectible: true).LoadFromStream(image); + var type = assembly.GetType("Behaviour.ViewModel", throwOnError: true)!; + var property = type.GetProperty("Items") ?? throw new InvalidOperationException("The Items property was not generated."); + return (Activator.CreateInstance(type)!, property, property.PropertyType); + } +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs index 24aea7c5..20020dda 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs @@ -24,10 +24,11 @@ public sealed partial class ReactiveCollectionGenerator /// Gets the generator assembly version used in generated-code metadata. internal static readonly string GeneratorVersion = typeof(ReactiveCollectionGenerator).Assembly.GetName().Version.ToString(); - /// The helper that turns a collection's changes into property changes, kept on the one line it has always been. - private const string CollectionChangedDeclaration = - "private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler " - + "CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName);"; + /// The suffix of the field that holds a property's collection-changed handler. + private const string HandlerFieldSuffix = "CollectionChangedHandler"; + + /// The handler type the generated field holds. + private const string HandlerType = "global::System.Collections.Specialized.NotifyCollectionChangedEventHandler"; /// The GeneratedCode attribute stamped on the generated properties, built once. private static readonly string GeneratedCodeAttribute = SourceWriterExtensions.GeneratedCodeAttribute(GeneratorName, GeneratorVersion); @@ -184,17 +185,18 @@ private static string GenerateSource(EquatableArray var depth = writer.OpenNamespace(target.TargetNamespace) + writer.OpenContainingTypes(target.ParentInfo); - // The GeneratedCode attribute has always been stamped once, ahead of the first property. - _ = writer.OpenPartialType(target).Line(GeneratedCodeAttribute); + _ = writer.OpenPartialType(target); for (var i = 0; i < properties.Count; i++) { + if (i > 0) + { + _ = writer.BlankLine(); + } + WriteProperty(writer, properties[i]); } - return writer.BlankLine() - .ExcludeFromCodeCoverage() - .Line(CollectionChangedDeclaration) - .CloseBlock() + return writer.CloseBlock() .CloseBlocks(depth) .RestoreNullableAndWarnings() .ToStringAndReturn(); @@ -203,12 +205,21 @@ private static string GenerateSource(EquatableArray /// Writes one reactive collection property, which re-raises the collection's changes as property changes. /// The writer, at the level of the type's members. /// The property. + /// + /// The handler is created once per property and kept in a field, so the setter unsubscribes the same instance it + /// subscribed: from the collection being replaced, not the new one. A handler made per call could never be removed, + /// so every replacement left one more subscribed and allocated three more. + /// private static void WriteProperty(SourceWriter writer, ReactiveCollectionFieldInfo propertyInfo) { var fieldName = propertyInfo.FieldName; var propertyName = propertyInfo.PropertyName; - _ = writer.InheritDoc(fieldName).ExcludeFromCodeCoverage(); + _ = writer.Append("private ").Append(HandlerType).Append("? ").Append(fieldName).Append(HandlerFieldSuffix).EndStatement() + .BlankLine() + .InheritDoc(fieldName) + .Line(GeneratedCodeAttribute) + .ExcludeFromCodeCoverage(); foreach (var attribute in propertyInfo.ForwardedAttributes.AsImmutableArray()) { _ = writer.Line(attribute); @@ -219,28 +230,21 @@ private static void WriteProperty(SourceWriter writer, ReactiveCollectionFieldIn .Append("get => ").Append(fieldName).EndStatement() .Line("set") .OpenBlock() - .Line("if (value == null)") - .OpenBlock(); - WriteCollectionChangedHandler(writer, propertyName, " -= "); - _ = writer.CloseBlock() + .Append("var handler = ").Append(fieldName).Append(HandlerFieldSuffix) + .Append(" ??= (_, _) => this.RaisePropertyChanged(nameof(").Append(propertyName).Line("));") + .Append("if (").Append(fieldName).Line(" != null)") + .OpenBlock() + .Append(fieldName).Line(".CollectionChanged -= handler;") + .CloseBlock() .BlankLine() .Append(fieldName).Line(" = value;") .Append("this.RaisePropertyChanged(nameof(").Append(propertyName).Line("));") .BlankLine() - .Append("if (").Append(fieldName).Line(" != null)") + .Line("if (value != null)") .OpenBlock() - .Line("// Remove the old handler if it exists"); - WriteCollectionChangedHandler(writer, propertyName, " -= "); - _ = writer.BlankLine(); - WriteCollectionChangedHandler(writer, propertyName, " += "); - _ = writer.CloseBlock().CloseBlock().CloseBlock(); + .Line("value.CollectionChanged += handler;") + .CloseBlock() + .CloseBlock() + .CloseBlock(); } - - /// Writes a statement that subscribes or unsubscribes the property's collection-changed handler. - /// The writer. - /// The generated property name. - /// The event operator, += or -= , with its surrounding spaces. - private static void WriteCollectionChangedHandler(SourceWriter writer, string propertyName, string assignment) => - _ = writer.Append(propertyName).Append(".CollectionChanged").Append(assignment) - .Append("CollectionChanged(this, nameof(").Append(propertyName).Line("));"); } From 4275010e8d3221a6a33aef3dbeb3c9ddf70156a8 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 02:16:00 +1000 Subject: [PATCH 23/30] test: measure allocations from EventPipe traces, including incremental reruns and generated code The generation benchmarks gain an EventPipe harness: each scenario runs a fixed number of times inside a GC-verbose EventPipe session on its own process, and GCAllocationTick amounts divided by the run count give the allocation per run, with the trace kept for breakdowns. Scenarios cover a cold run per corpus, warm reruns after an unrelated edit and after edits to a [Reactive] class, and three attribute-discovery strategies against each other. Every corpus includes attributed code no generator acts on. A runtime benchmark project measures the code the generators write. The README records the method and the before/after figures. --- src/Directory.Packages.props | 1 + src/ReactiveUI.SourceGenerators.slnx | 1 + src/benchmarks/.editorconfig | 2 + src/benchmarks/README.md | 108 +++++++++++++++ .../Mocks/Noise.cs | 74 ++++++++++ .../Program.cs | 26 +++- ...ctiveUI.SourceGenerators.Benchmarks.csproj | 2 + .../Support/DiscoveryGenerators.cs | 122 ++++++++++++++++ .../Support/DiscoveryScenarios.cs | 110 +++++++++++++++ .../Support/GenerationScenarios.cs | 103 ++++++++++++++ .../Support/GeneratorHarness.cs | 7 +- .../BenchmarkPlainObject.cs | 16 +++ .../BenchmarkViewModel.cs | 31 +++++ .../GeneratedCodeBenchmarks.cs | 95 +++++++++++++ .../Program.cs | 53 +++++++ ...SourceGenerators.Runtime.Benchmarks.csproj | 30 ++++ .../RuntimeScenarios.cs | 38 +++++ src/benchmarks/Shared/AllocationScenario.cs | 12 ++ src/benchmarks/Shared/EventPipeAllocations.cs | 130 ++++++++++++++++++ 19 files changed, 957 insertions(+), 4 deletions(-) create mode 100644 src/benchmarks/README.md create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Noise.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/DiscoveryGenerators.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/DiscoveryScenarios.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GenerationScenarios.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/BenchmarkPlainObject.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/BenchmarkViewModel.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/GeneratedCodeBenchmarks.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/Program.cs create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks.csproj create mode 100644 src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/RuntimeScenarios.cs create mode 100644 src/benchmarks/Shared/AllocationScenario.cs create mode 100644 src/benchmarks/Shared/EventPipeAllocations.cs diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 4044aefc..7226d700 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -38,5 +38,6 @@ + diff --git a/src/ReactiveUI.SourceGenerators.slnx b/src/ReactiveUI.SourceGenerators.slnx index 927f0d7a..f5d83bdd 100644 --- a/src/ReactiveUI.SourceGenerators.slnx +++ b/src/ReactiveUI.SourceGenerators.slnx @@ -1,6 +1,7 @@ + diff --git a/src/benchmarks/.editorconfig b/src/benchmarks/.editorconfig index 94936343..10d589d2 100644 --- a/src/benchmarks/.editorconfig +++ b/src/benchmarks/.editorconfig @@ -6,3 +6,5 @@ # The benchmark host is a console tool: it reports to the console rather than through a logging abstraction. ################### dotnet_diagnostic.SST1449.severity = none # Console output is the harness's report +dotnet_diagnostic.PSH1021.severity = none # The allocation harness collects before each traced session so earlier garbage is not counted +dotnet_diagnostic.PSH1315.severity = none # The harness is a synchronous console tool; it waits for the trace copy to finish diff --git a/src/benchmarks/README.md b/src/benchmarks/README.md new file mode 100644 index 00000000..2f7e5c65 --- /dev/null +++ b/src/benchmarks/README.md @@ -0,0 +1,108 @@ +# Generator benchmarks + +Two projects measure what the generators allocate: the generators while they run, and the code they generate while a +consumer's app runs it. Allocation is the figure to watch: it varies far less between runs than time does. + +| Project | Measures | +| --- | --- | +| `ReactiveUI.SourceGenerators.Benchmarks` | Generation: a cold run per generator's mock corpus, the whole corpus, and warm reruns after an edit. Also the attribute-discovery strategies against each other. | +| `ReactiveUI.SourceGenerators.Runtime.Benchmarks` | Generated code: a view model the generators write for, exercised as an app would. | + +## How allocations are measured + +Figures come from EventPipe, not BenchmarkDotNet's memory diagnoser. `--eventpipe ` runs each scenario a fixed +number of times inside an EventPipe session on its own process, with the runtime provider's GC keyword at verbose +level. The runtime raises a `GCAllocationTick` event about every 100 KB allocated, carrying the amount, the type and the +call stack. The sum of the amounts divided by the number of operations is the allocation per operation. Its sampling +error is about one tick over the whole session, so sessions run enough operations for that to be small. Each scenario's +trace is kept for breaking down by type and frame: + +```bash +cd src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks +dotnet run -c Release -- --smoke # every corpus generates and compiles; discovery strategies agree +dotnet run -c Release -- --eventpipe # generation scenarios +dotnet run -c Release -- --eventpipe-discovery # attribute discovery strategies +cd ../ReactiveUI.SourceGenerators.Runtime.Benchmarks +dotnet run -c Release -- --eventpipe # generated code + +dotnet run ~/source/rxui/tools/nettrace-analyzer.cs -- --top 40 /.nettrace +``` + +The BenchmarkDotNet entry points remain for timings; they attach the same EventPipe profiler to each benchmark. + +The mock corpus repeats each mock file 20 times, each copy in its own namespace, and every corpus includes `Noise.cs`: +attributed code no generator acts on, so each generator's cost of looking past code that is not its own is counted. +A scenario builds its compilation once and reuses it, so after the warmup the compiler's own symbol caches are warm and +the figures isolate the generators and the driver. The incremental scenarios keep one warm driver and rerun it against +the same edited compilation, which is what one keystroke costs in the IDE. + +All figures are on .NET 10 (x64, Linux). + +## Results + +"Before" is commit 7ab0cbc (after `[ObservableAsProperty]` and view registration were removed, before the writer and +the pipeline changes), measured with this same harness copied onto it. "After" is this branch. + +### Generation + +| Scenario | Before, bytes/op | After, bytes/op | Change | +| --- | ---: | ---: | ---: | +| Cold, whole corpus | 17,330,975 | 11,636,366 | −32.9% | +| Cold, `[Reactive]` | 6,117,449 | 3,701,964 | −39.5% | +| Cold, `[ReactiveCommand]` | 2,849,862 | 1,764,827 | −38.1% | +| Cold, `[IReactiveObject]` | 2,851,598 | 1,542,311 | −45.9% | +| Cold, `[ReactiveCollection]` | 1,598,212 | 1,025,509 | −35.8% | +| Cold, `[IViewFor]` | 1,659,840 | 1,155,046 | −30.4% | +| Cold, `[BindableDerivedList]` | 1,142,445 | 952,705 | −16.6% | +| Cold, `[ViewModelControlHost]` | 1,168,922 | 1,166,055 | −0.2% | +| Cold, `[RoutedControlHost]` | 1,090,552 | 1,085,232 | −0.5% | +| Rerun after an unrelated edit | 8,984,317 | 7,838,332 | −12.8% | +| Rerun after editing a `[Reactive]` class's other members | 8,986,035 | 7,841,624 | −12.7% | +| Rerun after renaming a `[Reactive]` field | 10,990,885 | 7,986,248 | −27.3% | + +In the whole-corpus trace, `System.String` fell from 5.53 MB to 2.83 MB per run, and `StringBuilder` (0.80 MB) and +`char[]` (0.70 MB) dropped out of the top allocated types. What remains is mostly the compiler's own binding and the +driver's state tables. For the WinForms hosts, half of what they allocate is the generated file's own text, which is +the output itself, so their figures did not move. + +Where it came from, largest first: + +- Writing through the indentation-aware `SourceWriter` instead of nested raw strings, interpolation, `string.Join` and + `StringBuilder` fragments. +- `[IViewFor]` and `[IReactiveObject]` found their targets by binding every attribute of every attributed class; they + now use `ForAttributeWithMetadataName`. That path was 66% of the cold `[IViewFor]` corpus's allocations. +- `TargetInfo` built once per type symbol instead of once per member; metadata-name checks compared without building + names; `Task`/observable/scheduler checks compared structurally instead of building display strings; documentation + only requested when the declaration has a documentation comment; `[Reactive]`'s AlsoNotify fallback no longer + evaluates named arguments. +- Each type's file written from its own output: an edit that changes one type's models rewrites only that type's file. + +### Attribute discovery + +Three ways to find the 280 `[Reactive]` fields in the corpus, each in a generator that only discovers: + +| Strategy | Cold, bytes/op | Rerun after an unrelated edit, bytes/op | +| --- | ---: | ---: | +| `ForAttributeWithMetadataName` | 484,701 | 314,141 | +| Attribute simple name from syntax, then the symbol | 770,266 | 363,839 | +| Bind every attributed field and read its attributes | 875,872 | 437,790 | + +`ForAttributeWithMetadataName` allocates the least both cold and incrementally, so every generator uses it, with a +syntax predicate that rejects a node before any binding where the shape allows (for example, only `partial` classes for +`[IViewFor]` and `[IReactiveObject]`). + +### Generated code + +| Operation | Before, bytes/op | After, bytes/op | +| --- | ---: | ---: | +| Replace a `[ReactiveCollection]` property's collection | 355 | 70 | +| Add to and clear that collection, after 20,000 replacements | 640,392 | 161 | +| Set a `[Reactive]` property that also notifies another | 64 | 64 | +| Set a property of an `[IReactiveObject]` type | 32 | 32 | +| Read a `[ReactiveCommand]` command | 0 | 0 | + +The generated `[ReactiveCollection]` setter created a new handler for each subscribe and unsubscribe, so it never +unsubscribed anything: every replacement left another handler behind, each collection change raised a notification per +leaked handler, and the replacement itself grew slower as the handler list grew. It now keeps one handler per property. +The 64 and 32 bytes are ReactiveUI's own notification arguments, not generated code. The collection-replacement figures +rest on few allocation ticks (13 and 66), so they carry a sampling error of roughly 100 KB over 20,000 operations. diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Noise.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Noise.cs new file mode 100644 index 00000000..bbb06b57 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Mocks/Noise.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.Serialization; +using System.Text.Json.Serialization; + +namespace Mocks.Noise__N__; + +// Code no generator acts on, with the attributes an application carries anyway. Every corpus includes it, so each +// generator's cost of looking past code that is not its own is measured. + +[Serializable] +[DataContract] +public partial class OrderDto +{ + [DataMember] + [JsonPropertyName("id")] + public int Id { get; set; } + + [DataMember] + [JsonPropertyName("customer")] + public string? Customer { get; set; } + + [Obsolete("Use Lines")] + [JsonIgnore] + public string? LegacyLines { get; set; } + + [Description("The order total")] + public decimal Total { get; set; } + + [ExcludeFromCodeCoverage] + public override string ToString() => Customer ?? string.Empty; +} + +[Description("A plain service")] +public sealed class OrderService +{ + [Obsolete("Use SaveAsync")] + public void Save(OrderDto order) => Validate(order); + + [ExcludeFromCodeCoverage] + private static void Validate(OrderDto order) => ArgumentNullException.ThrowIfNull(order); +} + +[DataContract] +public sealed record Address([property: DataMember] string Street, [property: DataMember] string City); + +[Flags] +public enum OrderState +{ + None = 0, + Placed = 1, + Shipped = 2, +} + +[Serializable] +public partial class Customer : INotifyPropertyChanged +{ + [NonSerialized] + private int _version; + + public event PropertyChangedEventHandler? PropertyChanged; + + [Browsable(false)] + public int Version + { + get => _version; + set + { + _version = value; + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Version))); + } + } +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Program.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Program.cs index ccc39e13..bc68a997 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Program.cs +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Program.cs @@ -8,6 +8,7 @@ using BenchmarkDotNet.Running; using Microsoft.Diagnostics.NETCore.Client; using Microsoft.Diagnostics.Tracing.Parsers; +using ReactiveUI.SourceGenerators.Benchmarks.Shared; using ReactiveUI.SourceGenerators.Benchmarks.Support; namespace ReactiveUI.SourceGenerators.Benchmarks; @@ -18,10 +19,24 @@ internal static class Program /// The environment variable that turns the EventPipe profiler off when set to false. private const string ProfilersVariable = "BENCHMARK_PROFILERS"; - /// Runs the benchmarks the command line selects, or --smoke to run each corpus once. + /// Runs the benchmarks the command line selects, --smoke to run each corpus once, or --eventpipe dir to trace allocations. /// The command-line arguments. internal static void Main(string[] args) { + if (args is ["--eventpipe", var outputDirectory]) + { + // Allocation figures: GCAllocationTick events from an EventPipe session over a fixed number of runs. + _ = EventPipeAllocations.Measure(GenerationScenarios.Create(), outputDirectory); + return; + } + + if (args is ["--eventpipe-discovery", var discoveryDirectory]) + { + // Attribute discovery strategies against each other, measured the same way. + _ = EventPipeAllocations.Measure(DiscoveryScenarios.Create(), discoveryDirectory); + return; + } + if (args is ["--smoke"]) { // Runs each corpus once outside BenchmarkDotNet, to prove the mocks still generate before a long run. @@ -32,6 +47,11 @@ internal static void Main(string[] args) Console.WriteLine($"{corpus}: {benchmark.Generate():N0} characters, {GeneratorHarness.CountErrors(corpus)} compile errors"); } + foreach (var finding in DiscoveryScenarios.DescribeFindings()) + { + Console.WriteLine(finding); + } + return; } @@ -39,14 +59,14 @@ internal static void Main(string[] args) } /// Creates the run configuration. - /// The memory diagnoser, plus an EventPipe trace per benchmark unless profiling is turned off. + /// An EventPipe trace per benchmark unless profiling is turned off; allocation figures come from its GC events. /// /// The trace carries verbose GC events, whose AllocationTick events name the allocated type and its call stack, /// and CPU samples. The traces land in BenchmarkDotNet.Artifacts and are summarised with nettrace-analyzer.cs. /// private static ManualConfig CreateConfig() { - var config = ManualConfig.Create(DefaultConfig.Instance).AddDiagnoser(MemoryDiagnoser.Default); + var config = ManualConfig.Create(DefaultConfig.Instance); if (string.Equals(Environment.GetEnvironmentVariable(ProfilersVariable), "false", StringComparison.OrdinalIgnoreCase)) { return config; diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj index c38853e1..57f72e22 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/ReactiveUI.SourceGenerators.Benchmarks.csproj @@ -12,6 +12,8 @@ + + diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/DiscoveryGenerators.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/DiscoveryGenerators.cs new file mode 100644 index 00000000..c13e4ec8 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/DiscoveryGenerators.cs @@ -0,0 +1,122 @@ +// 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 Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace ReactiveUI.SourceGenerators.Benchmarks.Support; + +/// Three ways to find the fields marked [Reactive], measured against each other. +/// +/// Each generator only discovers: its transform reads the field's name and its output counts the fields, so the +/// measurement is the cost of finding the targets and nothing else. +/// +internal static class DiscoveryGenerators +{ + /// The attribute every strategy looks for. + private const string AttributeMetadataName = "ReactiveUI.SourceGenerators.ReactiveAttribute"; + + /// Gets the strategies by name. + internal static IReadOnlyList<(string Name, IIncrementalGenerator Generator)> Strategies { get; } = + [ + ("ForAttributeWithMetadataName", new ForAttributeWithMetadataNameDiscovery()), + ("SyntaxNameThenSymbol", new SyntaxNameThenSymbolDiscovery()), + ("DeclaredSymbolScan", new DeclaredSymbolScanDiscovery()), + ]; + + /// Determines from syntax whether a declarator belongs to a field that carries attributes. + /// The node. + /// Whether the node is a variable of an attributed field. + private static bool IsAttributedField(SyntaxNode node) => + node is VariableDeclaratorSyntax { Parent.Parent: FieldDeclarationSyntax { AttributeLists.Count: > 0 } }; + + /// Determines whether a symbol carries the attribute, comparing its class's metadata name. + /// The symbol. + /// Whether the attribute is present. + private static bool HasReactiveAttribute(ISymbol symbol) + { + foreach (var attribute in symbol.GetAttributes()) + { + if (attribute.AttributeClass?.ToDisplayString() == AttributeMetadataName) + { + return true; + } + } + + return false; + } + + /// Writes the number of fields found, so every strategy's pipeline runs to its end. + /// The generator initialization context. + /// The names of the fields found. + private static void RegisterCount(in IncrementalGeneratorInitializationContext context, IncrementalValuesProvider names) => + context.RegisterSourceOutput(names.Collect(), static (context, all) => context.AddSource("Count.g.cs", $"// {all.Length}")); + + /// Finds the fields with ForAttributeWithMetadataName. + private sealed class ForAttributeWithMetadataNameDiscovery : IIncrementalGenerator + { + /// + public void Initialize(IncrementalGeneratorInitializationContext context) => + RegisterCount(context, context.SyntaxProvider.ForAttributeWithMetadataName( + AttributeMetadataName, + static (node, _) => IsAttributedField(node), + static (context, _) => context.TargetSymbol.Name)); + } + + /// Finds the fields by the attribute's simple name in syntax, then confirms the attribute on the symbol. + private sealed class SyntaxNameThenSymbolDiscovery : IIncrementalGenerator + { + /// + public void Initialize(IncrementalGeneratorInitializationContext context) => + RegisterCount(context, context.SyntaxProvider.CreateSyntaxProvider( + static (node, _) => NamesReactiveAttribute(node), + static (context, token) => context.SemanticModel.GetDeclaredSymbol(context.Node, token) is { } symbol && HasReactiveAttribute(symbol) ? symbol.Name : null) + .Where(static name => name is not null) + .Select(static (name, _) => name!)); + + /// Determines from syntax alone whether a field names an attribute Reactive or ReactiveAttribute. + /// The node. + /// Whether any attribute's simple name matches. + private static bool NamesReactiveAttribute(SyntaxNode node) + { + if (node is not VariableDeclaratorSyntax { Parent.Parent: FieldDeclarationSyntax field }) + { + return false; + } + + foreach (var list in field.AttributeLists) + { + foreach (var attribute in list.Attributes) + { + var name = attribute.Name switch + { + QualifiedNameSyntax qualified => qualified.Right.Identifier.ValueText, + AliasQualifiedNameSyntax alias => alias.Name.Identifier.ValueText, + SimpleNameSyntax simple => simple.Identifier.ValueText, + _ => string.Empty, + }; + + if (name is "Reactive" or "ReactiveAttribute") + { + return true; + } + } + } + + return false; + } + } + + /// Finds the fields by binding every attributed field and reading its attributes, as the old IViewFor helper did for classes. + private sealed class DeclaredSymbolScanDiscovery : IIncrementalGenerator + { + /// + public void Initialize(IncrementalGeneratorInitializationContext context) => + RegisterCount(context, context.SyntaxProvider.CreateSyntaxProvider( + static (node, _) => IsAttributedField(node), + static (context, token) => context.SemanticModel.GetDeclaredSymbol(context.Node, token) is { } symbol && HasReactiveAttribute(symbol) ? symbol.Name : null) + .Where(static name => name is not null) + .Select(static (name, _) => name!)); + } +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/DiscoveryScenarios.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/DiscoveryScenarios.cs new file mode 100644 index 00000000..8b9272ad --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/DiscoveryScenarios.cs @@ -0,0 +1,110 @@ +// 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 Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using ReactiveUI.SourceGenerators.Benchmarks.Shared; + +namespace ReactiveUI.SourceGenerators.Benchmarks.Support; + +/// The attribute-discovery scenarios: each strategy cold, and rerun after an unrelated edit. +internal static class DiscoveryScenarios +{ + /// How many times each mock file is repeated. + private const int Copies = 20; + + /// The operations a cold session runs. + private const int ColdOperations = 100; + + /// The operations an incremental session runs. + private const int IncrementalOperations = 400; + + /// The text the unrelated edit changes. + private const string UnrelatedEditTarget = "public override string ToString() => Customer ?? string.Empty;"; + + /// Creates a cold and an incremental scenario per discovery strategy. + /// The scenarios. + internal static List Create() + { + // Every generator's output joins the corpus first, so the attributes resolve and the generated files add the + // kind of code a real build carries alongside the consumer's. + Compilation compilation = null!; + Compilation edited = null!; + void Prepare() + { + if (compilation is not null) + { + return; + } + + _ = GeneratorHarness.CreateDriver(GeneratorHarness.AllCorpus) + .RunGeneratorsAndUpdateCompilation(GeneratorHarness.BuildCompilation(GeneratorHarness.AllCorpus, Copies), out compilation, out _); + var tree = FindTree(compilation, "Noise0.cs"); + var text = tree.GetText().ToString().Replace(UnrelatedEditTarget, "public override string ToString() => Customer ?? \"none\";", StringComparison.Ordinal); + edited = compilation.ReplaceSyntaxTree(tree, tree.WithChangedText(Microsoft.CodeAnalysis.Text.SourceText.From(text))); + } + + var scenarios = new List(); + foreach (var (name, generator) in DiscoveryGenerators.Strategies) + { + scenarios.Add(new($"Discovery-Cold-{name}", ColdOperations, Prepare, () => Run(CreateDriver(generator), compilation))); + + GeneratorDriver warm = null!; + scenarios.Add(new( + $"Discovery-Incremental-{name}", + IncrementalOperations, + () => + { + Prepare(); + warm = CreateDriver(generator).RunGenerators(compilation); + }, + () => Run(warm, edited))); + } + + return scenarios; + } + + /// Runs each strategy once and reports what it found, to show they agree. + /// One line per strategy. + internal static IEnumerable DescribeFindings() + { + _ = GeneratorHarness.CreateDriver(GeneratorHarness.AllCorpus) + .RunGeneratorsAndUpdateCompilation(GeneratorHarness.BuildCompilation(GeneratorHarness.AllCorpus, Copies), out var compilation, out _); + foreach (var (name, generator) in DiscoveryGenerators.Strategies) + { + var found = CreateDriver(generator).RunGenerators(compilation).GetRunResult().Results[0].GeneratedSources[0].SourceText.ToString(); + yield return $"{name}: {found}"; + } + } + + /// Creates a cold driver for one discovery generator. + /// The generator. + /// The driver. + private static CSharpGeneratorDriver CreateDriver(IIncrementalGenerator generator) => + CSharpGeneratorDriver.Create([generator.AsSourceGenerator()], parseOptions: new(LanguageVersion.CSharp13)); + + /// Finds a tree by file name. + /// The compilation. + /// The file name. + /// The tree. + private static SyntaxTree FindTree(Compilation compilation, string fileName) + { + foreach (var tree in compilation.SyntaxTrees) + { + if (Path.GetFileName(tree.FilePath) == fileName) + { + return tree; + } + } + + throw new InvalidOperationException($"The corpus has no {fileName}."); + } + + /// Runs a driver and returns the length of what it wrote, so the work is kept. + /// The driver. + /// The compilation. + /// The generated length. + private static long Run(GeneratorDriver driver, Compilation compilation) => + driver.RunGenerators(compilation).GetRunResult().Results[0].GeneratedSources[0].SourceText.Length; +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GenerationScenarios.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GenerationScenarios.cs new file mode 100644 index 00000000..e6220fa3 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GenerationScenarios.cs @@ -0,0 +1,103 @@ +// 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 Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using ReactiveUI.SourceGenerators.Benchmarks.Shared; + +namespace ReactiveUI.SourceGenerators.Benchmarks.Support; + +/// The generation scenarios the EventPipe allocation harness measures. +internal static class GenerationScenarios +{ + /// How many times each mock file is repeated, each copy in its own namespace. + private const int Copies = 20; + + /// The operations a cold-generation session runs; enough for hundreds of megabytes of allocation. + private const int ColdOperations = 60; + + /// The operations an incremental session runs. + private const int IncrementalOperations = 400; + + /// The text an unrelated edit changes: a member of a noise class no generator reads. + private const string UnrelatedEditTarget = "public override string ToString() => Customer ?? string.Empty;"; + + /// The text a related edit changes: a member of a class with [Reactive] fields that is not itself generated from. + private const string RelatedEditTarget = "public string FullName => FirstName + \" \" + LastName;"; + + /// The text a model edit changes: a [Reactive] field's name, which changes that one type's model. + private const string ModelEditTarget = "private int _age;"; + + /// Creates every scenario: a cold generation per corpus, and warm reruns after an edit. + /// The scenarios. + internal static List Create() + { + var scenarios = new List(); + foreach (var corpus in GeneratorCatalog.Corpora) + { + Compilation compilation = null!; + scenarios.Add(new( + $"Cold-{corpus}", + ColdOperations, + () => compilation = GeneratorHarness.BuildCompilation(corpus, Copies), + () => CountGenerated(GeneratorHarness.CreateDriver(corpus).RunGenerators(compilation)))); + } + + scenarios.Add(CreateIncremental("Incremental-UnrelatedEdit", "Noise0.cs", UnrelatedEditTarget, "public override string ToString() => Customer ?? \"none\";")); + scenarios.Add(CreateIncremental("Incremental-ReactiveClassEdit", "Reactive0.cs", RelatedEditTarget, "public string FullName => LastName + \", \" + FirstName;")); + scenarios.Add(CreateIncremental("Incremental-ReactiveModelEdit", "Reactive0.cs", ModelEditTarget, "private int _ageInYears;")); + return scenarios; + } + + /// Creates a scenario that reruns a warm driver over a compilation with one tree edited. + /// The scenario name. + /// The file name of the tree to edit. + /// The text to replace in that tree. + /// The replacement. + /// The scenario. + /// + /// The warm driver is never replaced, so every operation reruns from the same cached state against the same edit, + /// which is what one keystroke costs in the IDE. + /// + private static AllocationScenario CreateIncremental(string name, string treeName, string find, string replace) + { + GeneratorDriver warm = null!; + Compilation edited = null!; + return new( + name, + IncrementalOperations, + () => + { + var compilation = GeneratorHarness.BuildCompilation(GeneratorHarness.AllCorpus, Copies); + warm = GeneratorHarness.CreateDriver(GeneratorHarness.AllCorpus).RunGenerators(compilation); + var tree = compilation.SyntaxTrees.Single(t => Path.GetFileName(t.FilePath) == treeName); + var text = tree.GetText().ToString(); + if (!text.Contains(find, StringComparison.Ordinal)) + { + throw new InvalidOperationException($"{treeName} no longer contains the text the {name} scenario edits."); + } + + var newTree = tree.WithChangedText(Microsoft.CodeAnalysis.Text.SourceText.From(text.Replace(find, replace, StringComparison.Ordinal))); + edited = compilation.ReplaceSyntaxTree(tree, newTree); + }, + () => CountGenerated(warm.RunGenerators(edited))); + } + + /// Counts the characters a driver's last run generated. + /// The driver. + /// The number of generated characters. + private static long CountGenerated(GeneratorDriver driver) + { + var characters = 0L; + foreach (var result in driver.GetRunResult().Results) + { + foreach (var generated in result.GeneratedSources) + { + characters += generated.SourceText.Length; + } + } + + return characters; + } +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs index 51d57e54..f2b7317e 100644 --- a/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks/Support/GeneratorHarness.cs @@ -39,7 +39,9 @@ internal static CSharpCompilation BuildCompilation(string corpus, int copies) foreach (var path in paths) { var name = Path.GetFileNameWithoutExtension(path); - if (corpus != AllCorpus && !string.Equals(name, corpus, StringComparison.Ordinal) && !string.Equals(name, "Stubs", StringComparison.Ordinal)) + + // Stubs and Noise are in every corpus: the platform types the mocks derive from, and code no generator acts on. + if (corpus != AllCorpus && !string.Equals(name, corpus, StringComparison.Ordinal) && name is not ("Stubs" or "Noise")) { continue; } @@ -107,6 +109,9 @@ private static List CreateReferences() typeof(System.Reactive.Unit).Assembly, typeof(DynamicData.SourceList<>).Assembly, typeof(Splat.Locator).Assembly, + typeof(System.Text.Json.JsonSerializer).Assembly, + typeof(System.Runtime.Serialization.DataContractAttribute).Assembly, + typeof(System.ComponentModel.DescriptionAttribute).Assembly, ]; foreach (var seed in seeds) diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/BenchmarkPlainObject.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/BenchmarkPlainObject.cs new file mode 100644 index 00000000..09e9cc89 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/BenchmarkPlainObject.cs @@ -0,0 +1,16 @@ +// 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; + +namespace ReactiveUI.SourceGenerators.Runtime.Benchmarks; + +/// An object that implements IReactiveObject through the generator rather than a base class. +[IReactiveObject] +public partial class BenchmarkPlainObject +{ + /// Backs the generated Value property. + [Reactive] + private int _value; +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/BenchmarkViewModel.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/BenchmarkViewModel.cs new file mode 100644 index 00000000..dbc09844 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/BenchmarkViewModel.cs @@ -0,0 +1,31 @@ +// 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.Collections.ObjectModel; +using ReactiveUI.SourceGenerators; + +namespace ReactiveUI.SourceGenerators.Runtime.Benchmarks; + +/// A view model whose members the generators write, measured by . +public partial class BenchmarkViewModel : ReactiveObject +{ + /// Backs the generated Items property. + [ReactiveCollection] + private ObservableCollection? _items; + + /// Backs the generated Name property, which also notifies . + [Reactive(nameof(Greeting))] + private string _name = string.Empty; + + /// Backs the generated Count property. + [Reactive] + private int _count; + + /// Gets a value computed from Name. + public string Greeting => Name; + + /// Increments Count; the generated command runs it. + [ReactiveCommand] + private void Increment() => Count++; +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/GeneratedCodeBenchmarks.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/GeneratedCodeBenchmarks.cs new file mode 100644 index 00000000..5e861daf --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/GeneratedCodeBenchmarks.cs @@ -0,0 +1,95 @@ +// 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.Collections.ObjectModel; +using System.ComponentModel; +using BenchmarkDotNet.Attributes; + +namespace ReactiveUI.SourceGenerators.Runtime.Benchmarks; + +/// Measures the members the generators write, as a consumer's app runs them. +/// +/// Each benchmark has one PropertyChanged subscriber, as a bound view would, so the notifications the generated +/// code raises are delivered. Allocations per operation are the figure to watch: the generated code should add none of +/// its own beyond what ReactiveUI's notification needs. +/// +public class GeneratedCodeBenchmarks +{ + /// The view model under measurement. + private readonly BenchmarkViewModel _viewModel = new(); + + /// The plain object under measurement. + private readonly BenchmarkPlainObject _plainObject = new(); + + /// The first of two collections the collection property alternates between. + private readonly ObservableCollection _first = []; + + /// The second of two collections the collection property alternates between. + private readonly ObservableCollection _second = []; + + /// The number of notifications delivered, so the subscriber cannot be optimized away. + private int _notifications; + + /// Which value the next set writes. + private bool _toggle; + + /// Subscribes to both objects' notifications and gives the collection property its first value. + [GlobalSetup] + public void Setup() + { + _viewModel.PropertyChanged += OnPropertyChanged; + _plainObject.PropertyChanged += OnPropertyChanged; + _viewModel.Items = _first; + } + + /// Replaces the collection a [ReactiveCollection] property holds. + /// The number of notifications delivered so far. + [Benchmark] + public int ReplaceCollection() + { + _toggle = !_toggle; + _viewModel.Items = _toggle ? _second : _first; + return _notifications; + } + + /// Adds to and clears the collection a [ReactiveCollection] property holds. + /// The number of notifications delivered so far. + [Benchmark] + public int ChangeCollection() + { + var items = _viewModel.Items!; + items.Add(1); + items.Clear(); + return _notifications; + } + + /// Sets a [Reactive] property that also notifies another property. + /// The number of notifications delivered so far. + [Benchmark] + public int SetReactivePropertyWithAlsoNotify() + { + _toggle = !_toggle; + _viewModel.Name = _toggle ? "first" : "second"; + return _notifications; + } + + /// Sets a [Reactive] property on a type that implements IReactiveObject through [IReactiveObject]. + /// The number of notifications delivered so far. + [Benchmark] + public int SetGeneratedReactiveObjectProperty() + { + _plainObject.Value++; + return _notifications; + } + + /// Reads a generated command, which is created on first use. + /// The command's hash code, so the read cannot be optimized away. + [Benchmark] + public int ReadCommand() => _viewModel.IncrementCommand.GetHashCode(); + + /// Counts a delivered notification. + /// The object that raised it. + /// The notification. + private void OnPropertyChanged(object? sender, PropertyChangedEventArgs e) => _notifications++; +} diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/Program.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/Program.cs new file mode 100644 index 00000000..61a8e22e --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/Program.cs @@ -0,0 +1,53 @@ +// 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.Diagnostics.Tracing; +using BenchmarkDotNet.Configs; +using BenchmarkDotNet.Diagnosers; +using BenchmarkDotNet.Running; +using Microsoft.Diagnostics.NETCore.Client; +using Microsoft.Diagnostics.Tracing.Parsers; +using ReactiveUI.SourceGenerators.Benchmarks.Shared; + +namespace ReactiveUI.SourceGenerators.Runtime.Benchmarks; + +/// Entry point that hands the command line to the BenchmarkDotNet switcher. +internal static class Program +{ + /// The environment variable that turns the EventPipe profiler off when set to false. + private const string ProfilersVariable = "BENCHMARK_PROFILERS"; + + /// Runs the benchmarks the command line selects, or --eventpipe dir to trace allocations. + /// The command-line arguments. + internal static void Main(string[] args) + { + if (args is ["--eventpipe", var outputDirectory]) + { + // Allocation figures: GCAllocationTick events from an EventPipe session over a fixed number of operations. + _ = EventPipeAllocations.Measure(RuntimeScenarios.Create(), outputDirectory); + return; + } + + _ = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, CreateConfig()); + } + + /// Creates the run configuration. + /// An EventPipe trace per benchmark unless profiling is turned off; allocation figures come from its GC events. + private static ManualConfig CreateConfig() + { + var config = ManualConfig.Create(DefaultConfig.Instance); + if (string.Equals(Environment.GetEnvironmentVariable(ProfilersVariable), "false", StringComparison.OrdinalIgnoreCase)) + { + return config; + } + + EventPipeProvider[] providers = + [ + new("Microsoft-DotNETCore-SampleProfiler", EventLevel.Informational), + new(ClrTraceEventParser.ProviderName, EventLevel.Verbose, (long)(ClrTraceEventParser.Keywords.Default | ClrTraceEventParser.Keywords.GCHandle)), + ]; + + return config.AddDiagnoser(new EventPipeProfiler(EventPipeProfile.GcVerbose, providers)); + } +} 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 new file mode 100644 index 00000000..7e44eeea --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + Exe + false + enable + enable + + $(NoWarn);CA1515;CA1822;CA1001 + + + + + + + + + + + + + + + + + + + + diff --git a/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/RuntimeScenarios.cs b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/RuntimeScenarios.cs new file mode 100644 index 00000000..30c577e0 --- /dev/null +++ b/src/benchmarks/ReactiveUI.SourceGenerators.Runtime.Benchmarks/RuntimeScenarios.cs @@ -0,0 +1,38 @@ +// 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.Benchmarks.Shared; + +namespace ReactiveUI.SourceGenerators.Runtime.Benchmarks; + +/// The generated-code scenarios the EventPipe allocation harness measures. +internal static class RuntimeScenarios +{ + /// The operations each session runs; enough that one allocation tick is a small fraction of the total. + private const int Operations = 2_000_000; + + /// + /// The operations the collection-replacing session runs. Generated collection properties used to leak a handler per + /// replacement, so each replacement cost more than the last; this count lets that code finish. + /// + private const int ReplaceCollectionOperations = 20_000; + + /// The operations the collection-changing session runs, after the replacements above have left their handlers. + private const int ChangeCollectionOperations = 2_000; + + /// Creates one scenario per benchmark. + /// The scenarios. + internal static List Create() + { + var benchmarks = new GeneratedCodeBenchmarks(); + return + [ + new("ReplaceCollection", ReplaceCollectionOperations, benchmarks.Setup, () => benchmarks.ReplaceCollection()), + new("ChangeCollection", ChangeCollectionOperations, static () => { }, () => benchmarks.ChangeCollection()), + new("SetReactivePropertyWithAlsoNotify", Operations, static () => { }, () => benchmarks.SetReactivePropertyWithAlsoNotify()), + new("SetGeneratedReactiveObjectProperty", Operations, static () => { }, () => benchmarks.SetGeneratedReactiveObjectProperty()), + new("ReadCommand", Operations, static () => { }, () => benchmarks.ReadCommand()), + ]; + } +} diff --git a/src/benchmarks/Shared/AllocationScenario.cs b/src/benchmarks/Shared/AllocationScenario.cs new file mode 100644 index 00000000..751e5a13 --- /dev/null +++ b/src/benchmarks/Shared/AllocationScenario.cs @@ -0,0 +1,12 @@ +// 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.Benchmarks.Shared; + +/// One measured operation and how often to run it. +/// The scenario name, also the trace's file name. +/// How many operations the traced session runs. +/// Prepares the scenario before its warmup. +/// One operation; its result is kept so the work cannot be optimized away. +public sealed record AllocationScenario(string Name, int Operations, Action Setup, Func Operation); diff --git a/src/benchmarks/Shared/EventPipeAllocations.cs b/src/benchmarks/Shared/EventPipeAllocations.cs new file mode 100644 index 00000000..6874761d --- /dev/null +++ b/src/benchmarks/Shared/EventPipeAllocations.cs @@ -0,0 +1,130 @@ +// 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.Diagnostics.Tracing; +using System.Globalization; +using System.Text; +using Microsoft.Diagnostics.NETCore.Client; +using Microsoft.Diagnostics.Tracing; +using Microsoft.Diagnostics.Tracing.Parsers; + +namespace ReactiveUI.SourceGenerators.Benchmarks.Shared; + +/// Measures allocations per operation from an EventPipe trace of the running process. +/// +/// +/// Each scenario runs a fixed number of operations inside an EventPipe session on this process with the runtime +/// provider's GC keyword at verbose level, which raises a GCAllocationTick event roughly every 100 KB allocated, +/// carrying the exact amount, the allocated type and the call stack. The sum of those amounts divided by the operation +/// count is the allocation per operation; its sampling error is one tick (about 100 KB) over the whole session, so +/// sessions run enough operations to allocate hundreds of megabytes. +/// +/// +/// The trace of each scenario is kept, so the allocated types and the frames that allocated them can be broken down +/// afterwards with nettrace-analyzer.cs. The Jit and Loader keywords are on so the frames resolve to methods. +/// +/// +public static class EventPipeAllocations +{ + /// The runtime keywords the session enables: GC for the allocation ticks, and what resolves their stacks. + private const ClrTraceEventParser.Keywords SessionKeywords = + ClrTraceEventParser.Keywords.GC | ClrTraceEventParser.Keywords.Jit | ClrTraceEventParser.Keywords.Loader + | ClrTraceEventParser.Keywords.Stack; + + /// The number of untraced runs before a session, so JIT and first-use caches are out of the figure. + private const int WarmupOperations = 5; + + /// Traces each scenario and writes a markdown table of the allocations per operation. + /// The scenarios to measure. + /// The directory the traces and the table are written to. + /// The table, also written to allocations.md in . + public static string Measure(IReadOnlyList scenarios, string outputDirectory) + { + ArgumentNullException.ThrowIfNull(scenarios); + _ = Directory.CreateDirectory(outputDirectory); + + var table = new StringBuilder() + .AppendLine("| Scenario | Operations | Sampled bytes per operation | Allocation ticks |") + .AppendLine("| --- | ---: | ---: | ---: |"); + + foreach (var scenario in scenarios) + { + var result = Measure(scenario, Path.Combine(outputDirectory, $"{scenario.Name}.nettrace")); + _ = table.Append("| ").Append(scenario.Name) + .Append(" | ").Append(scenario.Operations.ToString("N0", CultureInfo.InvariantCulture)) + .Append(" | ").Append((result.Bytes / scenario.Operations).ToString("N0", CultureInfo.InvariantCulture)) + .Append(" | ").Append(result.Ticks.ToString("N0", CultureInfo.InvariantCulture)) + .AppendLine(" |"); + Console.WriteLine($"{scenario.Name}: {result.Bytes / scenario.Operations:N0} bytes/op ({result.Ticks:N0} ticks)"); + } + + var text = table.ToString(); + File.WriteAllText(Path.Combine(outputDirectory, "allocations.md"), text); + return text; + } + + /// Traces one scenario. + /// The scenario. + /// The file the trace is written to. + /// The sampled bytes and the number of allocation ticks. + private static (long Bytes, long Ticks) Measure(AllocationScenario scenario, string tracePath) + { + scenario.Setup(); + var sink = 0L; + for (var i = 0; i < WarmupOperations; i++) + { + sink += scenario.Operation(); + } + + GC.Collect(); + GC.WaitForPendingFinalizers(); + GC.Collect(); + + var client = new DiagnosticsClient(Environment.ProcessId); + EventPipeProvider[] providers = [new(ClrTraceEventParser.ProviderName, EventLevel.Verbose, (long)SessionKeywords)]; + using (var session = client.StartEventPipeSession(providers, requestRundown: true, circularBufferMB: 1024)) + { + var copy = Task.Run(() => + { + using var file = File.Create(tracePath); + session.EventStream.CopyTo(file); + }); + + for (var i = 0; i < scenario.Operations; i++) + { + sink += scenario.Operation(); + } + + session.Stop(); + copy.Wait(); + } + + GC.KeepAlive(sink); + return SumAllocationTicks(tracePath, Environment.ProcessId); + } + + /// Sums the allocation ticks a process raised in a trace. + /// The trace. + /// The process whose ticks count. + /// The sampled bytes and the number of ticks. + private static (long Bytes, long Ticks) SumAllocationTicks(string tracePath, int processId) + { + long bytes = 0; + long ticks = 0; + using var source = new EventPipeEventSource(tracePath); + source.Clr.GCAllocationTick += allocation => + { + if (allocation.ProcessID != processId) + { + return; + } + + bytes += allocation.AllocationAmount64; + ticks++; + }; + + _ = source.Process(); + return (bytes, ticks); + } +} From 6e250c6dcbdfa00cb7e4fbe0c24ac6929c11ab50 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 02:16:16 +1000 Subject: [PATCH 24/30] docs: describe the EventPipe allocation measurements and the pipeline fast paths in CLAUDE.md --- CLAUDE.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8e2e5980..3d649414 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -121,6 +121,15 @@ Initialize() └─ RegisterSourceOutput → GenerateSource() → AddSource() ``` +**Fast paths:** +- Find attributed targets with `ForAttributeWithMetadataName`; benchmarks show it allocates less than a syntax + provider, cold and incrementally. A generic attribute is registered by its arity name (``IViewForAttribute`1``). +- Reject nodes in the syntax predicate before any binding: node kind, parent shape, `partial` modifier. +- In the transform, read `context.Attributes[0]` rather than searching the symbol's attributes again, and ask for + semantic information only when syntax says it can exist (documentation only when the node has a doc comment). +- Group models per type with `GroupByTarget` and register one source output per type, so an edit rewrites only the + types whose models changed. Tag steps with `TrackingNames`; `IncrementalCachingTests` asserts what is reused. + **Incremental caching rules:** - All pipeline output models must implement value equality (`record`, `IEquatable`, or `EquatableArray`). - Never store `ISymbol`, `SyntaxNode`, `SemanticModel`, or `CancellationToken` in a model. @@ -226,12 +235,15 @@ dotnet test src/ReactiveUI.SourceGenerator.Tests --configuration Release ```pwsh cd src/benchmarks/ReactiveUI.SourceGenerators.Benchmarks dotnet run -c Release -- --smoke # every corpus generates and compiles -dotnet run -c Release -- --filter '*' --artifacts -dotnet run ~/source/rxui/tools/nettrace-analyzer.cs -- --top 40 /*.nettrace +dotnet run -c Release -- --eventpipe # bytes per run from GCAllocationTick, one trace per scenario +dotnet run -c Release -- --eventpipe-discovery # attribute discovery strategies against each other +cd ../ReactiveUI.SourceGenerators.Runtime.Benchmarks +dotnet run -c Release -- --eventpipe # the generated code, as an app runs it +dotnet run ~/source/rxui/tools/nettrace-analyzer.cs -- --top 40 /.nettrace ``` -Each run records an EventPipe trace per corpus; its AllocationTick events give the allocated types, sites and -inclusive frames. Set `BENCHMARK_PROFILERS=false` for timings only. +Report allocation figures from the EventPipe traces, not the memory diagnoser, and compare a change against the +previous commit with the same harness. `src/benchmarks/README.md` has the method and the current figures. ### Building From f0c3c284f52e9f602f191300cb63426b065d1eae Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Sat, 26 Sep 2026 02:29:10 +1000 Subject: [PATCH 25/30] fix: build the Avalonia and MAUI test apps again Both referenced the packaging project as an analyzer, which ships no generator assembly, so neither found the attributes; they now reference the Roslyn 5.0 generator as the WPF and WinForms apps do. The MAUI app targets the MAUI heads Directory.Build.props lists instead of the out-of-support net8.0 ones, overrides CreateWindow instead of setting the obsolete MainPage, moves its counter into the view model with [Reactive] and [ReactiveCommand], and targets Android 23, which its AndroidX dependencies need. The apps' code now meets the repository's analyzer rules. --- .../Program.cs | 30 ++++++----- .../TestAvaloniaApplication.Desktop.csproj | 2 +- .../app.manifest | 2 +- .../TestAvaloniaApplication/App.axaml.cs | 34 ++++-------- .../TestAvaloniaApplication.csproj | 4 +- .../ViewModels/MainViewModel.cs | 17 ++---- .../ViewModels/ViewModelBase.cs | 13 ++--- .../Views/MainView.axaml.cs | 15 ++---- .../Views/MainWindow.axaml.cs | 13 ++--- src/TestApps/TestMauiApplication/App.xaml | 2 +- src/TestApps/TestMauiApplication/App.xaml.cs | 35 ++++++------- .../TestMauiApplication/AppShell.xaml.cs | 29 ++++------- .../TestMauiApplication/MainPage.xaml | 10 ++-- .../TestMauiApplication/MainPage.xaml.cs | 48 +++++------------ .../TestMauiApplication/MainViewModel.cs | 35 +++++++++---- .../TestMauiApplication/MauiProgram.cs | 44 +++++++--------- .../Platforms/Android/AndroidManifest.xml | 2 +- .../Platforms/Android/MainActivity.cs | 29 ++++++----- .../Platforms/Android/MainApplication.cs | 52 ++++++++----------- .../Platforms/MacCatalyst/Entitlements.plist | 2 +- .../Platforms/Tizen/tizen-manifest.xml | 2 +- .../Platforms/Windows/App.xaml | 2 +- .../Platforms/Windows/Package.appxmanifest | 2 +- .../Resources/Raw/AboutAssets.txt | 2 +- .../Resources/Styles/Colors.xaml | 2 +- .../Resources/Styles/Styles.xaml | 2 +- .../TestMauiApplication.csproj | 10 ++-- src/TestApps/TestWpfApplication/App.xaml | 2 +- .../TestWpfApplication/MainWindow.xaml | 2 +- 29 files changed, 191 insertions(+), 253 deletions(-) diff --git a/src/TestApps/TestAvaloniaApplication.Desktop/Program.cs b/src/TestApps/TestAvaloniaApplication.Desktop/Program.cs index 5baa2d10..12bc279a 100644 --- a/src/TestApps/TestAvaloniaApplication.Desktop/Program.cs +++ b/src/TestApps/TestAvaloniaApplication.Desktop/Program.cs @@ -1,6 +1,5 @@ -// Copyright (c) 2024 .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. using System; @@ -10,23 +9,26 @@ namespace AvaloniaApplication1.Desktop; -/// -/// Program. -/// +/// The desktop entry point for the Avalonia sample application. internal static class Program { - // Initialization code. Don't use any Avalonia, third-party APIs or any - // SynchronizationContext-reliant code before AppMain is called: things aren't initialized - // yet and stuff might break. + /// Starts the application with the classic desktop lifetime. + /// + /// Don't use any Avalonia, third-party APIs or any SynchronizationContext-reliant code + /// before AppMain is called: things aren't initialized yet and stuff might break. + /// + /// The command line arguments. [STAThread] - public static void Main(string[] args) => BuildAvaloniaApp() + internal static void Main(string[] args) => BuildAvaloniaApp() .StartWithClassicDesktopLifetime(args); - // Avalonia configuration, don't remove; also used by visual designer. - public static AppBuilder BuildAvaloniaApp() - => AppBuilder.Configure() + /// Configures the Avalonia application builder with ReactiveUI support. + /// Don't remove; this is also used by the visual designer. + /// The configured . + internal static AppBuilder BuildAvaloniaApp() => + AppBuilder.Configure() .UsePlatformDetect() .WithInterFont() .LogToTrace() - .UseReactiveUI(_ => { }); + .UseReactiveUI(static _ => { }); } diff --git a/src/TestApps/TestAvaloniaApplication.Desktop/TestAvaloniaApplication.Desktop.csproj b/src/TestApps/TestAvaloniaApplication.Desktop/TestAvaloniaApplication.Desktop.csproj index 2556b191..06f4002d 100644 --- a/src/TestApps/TestAvaloniaApplication.Desktop/TestAvaloniaApplication.Desktop.csproj +++ b/src/TestApps/TestAvaloniaApplication.Desktop/TestAvaloniaApplication.Desktop.csproj @@ -1,4 +1,4 @@ - + WinExe diff --git a/src/TestApps/TestMauiApplication/Platforms/Tizen/tizen-manifest.xml b/src/TestApps/TestMauiApplication/Platforms/Tizen/tizen-manifest.xml index 16035f2e..2f71da31 100644 --- a/src/TestApps/TestMauiApplication/Platforms/Tizen/tizen-manifest.xml +++ b/src/TestApps/TestMauiApplication/Platforms/Tizen/tizen-manifest.xml @@ -1,4 +1,4 @@ - + diff --git a/src/TestApps/TestMauiApplication/Platforms/Windows/App.xaml b/src/TestApps/TestMauiApplication/Platforms/Windows/App.xaml index 4cf22441..4bf3aaa4 100644 --- a/src/TestApps/TestMauiApplication/Platforms/Windows/App.xaml +++ b/src/TestApps/TestMauiApplication/Platforms/Windows/App.xaml @@ -1,4 +1,4 @@ - + + + + - net8.0-android;net8.0-ios;net8.0-maccatalyst - $(TargetFrameworks);net8.0-windows10.0.19041.0 + + $(MauiTfms) @@ -32,7 +32,7 @@ 11.0 13.1 - 21.0 + 23.0 10.0.17763.0 10.0.17763.0 6.5 @@ -64,7 +64,7 @@ - + diff --git a/src/TestApps/TestWpfApplication/App.xaml b/src/TestApps/TestWpfApplication/App.xaml index 2e70522d..6bd9b06c 100644 --- a/src/TestApps/TestWpfApplication/App.xaml +++ b/src/TestApps/TestWpfApplication/App.xaml @@ -1,4 +1,4 @@ - Date: Sat, 26 Sep 2026 02:29:10 +1000 Subject: [PATCH 26/30] chore: store every file as UTF-8 without a byte order mark, with LF line endings .editorconfig sets charset = utf-8 and end_of_line = lf for every file, and .gitattributes checks text out with LF on every platform. The byte order marks are removed from the snapshots, project files, XAML and manifests. The generators hand their attribute sources to the compiler as UTF-8 without a byte order mark, and the snapshot helper writes without one. --- .editorconfig | 5 ++--- .gitattributes | 14 +++++++++++++- .../DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs | 2 +- .../BDLG.FRxProps#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs | 2 +- .../DLE.AccMods#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs | 2 +- .../DLE.CplxGen#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs | 2 +- .../DLE.DateTimeT#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs | 2 +- .../DLE.DiffNss#Ns1.TestVM.Bdl.verified.cs | 2 +- .../DLE.DiffNss#Ns2.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs | 2 +- .../DLE.EnumT#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs | 2 +- .../DLE.GenClass#TestNs.GenVM`1.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs | 2 +- .../DLE.GuidT#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DLE.IntClassGenPublicProp#BdlAttr.verified.cs | 2 +- ...IntClassGenPublicProp#TestNs.Vm.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs | 2 +- .../DLE.InterfaceT#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs | 2 +- .../DLE.MultiLists#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs | 2 +- ...tNs.OuterVM+InnerVM+DeepInnerVM.Bdl.verified.cs | 2 +- ...estClass#TestNs.OuterVM+InnerVM.Bdl.verified.cs | 2 +- .../DLE.NestClass#TestNs.OuterVM.Bdl.verified.cs | 2 +- .../DLE.NullElements#BdlAttr.verified.cs | 2 +- .../DLE.NullElements#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DLE.RecordClass#BdlAttr.verified.cs | 2 +- ...RecordClass#TestNs.TestVMRecord.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs | 2 +- .../DLE.StructT#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs | 2 +- .../DLE.TupleT#TestNs.TestVM.Bdl.verified.cs | 2 +- .../DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs | 2 +- .../DLE.WRx#TestNs.TestVM.Bdl.verified.cs | 2 +- .../GeneratorSnapshot.cs | 4 ++-- .../IVIEWFOR/IVFG.Basic#IvfAttr.verified.cs | 2 +- .../IVFG.Basic#TestNs.TestViewWpf.Ivf.verified.cs | 2 +- .../IVIEWFOR/VFE.DiffNs#IvfAttr.verified.cs | 2 +- .../VFE.DiffNs#Views.ProductView.Ivf.verified.cs | 2 +- ...FE.ExtNs#App.Views.ExternalView.Ivf.verified.cs | 2 +- .../IVIEWFOR/VFE.ExtNs#IvfAttr.verified.cs | 2 +- .../VFE.FIvfWNestViewClass#IvfAttr.verified.cs | 2 +- ...tainer+MiddleContainer+NestView.Ivf.verified.cs | 2 +- .../IVIEWFOR/VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs | 2 +- ...E.FIvfWRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs | 2 +- .../VFE.FIvfWRxPropsVm#IvfAttr.verified.cs | 2 +- ...vfWRxPropsVm#TestNs.RxPropsView.Ivf.verified.cs | 2 +- .../VFE.FIvfWStringVmT#IvfAttr.verified.cs | 2 +- ....FIvfWStringVmT#TestNs.TestView.Ivf.verified.cs | 2 +- .../VFE.FMultiIvfInSameNs#IvfAttr.verified.cs | 2 +- ....FMultiIvfInSameNs#TestNs.View1.Ivf.verified.cs | 2 +- ....FMultiIvfInSameNs#TestNs.View2.Ivf.verified.cs | 2 +- ....FMultiIvfInSameNs#TestNs.View3.Ivf.verified.cs | 2 +- .../IVIEWFOR/VFE.Gen#IvfAttr.verified.cs | 2 +- .../VFE.Gen#TestNs.StringItemView.Ivf.verified.cs | 2 +- .../IVIEWFOR/VFE.Interface#IvfAttr.verified.cs | 2 +- ....Interface#TestNs.InterfaceView.Ivf.verified.cs | 2 +- .../IVIEWFOR/VFE.Nest#IvfAttr.verified.cs | 2 +- .../VFE.Nest#TestNs.ChildView.Ivf.verified.cs | 2 +- .../IVIEWFOR/VFE.Record#IvfAttr.verified.cs | 2 +- .../VFE.Record#TestNs.RecordView.Ivf.verified.cs | 2 +- .../REACTIVE/RG.Basic#AccMod.verified.cs | 2 +- .../REACTIVE/RG.Basic#RxAttr.verified.cs | 2 +- .../RG.Basic#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RG.CalledValue#AccMod.verified.cs | 2 +- .../REACTIVE/RG.CalledValue#RxAttr.verified.cs | 2 +- .../RG.CalledValue#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RG.Partial#AccMod.verified.cs | 2 +- .../REACTIVE/RG.Partial#RxAttr.verified.cs | 2 +- .../RG.PartialAlsoNotify#AccMod.verified.cs | 2 +- .../RG.PartialAlsoNotify#RxAttr.verified.cs | 2 +- ...rtialAlsoNotify#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RG.WAcc#AccMod.verified.cs | 2 +- .../REACTIVE/RG.WAcc#RxAttr.verified.cs | 2 +- .../RG.WAcc#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs | 2 +- .../REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs | 2 +- ...WAttrAccInherit#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RG.WAttrs#AccMod.verified.cs | 2 +- .../REACTIVE/RG.WAttrs#RxAttr.verified.cs | 2 +- .../RG.WAttrs#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RG.WIdenticalClass#AccMod.verified.cs | 2 +- .../REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs | 2 +- ...IdenticalClass#TestNs1.TestVM.Props.verified.cs | 2 +- ...IdenticalClass#TestNs2.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RG.WInit#AccMod.verified.cs | 2 +- .../REACTIVE/RG.WInit#RxAttr.verified.cs | 2 +- .../RG.WInit#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RG.WNestClass#AccMod.verified.cs | 2 +- .../REACTIVE/RG.WNestClass#RxAttr.verified.cs | 2 +- ...stNs1.TestVm3+TestInnerClass1.Props.verified.cs | 2 +- ...stInnerClass2+TestInnerClass3.Props.verified.cs | 2 +- ...stNs1.TestVm3+TestInnerClass2.Props.verified.cs | 2 +- ...RG.WNestClass#TestNs1.TestVm3.Props.verified.cs | 2 +- .../REACTIVE/RGE.Arrays#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Arrays#RxAttr.verified.cs | 2 +- .../RGE.Arrays#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.CplxGen#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.CplxGen#RxAttr.verified.cs | 2 +- .../RGE.CplxGen#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.DeepNest#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.DeepNest#RxAttr.verified.cs | 2 +- ...1+Level2+Level3+Level4+Level5.Props.verified.cs | 2 +- ...s.Level1+Level2+Level3+Level4.Props.verified.cs | 2 +- ...t#TestNs.Level1+Level2+Level3.Props.verified.cs | 2 +- ...DeepNest#TestNs.Level1+Level2.Props.verified.cs | 2 +- .../RGE.DeepNest#TestNs.Level1.Props.verified.cs | 2 +- .../REACTIVE/RGE.Delegates#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Delegates#RxAttr.verified.cs | 2 +- .../RGE.Delegates#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Enums#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Enums#RxAttr.verified.cs | 2 +- .../RGE.Enums#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Gen#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Gen#RxAttr.verified.cs | 2 +- .../RGE.Gen#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.GenClass#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.GenClass#RxAttr.verified.cs | 2 +- .../RGE.GenClass#TestNs.GenVM`1.Props.verified.cs | 2 +- .../RGE.GenClass#TestNs.GenVM`2.Props.verified.cs | 2 +- .../REACTIVE/RGE.Interfaces#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Interfaces#RxAttr.verified.cs | 2 +- .../RGE.Interfaces#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Lazy#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Lazy#RxAttr.verified.cs | 2 +- .../RGE.Lazy#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.MixedAcc#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.MixedAcc#RxAttr.verified.cs | 2 +- .../RGE.MixedAcc#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.MultiAlso#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.MultiAlso#RxAttr.verified.cs | 2 +- .../RGE.MultiAlso#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.MultiAttr#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.MultiAttr#RxAttr.verified.cs | 2 +- .../RGE.MultiAttr#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.MultiPartial#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.MultiPartial#RxAttr.verified.cs | 2 +- ...GE.MultiPartial#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.NewMod#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.NewMod#RxAttr.verified.cs | 2 +- .../RGE.NewMod#TestNs.BaseVM.Props.verified.cs | 2 +- .../RGE.NewMod#TestNs.DerivedVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Null#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Null#RxAttr.verified.cs | 2 +- .../RGE.Null#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Override#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Override#RxAttr.verified.cs | 2 +- .../RGE.Override#TestNs.BaseVM.Props.verified.cs | 2 +- ...RGE.Override#TestNs.DerivedVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Record#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Record#RxAttr.verified.cs | 2 +- ...GE.Record#TestNs.TestVMRecord.Props.verified.cs | 2 +- .../REACTIVE/RGE.Ro#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Ro#RxAttr.verified.cs | 2 +- .../RGE.Ro#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Struct#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Struct#RxAttr.verified.cs | 2 +- .../RGE.Struct#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Time#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Time#RxAttr.verified.cs | 2 +- .../RGE.Time#TestNs.TestVM.Props.verified.cs | 2 +- .../REACTIVE/RGE.Tuples#AccMod.verified.cs | 2 +- .../REACTIVE/RGE.Tuples#RxAttr.verified.cs | 2 +- .../RGE.Tuples#TestNs.TestVM.Props.verified.cs | 2 +- .../RCE.FMultiRxCmds#RxCmdAttr.verified.cs | 2 +- ...E.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs | 2 +- ...E.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs | 2 +- ...s.Outer+Middle+Inner+Deepest.RxCmds.verified.cs | 2 +- ...ss#TestNs.Outer+Middle+Inner.RxCmds.verified.cs | 2 +- ...estClass#TestNs.Outer+Middle.RxCmds.verified.cs | 2 +- ...DeeplyNestClass#TestNs.Outer.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs | 2 +- ...CmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs | 2 +- ...ordClass#TestNs.TestVMRecord.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs | 2 +- ...CmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs | 2 +- ...CmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs | 2 +- ...E.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs | 2 +- ...nExecuteMethod#TestNs.TestVM.RxCmds.verified.cs | 2 +- ...RxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs | 2 +- ...ecuteScheduler#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs | 2 +- ...mdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWCt#RxCmdAttr.verified.cs | 2 +- .../RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs | 2 +- ...FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs | 2 +- ...WDelegateParam#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs | 2 +- ...xCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs | 2 +- ...mdWMultiParams#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs | 2 +- ...xCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs | 2 +- ....FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs | 2 +- ...CmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs | 2 +- ...dWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs | 2 +- ...WTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs | 2 +- ...xCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs | 2 +- ...xCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs | 2 +- ...AcrossPartialDeclarations#RxCmdAttr.verified.cs | 2 +- ...alDeclarations#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs | 2 +- .../RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCMDG.AsyncWParam#RxCmdAttr.verified.cs | 2 +- ...DG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs | 2 +- .../RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs | 2 +- ...DG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs | 2 +- ...stNs.TestVm3+TestInnerClass1.RxCmds.verified.cs | 2 +- ...tInnerClass2+TestInnerClass3.RxCmds.verified.cs | 2 +- ...stNs.TestVm3+TestInnerClass2.RxCmds.verified.cs | 2 +- .../RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs | 2 +- .../RCMDG.NullTRet#RxCmdAttr.verified.cs | 2 +- ...RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCMDG.RunInBackground#RxCmdAttr.verified.cs | 2 +- ...unInBackground#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCMDG.Scheduler#RxCmdAttr.verified.cs | 2 +- ...CMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs | 2 +- .../RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs | 2 +- .../RCE.ByteArray#RxCollAttr.verified.cs | 2 +- ...RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs | 2 +- .../RCE.CplxT#TestNs.TestVM.RxColls.verified.cs | 2 +- .../RCE.DateTime#RxCollAttr.verified.cs | 2 +- .../RCE.DateTime#TestNs.TestVM.RxColls.verified.cs | 2 +- .../RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs | 2 +- .../RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs | 2 +- .../REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs | 2 +- .../RCE.Enum#TestNs.TestVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs | 2 +- .../RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs | 2 +- .../RCE.Guid#TestNs.TestVM.RxColls.verified.cs | 2 +- .../RCE.Interface#RxCollAttr.verified.cs | 2 +- ...RCE.Interface#TestNs.TestVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs | 2 +- .../RCE.Multi#TestNs.TestVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs | 2 +- ...OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs | 2 +- ...Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs | 2 +- .../RCE.Nest#TestNs.OuterVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs | 2 +- .../RCE.Null#TestNs.TestVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs | 2 +- ....Record#TestNs.TestVMRecord.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs | 2 +- .../RCE.Struct#TestNs.TestVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs | 2 +- .../RCE.Tuple#TestNs.TestVM.RxColls.verified.cs | 2 +- .../REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs | 2 +- .../RCE.WRx#TestNs.TestVM.RxColls.verified.cs | 2 +- .../RCG.BasicField#RxCollAttr.verified.cs | 2 +- ...CG.BasicField#TestNs.TestVM.RxColls.verified.cs | 2 +- .../REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs | 2 +- .../ROE.Basic#TestNs.TestVM.IRxObj.verified.cs | 2 +- .../REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs | 2 +- .../ROE.CplxT#TestNs.TestVM.IRxObj.verified.cs | 2 +- .../REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs | 2 +- .../ROE.Enums#TestNs.TestVM.IRxObj.verified.cs | 2 +- .../ROE.FRxObjRecord#IRxObjAttr.verified.cs | 2 +- .../ROE.FRxObjWAccMods#IRxObjAttr.verified.cs | 2 +- ...FRxObjWAccMods#TestNs.TestVM.IRxObj.verified.cs | 2 +- .../ROE.FRxObjWAttrs#IRxObjAttr.verified.cs | 2 +- ...E.FRxObjWAttrs#TestNs.TestVM.IRxObj.verified.cs | 2 +- ...FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs | 2 +- ....Level1+Level2+Level3+Level4.IRxObj.verified.cs | 2 +- ...#TestNs.Level1+Level2+Level3.IRxObj.verified.cs | 2 +- ...Classes#TestNs.Level1+Level2.IRxObj.verified.cs | 2 +- ...plyNestClasses#TestNs.Level1.IRxObj.verified.cs | 2 +- .../ROE.FRxObjWGenClass#IRxObjAttr.verified.cs | 2 +- ...xObjWGenClass#TestNs.GenVM`1.IRxObj.verified.cs | 2 +- .../ROE.FRxObjWInhMods#IRxObjAttr.verified.cs | 2 +- ...FRxObjWInhMods#TestNs.BaseVM.IRxObj.verified.cs | 2 +- ...ObjWInhMods#TestNs.DerivedVM.IRxObj.verified.cs | 2 +- .../ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs | 2 +- ...ObjWMultiProps#TestNs.TestVM.IRxObj.verified.cs | 2 +- ...FRxObjWMultiTConstraints#IRxObjAttr.verified.cs | 2 +- ...onstraints#TestNs.EntityVM`1.IRxObj.verified.cs | 2 +- .../ROE.FRxObjWNestClass#IRxObjAttr.verified.cs | 2 +- ...lass#TestNs.ParentVM+ChildVM.IRxObj.verified.cs | 2 +- ...bjWNestClass#TestNs.ParentVM.IRxObj.verified.cs | 2 +- .../ROE.Interface#IRxObjAttr.verified.cs | 2 +- .../ROE.Interface#TestNs.TestVM.IRxObj.verified.cs | 2 +- .../REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs | 2 +- .../ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs | 2 +- .../ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs | 2 +- .../REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs | 2 +- .../ROE.Null#TestNs.TestVM.IRxObj.verified.cs | 2 +- .../REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs | 2 +- .../ROG.Basic#TestNs.TestVM.IRxObj.verified.cs | 2 +- .../TestViewWinForms.resx | 2 +- .../TestWinFormsRCHost.resx | 2 +- .../TestWinFormsVMCHost.resx | 2 +- .../BindableDerivedListGenerator.cs | 4 ++-- .../Core/CodeGeneration/SourceWriterExtensions.cs | 4 ++++ .../IViewFor/IViewForGenerator.cs | 4 ++-- .../Reactive/ReactiveGenerator.cs | 6 +++--- .../ReactiveCollectionGenerator.cs | 4 ++-- .../ReactiveCommand/ReactiveCommandGenerator.cs | 4 ++-- .../ReactiveObject/ReactiveObjectGenerator.cs | 4 ++-- .../ReactiveUI.SourceGenerators.Roslyn.projitems | 2 +- .../RoutedControlHostGenerator.cs | 4 ++-- .../ViewModelControlHostGenerator.cs | 6 ++++-- .../ReactiveUI.SourceGenerators.Roslyn4140.csproj | 2 +- .../ReactiveUI.SourceGenerators.Roslyn480.csproj | 2 +- .../ReactiveUI.SourceGenerators.csproj | 2 +- 325 files changed, 353 insertions(+), 336 deletions(-) diff --git a/.editorconfig b/.editorconfig index c4671a1b..a8a3dad2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,8 @@ root = true # Default settings ############################################# [*] +# Every file is UTF-8 without a byte order mark, with LF line endings, on every platform. XAML included. +charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = space @@ -2828,9 +2830,6 @@ indent_size = 2 [*.sh] end_of_line = lf -[*.{cmd, bat}] -end_of_line = crlf - ############################################# # Test projects (TUnit) ############################################# diff --git a/.gitattributes b/.gitattributes index a510aa72..bedb4e88 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,13 @@ -*.cs text eol=lf +# Text files are stored and checked out with LF line endings on every platform. +# Files are UTF-8 without a byte order mark; .editorconfig sets that for editors. +* text=auto eol=lf + +# Binary files are never normalised. +*.png binary +*.jpg binary +*.ico binary +*.snk binary +*.dll binary +*.exe binary +*.nupkg binary +*.nettrace binary diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BDLG.FRxProps#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 de17dfde..6cb69fee 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs index 07ca7a20..2b2de01f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.AccMods#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 32f52fce..68169715 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.CplxGen#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 5248b963..d10086c0 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DateTimeT#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 531d7ba9..8979887c 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs index 07ca7a20..2b2de01f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.DiffNss#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 0286f182..3e42a391 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,4 +1,4 @@ -//HintName: Namespace1.TestVM.BindableDerivedList.g.cs +//HintName: Namespace1.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; 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 ede555ee..a62ddd8a 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,4 +1,4 @@ -//HintName: Namespace2.TestVM.BindableDerivedList.g.cs +//HintName: Namespace2.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.EnumT#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 e7df159d..ca900426 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs index 07ca7a20..2b2de01f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GenClass#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 bed3a1e7..3458dd34 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,4 +1,4 @@ -//HintName: TestNs.GenericVM`1.BindableDerivedList.g.cs +//HintName: TestNs.GenericVM`1.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.GuidT#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 2a431a08..0462e27b 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.IntClassGenPublicProp#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 bc7a8534..e6a21d3a 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,4 +1,4 @@ -//HintName: TestNs.ViewModel.BindableDerivedList.g.cs +//HintName: TestNs.ViewModel.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs index 07ca7a20..2b2de01f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.InterfaceT#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 914c3081..dc3bb8c0 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.MultiLists#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 c18c7584..b8cd09c3 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NestClass#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 937ad1ef..2d1f74eb 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,4 +1,4 @@ -//HintName: TestNs.OuterVM+InnerVM+DeepInnerVM.BindableDerivedList.g.cs +//HintName: TestNs.OuterVM+InnerVM+DeepInnerVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; 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 1195c9dd..319c4fba 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,4 +1,4 @@ -//HintName: TestNs.OuterVM+InnerVM.BindableDerivedList.g.cs +//HintName: TestNs.OuterVM+InnerVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; 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 2d5b3509..508b63d5 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,4 +1,4 @@ -//HintName: TestNs.OuterVM.BindableDerivedList.g.cs +//HintName: TestNs.OuterVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.NullElements#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 189f4304..cc7bff77 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.RecordClass#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 50cdba36..232de777 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,4 +1,4 @@ -//HintName: TestNs.TestVMRecord.BindableDerivedList.g.cs +//HintName: TestNs.TestVMRecord.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs index 07ca7a20..2b2de01f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.StructT#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 9624109c..cc4dae36 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.TupleT#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 96ac3433..bdc5df28 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs index f529f0cc..1150c13e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/DLE.WRx#BdlAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +//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. 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 15230a9f..73d410e2 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,4 +1,4 @@ -//HintName: TestNs.TestVM.BindableDerivedList.g.cs +//HintName: TestNs.TestVM.BindableDerivedList.g.cs // using System.Collections.ObjectModel; using DynamicData; diff --git a/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs b/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs index cccd6881..80cc3e9f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/GeneratorSnapshot.cs @@ -44,8 +44,8 @@ internal static class GeneratorSnapshot /// The suffix every generated hint name ends with, dropped from the snapshot name. private const string HintSuffix = ".g.cs"; - /// The encoding snapshots are written in: UTF-8 with a byte order mark, as the stored snapshots are. - private static readonly UTF8Encoding SnapshotEncoding = new(encoderShouldEmitUTF8Identifier: true); + /// The encoding snapshots are written in: UTF-8 without a byte order mark, as every file in the repository is. + private static readonly UTF8Encoding SnapshotEncoding = new(encoderShouldEmitUTF8Identifier: false); /// /// The words shortened in a snapshot's method and hint segments, longest first so a longer word is never split by a diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#TestNs.TestViewWpf.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#TestNs.TestViewWpf.Ivf.verified.cs index 7fcbdc93..55ef8300 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#TestNs.TestViewWpf.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IVFG.Basic#TestNs.TestViewWpf.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewWpf.IViewFor.g.cs +//HintName: TestNs.TestViewWpf.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#Views.ProductView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#Views.ProductView.Ivf.verified.cs index 05bb18e1..29c08965 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#Views.ProductView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.DiffNs#Views.ProductView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: Views.ProductView.IViewFor.g.cs +//HintName: Views.ProductView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#App.Views.ExternalView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#App.Views.ExternalView.Ivf.verified.cs index 412cfcd7..41303a90 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#App.Views.ExternalView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#App.Views.ExternalView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: App.Views.ExternalView.IViewFor.g.cs +//HintName: App.Views.ExternalView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.ExtNs#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs index c0c882c9..464624f6 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWNestViewClass#TestNs.OuterContainer+MiddleContainer+NestView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.OuterContainer+MiddleContainer+NestedView.IViewFor.g.cs +//HintName: TestNs.OuterContainer+MiddleContainer+NestedView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs index c0417123..0c191213 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxCmdsVm#TestNs.CmdsView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.CommandsView.IViewFor.g.cs +//HintName: TestNs.CommandsView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#TestNs.RxPropsView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#TestNs.RxPropsView.Ivf.verified.cs index f24a0019..4d5c29c3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#TestNs.RxPropsView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWRxPropsVm#TestNs.RxPropsView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.ReactivePropertiesView.IViewFor.g.cs +//HintName: TestNs.ReactivePropertiesView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#TestNs.TestView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#TestNs.TestView.Ivf.verified.cs index cf05cbc2..3b469cb1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#TestNs.TestView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FIvfWStringVmT#TestNs.TestView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestView.IViewFor.g.cs +//HintName: TestNs.TestView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View1.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View1.Ivf.verified.cs index ee2f20c5..07294475 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View1.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View1.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.View1.IViewFor.g.cs +//HintName: TestNs.View1.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View2.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View2.Ivf.verified.cs index 4f704a70..d92018eb 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View2.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View2.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.View2.IViewFor.g.cs +//HintName: TestNs.View2.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View3.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View3.Ivf.verified.cs index 2b2f1dbb..0f925889 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View3.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.FMultiIvfInSameNs#TestNs.View3.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.View3.IViewFor.g.cs +//HintName: TestNs.View3.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#TestNs.StringItemView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#TestNs.StringItemView.Ivf.verified.cs index cbca5535..c55c72db 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#TestNs.StringItemView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Gen#TestNs.StringItemView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.StringItemView.IViewFor.g.cs +//HintName: TestNs.StringItemView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#TestNs.InterfaceView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#TestNs.InterfaceView.Ivf.verified.cs index 5a45ea87..34e9b948 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#TestNs.InterfaceView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Interface#TestNs.InterfaceView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.InterfaceView.IViewFor.g.cs +//HintName: TestNs.InterfaceView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#TestNs.ChildView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#TestNs.ChildView.Ivf.verified.cs index 6a228272..62337ea4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#TestNs.ChildView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Nest#TestNs.ChildView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.ChildView.IViewFor.g.cs +//HintName: TestNs.ChildView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#IvfAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#IvfAttr.verified.cs index 0318d8ef..038e227f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#IvfAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#IvfAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#TestNs.RecordView.Ivf.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#TestNs.RecordView.Ivf.verified.cs index d442e6f9..e26cd7a1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#TestNs.RecordView.Ivf.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/VFE.Record#TestNs.RecordView.Ivf.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.RecordView.IViewFor.g.cs +//HintName: TestNs.RecordView.IViewFor.g.cs // using ReactiveUI; using System.Windows; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs index 16fca858..33529735 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Basic#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs index 8e4e96a9..7019dcb0 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.CalledValue#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.Partial#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs index 2f0db6cd..a11cbd93 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.PartialAlsoNotify#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs index 8023d78b..7020480a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAcc#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs index 49e00838..f6e0c555 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrAccInherit#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs index cafd48e5..66003ccc 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WAttrs#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs index 59ba85bd..0c3dbe87 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs1.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs1.TestVM.Properties.g.cs +//HintName: TestNs1.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs index 28449793..b4f70ee7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WIdenticalClass#TestNs2.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs2.TestVM.Properties.g.cs +//HintName: TestNs2.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs index def79e1f..e9dd9795 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WInit#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs index e5590c67..dacde27b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass1.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs1.TestViewModel3+TestInnerClass1.Properties.g.cs +//HintName: TestNs1.TestViewModel3+TestInnerClass1.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs index e79b345b..64c5fc0e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2+TestInnerClass3.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.cs +//HintName: TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs index 788f6722..d53f2239 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3+TestInnerClass2.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs1.TestViewModel3+TestInnerClass2.Properties.g.cs +//HintName: TestNs1.TestViewModel3+TestInnerClass2.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs index c7112404..8d2621f9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RG.WNestClass#TestNs1.TestVm3.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs1.TestViewModel3.Properties.g.cs +//HintName: TestNs1.TestViewModel3.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs index 09d7bf41..20faaf37 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Arrays#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs index 8a6cebfa..acbe7862 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.CplxGen#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs index 3e6c9297..ee6b696c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4+Level5.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1+Level2+Level3+Level4+Level5.Properties.g.cs +//HintName: TestNs.Level1+Level2+Level3+Level4+Level5.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs index d29f1ffd..5bfd08c2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3+Level4.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1+Level2+Level3+Level4.Properties.g.cs +//HintName: TestNs.Level1+Level2+Level3+Level4.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs index 31e0f191..c907d361 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2+Level3.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1+Level2+Level3.Properties.g.cs +//HintName: TestNs.Level1+Level2+Level3.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs index 64c47f74..3b24adf6 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1+Level2.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1+Level2.Properties.g.cs +//HintName: TestNs.Level1+Level2.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs index dfa1e337..1f906bca 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.DeepNest#TestNs.Level1.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1.Properties.g.cs +//HintName: TestNs.Level1.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs index 75723baf..af08b0ce 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Delegates#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs index 2b384e01..16633b56 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Enums#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs index c383ebd2..8ea7e08d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Gen#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs index 52b01c2b..951c8af1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`1.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.GenericVM`1.Properties.g.cs +//HintName: TestNs.GenericVM`1.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs index ddfc05e0..3b89f316 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.GenClass#TestNs.GenVM`2.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.GenericVM`2.Properties.g.cs +//HintName: TestNs.GenericVM`2.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs index abea0baf..d24f5252 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Interfaces#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs index 0f31136d..4ef3395d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Lazy#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs index a4762196..c85254c5 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MixedAcc#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs index f96197d0..3151b859 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAlso#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs index 07f24b9a..b47d5685 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiAttr#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs index 0dbe8d60..7d648d7d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.MultiPartial#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs index 315a2359..5d453fb2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.BaseVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.BaseVM.Properties.g.cs +//HintName: TestNs.BaseVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs index d22156bd..7ddab434 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.NewMod#TestNs.DerivedVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.DerivedVM.Properties.g.cs +//HintName: TestNs.DerivedVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs index 0b18ba41..169b46c4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Null#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs index 96515258..cf4304b7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.BaseVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.BaseVM.Properties.g.cs +//HintName: TestNs.BaseVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs index 43294976..e70f9501 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Override#TestNs.DerivedVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.DerivedVM.Properties.g.cs +//HintName: TestNs.DerivedVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs index e6152226..ebe73c73 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Record#TestNs.TestVMRecord.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVMRecord.Properties.g.cs +//HintName: TestNs.TestVMRecord.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs index 2b07667b..8f43df99 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Ro#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs index 506d7e63..0a7cec08 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Struct#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs index 6f778bd6..ef2b7ef8 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Time#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs index ee675de4..f0a955ae 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#AccMod.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs index 8ad05832..1198bf74 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#RxAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs index 2017ab34..bbd18eaa 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/RGE.Tuples#TestNs.TestVM.Props.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.Properties.g.cs +//HintName: TestNs.TestVM.Properties.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs index 573e825b..4d8c1f6e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FMultiRxCmds#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs index bc2f2ec9..90f0d7c4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner+Deepest.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Outer+Middle+Inner+Deepest.ReactiveCommands.g.cs +//HintName: TestNs.Outer+Middle+Inner+Deepest.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs index fe903e80..807c335d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle+Inner.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Outer+Middle+Inner.ReactiveCommands.g.cs +//HintName: TestNs.Outer+Middle+Inner.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs index 6e03df0b..9f989451 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer+Middle.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Outer+Middle.ReactiveCommands.g.cs +//HintName: TestNs.Outer+Middle.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs index 251cda70..b59d8416 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInDeeplyNestClass#TestNs.Outer.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Outer.ReactiveCommands.g.cs +//HintName: TestNs.Outer.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs index 411adef0..08f36a95 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInGenClass#TestNs.GenVM`1.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.GenericVM`1.ReactiveCommands.g.cs +//HintName: TestNs.GenericVM`1.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs index 8abd2895..450fa523 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdInRecordClass#TestNs.TestVMRecord.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVMRecord.ReactiveCommands.g.cs +//HintName: TestNs.TestVMRecord.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs index c11b97b7..a2792940 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWArrayParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs index 0db5499e..8fbbf4a9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecute#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs index a8dc8d9f..d4db1b27 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteMethod#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs index 9c4fd7fa..4b0b0f5b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCanExecuteScheduler#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs index 78b6e229..1f87b397 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCplxGenRetT#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs index 085d8670..81e792a2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCt#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs index 757b8307..d5103d93 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWCtParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs index ce32b26f..b3c12a0a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWDelegateParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs index b32455a8..601dd94b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWEnumParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs index 16070d66..68cbe615 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWMultiParams#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs index 0db0c621..412edf3c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWNullParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs index 6dc9ea19..9ffe958d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWObsRet#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs index 8261d489..38fe8c84 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWPrivateAcc#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs index 4995a3be..84c0b4f9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWProtectedAcc#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs index 5d8d5108..6aba5b81 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTaskOfNullRet#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs index bd4bc2d4..335784a6 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWTupleRetT#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs index 787316cc..071843d7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdWValueTask#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs index b30f9c79..6dc84ff9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCE.FRxCmdsAcrossPartialDeclarations#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs index 512b74e4..09d9310c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Acc#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs index 8f192a33..545cf2f8 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.AsyncWParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs index 86617821..d263e8f2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Basic#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs index 3abc67a9..d41c6091 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.FRxAsyncCmd#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs index e527ae32..f6292e02 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass1.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewModel3+TestInnerClass1.ReactiveCommands.g.cs +//HintName: TestNs.TestViewModel3+TestInnerClass1.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs index 9b552362..9f41689a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2+TestInnerClass3.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewModel3+TestInnerClass2+TestInnerClass3.ReactiveCommands.g.cs +//HintName: TestNs.TestViewModel3+TestInnerClass2+TestInnerClass3.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs index af037cd8..af1b0e15 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3+TestInnerClass2.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewModel3+TestInnerClass2.ReactiveCommands.g.cs +//HintName: TestNs.TestViewModel3+TestInnerClass2.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs index 1f475af8..75e245da 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Nest#TestNs.TestVm3.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestViewModel3.ReactiveCommands.g.cs +//HintName: TestNs.TestViewModel3.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs index 725d0362..681eaf98 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.NullTRet#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs index ece1d26b..a0acdee3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.RunInBackground#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs index 86617821..d263e8f2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.Scheduler#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs index b0534866..0f45d48c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#RxCmdAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs index 34d6aad1..49e8f5b9 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/RCMDG.WParam#TestNs.TestVM.RxCmds.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCommands.g.cs +//HintName: TestNs.TestVM.ReactiveCommands.g.cs // #pragma warning disable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs index 28c41a97..9bceb0b7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.ByteArray#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs index 3ff5c27d..240db87c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.CplxT#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs index 09dc5b11..04b69f3d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DateTime#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs index e5b2935f..f58a67cd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns1.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: Namespace1.TestVM.ReactiveCollections.g.cs +//HintName: Namespace1.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs index 98aa21b9..095b776e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#Ns2.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: Namespace2.TestVM.ReactiveCollections.g.cs +//HintName: Namespace2.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.DiffNs#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs index 66209f94..a9f78d87 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Enum#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs index 6784dc4a..e0420a30 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Gen#TestNs.GenVM`1.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.GenericVM`1.ReactiveCollections.g.cs +//HintName: TestNs.GenericVM`1.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs index 52177b0e..9f3aca6f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Guid#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs index 0f371f75..d3a295dd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Interface#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs index 8be917cf..67b473a1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Multi#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs index 4ccf8a1c..c96bf723 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM+DeepInnerVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.OuterVM+InnerVM+DeepInnerVM.ReactiveCollections.g.cs +//HintName: TestNs.OuterVM+InnerVM+DeepInnerVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs index c576ef1e..e5876b75 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM+InnerVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.OuterVM+InnerVM.ReactiveCollections.g.cs +//HintName: TestNs.OuterVM+InnerVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs index 49975ded..3db6fc06 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Nest#TestNs.OuterVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.OuterVM.ReactiveCollections.g.cs +//HintName: TestNs.OuterVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs index 02906711..7f2d3ca7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Null#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs index 07a51fcb..3d823a28 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Record#TestNs.TestVMRecord.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVMRecord.ReactiveCollections.g.cs +//HintName: TestNs.TestVMRecord.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs index 051b2d04..3110898e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Struct#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs index 64882926..e222f0b6 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.Tuple#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs index 3ca380ec..d058336e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCE.WRx#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs index 89bb3391..4bef164c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#RxCollAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs index 5a038f31..75fd3494 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/RCG.BasicField#TestNs.TestVM.RxColls.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.ReactiveCollections.g.cs +//HintName: TestNs.TestVM.ReactiveCollections.g.cs // using ReactiveUI; diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Basic#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.CplxT#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Enums#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjRecord#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAccMods#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWAttrs#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3+Level4.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3+Level4.IRxObj.verified.cs index 667c2120..595edd9d 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3+Level4.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3+Level4.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1+Level2+Level3+Level4.IReactiveObject.g.cs +//HintName: TestNs.Level1+Level2+Level3+Level4.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3.IRxObj.verified.cs index bea1ef9a..58e1f8ad 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2+Level3.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1+Level2+Level3.IReactiveObject.g.cs +//HintName: TestNs.Level1+Level2+Level3.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2.IRxObj.verified.cs index bcdbfdba..3aae082f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1+Level2.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1+Level2.IReactiveObject.g.cs +//HintName: TestNs.Level1+Level2.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1.IRxObj.verified.cs index e362f538..957d1572 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWDeeplyNestClasses#TestNs.Level1.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.Level1.IReactiveObject.g.cs +//HintName: TestNs.Level1.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#TestNs.GenVM`1.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#TestNs.GenVM`1.IRxObj.verified.cs index 076014b8..cf3eefc5 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#TestNs.GenVM`1.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWGenClass#TestNs.GenVM`1.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.GenericVM`1.IReactiveObject.g.cs +//HintName: TestNs.GenericVM`1.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.BaseVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.BaseVM.IRxObj.verified.cs index 11075291..488842e4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.BaseVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.BaseVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.BaseVM.IReactiveObject.g.cs +//HintName: TestNs.BaseVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.DerivedVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.DerivedVM.IRxObj.verified.cs index b2dc952c..40bcd28b 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.DerivedVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWInhMods#TestNs.DerivedVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.DerivedVM.IReactiveObject.g.cs +//HintName: TestNs.DerivedVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiProps#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#TestNs.EntityVM`1.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#TestNs.EntityVM`1.IRxObj.verified.cs index 11a8e664..f1e45eb2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#TestNs.EntityVM`1.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWMultiTConstraints#TestNs.EntityVM`1.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.EntityVM`1.IReactiveObject.g.cs +//HintName: TestNs.EntityVM`1.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM+ChildVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM+ChildVM.IRxObj.verified.cs index 6b2e376e..ac322e8c 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM+ChildVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM+ChildVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.ParentVM+ChildVM.IReactiveObject.g.cs +//HintName: TestNs.ParentVM+ChildVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM.IRxObj.verified.cs index dc8eecbe..d4dd5201 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.FRxObjWNestClass#TestNs.ParentVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.ParentVM.IReactiveObject.g.cs +//HintName: TestNs.ParentVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Interface#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs index 99bcd130..e2217c65 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns1.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: Namespace1.TestVM.IReactiveObject.g.cs +//HintName: Namespace1.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs index 22b835d2..8c14b667 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.MultiNs#Ns2.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: Namespace2.TestVM.IReactiveObject.g.cs +//HintName: Namespace2.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROE.Null#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs index 159a4426..fa7282c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#IRxObjAttr.verified.cs @@ -1,4 +1,4 @@ -//HintName: ReactiveUI.SourceGenerators.IReactiveObjectAttribute.g.cs +//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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#TestNs.TestVM.IRxObj.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#TestNs.TestVM.IRxObj.verified.cs index cb482d41..69a07712 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#TestNs.TestVM.IRxObj.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVEOBJ/ROG.Basic#TestNs.TestVM.IRxObj.verified.cs @@ -1,4 +1,4 @@ -//HintName: TestNs.TestVM.IReactiveObject.g.cs +//HintName: TestNs.TestVM.IReactiveObject.g.cs // #pragma warning disable #nullable enable diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewWinForms.resx b/src/ReactiveUI.SourceGenerators.Execute/TestViewWinForms.resx index 1af7de15..d58980a3 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewWinForms.resx +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewWinForms.resx @@ -1,4 +1,4 @@ - +