STDevExt 0.1.0-rc2
dotnet add package STDevExt --version 0.1.0-rc2
NuGet\Install-Package STDevExt -Version 0.1.0-rc2
<PackageReference Include="STDevExt" Version="0.1.0-rc2" />
<PackageVersion Include="STDevExt" Version="0.1.0-rc2" />
<PackageReference Include="STDevExt" />
paket add STDevExt --version 0.1.0-rc2
#r "nuget: STDevExt, 0.1.0-rc2"
#addin nuget:?package=STDevExt&version=0.1.0-rc2&prerelease
#tool nuget:?package=STDevExt&version=0.1.0-rc2&prerelease
STDevExt
Extensions from STDev. Target is .NET 4.6, UWP, Xamarin(Android, iOS, Forms) and .NET Standard 1.3.
Supported Platforms
STDevExt supports the following platforms
- .NET Framework 4.6+
- .NET Standard 1.3+ (including .NET Core, Xamarin and others)
- UWP
Installation
STDevRxExt is available through NuGet. To install it, simply run the following command to your Package Manager Console:
PM> Install-Package STDevExt
Usage
Add following in top of your file:
using STDevExt.Extensions;
List of All Extensions
- Collection Extensions
- Rx Extensions
- more coming soon
Collection Extensions
Inserting
Insert element to IList
to provided index and return result:
IList<string> list = new List<string>()
.Inserting(0, "second")
.Inserting(0, "first");
list.ToList().ForEach(element => Debug.WriteLine(element));
Output will be:
first
second
Adding
Add element to end of ICollection
and return result:
ICollection<string> list = new List<string>()
.Adding("first")
.Adding("second");
list.ToList().ForEach(element => Debug.WriteLine(element));
Output will be:
first
second
WhereNotNull
Filter IEnumerable
and keep only not null
elements:
IEnumerable<string> list = new List<string>()
.Adding("first")
.Adding(null)
.Adding("second")
.WhereNotNull();
list.ToList().ForEach(element => Debug.WriteLine(element));
Output will be:
first
second
Rx Extensions
WhereNotNull
Filter IObservable
and keep only not null
elements:
Subject<string> subject = new Subject<string>();
subject
.WhereNotNull()
.Subscribe(element => Debug.WriteLine(element));
subject.OnNext("first");
subject.OnNext(null);
subject.OnNext("second");
Output will be:
first
second
If you prefer only
null
elements you can useWhereNull
method.
WhereNotEmpty
Filter IObservable<string | ICollection>
and keep only not empty elements:
Subject<string> subject = new Subject<string>();
subject
.WhereNotEmpty()
.Subscribe(element => Debug.WriteLine(element));
subject.OnNext("first");
subject.OnNext("");
subject.OnNext("second");
Output will be:
first
second
If you prefer only empty elements you can use
WhereEmpty
method.
WhereTrue
Filter IObservable<bool>
and keep only true
elements:
Subject<bool> subject = new Subject<bool>();
subject
.WhereTrue()
.Subscribe(element => Debug.WriteLine(element));
subject.OnNext(true);
subject.OnNext(false);
subject.OnNext(true);
subject.OnNext(true);
subject.OnNext(false);
Output will be:
True
True
True
If you prefer only
false
elements you can useWhereFalse
method.
SelectTo
Map IObservable
all elements with provided value:
Subject<bool> subject = new Subject<bool>();
subject
.SelectTo("ping")
.Subscribe(element => Debug.WriteLine(element));
subject.OnNext(true);
subject.OnNext(false);
subject.OnNext(true);
subject.OnNext(true);
subject.OnNext(false);
Output will be:
ping
ping
ping
ping
ping
Author
Tigran Hambardzumyan, tigran@stdevmail.com
Support
Feel free to open issuses with any suggestions, bug reports, feature requests, questions.
Let us know!
We’d be really happy if you sent us links to your projects where you use our component. Just send an email to developer@stdevmail.com And do let us know if you have any questions or suggestion.
License
STDevRxExt is available under the MIT license. See the LICENSE file for more info.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid is compatible. |
MonoMac | monomac was computed. |
MonoTouch | monotouch is compatible. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 is compatible. |
Xamarin.iOS | xamarinios was computed. xamarinios10 is compatible. |
Xamarin.Mac | xamarinmac was computed. xamarinmac20 is compatible. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6
- System.Reactive (>= 4.0.0-preview00001)
-
.NETStandard 1.3
- System.Reactive (>= 4.0.0-preview00001)
-
MonoAndroid 0.0
- System.Reactive (>= 4.0.0-preview00001)
-
MonoTouch 0.0
- System.Reactive (>= 4.0.0-preview00001)
-
Portable Class Library (MonoAndroid 0.0, MonoTouch 0.0, .NETFramework 4.6, UAP 0.0)
- System.Reactive (>= 4.0.0-preview00001)
-
UAP 10.0
- System.Reactive (>= 4.0.0-preview00001)
-
Xamarin.Mac 2.0
- System.Reactive (>= 4.0.0-preview00001)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.0-rc2 | 1,013 | 4/4/2018 |
0.1.0-rc1 | 976 | 4/4/2018 |
0.1.0-rc | 941 | 3/28/2018 |
0.1.0-pre1 | 967 | 4/3/2018 |