Locust.Base
1.0.0
See the version list below for details.
dotnet add package Locust.Base --version 1.0.0
NuGet\Install-Package Locust.Base -Version 1.0.0
<PackageReference Include="Locust.Base" Version="1.0.0" />
<PackageVersion Include="Locust.Base" Version="1.0.0" />
<PackageReference Include="Locust.Base" />
paket add Locust.Base --version 1.0.0
#r "nuget: Locust.Base, 1.0.0"
#:package Locust.Base@1.0.0
#addin nuget:?package=Locust.Base&version=1.0.0
#tool nuget:?package=Locust.Base&version=1.0.0
This library contains basic utilities and type helpers. It also holds some multi-purpose attributes such as Ignore and Size that could be leveraged by other libraries for their own purpose. Locust.Base depends on no other library and is standalone.
Helper classes:
TypeHelper: a helper class with static type properties for primitive and most-used types.
InstanceProvider<TAbstraction, TImplementation>: a once for all singleton instance provider.
AnyComparer: a utility comparer class that is able to compare anything with anything safely using its singleton IComparer instance. The default instance is of type DefaultAnyComparer that checks whether any of the two arguments or both of them are null. If so, the result is specified based on the rule 'null equals with null, but is less than any not-null value'. If both of them are not null, it tries to cast either of the arguments to IComparable and use their CompareTo() method. If none implements IComparable, it falls back to comparing their GetHashCode() at the end.
Attributes:
Ignore: applies to anything and implies that the target should be ignored (based on the usage)
Size: applies to properties to denote a size or length attribute.
EnumDefault: applies to enums and is used to specify a default value for the enum.
TypeHelper methods:
TAbstraction EnsureInitialized<TAbstraction, TConcretion>(ref TAbstraction value, bool threadSafe = false):
a utility method to -safely- instantiate and return an implementation for a given abstraction.
Type FindType(string typename)
searches current appdomain's assemblies for a type based on its string name.
IEnumerable<T> GetValues<T>()
converts list of values in an enum of type T into an IEnumerable<T>
object FindTypeAndInstantiate(string typename, params object[] args)
looks for the given type based on its name in current appdomain's assemblies and instantiates from it using the given arguments (passes the arguments to the found type constructor).
object FindTypeAndTryInstantiate(string typename, params object[] args)
performs the same as FindTypeAndInstantiate() except that it handles exceptions using a try/catch when instantiating object to prevent errors.
| 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 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 | 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 was computed. |
| .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. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Locust.Base:
| Package | Downloads |
|---|---|
|
Locust.Text
This library contains types and utilities regarding working with texts. |
|
|
Locust.Conversion
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.