diff --git a/README.md b/README.md index dec5327..c18d6f9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -# Observable event generator + + + -This project is a .NET 5 source generator which produces `IObservable` for events contained within a object including all base classes. +# Observable Event Generator -# Installation +This project is a .NET 5 source generator which produces `IObservable` for events contained within a object including all base classes. `ObservableEvents` generator will convert events within an assembly and create observable wrappers for them, it is based on [Pharmacist](https://github.com/reactiveui/Pharmacist) and uses [.NET Source Generator](https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview) technology. ## NuGet Packages @@ -14,21 +16,18 @@ Install the following packages to start using Observable Events. | ----------------------------- | ----------------- | -------------------------------- | | [ReactiveMarbles.ObservableEvents.SourceGenerator][Core] | Core - Libary | [![CoreBadge]][Core] | - [Core]: https://www.nuget.org/packages/ReactiveMarbles.ObservableEvents.SourceGenerator/ [CoreBadge]: https://img.shields.io/nuget/v/ReactiveMarbles.ObservableEvents.SourceGenerator.svg -## What does it do? - -ObservableEvents generator will convert events within an assembly and create observable wrappers for them. +## Manual Installation -It is based on pharmacist [Pharmacist](https://github.com/reactiveui/Pharmacist) and uses .NET Source Generator technology. - -## Installation Include the following in your .csproj file ```xml - + ``` The `PrivateAssets` will prevent the ObservableEvents source generator from being inherited by other projects. @@ -36,11 +35,8 @@ The `PrivateAssets` will prevent the ObservableEvents source generator from bein ## How to use ### Instance Based -It injects a class for instance based events into your source code which will expose a extension method called `Events()`. - -You need to include the namespace `ReactiveMarbles.ObservableEvents` to access to the extension method. -You can then use this to get `IObservable` instances from your events. +It injects a class for instance based events into your source code which will expose a extension method called `Events()`. You need to include the namespace `ReactiveMarbles.ObservableEvents` to access to the extension method. You can then use this to get `IObservable` instances from your events. ```cs using ReactiveMarbles.ObservableEvents; @@ -63,9 +59,8 @@ You must use include a attribute `GenerateStaticEventObservables` on the assembl ```cs [assembly: GenerateStaticEventObservablesAttribute(typeof(StaticTest))] - - public static class StaticTest - { - public static event EventHandler? TestChanged; - } +public static class StaticTest +{ + public static event EventHandler? TestChanged; +} ``` diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..20cae93 Binary files /dev/null and b/images/logo.png differ diff --git a/src/Directory.Build.props b/src/Directory.Build.props index e211f2d..665e908 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -10,6 +10,7 @@ MIT https://github.com/reactivemarbles/ObservableEvents Allows to get an observables for property changed events. + logo.png glennawatson system.reactive;propertychanged;inpc;reactive;functional https://github.com/reactivemarbles/ObservableEvents/releases @@ -34,6 +35,7 @@ +