dotnet add package Sylvan.Common --version 0.4.3
NuGet\Install-Package Sylvan.Common -Version 0.4.3
<PackageReference Include="Sylvan.Common" Version="0.4.3" />
paket add Sylvan.Common --version 0.4.3
#r "nuget: Sylvan.Common, 0.4.3"
// Install Sylvan.Common as a Cake Addin #addin nuget:?package=Sylvan.Common&version=0.4.3 // Install Sylvan.Common as a Cake Tool #tool nuget:?package=Sylvan.Common&version=0.4.3
Sylvan.Common library contains a collection of types and extensions that I've developed over time.
Most of these will not be of much interest to most people, but you're free to use it if you do.
Exposes methods to convert to and from ISO 8601 formatted dates.
These are faster than the default DateTime implementation since they don't need to account for a variety of formats and cultures.
DateTime.TryParse performance is best when using the "O" (round-trip) format specifier, which requires a very specific ISO 8601 format.
IsoDate attempts to be a bit more lenient in what it parses, while maintaining high performance.
This code was largely taken from an implementation in
System.Text.Json, which I then modified in the following way:
- Handles chars instead of bytes, as the S.T.Json impl was utf-8 specific.
- Allows ' ' in place of 'T' as time separator. Not ISO compliant, but common enough that I wanted to support it.
- Allows ',' in place of '.' as fractional time separator, which ISO8601 apparently allows, but isn't supported by S.T.Json.
- Rounds appropriately when more than 7 fractional second digits are parsed. Nanoseconds are important, right.
This type provides a means of de-duping strings upon construction.
It is conceptually similar to the
System.Xml.NameTable type, which is intended to de-dupe the repetitive names in XML.
This implements a dictionary that only allows adding by calling
string GetString(char buffer, int offset, int length), which
will return an existing string if the same sequence has already been seen. This was created to de-dupe strings in
Sylvan.Data.Csv.CsvDataReader implementation. This type has no eviction policy, so it is essentially a giant memory
leak until it is GCed.
If you are intending to use this along with the Sylvan CSV reader, you might investigate using
Ben.StringPool instead, which offers a more
robust implementation that includes LRU cache eviction, making it suitable for use in longer-lived scopes.
Implements an in-memory buffer, similar to MemoryStream, but instead maintaining a contiguous block of memory, uses a series of fixed-size pages to hold data. Pages are allocated from an ArrayPool. This is intended for specific high-performance scenarios, where it can offer better performance than MemoryStream.
Implements a TextWriter that uses the same pattern as the PooledMemoryStream.
... and more
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.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.|
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Sylvan.Common:
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Sylvan.Common:
Multi-Platform Package Manager for Stable Diffusion
Modern, minimal, fast, zero allocation, reading and writing of separated values (`csv`, `tsv` etc.). Cross-platform, trimmable and AOT/NativeAOT compatible.