Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ public partial class MyReactiveControl : UserControl
public MyReactiveControl()
{
InitializeComponent();
ViewModel = Locator.Current.GetService<MyReactiveClass>();
ViewModel = AppLocator.Current.GetService<MyReactiveClass>();
}
}
```
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public partial class TestViewModel : ReactiveObject, IActivatableViewModel, IDis
private readonly Subject<double?> _testSubject = new();
private readonly Subject<double> _testNonNullSubject = new();
private readonly Subject<int> _fromPartialTestSubject = new();
private readonly IScheduler _scheduler = RxApp.MainThreadScheduler;
private readonly IScheduler _scheduler = RxSchedulers.MainThreadScheduler;

[property: JsonInclude]
[DataMember]
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.SourceGenerators.Execute/TestViewWpf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public partial class TestViewWpf : Window
/// </summary>
public TestViewWpf()
{
Locator.CurrentMutable.RegisterLazySingleton<IViewFor<TestViewModel>>(() => new TestViewWpf());
AppLocator.CurrentMutable.RegisterLazySingleton<IViewFor<TestViewModel>>(() => new TestViewWpf());
ViewModel = TestViewModel.Instance;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
31 changes: 2 additions & 29 deletions src/ReactiveUI.SourceGenerators/ReactiveUI.SourceGenerators.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,16 @@

<PackageDescription>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</PackageDescription>

<!-- Necessary polyfills -->
<!--<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
<PolySharpIncludeGeneratedTypes>-->
<!--System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute;
System.Diagnostics.CodeAnalysis.MemberNotNullAttribute;
System.Diagnostics.CodeAnalysis.NotNullAttribute;
System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute;
System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute;
System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute;
System.Runtime.CompilerServices.CallerArgumentExpressionAttribute;
System.Runtime.CompilerServices.SkipLocalsInitAttribute;-->
<!--System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute;
System.Diagnostics.CodeAnalysis.NotNullWhenAttribute;
System.Diagnostics.CodeAnalysis.UnscopedRefAttribute;
System.Runtime.CompilerServices.IsExternalInit;
System.Index;
System.Range;
</PolySharpIncludeGeneratedTypes>-->
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
<!-- Include PolySharp to generate polyfills for all projects (on their .NET Standard 2.x targets) -->

<ItemGroup>
<!--<PackageReference Include="PolySharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>build; analyzers</IncludeAssets>
</PackageReference>-->
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="ReactiveUI.CodeFixes" />
</ItemGroup>
Expand All @@ -60,9 +38,4 @@
<None Include="..\ReactiveUI.SourceGenerators.Roslyn480\bin\$(Configuration)\netstandard2.0\ReactiveUI.SourceGenerators.dll" PackagePath="analyzers\dotnet\roslyn4.8\cs" Pack="true" Visible="false" />
<None Include="..\ReactiveUI.SourceGenerators.Roslyn4120\\bin\$(Configuration)\netstandard2.0\ReactiveUI.SourceGenerators.dll" PackagePath="analyzers\dotnet\roslyn4.12\cs" Pack="true" Visible="false" />
</ItemGroup>

<!-- Include PolySharp generated code
<ItemGroup>
<Folder Include="Generated\" />
</ItemGroup> -->
</Project>
Loading