Thinkmine.Zaria.Core
1.4.16
dotnet add package Thinkmine.Zaria.Core --version 1.4.16
NuGet\Install-Package Thinkmine.Zaria.Core -Version 1.4.16
<PackageReference Include="Thinkmine.Zaria.Core" Version="1.4.16" />
paket add Thinkmine.Zaria.Core --version 1.4.16
#r "nuget: Thinkmine.Zaria.Core, 1.4.16"
// Install Thinkmine.Zaria.Core as a Cake Addin #addin nuget:?package=Thinkmine.Zaria.Core&version=1.4.16 // Install Thinkmine.Zaria.Core as a Cake Tool #tool nuget:?package=Thinkmine.Zaria.Core&version=1.4.16
Thinkmine Zaria Core
This library contains extension and helper methods that enhance the use of C#.
Version 1.4.0
Minor fixes for stability. Improved documentation across entire surface area.
Version 1.2.9
Added FilterAsync
extension method on all enumerables. FilterAsync allows you to use string notation to run a filter on a list. In the following sample we use this mechanism to filter the list based on the value of the property Two
. This can be used in scenarios where the property name is not known at
//Class that csv string is deserialized to
public record Test : ICustomCSVProcessor
{
[Index(2)]
public bool One { get; set; }
[Index(1)]
public int Two { get; set; }
[Index(0)]
public string Three { get; set; }
[Index(3)]
public DateTime Date { get; set; }
public void ProcessRow(string[] row_data)
{
//throw new NotImplementedException();
}
}
//Write CSV date
var csv = """
a,"2,500","true","1/1/2001"
e,7,false,"2/2/2002"
""";
//Convert to Enumerable
var result = csv.FromCSVString<Test>();
//Use filter to filter the list
var filtered = await result.Result.FilterAsync("Two > 10");
Version 1.1.*
- Add support for .NET 8. .NET 6 is out of support so the project has been migrated to the next LTS version.
- FromCSV is no longer in beta and now adds support for parsing the CSV document into a list of a certain type.
- Added ICustomCSVProcessor interface for custom processing of the CSV data. This should be used in scenarios where the user needs to do some complex processing and mapping of the csv data. The example below illustrates.
public class Test : ICustomCSVProcessor
{
public bool One { get; set; }
[Index(1)]
public int Two { get; set; }
[Index(0)]
public string Three { get; set; }
public void ProcessRow(string[] row_data)
{
One = bool.Parse(row_data[2]);
}
}
- Added support for duplicate IndexAttributes with the same index value. In such scenarios previous values will be overwritten by newer ones in the order that they are encountered.
- Added support for guid, string, int, double, datetime, and bool as property types on any type you want mapped to rows of the CSV document. Previously a type defined as follows would not work properly as the types for properties
One
andTwo
are not string. With this release they can now be used.
public class Test
{
[Index(2)]
public bool One { get; set; }
[Index(1)]
public int Two { get; set; }
[Index(0)]
public string Three { get; set; }
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net8.0
- Microsoft.CodeAnalysis.Common (>= 4.11.0)
- Microsoft.CodeAnalysis.CSharp.Scripting (>= 4.11.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Text.Json (>= 8.0.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Thinkmine.Zaria.Core:
Package | Downloads |
---|---|
Zaria.AI
This framework provides a simple, attribute-driven, low-code API for building text based interactive dialog. It can be used to build AI BOTs, CLIs and command line tools, workflow orchestrators, and other general command processing utilities! Find out more about Zaria.AI here: https://github.com/thinkmine/zaria.ai |
|
Zaria.Data
Library for quickly and easily accessing sql data via JSON, service endpoint, or code-gen |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.4.16 | 47 | 12/25/2024 |
1.4.15 | 84 | 12/22/2024 |
1.4.13 | 571 | 11/26/2024 |
1.4.12 | 141 | 11/21/2024 |
1.4.11 | 85 | 11/18/2024 |
1.4.10 | 75 | 11/18/2024 |
1.4.9 | 88 | 11/18/2024 |
1.4.8 | 80 | 11/18/2024 |
1.4.7 | 146 | 11/8/2024 |
1.4.6 | 106 | 10/31/2024 |
1.4.4 | 86 | 10/27/2024 |
1.4.3 | 84 | 10/27/2024 |
1.4.2 | 85 | 10/27/2024 |
1.4.1 | 96 | 9/25/2024 |
1.4.0 | 88 | 9/22/2024 |
1.2.9 | 127 | 9/5/2024 |
1.2.8 | 110 | 9/5/2024 |
1.2.7 | 126 | 8/19/2024 |
1.2.6 | 132 | 8/19/2024 |
1.1.3 | 126 | 8/18/2024 |
1.1.2 | 138 | 8/16/2024 |
1.1.1 | 126 | 8/15/2024 |
1.1.0 | 117 | 8/15/2024 |
1.0.2 | 88 | 8/6/2024 |
1.0.1 | 104 | 8/6/2024 |
1.0.0 | 81 | 8/5/2024 |
0.0.7-alpha | 110 | 2/6/2023 |
0.0.6-alpha | 353 | 1/31/2023 |
0.0.5-alpha | 375 | 1/25/2023 |
0.0.4-alpha | 109 | 1/24/2023 |
0.0.3-alpha | 134 | 1/13/2023 |
0.0.2-alpha | 131 | 1/9/2023 |
0.0.1-alpha | 131 | 1/9/2023 |