![]() |
VOOZH | about |
dotnet add package SourceKit.Generators.Builder --version 1.2.60
NuGet\Install-Package SourceKit.Generators.Builder -Version 1.2.60
<PackageReference Include="SourceKit.Generators.Builder" Version="1.2.60" />
<PackageVersion Include="SourceKit.Generators.Builder" Version="1.2.60" />Directory.Packages.props
<PackageReference Include="SourceKit.Generators.Builder" />Project file
paket add SourceKit.Generators.Builder --version 1.2.60
#r "nuget: SourceKit.Generators.Builder, 1.2.60"
#:package SourceKit.Generators.Builder@1.2.60
#addin nuget:?package=SourceKit.Generators.Builder&version=1.2.60Install as a Cake Addin
#tool nuget:?package=SourceKit.Generators.Builder&version=1.2.60Install as a Cake Tool
Use [GenerateBuilder] attribute to generate builder.
record or record struct types are supportedBuilderList<> will be generatedWith{PropName} and With{PropName}s will be generatedIComparable or IComparable<TSelf> the .Distinct LINQ method would be called on .Build methodList<> or HashSet<> then it will be converted to this collection respectively, otherwise, ToArray method will be calledYou can use SomeType.Build() static method to shorthand create type instance using generated builder
[GenerateBuilder]
public partial record SomeQuery(IReadOnlyCollection<Guid> Ids, int Count = 10);
...
var query = SomeQuery.Build(x => x.WithCount(2).WithId(Guid.NewGuid());
Default values for record properties are supported
You can annotate property with [RequiredValue] attribute to force compile time error
when it is not initialized withing Build method of model.
[GenerateBuilder]
public partial record SomeQuery(long[] Ids, [RequiredValue] int PageSize);
The following code will produce an error.
var query = SomeQuery.Build(x => x.WithId(1));
Learn more about Target Frameworks and .NET Standard.
Showing the top 5 NuGet packages that depend on SourceKit.Generators.Builder:
| Package | Downloads |
|---|---|
|
Itmo.Dev.Platform.Kafka
Package Description |
|
|
Itmo.Dev.Platform.BackgroundTasks
Package Description |
|
|
Itmo.Dev.Platform.MessagePersistence
Package Description |
|
|
Itmo.Dev.Platform.MessagePersistence.Postgres
Package Description |
|
|
Itmo.Dev.Platform.BackgroundTasks.Postgres
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.60 | 100 | 6/13/2026 |
| 1.2.59 | 168 | 5/4/2026 |
| 1.2.58 | 450 | 4/2/2026 |
| 1.2.57 | 124 | 4/2/2026 |
| 1.2.56 | 305 | 3/28/2026 |
| 1.2.54 | 207 | 3/1/2026 |
| 1.2.53 | 135 | 2/28/2026 |
| 1.2.52 | 1,121 | 1/3/2026 |
| 1.2.51 | 247 | 12/20/2025 |
| 1.2.50 | 2,467 | 5/16/2025 |
| 1.2.49 | 581 | 1/13/2025 |
| 1.2.48 | 221 | 1/13/2025 |
| 1.2.47 | 235 | 1/12/2025 |
| 1.2.46 | 243 | 1/12/2025 |
| 1.2.45 | 834 | 12/15/2024 |
| 1.2.44 | 459 | 12/15/2024 |
| 1.2.43 | 238 | 12/15/2024 |
| 1.2.42 | 233 | 12/15/2024 |
| 1.2.41 | 255 | 12/15/2024 |
| 1.2.40 | 252 | 12/15/2024 |
Added default values support