diff --git a/README.md b/README.md index 79e331f..15a14c7 100644 --- a/README.md +++ b/README.md @@ -575,7 +575,7 @@ public partial class MyReactiveControl : UserControl public MyReactiveControl() { InitializeComponent(); - ViewModel = Locator.Current.GetService(); + ViewModel = AppLocator.Current.GetService(); } } ``` @@ -584,7 +584,7 @@ this will generate the following code to enable you register the marked Views as ```csharp using ReactiveUI.SourceGenerators; -Splat.Locator.CurrentMutable.RegisterViewsForViewModelsSourceGenerated(); +Splat.AppLocator.CurrentMutable.RegisterViewsForViewModelsSourceGenerated(); ``` ### Usage IViewFor with ViewModel Name - Generic Types should be used with the fully qualified name, otherwise use nameof(ViewModelTypeName) diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs index 853bd42..b17debf 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs @@ -35,7 +35,7 @@ public partial class TestViewModel : ReactiveObject, IActivatableViewModel, IDis private readonly Subject _testSubject = new(); private readonly Subject _testNonNullSubject = new(); private readonly Subject _fromPartialTestSubject = new(); - private readonly IScheduler _scheduler = RxApp.MainThreadScheduler; + private readonly IScheduler _scheduler = RxSchedulers.MainThreadScheduler; [property: JsonInclude] [DataMember] diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs index 1047ca1..365e338 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs @@ -21,7 +21,7 @@ public partial class TestViewWpf : Window /// public TestViewWpf() { - Locator.CurrentMutable.RegisterLazySingleton>(() => new TestViewWpf()); + AppLocator.CurrentMutable.RegisterLazySingleton>(() => new TestViewWpf()); ViewModel = TestViewModel.Instance; } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs index f67d0f3..55eb23b 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs @@ -36,8 +36,8 @@ public partial class ReactiveCommandGenerator private const string CreateT = ".CreateFromTask"; private const string CanExecute = "CanExecute"; private const string OutputScheduler = "OutputScheduler"; - private const string MainThreadScheduler = "RxApp.MainThreadScheduler"; - private const string TaskpoolScheduler = "RxApp.TaskpoolScheduler"; + private const string MainThreadScheduler = "RxSchedulers.MainThreadScheduler"; + private const string TaskpoolScheduler = "RxSchedulers.TaskpoolScheduler"; private static CommandInfo? GetMethodInfo(in GeneratorAttributeSyntaxContext context, CancellationToken token) { diff --git a/src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj b/src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj index e95b566..3f20793 100644 --- a/src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj +++ b/src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj @@ -13,38 +13,16 @@ A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the Source Generators package for ReactiveUI - - - - True - + - - + @@ -60,9 +38,4 @@ - -