SourceKit.Generators.Builder
1.0.3
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SourceKit.Generators.Builder --version 1.0.3
NuGet\Install-Package SourceKit.Generators.Builder -Version 1.0.3
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.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SourceKit.Generators.Builder --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SourceKit.Generators.Builder, 1.0.3"
#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.
// Install SourceKit.Generators.Builder as a Cake Addin
#addin nuget:?package=SourceKit.Generators.Builder&version=1.0.3
// Install SourceKit.Generators.Builder as a Cake Tool
#tool nuget:?package=SourceKit.Generators.Builder&version=1.0.3
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
record
orrecord struct
types 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}s
will be generated - If collection element type is
IComparable
orIComparable<TSelf>
the.Distinct
LINQ method would be called on.Build
method - If collection property is
List<>
orHashSet<>
then it will be converted to this collection respectively, otherwise,ToArray
method 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);
...
var query = SomeQuery.Build(x => x.WithCount(2).WithId(Guid.NewGuid());
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- SourceKit.Generators.Builder.Annotations (>= 1.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SourceKit.Generators.Builder:
Package | Downloads |
---|---|
Itmo.Dev.Platform.BackgroundTasks
Package Description |
|
Itmo.Dev.Platform.MessagePersistence
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.34 | 138 | 5/4/2024 |
1.2.33 | 70 | 5/1/2024 |
1.2.31 | 96 | 4/27/2024 |
1.2.30 | 137 | 4/6/2024 |
1.1.29 | 125 | 4/3/2024 |
1.1.27 | 94 | 4/3/2024 |
1.1.26 | 110 | 4/3/2024 |
1.1.24 | 1,156 | 12/19/2023 |
1.1.23 | 184 | 12/6/2023 |
1.1.22 | 248 | 11/22/2023 |
1.1.21 | 594 | 11/11/2023 |
1.1.20 | 73 | 11/11/2023 |
1.1.19 | 156 | 11/11/2023 |
1.1.18 | 100 | 11/11/2023 |
1.1.16 | 77 | 11/11/2023 |
1.1.15 | 93 | 11/11/2023 |
1.1.14 | 106 | 11/11/2023 |
1.1.13 | 133 | 11/11/2023 |
1.1.11 | 90 | 11/11/2023 |
1.1.10 | 187 | 9/16/2023 |
1.1.4 | 228 | 9/10/2023 |
1.0.4 | 1,063 | 6/11/2023 |
1.0.3 | 153 | 6/10/2023 |
1.0.2 | 119 | 6/10/2023 |
1.0.1 | 351 | 5/14/2023 |
1.0.0 | 144 | 5/13/2023 |
Fixed string property generation