FluentSetups 0.3.7

dotnet add package FluentSetups --version 0.3.7                
NuGet\Install-Package FluentSetups -Version 0.3.7                
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="FluentSetups" Version="0.3.7" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentSetups --version 0.3.7                
#r "nuget: FluentSetups, 0.3.7"                
#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 FluentSetups as a Cake Addin
#addin nuget:?package=FluentSetups&version=0.3.7

// Install FluentSetups as a Cake Tool
#tool nuget:?package=FluentSetups&version=0.3.7                

FluentSetups

build workflow

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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,030 7/31/2022
0.3.6 441 6/9/2022
0.3.5 427 6/6/2022
0.3.4 404 6/5/2022
0.3.3 414 6/5/2022
0.3.2 412 6/4/2022
0.3.1 411 6/4/2022
0.3.1-rc1 190 6/1/2022
0.3.0 439 5/17/2022
0.3.0-rc5 174 5/17/2022
0.3.0-rc4 156 5/17/2022
0.3.0-rc3 170 5/17/2022
0.2.0 410 5/15/2022
0.2.0-rc.4 143 5/13/2022
0.0.1 459 5/4/2022
0.0.1-rc.1 133 5/3/2022
0.0.1-dev.11 122 5/3/2022
0.0.1-dev.10 131 5/3/2022
0.0.1-dev.9 130 5/2/2022
0.0.1-dev.8 127 5/2/2022
0.0.1-dev.7 129 5/1/2022
0.0.1-dev.6 129 5/1/2022
0.0.1-dev.1 136 5/1/2022

0.3.5 to 0.3.6
- Added FluentRootAttribute to support a default setup entry point other than 'Setup'
- Added support for list types
- Added signularization for plural list members
- Made fluent entry methods 'overridable' by the user
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.