Chasm.Utilities 2.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Chasm.Utilities --version 2.1.0
                    
NuGet\Install-Package Chasm.Utilities -Version 2.1.0
                    
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="Chasm.Utilities" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Chasm.Utilities" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Chasm.Utilities" />
                    
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 Chasm.Utilities --version 2.1.0
                    
#r "nuget: Chasm.Utilities, 2.1.0"
                    
#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=Chasm.Utilities&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Chasm.Utilities&version=2.1.0
                    
Install as a Cake Tool

Chasm.Utilities

Provides various utility types and methods.

Util

Contains Fail and Catch utility methods, that can be used to shorten common branch code. (or... you could also just not use the auto-formatting, and write everything in a single line, but that's not my style)

Util.Fail sets all out parameters to default and returns either false or a specified return value. Especially useful for parsing.

// Commonly written as:
if (stringIsInvalid) { result = null; return ErrorCode.InvalidString; }

// Using Util.Fail:
if (stringIsInvalid) return Util.Fail(ErrorCode.InvalidString, out result);

Util.Catch catches an exception thrown by the specified delegate. If the delegate returned a value, it can be read through an out parameter.

// Commonly written as:
object? result; Exception? ex;
try { result = doSomething(); ex = null; }
catch (Exception caught) { result = null; ex = caught; }

// Using Util.Catch:
var ex = Util.Catch(doSomething, out object? result);

Util.Is can be used to assign a type-casted value to an existing variable.

// Commonly written as:
if (a is string textA) { /* ... */ }
else if (b is string textB) { /* ... */ }
else if (c is string textC) { /* ... */ }

// Using Util.Is:
if (a is string text) { /* ... */ }
else if (Util.Is(b, out text)) { /* ... */ }
else if (Util.Is(c, out text)) { /* ... */ }
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 is compatible.  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 netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
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.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Chasm.Utilities:

Package Downloads
GrammarSharp.Russian

Provides a bunch of classes, structures and methods pertaining to Russian declension of nouns, adjectives and pronouns.

GrammarSharp

Package Description

GrammarSharp.English

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 96 4/12/2025
2.5.3 472 3/25/2025
2.5.2 133 9/28/2024
2.5.1 280 9/6/2024
2.5.0 117 9/6/2024
2.4.0 117 9/5/2024
2.3.7 84 7/30/2024
2.3.6 110 6/11/2024
2.3.5 118 6/7/2024
2.3.4 125 5/9/2024
2.3.3 318 1/2/2024
2.3.2 188 1/1/2024
2.3.1 153 12/30/2023
2.3.0 142 12/29/2023
2.2.0 141 12/17/2023
2.1.0 136 12/16/2023
2.0.0 143 12/16/2023