FluentSetups 0.3.2
See the version list below for details.
dotnet add package FluentSetups --version 0.3.2
NuGet\Install-Package FluentSetups -Version 0.3.2
<PackageReference Include="FluentSetups" Version="0.3.2" />
paket add FluentSetups --version 0.3.2
#r "nuget: FluentSetups, 0.3.2"
// Install FluentSetups as a Cake Addin #addin nuget:?package=FluentSetups&version=0.3.2 // Install FluentSetups as a Cake Tool #tool nuget:?package=FluentSetups&version=0.3.2
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,010 | 7/31/2022 |
0.3.6 | 437 | 6/9/2022 |
0.3.5 | 423 | 6/6/2022 |
0.3.4 | 400 | 6/5/2022 |
0.3.3 | 410 | 6/5/2022 |
0.3.2 | 408 | 6/4/2022 |
0.3.1 | 407 | 6/4/2022 |
0.3.1-rc1 | 188 | 6/1/2022 |
0.3.0 | 435 | 5/17/2022 |
0.3.0-rc5 | 172 | 5/17/2022 |
0.3.0-rc4 | 154 | 5/17/2022 |
0.3.0-rc3 | 168 | 5/17/2022 |
0.2.0 | 406 | 5/15/2022 |
0.2.0-rc.4 | 141 | 5/13/2022 |
0.0.1 | 455 | 5/4/2022 |
0.0.1-rc.1 | 131 | 5/3/2022 |
0.0.1-dev.11 | 120 | 5/3/2022 |
0.0.1-dev.10 | 129 | 5/3/2022 |
0.0.1-dev.9 | 128 | 5/2/2022 |
0.0.1-dev.8 | 125 | 5/2/2022 |
0.0.1-dev.7 | 127 | 5/1/2022 |
0.0.1-dev.6 | 127 | 5/1/2022 |
0.0.1-dev.1 | 134 | 5/1/2022 |
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.