{"id":29622365,"url":"https://github.com/vasar007/acolyte.net","last_synced_at":"2025-10-12T08:37:25.519Z","repository":{"id":36938270,"uuid":"231741625","full_name":"Vasar007/Acolyte.NET","owner":"Vasar007","description":"Acolyte.NET is a helper library with a lot of useful classes and extension methods that you need in your everyday work.","archived":false,"fork":false,"pushed_at":"2025-05-05T14:15:44.000Z","size":1219,"stargazers_count":1,"open_issues_count":14,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T08:37:24.078Z","etag":null,"topics":["acolyte","acolyte-net","classes","csharp","dotnet","dotnet-standard","extension","helper","helper-lib","net-acolyte"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vasar007.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,"zenodo":null}},"created_at":"2020-01-04T09:55:55.000Z","updated_at":"2023-03-06T19:35:10.000Z","dependencies_parsed_at":"2023-10-14T15:34:33.388Z","dependency_job_id":"9965b7e0-e1b8-4963-8de5-350a1ccd2a46","html_url":"https://github.com/Vasar007/Acolyte.NET","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Vasar007/Acolyte.NET","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasar007%2FAcolyte.NET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasar007%2FAcolyte.NET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasar007%2FAcolyte.NET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasar007%2FAcolyte.NET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vasar007","download_url":"https://codeload.github.com/Vasar007/Acolyte.NET/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasar007%2FAcolyte.NET/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010793,"owners_count":26084807,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["acolyte","acolyte-net","classes","csharp","dotnet","dotnet-standard","extension","helper","helper-lib","net-acolyte"],"created_at":"2025-07-21T04:08:48.422Z","updated_at":"2025-10-12T08:37:25.496Z","avatar_url":"https://github.com/Vasar007.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Acolyte.NET\n\n![Acolyte.NET icon](Media/AcolyteIcon.png \"Acolyte.NET icon\")\n\nAcolyte.NET is a helper library with a lot of useful classes and extension methods that you need in your everyday work.\nSo, do not reinvent the wheel, use this library instead!\n\n[![nuget](https://img.shields.io/nuget/v/Acolyte.NET.svg)](https://www.nuget.org/packages/Acolyte.NET)\n[![License](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/Vasar007/Acolyte.NET/blob/master/LICENSE)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FVasar007%2FAcolyte.NET.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FVasar007%2FAcolyte.NET?ref=badge_shield)\n\n## Build and Release Status\n\n|                    | Stable (master)                                                                                  | Pre-release (develop)                                                                  |\n| -----------------: | :----------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------: |\n| **Build**          | ![AppVeyor branch](https://img.shields.io/appveyor/build/Vasar007/acolyte-net/master)            | ![AppVeyor branch](https://img.shields.io/appveyor/build/Vasar007/acolyte-net/develop) |\n| **GitHub Release** | ![GitHub release (latest by date)](https://img.shields.io/github/v/release/Vasar007/Acolyte.NET) | —                                                                                      |\n\n## Installation\n\nInstall [NuGet package](https://www.nuget.org/packages/Acolyte.NET).\n\n## About library\n\nLibrary contains classes, helper static classes and many extension methods. Each of these is divided into one of the following categories.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTable of content [click to expand]\u003c/strong\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n### Assertions (C#)\n\n- [ThrowsExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Assertions/ThrowsExtensions.cs) — contains extension methods to check certain conditions.\n\n### Collections (C#)\n\n- [AsyncEnumerableExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Collections/AsyncEnumerableExtensions.cs) — contains useful methods to work with `async` enumerable items (`IAsyncEnumerable` was introduced in C# 8.0);\n- [ConcurrentHashSet](Acolyte.NET/Libraries/Acolyte.CSharp/Collections/ConcurrentHashSet.cs) — represents a thread-safe set of values;\n- [DictionaryExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Collections/DictionaryExtensions.cs) — contains extension methods to simplify work with associative collections;\n- [EnumerableExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Collections/EnumerableExtensions.cs) – extends `LINQ` methods to work with enumerable items;\n- [InverseComparer](Acolyte.NET/Libraries/Acolyte.CSharp/Collections/InverseComparer.cs) — allows to invert every object of `IComparer` type;\n- [IHaveCreationTime](Acolyte.NET/Libraries/Acolyte.CSharp/Collections/IHaveCreationTime.cs) — provides read-only `DateTime` property to use by `TimeBasedConcurrentDictionary`;\n- [TimeBasedConcurrentDictionary](Acolyte.NET/Libraries/Acolyte.CSharp/Collections/TimeBasedConcurrentDictionary.cs) — extends the standard `ConcurrentDictionary` class with time-based logic (this collection cleans up expired objects when calling any method).\n\n### Common (C#)\n\n- [Constants](Acolyte.NET/Libraries/Acolyte.CSharp/Common/Constants.cs) — provides some constants (say “No” to magic numbers and strings);\n- [EnumExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Common/EnumExtensions.cs) — contains extension methods for enumeration values;\n- [EnumHelper](Acolyte.NET/Libraries/Acolyte.CSharp/Common/EnumHelper.cs) — contains common logic to work with enumeration values (like static methods in the standard `Enum` class);\n- [GuidExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Common/GuidExtensions.cs) — contains extension methods for `Guid` values;\n- [IClonable`\u003c`T`\u003e`](Acolyte.NET/Libraries/Acolyte.CSharp/Common/IClonableT.cs) — provides generic interface to clone objects (the standard `IClonable` interface provides `Clone` method with the `object` return type);\n- [MathHelper](Acolyte.NET/Libraries/Acolyte.CSharp/Common/MathHelper.cs) — provides a set of useful mathematic methods;\n- [Maybe](Acolyte.NET/Libraries/Acolyte.CSharp/Common/Maybe.cs) — represents similar interface to `Nullable` struct but for reference types;\n- [TypeExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Common/TypeExtensions.cs) — contains extension methods for `Type` class;\n\n#### Bits (C#)\n\n- [BitConverterExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Common/Bits/BitConverterExtensions.cs) — contains extension methods to work with bits;\n\n#### Monads (C#)\n\n- [MonadExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Common/Monads/MonadExtensions.cs) — provides a set of monadic functions (simplify using functional style in C#);\n\n### Data (C#)\n\n- [DataReaderExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Data/DataReaderExtensions.cs) — contains extension methods for `IDataReader` class;\n\n### Exceptions (C#)\n\n- [IUnhandledExceptionHandler](Acolyte.NET/Libraries/Acolyte.CSharp/Exceptions/IUnhandledExceptionHandler.cs) — provides interface for exception handler used by `AppDomainUnhandledExceptionManager`;\n- [AppDomainUnhandledExceptionManager](Acolyte.NET/Libraries/Acolyte.CSharp/Exceptions/AppDomainUnhandledExceptionManager.cs) — allows to set up exception handlers when an exception is not caught;\n- [ExceptionsExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Exceptions/ExceptionsExtensions.cs) — contains extension methods to work with exceptions;\n- [ExceptionsHelper](Acolyte.NET/Libraries/Acolyte.CSharp/Exceptions/ExceptionsHelper.cs) — provides methods to process or transform exceptions;\n- [MultipleArgumentException](Acolyte.NET/Libraries/Acolyte.CSharp/Exceptions/MultipleArgumentException.cs) — represents the exception that is thrown when several arguments provided to a method are not valid;\n- [NotFoundException](Acolyte.NET/Libraries/Acolyte.CSharp/Exceptions/NotFoundException.cs) — represents the exception that is thrown when object is not found;\n- [TaskFaultedException](Acolyte.NET/Libraries/Acolyte.CSharp/Exceptions/TaskFaultedException.cs) — represents the exception that is thrown when processing method encounters task in faulted state.\n\n### IO (C#)\n\n- [StreamExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/IO/StreamExtensions.cs) — contains extension methods to work with streams.\n\n### Threading (C#)\n\n- [NoneResult](Acolyte.NET/Libraries/Acolyte.CSharp/Threading/NoneResult.cs) — represents an object with no result (used for track `Task` objects);\n- [ResultOrException](Acolyte.NET/Libraries/Acolyte.CSharp/Threading/ResultOrException.cs) — represents an object with result or exception value from completed tasks;\n- [TaskExtensions](Acolyte.NET/Libraries/Acolyte.CSharp/Threading/TaskExtensions.cs) — contains extension methods to work with tasks;\n- [TaskHelper](Acolyte.NET/Libraries/Acolyte.CSharp/Threading/TaskHelper.cs) — contains common logic to work with tasks (like static methods in the standard `Task` class);\n- [ThreadHelper](Acolyte.NET/Libraries/Acolyte.CSharp/Threading/ThreadHelper.cs) — contains additional logic to work with `Thread` class;\n- [ThreadPoolHelper](Acolyte.NET/Libraries/Acolyte.CSharp/Threading/ThreadPoolHelper.cs) — contains additional logic to work with `ThreadPool` class.\n\n### XML (C#)\n\n- [XDocumentParser](Acolyte.NET/Libraries/Acolyte.CSharp/Xml/XDocumentParser.cs) — represents a XML document parser;\n- [XmlHelper](Acolyte.NET/Libraries/Acolyte.CSharp/Xml/XmlHelper.cs) — provides serialization and deserialization methods to work with XML.\n\n### Functional (F#)\n\n- [Throw](Acolyte.NET/Libraries/Acolyte.FSharp/Functional/Throw.fs) — represents F#-style usage of some assertion extensions;\n- [Utils](Acolyte.NET/Libraries/Acolyte.FSharp/Functional/Utils.fs) — provides useful methods to work with F# values;\n- [SeqEx](Acolyte.NET/Libraries/Acolyte.FSharp/Functional/SeqEx.fs) — contains additional methods to work with `seq` (i.e. `IEnumerable\u003cT\u003e`).\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Usage examples\n\nCheck examples solution [here](https://github.com/Vasar007/Acolyte.NET/tree/develop/Acolyte.Examples).\n\n```csharp\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\nusing Acolyte.Assertions;\nusing Acolyte.Collections;\nusing Acolyte.Common;\nusing Acolyte.Threading;\n\nnamespace Acolyte.Examples\n{\n    internal static class Samples\n    {\n        internal static IEnumerable\u003cT\u003e GenerateCollection\u003cT\u003e(Func\u003cT\u003e generator, int count)\n        {\n            generator.ThrowIfNull(nameof(generator));\n            count.ThrowIfValueIsOutOfRange(\n                nameof(count), includedLowerBound: 1, includedUpperBound: 1000\n            );\n\n            return Enumerable\n                .Range(0, count)\n                .Select(_ =\u003e generator());\n        }\n\n        internal static IEnumerable\u003cstring\u003e GetItemsByPattern(IEnumerable\u003cstring\u003e source,\n            string pattern)\n        {\n            source.ThrowIfNull(nameof(source));\n            pattern.ThrowIfNullOrEmpty(nameof(pattern));\n\n            return source.Where(item =\u003e Regex.IsMatch(item, pattern));\n        }\n\n        internal static void OutputCollection\u003cT\u003e(IEnumerable\u003cT\u003e collection)\n        {\n            collection.ThrowIfNull(nameof(collection));\n\n            Console.WriteLine($\"Collection: [{collection.ToSingleString()}].\");\n        }\n\n        internal static int DistanceBetweenMinAndMax(IEnumerable\u003cint\u003e source)\n        {\n            source.ThrowIfNullOrEmpty(nameof(source));\n\n            (int minValue, int maxValue) = source.MinMax();\n            return maxValue - minValue;\n        }\n\n        internal static async Task ExecuteAllTasksSafe(params Task[] tasks)\n        {\n            IReadOnlyList\u003cResult\u003cNoneResult, Exception\u003e\u003e resultObjects =\n                await TaskHelper.WhenAllResultsOrExceptions(tasks);\n\n            IReadOnlyList\u003cException\u003e exceptions = resultObjects.UnwrapResultsOrExceptions();\n\n            string separator = Environment.NewLine;\n            const string emptyCollectionMessage = \"No exceptions occurred.\";\n            string exceptionsToLog = exceptions.ToSingleString(\n                emptyCollectionMessage, separator, selector: ex =\u003e ex.ToString()\n            );\n\n            Console.WriteLine($\"{separator}{exceptionsToLog}{separator}\");\n        }\n    }\n}\n\n```\n\n## Dependencies\n\nTarget .NET Standard versions are 2.0 and 2.1 for libraries. Version of C# is 9.0, version of F# is 5.0.\n\n## License information\n\nThis project is licensed under the terms of the [Apache License 2.0](LICENSE).\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FVasar007%2FAcolyte.NET.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FVasar007%2FAcolyte.NET?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasar007%2Facolyte.net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasar007%2Facolyte.net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasar007%2Facolyte.net/lists"}