SourceKit.Generators.Builder
1.2.62
Prefix Reserved
dotnet add package SourceKit.Generators.Builder --version 1.2.62
NuGet\Install-Package SourceKit.Generators.Builder -Version 1.2.62
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="SourceKit.Generators.Builder" Version="1.2.62" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SourceKit.Generators.Builder" Version="1.2.62" />Directory.Packages.props
<PackageReference Include="SourceKit.Generators.Builder" />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 SourceKit.Generators.Builder --version 1.2.62
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SourceKit.Generators.Builder, 1.2.62"
#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 SourceKit.Generators.Builder@1.2.62
#: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=SourceKit.Generators.Builder&version=1.2.62Install as a Cake Addin
#tool nuget:?package=SourceKit.Generators.Builder&version=1.2.62Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SourceKit.Generators.Builder
Use [GenerateBuilder] attribute to generate builder.
- Only
recordorrecord structtypes are supported - Builder is a nested class
Builder - For collection properties field of type
List<>will be generated - For collection properties, methods
With{PropName}andWith{PropName}swill be generated - If collection element type is
IComparableorIComparable<TSelf>the.DistinctLINQ method would be called on.Buildmethod - If collection property is
List<>orHashSet<>then it will be converted to this collection respectively, otherwise,ToArraymethod will be called
You 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
Required properties
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));
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- FluentChaining (>= 1.0.4)
- Humanizer.Core (>= 2.14.1)
- Humanizer.Core.uk (>= 2.14.1)
- Microsoft.CodeAnalysis.Common (>= 4.9.2)
- Microsoft.CodeAnalysis.CSharp (>= 4.9.2)
- Microsoft.CodeAnalysis.Workspaces.Common (>= 4.9.2)
- Microsoft.Extensions.DependencyInjection (>= 3.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 3.0.0)
- SourceKit (>= 1.1.62)
- SourceKit.Generators.Builder.Annotations (>= 1.1.62)
NuGet packages (9)
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 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.62 | 77 | 6/30/2026 |
| 1.2.61 | 74 | 6/30/2026 |
| 1.2.60 | 131 | 6/13/2026 |
| 1.2.59 | 175 | 5/4/2026 |
| 1.2.58 | 832 | 4/2/2026 |
| 1.2.57 | 127 | 4/2/2026 |
| 1.2.56 | 308 | 3/28/2026 |
| 1.2.54 | 210 | 3/1/2026 |
| 1.2.53 | 138 | 2/28/2026 |
| 1.2.52 | 1,123 | 1/3/2026 |
| 1.2.51 | 252 | 12/20/2025 |
| 1.2.50 | 2,476 | 5/16/2025 |
| 1.2.49 | 585 | 1/13/2025 |
| 1.2.48 | 225 | 1/13/2025 |
| 1.2.47 | 237 | 1/12/2025 |
| 1.2.46 | 248 | 1/12/2025 |
| 1.2.45 | 837 | 12/15/2024 |
| 1.2.44 | 461 | 12/15/2024 |
| 1.2.43 | 240 | 12/15/2024 |
| 1.2.42 | 234 | 12/15/2024 |
Loading failed
Added default values support