![]() |
VOOZH | about |
dotnet add package ReactiveUI.SourceGenerators --version 1.0.3
NuGet\Install-Package ReactiveUI.SourceGenerators -Version 1.0.3
<PackageReference Include="ReactiveUI.SourceGenerators" Version="1.0.3" />
<PackageVersion Include="ReactiveUI.SourceGenerators" Version="1.0.3" />Directory.Packages.props
<PackageReference Include="ReactiveUI.SourceGenerators" />Project file
paket add ReactiveUI.SourceGenerators --version 1.0.3
#r "nuget: ReactiveUI.SourceGenerators, 1.0.3"
#:package ReactiveUI.SourceGenerators@1.0.3
#addin nuget:?package=ReactiveUI.SourceGenerators&version=1.0.3Install as a Cake Addin
#tool nuget:?package=ReactiveUI.SourceGenerators&version=1.0.3Install as a Cake Tool
Use source generators to generate ReactiveUI objects.
Not taking public contributions at this time
These Source Generators were designed to work in full with ReactiveUI V19.5.31 and newer supporting all features, currently:
Versions older than V19.5.31 to this:
Typically properties are declared like this:
private string _name;
public string Name
{
get => _name;
set => this.RaiseAndSetIfChanged(ref _name, value);
}
Before these Source Generators were avaliable we used ReactiveUI.Fody.
With ReactiveUI.Fody the [Reactive] Attribute was placed on a Public Property with Auto get / set properties, the generated code from the Source Generator and the Injected code using Fody are very similar with the exception of the Attributes.
[Reactive]
public string Name { get; set; }
Similarly, to declare output properties, the code looks like this:
public partial class MyReactiveClass : ReactiveObject
{
ObservableAsPropertyHelper<string> _firstName;
public MyReactiveClass()
{
_firstName = firstNameObservable
.ToProperty(this, x => x.FirstName);
}
public string FirstName => _firstName.Value;
private IObservable<string> 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.
[ObservableAsProperty]
public string FirstName { get; }
[Reactive]using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass : ReactiveObject
{
[Reactive]
private string _myProperty;
}
[ObservableAsProperty]using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass : ReactiveObject
{
[ObservableAsProperty]
private string _myProperty;
}
[ReactiveCommand]using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass
{
public MyReactiveClass()
{
InitializeCommands();
}
[ReactiveCommand]
private void Execute() { }
}
using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass
{
public MyReactiveClass()
{
InitializeCommands();
}
[ReactiveCommand]
private void Execute(string parameter) { }
}
using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass
{
public MyReactiveClass()
{
InitializeCommands();
}
[ReactiveCommand]
private string Execute(string parameter) => parameter;
}
using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass
{
public MyReactiveClass()
{
InitializeCommands();
}
[ReactiveCommand]
private async Task<string> Execute(string parameter) => await Task.FromResult(parameter);
}
using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass
{
public MyReactiveClass()
{
InitializeCommands();
}
[ReactiveCommand]
private IObservable<string> Execute(string parameter) => Observable.Return(parameter);
}
using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass
{
public MyReactiveClass()
{
InitializeCommands();
}
[ReactiveCommand]
private async Task Execute(CancellationToken token) => await Task.Delay(1000, token);
}
using ReactiveUI.SourceGenerators;
public partial class MyReactiveClass
{
public MyReactiveClass()
{
InitializeCommands();
}
[ReactiveCommand]
private async Task<string> Execute(string parameter, CancellationToken token)
{
await Task.Delay(1000, token);
return parameter;
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on ReactiveUI.SourceGenerators:
| Package | Downloads |
|---|---|
|
Zafiro.Avalonia.Dialogs
UI components, controls, dialogs, behaviors, and helpers for Avalonia applications. Includes reactive patterns, cross-platform support (desktop, mobile, browser), and source generators. |
|
|
SuppaWallet.Gui.Model.Impl
Package Description |
|
|
SuppaWallet.Gui
Package Description |
|
|
SuppaWallet.Infrastructure.Default
Package Description |
|
|
Helium.Visible
Package Description |
Showing the top 14 popular GitHub repositories that depend on ReactiveUI.SourceGenerators:
| Repository | Stars |
|---|---|
|
timschneeb/GalaxyBudsClient
Unofficial Galaxy Buds Manager for Windows, macOS, Linux, and Android
|
|
|
HMBSbige/NatTypeTester
测试当前网络的 NAT 类型(STUN)
|
|
|
reactiveui/Akavache
An asynchronous, persistent key-value store created for writing desktop and mobile applications, based on SQLite3. Akavache is great for both storing important data as well as cached local data that expires.
|
|
|
TEdit/Terraria-Map-Editor
TEdit - Terraria Map Editor - TEdit is a stand alone, open source map editor for Terraria. It lets you edit maps just like (almost) paint! It also lets you change world settings (time, bosses downed etc), edit chests and change sign, make epic dungeons, castles, cities, and add rewards for your adventurers!
|
|
|
wieslawsoltes/Dock
A docking layout system.
|
|
|
database64128/youtube-dl-wpf
WPF GUI for youtube-dl and yt-dlp.
|
|
|
LibUsbDotNet/LibUsbDotNet
My updates to LibUsbDotNet, an excellent library for cross-platform USB device control using Mono/.NET
|
|
|
PhantomGamers/SFP
This utility is designed to allow you to apply skins to the modern Steam client
|
|
|
AvaloniaUI/Avalonia.Markup.Declarative
Provides helpers for declarative ui in C#
|
|
|
Monitor221hz/Pandora-Behaviour-Engine-Plus
Patcher for behavior, character, and skeleton project files for Skyrim Special Edition.
|
|
| OpenHarmony-NET/OpenHarmony.Avalonia | |
|
reactiveui/ReactiveUI.Validation
Validation helpers for ReactiveUI-based apps.
|
|
|
mysteryx93/HanumanInstitute.MvvmDialogs
Library simplifying the concept of opening dialogs from a view model when using MVVM
|
|
|
reactiveui/ReactiveMvvm
Cross-platform ReactiveUI sample app built for a talk at MSK .NET conf.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.1.0 | 6,162 | 6/4/2026 |
| 3.0.0 | 913 | 6/3/2026 |
| 2.6.1 | 66,214 | 1/12/2026 |
| 2.5.1 | 31,877 | 10/24/2025 |
| 2.4.1 | 16,997 | 9/2/2025 |
| 2.3.1 | 16,211 | 6/29/2025 |
| 2.2.4 | 8,796 | 6/1/2025 |
| 2.1.27 | 16,313 | 3/16/2025 |
| 2.1.8 | 57,630 | 2/13/2025 |
| 2.1.1 | 1,932 | 1/29/2025 |
| 2.0.17 | 8,435 | 11/9/2024 |
| 1.1.31 | 3,735 | 9/19/2024 |
| 1.1.26 | 435 | 9/16/2024 |
| 1.0.3 | 20,871 | 7/19/2024 |
| 1.0.2 | 530 | 7/18/2024 |