Skip to content

Commit 315d317

Browse files
authored
feature: add Get Started to nuget package (#61)
1 parent c0c6d25 commit 315d317

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

docs/GET_STARTED.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Get Started
2+
3+
## Registering Framework Concerns
4+
5+
`ICoreRegistration` gives the framework an understanding of the following concerns for ReactiveMarbles internals. We provide a simple builder and extension method to register it against the `ServiceLocator`.
6+
7+
```csharp
8+
ServiceLocator
9+
.Current()
10+
.AddCoreRegistrations(() =>
11+
CoreRegistrationBuilder
12+
.Create()
13+
.WithMainThreadScheduler(Scheduler.Default)
14+
.WithTaskPoolScheduler(TaskPoolScheduler.Default)
15+
.WithExceptionHandler(new DebugExceptionHandler())
16+
.Build());
17+
```
18+
19+
## AsValue
20+
21+
`AsValue` allows you to bind an `IObservable<T>` to a property that produces a property changed event.
22+
23+
```csharp
24+
_valueChange =
25+
this.WhenChanged(x => x.Property)
26+
.Select(x => x + "Changed")
27+
.AsValue(onChanged: x => RaisePropertyChanged(nameof(ValueChange)));
28+
```

src/ReactiveMarbles.Mvvm.Tests/ReactiveMarbles.Mvvm.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<LangVersion>preview</LangVersion>
77
<Nullable>enable</Nullable>

src/directory.build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<PackageProjectUrl>https://github.com/reactivemarbles/Mvvm</PackageProjectUrl>
88
<PackageDescription>Common base classes for the MVVM pattern for Reactive Marbles.</PackageDescription>
99
<PackageIcon>logo.png</PackageIcon>
10+
<PackageReadmeFile>docs\GET_STARTED.md</PackageReadmeFile>
1011
<Owners>glennawatson;rlittlesii</Owners>
1112
<PackageTags>system.reactive;propertychanged;inpc;reactive;functional;mvvm</PackageTags>
1213
<PackageReleaseNotes>https://github.com/reactivemarbles/Mvvm/releases</PackageReleaseNotes>
@@ -39,6 +40,7 @@
3940
<ItemGroup>
4041
<None Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" PackagePath="LICENSE" />
4142
<None Include="$(MSBuildThisFileDirectory)..\images\logo.png" Pack="true" PackagePath="\"/>
43+
<None Include="$(MSBuildThisFileDirectory)..\docs\GET_STARTED.md" Pack="true" PackagePath="\docs"/>
4244
</ItemGroup>
4345

4446
<ItemGroup>

0 commit comments

Comments
 (0)