T1.Standard 1.0.79

There is a newer version of this package available.
See the version list below for details.
dotnet add package T1.Standard --version 1.0.79
                    
NuGet\Install-Package T1.Standard -Version 1.0.79
                    
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.

                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.

                    
Directory.Packages.props

                    
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 T1.Standard --version 1.0.79
                    
#r "nuget: T1.Standard, 1.0.79"
                    
#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 T1.Standard@1.0.79
                    
#: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=T1.Standard&version=1.0.79
                    
Install as a Cake Addin
#tool nuget:?package=T1.Standard&version=1.0.79
                    
Install as a Cake Tool

Release Notes: https://mr-brain.github.io/categories/t1-standard/

T1.Standard.Data.SqlBuilders

MssqlBuilder

Generate Insert T-SQL statement string

var sqlBuilder = new MssqlBuilder();
var tableInfo = sqlBuilder.GetTableInfo(typeof(CustomerEntity));
var sqlCode = sqlBuilder.CreateInsertStatement(tableInfo);

T1.Standard.Collections.TreeBuilder

ReduceTree

Universal way to convert List of items to Tree, Build the tree as completely as possible

var userList = new[]
{
	 new MyUser { Path = "", Name = "A1" },
	 new MyUser { Path = "", Name = "A2" },
	 new MyUser { Path = "demo", Name = "B1" }
};

var actual = _treeBuilder.ReduceTree(userList,
	 x => x.Path,
	 x => _treeBuilder.GetParentPath(x),
	 x => _treeBuilder.QueryParentPaths(x.Path)
).ToList();

var expected = new List>
{
	 new TreeBuilder.TreeItem()
	 {
		  Id = "",
		  ParentId = null,
		  Item = new MyUser {Path = "", Name = "A1"},
		  Children = new List>()
	 },
	 new TreeBuilder.TreeItem()
	 {
		  Id = "",
		  ParentId = null,
		  Item = new MyUser {Path = "", Name = "A2"},
		  Children = new List>()
	 },
	 new TreeBuilder.TreeItem()
	 {
		  Id = "demo",
		  ParentId = null,
		  Item = new MyUser {Path = "demo", Name = "B1"},
		  Children = new List>()
	 },
};

expected.ToExpectedObject().ShouldEqual(actual);

GenerateTree

This will only create a fully structured tree

var userList = new[]
{
	 new MyUser {Path = "", Name = "A1"},
	 new MyUser {Path = "demo/name", Name = "C1"},
};

var actual = _treeBuilder.GenerateTree(userList,
	 x => x.Path,
	 x => _treeBuilder.GetParentPath(x.Path)
).ToList();

var expected = new List>
{
	 new TreeBuilder.TreeItem()
	 {
		  Id = "",
		  ParentId = null,
		  Item = new MyUser {Path = "", Name = "A1"},
		  Children = new List>()
	 },
};

expected.ToExpectedObject().ShouldEqual(actual);

string/object Dictionary List to DataTable Sample

var dictList = new List> {
	new Dictionary
	{
		{"Id", 1},
		{"Name", "Jack"},
		{"Birth", DateTime.Parse("2022-05-01")}
	},
	new Dictionary
	{
		{"Id", 2},
		{"Name", "Flash"},
		{"Birth", DateTime.Parse("2022-05-01")}
	}
};

var datatable = dictList.ToDataTable();

string/object Dictionary List Deep to DataTable Sample

var dictList = new List> {
	new Dictionary
	{
		{"Id", 1},
		{"Name", "Jack"},
		{"Birth", DateTime.Parse("2022-05-01")},
		{"Price", null},
	},
	new Dictionary
	{
		{"Id", 2},
		{"Name", "Flash"},
		{"Birth", DateTime.Parse("2022-05-01")},
		{"Price", 123m},
		{"Home", null},
	}
};

var datatable = dictList.DeepToDataTable();

Assert.Equal(typeof(decimal), dt.Columns["Price"]!.DataType);
Assert.Equal(typeof(string), dt.Columns["Home"]!.DataType);
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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on T1.Standard:

Package Downloads
T1.AspNetCore3

DynamicHub, DefaultRequestResponseLoggingHandler, RawHtmlInjectMiddleware, ProtectFolderMiddleware

FlashElf.ChaosKit.Autofac

Package Description

FlashElf.ChaosKit

Chaos strategy is a software development strategy based on the chaos model. Its main rule is to always solve the most important problems first.

T1.SlackSdk

let SlackNet more easy

T1.SqlSharp

Parse TSQL

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 490 12/8/2025
1.0.86 363 4/6/2025
1.0.85 289 1/29/2025
1.0.84 267 12/2/2024
1.0.83 535 11/16/2024
1.0.81 551 8/31/2024
1.0.80 310 8/19/2024
1.0.79 324 8/18/2024
1.0.78 347 6/2/2024
1.0.74 513 4/9/2023
Loading failed

Either Add Async Methods