Brudixy.TypeGenerator
1.0.0.11
dotnet add package Brudixy.TypeGenerator --version 1.0.0.11
NuGet\Install-Package Brudixy.TypeGenerator -Version 1.0.0.11
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="Brudixy.TypeGenerator" Version="1.0.0.11"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Brudixy.TypeGenerator" Version="1.0.0.11" />
<PackageReference Include="Brudixy.TypeGenerator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
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 Brudixy.TypeGenerator --version 1.0.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Brudixy.TypeGenerator, 1.0.0.11"
#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 Brudixy.TypeGenerator@1.0.0.11
#: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=Brudixy.TypeGenerator&version=1.0.0.11
#tool nuget:?package=Brudixy.TypeGenerator&version=1.0.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Brudixy.TypeGenerator
Source generator for Brudixy that turns YAML schemas into strongly-typed DataTable/DataSet code at build time.
Install
<ItemGroup>
<PackageReference Include="Brudixy" Version="1.0.0" />
<PackageReference Include="Brudixy.TypeGenerator" Version="1.0.0" PrivateAssets="all" />
<AdditionalFiles Include="Schemas\**\*.brudixy.yaml" />
<AdditionalFiles Include="Schemas\**\*.st.brudixy.yaml" />
</ItemGroup>
YAML schema files
There are two common shapes:
- Single table:
*.st.brudixy.yamlwith aTableroot. - DataSet-style container:
*.brudixy.yamlwithTablesand optional relations/indexes.
Single table (minimal)
---
Table: Users
PrimaryKey:
- Id
Columns:
Id: Int32
Name: String
DataSet-style (multiple tables)
---
Tables:
- Users
- Orders
TableOptions:
Users:
FileName: Users.st.brudixy.yaml
Orders:
FileName: Orders.st.brudixy.yaml
Relations:
FK_Orders_Users:
ParentTable: Users
ParentKey: Id
ChildTable: Orders
ChildKey: UserId
RelationType: OneToMany
Schema reference (key fields)
Top-level keys (table or dataset):
Table: name of a single table (single-table schemas).Tables: list of table names (dataset schema).TableOptions: per-table options for dataset schemas. Common fields:FileName,CodeProperty.Columns: map of column name to type (single-table schemas).PrimaryKey: list of column names.Relations: map of relation name to definition.Indexes: map of index name to definition.XProperties: table-level extended properties.EnforceConstraints: enable/disable relation constraints.
Column options (in ColumnOptions):
Type: storage type (see supported types below).TypeModifier:Simple,Array, orRange.DataType: full CLR type name forUserTypeorEnumType.EnumType: CLR enum type for enum-backed columns.AllowNull,IsUnique,IsReadOnly,IsService,Auto,HasIndex.DefaultValue,MaxLength,Expression,DisplayName,CodeProperty.XProperties: column-level extended properties.
Supported types
Built-in storage types:
ObjectBoolean(Bool,Flag)CharSByte,ByteInt16,UInt16Int32(Integer),UInt32Int64,UInt64Single,Double,Decimal(Money)DateTime,DateTimeOffset,TimeSpanStringGuidBigIntegerUri,TypeXml(XElement),Json(JsonObject)UserType
Type aliases are case-insensitive. TypeModifier can be Array or Range where supported.
Custom types
To store your own CLR type:
- Use
UserTypeand setDataTypeto the full CLR type name. - Register the type at runtime:
using Brudixy;
CoreDataTable.RegisterUserType<MyType>();
// Optional: string conversion for YAML or serialization
CoreDataTable.RegisterUserTypeStringMethods<MyType>(
value => value.ToString(),
text => MyType.Parse(text));
Notes
- Generators run at build time; the runtime library is
Brudixy. - For schema validation or advanced options, check the README in the root package.
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.