FluentSetups 0.3.5
See the version list below for details.
dotnet add package FluentSetups --version 0.3.5
NuGet\Install-Package FluentSetups -Version 0.3.5
<PackageReference Include="FluentSetups" Version="0.3.5" />
paket add FluentSetups --version 0.3.5
#r "nuget: FluentSetups, 0.3.5"
// Install FluentSetups as a Cake Addin #addin nuget:?package=FluentSetups&version=0.3.5 // Install FluentSetups as a Cake Tool #tool nuget:?package=FluentSetups&version=0.3.5
FluentSetups
What is FluentSetups
FluentSetups is a library that generates the boilerplate code for a fluent builder pattern ( I call it a fluent setup ). It uses the roslyn source generators, to analyse your code and add the required setup classes, if you use the FluentSetups attributes in your code.
Usage
Lets assume that you have an object you want to create a fluent setup api for
// This is the object we want to create an fluent setup/builder for
public class Person
{
public int Age { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string FullName => $"{FirstName} {LastName}";
}
Normaly you would have to write all that boilerplate code, with FluentSetups all you have to write, is this.
[FluentSetup(typeof(Person))]
public partial class PersonSetup
{
}
Now that you have done this, you are able to write the code below, without having to write any of the called methods or the static Setup class. These are all generated for you, but you can customize them if you want, and the fluent setup generator will adjust the generated code to fit your needs.
var person = Setup.Person()
.WithFirstName("Robert")
.WithLastName("Ramirez")
.WithAge(34)
.Done();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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. |
.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 is compatible. 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. |
-
.NETFramework 4.6.1
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net6.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.
Version | Downloads | Last updated |
---|---|---|
0.3.7 | 1,000 | 7/31/2022 |
0.3.6 | 436 | 6/9/2022 |
0.3.5 | 422 | 6/6/2022 |
0.3.4 | 399 | 6/5/2022 |
0.3.3 | 409 | 6/5/2022 |
0.3.2 | 407 | 6/4/2022 |
0.3.1 | 406 | 6/4/2022 |
0.3.1-rc1 | 187 | 6/1/2022 |
0.3.0 | 434 | 5/17/2022 |
0.3.0-rc5 | 171 | 5/17/2022 |
0.3.0-rc4 | 153 | 5/17/2022 |
0.3.0-rc3 | 166 | 5/17/2022 |
0.2.0 | 404 | 5/15/2022 |
0.2.0-rc.4 | 139 | 5/13/2022 |
0.0.1 | 450 | 5/4/2022 |
0.0.1-rc.1 | 128 | 5/3/2022 |
0.0.1-dev.11 | 118 | 5/3/2022 |
0.0.1-dev.10 | 126 | 5/3/2022 |
0.0.1-dev.9 | 125 | 5/2/2022 |
0.0.1-dev.8 | 123 | 5/2/2022 |
0.0.1-dev.7 | 125 | 5/1/2022 |
0.0.1-dev.6 | 125 | 5/1/2022 |
0.0.1-dev.1 | 132 | 5/1/2022 |
0.3.4 to 0.3.5
- Fixed compiler warnigns CS0414 for unused members in generated code with pragma.
0.3.3 to 0.3.4
- Bugfix for nested classes with the FluentSetup attribute.
0.3.2 to 0.3.3
- Bugfix for missing default value when no constant was used.
0.3.1 to 0.3.2
- Added diagnostic analyzer for multiple partial members defined by the user.
0.3.0 to 0.3.1
- Multiple partial members defined by the user, skipp source generation for the fluent setup class.
- Improvements for reporting diagnostics.