{"id":18398240,"url":"https://github.com/stdevtm/stdevext","last_synced_at":"2025-04-12T15:24:32.085Z","repository":{"id":102295767,"uuid":"128018937","full_name":"STDevTM/STDevExt","owner":"STDevTM","description":"Extensions from STDev. Target is .NET 4.6, UWP, Xamarin(Android, iOS, Forms) and .NET Standard 1.3.","archived":false,"fork":false,"pushed_at":"2018-04-04T10:05:26.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T02:41:59.904Z","etag":null,"topics":["collections","csharp","extensions","list","reactive","reactive-programming","reactivex"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/STDevTM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-04T06:42:02.000Z","updated_at":"2020-08-10T08:18:31.000Z","dependencies_parsed_at":"2023-06-06T03:45:26.835Z","dependency_job_id":null,"html_url":"https://github.com/STDevTM/STDevExt","commit_stats":null,"previous_names":["stdevteam/stdevext"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STDevTM%2FSTDevExt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STDevTM%2FSTDevExt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STDevTM%2FSTDevExt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STDevTM%2FSTDevExt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/STDevTM","download_url":"https://codeload.github.com/STDevTM/STDevExt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248587520,"owners_count":21129249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collections","csharp","extensions","list","reactive","reactive-programming","reactivex"],"created_at":"2024-11-06T02:20:26.003Z","updated_at":"2025-04-12T15:24:32.061Z","avatar_url":"https://github.com/STDevTM.png","language":"C#","readme":"# STDevExt\nExtensions from STDev. Target is .NET 4.6, UWP, Xamarin(Android, iOS, Forms) and .NET Standard 1.3.\n\n![Version](https://img.shields.io/nuget/v/STDevExt.svg) ![Downloads](https://img.shields.io/nuget/dt/STDevExt.svg)\n\n## Supported Platforms\n\nSTDevExt supports the following platforms\n* .NET Framework 4.6+\n* .NET Standard 1.3+ (including .NET Core, Xamarin and others)\n* UWP\n\n## Installation\n\nSTDevRxExt is available through [NuGet](http://nuget.org). To install\nit, simply run the following command to your Package Manager Console:\n\n```powershell\nPM\u003e Install-Package STDevExt\n```\n\n## Usage\n\nAdd following in top of your file:\n```csharp\nusing STDevExt.Extensions;\n```\n\n## List of All Extensions\n\n* [Collection Extensions](#collection-extensions)\n* [Rx Extensions](#rx-extensions)\n* _more coming soon_\n\n\n## Collection Extensions\n\n**Inserting**\n\nInsert element to `IList` to provided index and return result:\n\n```csharp\nIList\u003cstring\u003e list = new List\u003cstring\u003e()\n    .Inserting(0, \"second\")\n    .Inserting(0, \"first\");\n\nlist.ToList().ForEach(element =\u003e Debug.WriteLine(element));\n```\n\nOutput will be:\n\n```text\nfirst\nsecond\n```\n\n---\n**Adding**\n\nAdd element to end of `ICollection` and return result:\n\n```csharp\nICollection\u003cstring\u003e list = new List\u003cstring\u003e()\n    .Adding(\"first\")\n    .Adding(\"second\");\n\nlist.ToList().ForEach(element =\u003e Debug.WriteLine(element));\n```\n\nOutput will be:\n\n```text\nfirst\nsecond\n```\n\n---\n**WhereNotNull**\n\nFilter `IEnumerable` and keep only not `null` elements:\n\n```csharp\nIEnumerable\u003cstring\u003e list = new List\u003cstring\u003e()\n    .Adding(\"first\")\n    .Adding(null)\n    .Adding(\"second\")\n    .WhereNotNull();\n\nlist.ToList().ForEach(element =\u003e Debug.WriteLine(element));\n```\n\nOutput will be:\n\n```text\nfirst\nsecond\n```\n\n## Rx Extensions\n\n**WhereNotNull**\n\nFilter `IObservable` and keep only not `null` elements:\n\n```csharp\nSubject\u003cstring\u003e subject = new Subject\u003cstring\u003e();\n\nsubject\n    .WhereNotNull()\n    .Subscribe(element =\u003e Debug.WriteLine(element));\n\nsubject.OnNext(\"first\");\nsubject.OnNext(null);\nsubject.OnNext(\"second\");\n```\n\nOutput will be:\n\n```text\nfirst\nsecond\n```\n\u003e If you prefer only `null` elements you can use `WhereNull` method.\n\n---\n**WhereNotEmpty**\n\nFilter `IObservable\u003cstring | ICollection\u003e` and keep only not empty elements:\n\n```csharp\nSubject\u003cstring\u003e subject = new Subject\u003cstring\u003e();\n\nsubject\n    .WhereNotEmpty()\n    .Subscribe(element =\u003e Debug.WriteLine(element));\n\nsubject.OnNext(\"first\");\nsubject.OnNext(\"\");\nsubject.OnNext(\"second\");\n```\n\nOutput will be:\n\n```text\nfirst\nsecond\n```\n\u003e If you prefer only empty elements you can use `WhereEmpty` method.\n\n---\n**WhereTrue**\n\nFilter `IObservable\u003cbool\u003e` and keep only `true` elements:\n\n```csharp\nSubject\u003cbool\u003e subject = new Subject\u003cbool\u003e();\n\nsubject\n    .WhereTrue()\n    .Subscribe(element =\u003e Debug.WriteLine(element));\n\nsubject.OnNext(true);\nsubject.OnNext(false);\nsubject.OnNext(true);\nsubject.OnNext(true);\nsubject.OnNext(false);\n```\n\nOutput will be:\n\n```text\nTrue\nTrue\nTrue\n```\n\u003e If you prefer only `false` elements you can use `WhereFalse` method.\n\n---\n**SelectTo**\n\nMap `IObservable` all elements with provided value:\n\n```csharp\nSubject\u003cbool\u003e subject = new Subject\u003cbool\u003e();\n\nsubject\n    .SelectTo(\"ping\")\n    .Subscribe(element =\u003e Debug.WriteLine(element));\n\nsubject.OnNext(true);\nsubject.OnNext(false);\nsubject.OnNext(true);\nsubject.OnNext(true);\nsubject.OnNext(false);\n```\n\nOutput will be:\n\n```text\nping\nping\nping\nping\nping\n```\n\n## Author\n\nTigran Hambardzumyan, tigran@stdevmail.com\n\n## Support\n\nFeel free to [open issuses](https://github.com/stdevteam/STDevExt/issues/new) with any suggestions, bug reports, feature requests, questions.\n\n## Let us know!\n\nWe’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.\n\n## License\n\nSTDevRxExt is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdevtm%2Fstdevext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstdevtm%2Fstdevext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdevtm%2Fstdevext/lists"}