Trarizon.Library
1.1.0.13
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
dotnet add package Trarizon.Library --version 1.1.0.13
NuGet\Install-Package Trarizon.Library -Version 1.1.0.13
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="Trarizon.Library" Version="1.1.0.13" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Trarizon.Library" Version="1.1.0.13" />
<PackageReference Include="Trarizon.Library" />
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 Trarizon.Library --version 1.1.0.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Trarizon.Library, 1.1.0.13"
#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.
#:package Trarizon.Library@1.1.0.13
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Trarizon.Library&version=1.1.0.13
#tool nuget:?package=Trarizon.Library&version=1.1.0.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Trarizon.Library
Miscellaneous Helpers
This library use nuget package CommunityToolkit.HighPerformance and CommunityToolkit.Diagnostics
Contents:
CodeAnalysis
[ExternalSealed]: Indicates a type or interface cannot be inherited or implemented by types in another assembly[BackingFieldAccess]: a workround of .NET 9 backing field[FriendAccess]: Opt-in ver offriendin c++
CodeGeneration
[Singleton]: Generate a singleton class, thread safe with static field[OptionalOut]: Mark it on aoutparameter, a method with same signature without theoutparameter will be generated- Currently does not support multiple
outparameters
- Currently does not support multiple
Wrappers
Either<,>: Monad eitherLazyInitDisposable: Wrapper for fully utilizing theusingstatement when lazy-initIDisposableobjects.Result<,>: Monad Result, for smaller size,TErroronly supports reference type, and ifTErroris null, the result means successOptional<>: Monad Option
More
The namespace structure is almost the same with System.XXX
- namespace
BufferObjectPool: Object poolIObjectAllcator: Interface for object allocator
- namespace
ComponentsEventBus: A event bus implementationIFlagNotifiable: Interface for notification, a cheaper and stricterINotifyPropertyChangedFlagNotifiable: Extensions and static methods for global notificationFlagNotifiable<>/<,>: Abstract classes that implementsIFlagNotifiableand provide a methodInvokeNotification, not thread-safeFlagNotifier: Designed as a field to help implementsIFlagNotifiable
- namespace
IOTraPath: ExtendsSystem.IO.PathTraStream: Helpers forSystem.IO.Stream
- namespace
MathematicsBoundedInterval: Represents a intervalInterval: Represents a left-close, right-open intervalRational: Rational numberTraGeometry: Helpers forVector2/3,Quaternion, etc.TraIndex: Helpers forIndex,RangeTraNumber: Helpers for number types (inSystem.Numerics)Geometry2D/Geometry3DLine2DLineSegment2DRay2D/3D
- namespace
TextTraString: Helper forstring- namespace
JsonWeakJsonElement: Wrapper ofJsonElementthat auto checkJsonValueKind
- namespace
ThreadingAsyncSemaphoreLock: Async lock implemented withSemaphoreSlimTraAsync: Helpers for async operation,Task<>,ValueTask<>, etc.
TraDelegate: Helpers for delegatesTraEnum: Helpers for enum typesTraRandom: Helpers forRandomTraTuple: Helpers forValueTuplesTraUnsafe: ExtendsUnsafe
Helpers
- ArrayPool
Rent: Overload forArrayPool<>.Rent, returns a auto-return object avaible withusingstatement
- Path
IsValidFile/PathName: check validation of file/path name, withSearchValuesReplaceInvalidFileNameChar: Replace invalid file name characters
- Stream
Read(Exactly): Read data intounmanagedspanReadExactlyIntoArray: Read exactly data into anunmanagedarray with specific lengthReadWithInt32Prefix: Read aintas array length, and doReadExactlyIntoArray
- String
CreateAsSpan: Create string by <see cref="DefaultInterpolatedStringHandler"/>, directly return inner ReadOnlySpan without allocate string(Try)Unescape: Unescape string
- Number
IncAnd(Try)Wrap: Increment the number, if the result is greater than givenmax, then wrap itNormalize: Linear normalize value into [0,1]NormalizeUnclamped: Linear normalize value into [0,1], but not clampedMapTo: Linear map a value from [a, b] to [c, d], no clampFlipNegative:if (value < 0) value = ~value, useful onBinarySearchresultMin/Max: Overloads forparams ReadOnlySpan<>MinMax(T, T): Reorder input 2 argsMinMax(ROS<T>): Get min and max in one iterationGetCheckedOffset:Index.GetOffsetwith overflow checkValidateSliceArgs: Check ifstartandlengthis valid within a collection
- Geometry
ToNormalized: NormalizeVector2/3,QuaternionToEulerAngles
- Async
GetAwaiter: Supportawaitkeyword forValueTask?,ValueTask<>?CatchCancallation: Return a awaitable that will catchTaskCancellationException.
- Delegate
Create: Create delegate with anobjectand a static method. It is actually the way compiler use to create delegate for extension methods.
- Enum
HasAnyFlag: Check if a enum value has one of given flags.
- Random
SelectWeight: Weighted randomNextSingle/Double: Get a random float number in specific rangeNextBoolean: Get a random boolean valueNextItem: Get a random item in collection
- Unsafe
AsReadOnly: PerformUnsafe.Asforref readonlyvariables
- Utils
SetField: If given value is not equals to field, set value and returntrue, otherwise returnfalse
| 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 is compatible. 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 is compatible. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | 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 was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. 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.
-
.NETStandard 2.0
- CommunityToolkit.Diagnostics (>= 8.4.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- System.Threading.Tasks.Extensions (>= 4.6.3)
- Trarizon.Library.Collections (>= 1.0.0.3)
- Trarizon.Library.Functional (>= 1.0.0.3)
- Trarizon.Library.Mathematics (>= 1.0.0)
-
.NETStandard 2.1
- CommunityToolkit.Diagnostics (>= 8.4.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- Trarizon.Library.Collections (>= 1.0.0.3)
- Trarizon.Library.Functional (>= 1.0.0.3)
- Trarizon.Library.Mathematics (>= 1.0.0)
-
net8.0
- CommunityToolkit.Diagnostics (>= 8.4.0)
- Trarizon.Library.Collections (>= 1.0.0.3)
- Trarizon.Library.Functional (>= 1.0.0.3)
- Trarizon.Library.Mathematics (>= 1.0.0)
-
net9.0
- CommunityToolkit.Diagnostics (>= 8.4.0)
- Trarizon.Library.Collections (>= 1.0.0.3)
- Trarizon.Library.Functional (>= 1.0.0.3)
- Trarizon.Library.Mathematics (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.