STDevExt 0.1.0-rc2

This is a prerelease version of STDevExt.
dotnet add package STDevExt --version 0.1.0-rc2
                    
NuGet\Install-Package STDevExt -Version 0.1.0-rc2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="STDevExt" Version="0.1.0-rc2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="STDevExt" Version="0.1.0-rc2" />
                    
Directory.Packages.props
<PackageReference Include="STDevExt" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add STDevExt --version 0.1.0-rc2
                    
#r "nuget: STDevExt, 0.1.0-rc2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=STDevExt&version=0.1.0-rc2&prerelease
                    
Install STDevExt as a Cake Addin
#tool nuget:?package=STDevExt&version=0.1.0-rc2&prerelease
                    
Install STDevExt as a Cake Tool

STDevExt

Extensions from STDev. Target is .NET 4.6, UWP, Xamarin(Android, iOS, Forms) and .NET Standard 1.3.

Version Downloads

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

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 use WhereNull 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 use WhereFalse 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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