From 92cc2d2d83a91bbfc2e6a2f2dbafbc1e3e7a608e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 29 Mar 2026 17:24:31 +0000 Subject: [PATCH 1/3] Initial plan From 4854fc47297af31ee029a848efeb49c5ae340034 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 29 Mar 2026 17:42:49 +0000 Subject: [PATCH 2/3] Initial plan for fix Agent-Logs-Url: https://github.com/StefH/FluentBuilder/sessions/bee1696e-f5c0-43bc-a820-be1fbf2e2842 Co-authored-by: StefH <249938+StefH@users.noreply.github.com> --- ...amespace.ClassOnOtherNamespaceBuilder.g.cs | 68 ++++---- ...lderGeneratorTests.DTO.AddressBuilder.g.cs | 164 +++++++++--------- ...rGeneratorTests.DTO.AddressBuilder_T_.g.cs | 68 ++++---- ...atorTests.DTO.AddressTTBuilder_T1_T2_.g.cs | 72 ++++---- ...nstructorParamMatchingPropertyBuilder.g.cs | 70 ++++---- ...sts.DTO.ClassWithFuncAndActionBuilder.g.cs | 80 ++++----- ...ts.DTO.ClassWithInitPropertiesBuilder.g.cs | 92 +++++----- ...TO.ClassWithPrimaryConstructorBuilder.g.cs | 70 ++++---- ...ts.DTO.ClassWithPrivateSetter1Builder.g.cs | 68 ++++---- ...ts.DTO.ClassWithPrivateSetter2Builder.g.cs | 68 ++++---- ....DTO.ClassWithPropertyValueSetBuilder.g.cs | 114 ++++++------ ...neratorTests.DTO.InternalClassBuilder.g.cs | 68 ++++---- ...eneratorTests.DTO.MyDummyClassBuilder.g.cs | 68 ++++---- ...ratorTests.DTO.MyInternalClassBuilder.g.cs | 68 ++++---- ...O.RecordWithPrimaryConstructorBuilder.g.cs | 70 ++++---- ...BuilderGeneratorTests.DTO.TestBuilder.g.cs | 68 ++++---- ...uilderGeneratorTests.DTO.ThingBuilder.g.cs | 68 ++++---- ...BuilderGeneratorTests.DTO.UserBuilder.g.cs | 84 ++++----- ...derGeneratorTests.DTO.UserTBuilder_T_.g.cs | 68 ++++---- ...rTWithAddressAndConstructorBuilder_T_.g.cs | 72 ++++---- ...Tests.DTO.UserTWithAddressTBuilder_T_.g.cs | 72 ++++---- ...erGeneratorTests.DTO2.MyOptionBuilder.g.cs | 68 ++++---- 22 files changed, 854 insertions(+), 854 deletions(-) diff --git a/tests/FluentBuilderGeneratorTests/DTO/AbcTest.OtherNamespace.ClassOnOtherNamespaceBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/AbcTest.OtherNamespace.ClassOnOtherNamespaceBuilder.g.cs index 1220d93..5d6c418 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/AbcTest.OtherNamespace.ClassOnOtherNamespaceBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/AbcTest.OtherNamespace.ClassOnOtherNamespaceBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using AbcTest.OtherNamespace; - -namespace AbcTest.OtherNamespace -{ - public static partial class ClassOnOtherNamespaceBuilderExtensions - { - public static ClassOnOtherNamespaceBuilder AsBuilder(this AbcTest.OtherNamespace.ClassOnOtherNamespace instance) - { - return new ClassOnOtherNamespaceBuilder().UsingInstance(instance); - } - } - - public partial class ClassOnOtherNamespaceBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using AbcTest.OtherNamespace; + +namespace AbcTest.OtherNamespace +{ + public static partial class ClassOnOtherNamespaceBuilderExtensions + { + public static ClassOnOtherNamespaceBuilder AsBuilder(this AbcTest.OtherNamespace.ClassOnOtherNamespace instance) + { + return new ClassOnOtherNamespaceBuilder().UsingInstance(instance); + } + } + + public partial class ClassOnOtherNamespaceBuilder : Builder + { private bool _idIsSet; private Lazy _id = new Lazy(() => default(int)); public ClassOnOtherNamespaceBuilder WithId(int value) => WithId(() => value); @@ -36,7 +36,7 @@ public ClassOnOtherNamespaceBuilder WithId(Func func) _idIsSet = true; return this; } - + private bool _Constructor1204632294_IsSet; private Lazy _Constructor1204632294 = new Lazy(() => new AbcTest.OtherNamespace.ClassOnOtherNamespace() { @@ -59,7 +59,7 @@ public ClassOnOtherNamespaceBuilder UsingConstructor() return this; } - + public ClassOnOtherNamespaceBuilder UsingInstance(ClassOnOtherNamespace value) => UsingInstance(() => value); public ClassOnOtherNamespaceBuilder UsingInstance(Func func) @@ -105,7 +105,7 @@ public override ClassOnOtherNamespace Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/BuilderGeneratorTests.DTO.AddressBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/BuilderGeneratorTests.DTO.AddressBuilder.g.cs index 06e9c0c..fae200a 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/BuilderGeneratorTests.DTO.AddressBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/BuilderGeneratorTests.DTO.AddressBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class AddressBuilderExtensions - { - public static AddressBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Address instance) - { - return new AddressBuilder().UsingInstance(instance); - } - } - - public partial class AddressBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class AddressBuilderExtensions + { + public static AddressBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Address instance) + { + return new AddressBuilder().UsingInstance(instance); + } + } + + public partial class AddressBuilder : Builder + { private bool _houseNumberIsSet; private Lazy _houseNumber = new Lazy(() => default(int)); public AddressBuilder WithHouseNumber(int value) => WithHouseNumber(() => value); @@ -342,7 +342,7 @@ public AddressBuilder WithDictionary2(Action) builder.Build(useObjectInitializer); }); - + private bool _Constructor_1362952513_IsSet; private Lazy _Constructor_1362952513 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.Address() { @@ -365,7 +365,7 @@ public AddressBuilder UsingConstructor() return this; } - + public AddressBuilder UsingInstance(Address value) => UsingInstance(() => value); public AddressBuilder UsingInstance(Func
func) @@ -387,30 +387,30 @@ public override Address Build(bool useObjectInitializer) { instance = new Address { - HouseNumber = _houseNumber.Value, - City = _city.Value, - Array = _array.Value, - Array2 = _array2.Value, - ThingUsingConstructorWithItself = _thingUsingConstructorWithItself.Value, - ThingUsingConstructorWith2Parameters = _thingUsingConstructorWith2Parameters.Value, - ThingWithoutDefaultConstructor = _thingWithoutDefaultConstructor.Value, - ThingWithPrivateConstructor = _thingWithPrivateConstructor.Value, - Thing = _thing.Value, - ThingIsStruct = _thingIsStruct.Value, - IReadOnlyCollection = _iReadOnlyCollection.Value, - IReadOnlyCollectionThing = _iReadOnlyCollectionThing.Value, - IReadOnlyCollectionAddress = _iReadOnlyCollectionAddress.Value, - ReadOnlyCollection = _readOnlyCollection.Value, - IReadOnlyList = _iReadOnlyList.Value, - IReadOnlyListAddress = _iReadOnlyListAddress.Value, - Enumerable = _enumerable.Value, - Enumerable2 = _enumerable2.Value, - List = _list.Value, - List2 = _list2.Value, - Collection = _collection.Value, - Collection2 = _collection2.Value, - IDictionary = _iDictionary.Value, - IDictionary2 = _iDictionary2.Value, + HouseNumber = _houseNumber.Value, + City = _city.Value, + Array = _array.Value, + Array2 = _array2.Value, + ThingUsingConstructorWithItself = _thingUsingConstructorWithItself.Value, + ThingUsingConstructorWith2Parameters = _thingUsingConstructorWith2Parameters.Value, + ThingWithoutDefaultConstructor = _thingWithoutDefaultConstructor.Value, + ThingWithPrivateConstructor = _thingWithPrivateConstructor.Value, + Thing = _thing.Value, + ThingIsStruct = _thingIsStruct.Value, + IReadOnlyCollection = _iReadOnlyCollection.Value, + IReadOnlyCollectionThing = _iReadOnlyCollectionThing.Value, + IReadOnlyCollectionAddress = _iReadOnlyCollectionAddress.Value, + ReadOnlyCollection = _readOnlyCollection.Value, + IReadOnlyList = _iReadOnlyList.Value, + IReadOnlyListAddress = _iReadOnlyListAddress.Value, + Enumerable = _enumerable.Value, + Enumerable2 = _enumerable2.Value, + List = _list.Value, + List2 = _list2.Value, + Collection = _collection.Value, + Collection2 = _collection2.Value, + IDictionary = _iDictionary.Value, + IDictionary2 = _iDictionary2.Value, Dictionary2 = _dictionary2.Value }; @@ -424,30 +424,30 @@ public override Address Build(bool useObjectInitializer) }); } - if (_houseNumberIsSet) { Instance.Value.HouseNumber = _houseNumber.Value; } - if (_cityIsSet) { Instance.Value.City = _city.Value; } - if (_arrayIsSet) { Instance.Value.Array = _array.Value; } - if (_array2IsSet) { Instance.Value.Array2 = _array2.Value; } - if (_thingUsingConstructorWithItselfIsSet) { Instance.Value.ThingUsingConstructorWithItself = _thingUsingConstructorWithItself.Value; } - if (_thingUsingConstructorWith2ParametersIsSet) { Instance.Value.ThingUsingConstructorWith2Parameters = _thingUsingConstructorWith2Parameters.Value; } - if (_thingWithoutDefaultConstructorIsSet) { Instance.Value.ThingWithoutDefaultConstructor = _thingWithoutDefaultConstructor.Value; } - if (_thingWithPrivateConstructorIsSet) { Instance.Value.ThingWithPrivateConstructor = _thingWithPrivateConstructor.Value; } - if (_thingIsSet) { Instance.Value.Thing = _thing.Value; } - if (_thingIsStructIsSet) { Instance.Value.ThingIsStruct = _thingIsStruct.Value; } - if (_iReadOnlyCollectionIsSet) { Instance.Value.IReadOnlyCollection = _iReadOnlyCollection.Value; } - if (_iReadOnlyCollectionThingIsSet) { Instance.Value.IReadOnlyCollectionThing = _iReadOnlyCollectionThing.Value; } - if (_iReadOnlyCollectionAddressIsSet) { Instance.Value.IReadOnlyCollectionAddress = _iReadOnlyCollectionAddress.Value; } - if (_readOnlyCollectionIsSet) { Instance.Value.ReadOnlyCollection = _readOnlyCollection.Value; } - if (_iReadOnlyListIsSet) { Instance.Value.IReadOnlyList = _iReadOnlyList.Value; } - if (_iReadOnlyListAddressIsSet) { Instance.Value.IReadOnlyListAddress = _iReadOnlyListAddress.Value; } - if (_enumerableIsSet) { Instance.Value.Enumerable = _enumerable.Value; } - if (_enumerable2IsSet) { Instance.Value.Enumerable2 = _enumerable2.Value; } - if (_listIsSet) { Instance.Value.List = _list.Value; } - if (_list2IsSet) { Instance.Value.List2 = _list2.Value; } - if (_collectionIsSet) { Instance.Value.Collection = _collection.Value; } - if (_collection2IsSet) { Instance.Value.Collection2 = _collection2.Value; } - if (_iDictionaryIsSet) { Instance.Value.IDictionary = _iDictionary.Value; } - if (_iDictionary2IsSet) { Instance.Value.IDictionary2 = _iDictionary2.Value; } + if (_houseNumberIsSet) { Instance.Value.HouseNumber = _houseNumber.Value; } + if (_cityIsSet) { Instance.Value.City = _city.Value; } + if (_arrayIsSet) { Instance.Value.Array = _array.Value; } + if (_array2IsSet) { Instance.Value.Array2 = _array2.Value; } + if (_thingUsingConstructorWithItselfIsSet) { Instance.Value.ThingUsingConstructorWithItself = _thingUsingConstructorWithItself.Value; } + if (_thingUsingConstructorWith2ParametersIsSet) { Instance.Value.ThingUsingConstructorWith2Parameters = _thingUsingConstructorWith2Parameters.Value; } + if (_thingWithoutDefaultConstructorIsSet) { Instance.Value.ThingWithoutDefaultConstructor = _thingWithoutDefaultConstructor.Value; } + if (_thingWithPrivateConstructorIsSet) { Instance.Value.ThingWithPrivateConstructor = _thingWithPrivateConstructor.Value; } + if (_thingIsSet) { Instance.Value.Thing = _thing.Value; } + if (_thingIsStructIsSet) { Instance.Value.ThingIsStruct = _thingIsStruct.Value; } + if (_iReadOnlyCollectionIsSet) { Instance.Value.IReadOnlyCollection = _iReadOnlyCollection.Value; } + if (_iReadOnlyCollectionThingIsSet) { Instance.Value.IReadOnlyCollectionThing = _iReadOnlyCollectionThing.Value; } + if (_iReadOnlyCollectionAddressIsSet) { Instance.Value.IReadOnlyCollectionAddress = _iReadOnlyCollectionAddress.Value; } + if (_readOnlyCollectionIsSet) { Instance.Value.ReadOnlyCollection = _readOnlyCollection.Value; } + if (_iReadOnlyListIsSet) { Instance.Value.IReadOnlyList = _iReadOnlyList.Value; } + if (_iReadOnlyListAddressIsSet) { Instance.Value.IReadOnlyListAddress = _iReadOnlyListAddress.Value; } + if (_enumerableIsSet) { Instance.Value.Enumerable = _enumerable.Value; } + if (_enumerable2IsSet) { Instance.Value.Enumerable2 = _enumerable2.Value; } + if (_listIsSet) { Instance.Value.List = _list.Value; } + if (_list2IsSet) { Instance.Value.List2 = _list2.Value; } + if (_collectionIsSet) { Instance.Value.Collection = _collection.Value; } + if (_collection2IsSet) { Instance.Value.Collection2 = _collection2.Value; } + if (_iDictionaryIsSet) { Instance.Value.IDictionary = _iDictionary.Value; } + if (_iDictionary2IsSet) { Instance.Value.IDictionary2 = _iDictionary2.Value; } if (_dictionary2IsSet) { Instance.Value.Dictionary2 = _dictionary2.Value; } PostBuild(Instance.Value); @@ -459,7 +459,7 @@ public override Address Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.AddressBuilder_T_.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.AddressBuilder_T_.g.cs index ac6def4..f853f70 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.AddressBuilder_T_.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.AddressBuilder_T_.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class AddressBuilder_T_Extensions - { - public static AddressBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Address instance) where T : struct - { - return new AddressBuilder().UsingInstance(instance); - } - } - - public partial class AddressBuilder : Builder> where T : struct - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class AddressBuilder_T_Extensions + { + public static AddressBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Address instance) where T : struct + { + return new AddressBuilder().UsingInstance(instance); + } + } + + public partial class AddressBuilder : Builder> where T : struct + { private bool _streetIsSet; private Lazy _street = new Lazy(() => default(T)); public AddressBuilder WithStreet(T value) => WithStreet(() => value); @@ -36,7 +36,7 @@ public AddressBuilder WithStreet(Func func) _streetIsSet = true; return this; } - + private bool _Constructor478882805_IsSet; private Lazy> _Constructor478882805 = new Lazy>(() => new FluentBuilderGeneratorTests.DTO.Address() { @@ -59,7 +59,7 @@ public AddressBuilder UsingConstructor() return this; } - + public AddressBuilder UsingInstance(Address value) => UsingInstance(() => value); public AddressBuilder UsingInstance(Func> func) @@ -105,7 +105,7 @@ public override Address Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.AddressTTBuilder_T1_T2_.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.AddressTTBuilder_T1_T2_.g.cs index a1764e9..52838b8 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.AddressTTBuilder_T1_T2_.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.AddressTTBuilder_T1_T2_.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class AddressTTBuilder_T1_T2_Extensions - { - public static AddressTTBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.AddressTT instance) where T1 : struct where T2 : class, new() - { - return new AddressTTBuilder().UsingInstance(instance); - } - } - - public partial class AddressTTBuilder : Builder> where T1 : struct where T2 : class, new() - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class AddressTTBuilder_T1_T2_Extensions + { + public static AddressTTBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.AddressTT instance) where T1 : struct where T2 : class, new() + { + return new AddressTTBuilder().UsingInstance(instance); + } + } + + public partial class AddressTTBuilder : Builder> where T1 : struct where T2 : class, new() + { private bool _testValue1IsSet; private Lazy _testValue1 = new Lazy(() => default(T1)); public AddressTTBuilder WithTestValue1(T1 value) => WithTestValue1(() => value); @@ -45,7 +45,7 @@ public AddressTTBuilder WithTestValue2(Func func) _testValue2IsSet = true; return this; } - + private bool _Constructor_758958168_IsSet; private Lazy> _Constructor_758958168 = new Lazy>(() => new FluentBuilderGeneratorTests.DTO.AddressTT() { @@ -68,7 +68,7 @@ public AddressTTBuilder UsingConstructor() return this; } - + public AddressTTBuilder UsingInstance(AddressTT value) => UsingInstance(() => value); public AddressTTBuilder UsingInstance(Func> func) @@ -90,7 +90,7 @@ public override AddressTT Build(bool useObjectInitializer) { instance = new AddressTT { - TestValue1 = _testValue1.Value, + TestValue1 = _testValue1.Value, TestValue2 = _testValue2.Value }; @@ -104,7 +104,7 @@ public override AddressTT Build(bool useObjectInitializer) }); } - if (_testValue1IsSet) { Instance.Value.TestValue1 = _testValue1.Value; } + if (_testValue1IsSet) { Instance.Value.TestValue1 = _testValue1.Value; } if (_testValue2IsSet) { Instance.Value.TestValue2 = _testValue2.Value; } PostBuild(Instance.Value); @@ -116,7 +116,7 @@ public override AddressTT Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithConstructorParamMatchingPropertyBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithConstructorParamMatchingPropertyBuilder.g.cs index 3b67742..7020b69 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithConstructorParamMatchingPropertyBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithConstructorParamMatchingPropertyBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class ClassWithConstructorParamMatchingPropertyBuilderExtensions - { - public static ClassWithConstructorParamMatchingPropertyBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithConstructorParamMatchingProperty instance) - { - return new ClassWithConstructorParamMatchingPropertyBuilder().UsingInstance(instance); - } - } - - public partial class ClassWithConstructorParamMatchingPropertyBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class ClassWithConstructorParamMatchingPropertyBuilderExtensions + { + public static ClassWithConstructorParamMatchingPropertyBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithConstructorParamMatchingProperty instance) + { + return new ClassWithConstructorParamMatchingPropertyBuilder().UsingInstance(instance); + } + } + + public partial class ClassWithConstructorParamMatchingPropertyBuilder : Builder + { private bool _typeIsSet; private Lazy _type = new Lazy(() => default(FluentBuilderGeneratorTests.DTO.StageType)); public ClassWithConstructorParamMatchingPropertyBuilder WithType(FluentBuilderGeneratorTests.DTO.StageType value) => WithType(() => value); @@ -45,7 +45,7 @@ public ClassWithConstructorParamMatchingPropertyBuilder WithName(Func fu _nameIsSet = true; return this; } - + private bool _Constructor1653456255_IsSet; private Lazy _Constructor1653456255 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.ClassWithConstructorParamMatchingProperty(default(FluentBuilderGeneratorTests.DTO.StageType)) { @@ -68,7 +68,7 @@ public ClassWithConstructorParamMatchingPropertyBuilder UsingConstructor(FluentB return this; } - + public ClassWithConstructorParamMatchingPropertyBuilder UsingInstance(ClassWithConstructorParamMatchingProperty value) => UsingInstance(() => value); public ClassWithConstructorParamMatchingPropertyBuilder UsingInstance(Func func) @@ -98,7 +98,7 @@ public override ClassWithConstructorParamMatchingProperty Build(bool useObjectIn }); } - if (_typeIsSet) { Instance.Value.Type = _type.Value; } + if (_typeIsSet) { Instance.Value.Type = _type.Value; } if (_nameIsSet) { Instance.Value.Name = _name.Value; } PostBuild(Instance.Value); @@ -110,7 +110,7 @@ public override ClassWithConstructorParamMatchingProperty Build(bool useObjectIn { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithFuncAndActionBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithFuncAndActionBuilder.g.cs index f70d9e7..801a420 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithFuncAndActionBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithFuncAndActionBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class ClassWithFuncAndActionBuilderExtensions - { - public static ClassWithFuncAndActionBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithFuncAndAction instance) - { - return new ClassWithFuncAndActionBuilder().UsingInstance(instance); - } - } - - public partial class ClassWithFuncAndActionBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class ClassWithFuncAndActionBuilderExtensions + { + public static ClassWithFuncAndActionBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithFuncAndAction instance) + { + return new ClassWithFuncAndActionBuilder().UsingInstance(instance); + } + } + + public partial class ClassWithFuncAndActionBuilder : Builder + { private bool _func1IsSet; private Lazy> _func1 = new Lazy>(() => new System.Func((_) => string.Empty)); public ClassWithFuncAndActionBuilder WithFunc1(System.Func value) => WithFunc1(() => value); @@ -63,7 +63,7 @@ public ClassWithFuncAndActionBuilder WithAction(Func> func) _actionIsSet = true; return this; } - + private bool _Constructor_1844167085_IsSet; private Lazy _Constructor_1844167085 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.ClassWithFuncAndAction() { @@ -86,7 +86,7 @@ public ClassWithFuncAndActionBuilder UsingConstructor() return this; } - + public ClassWithFuncAndActionBuilder UsingInstance(ClassWithFuncAndAction value) => UsingInstance(() => value); public ClassWithFuncAndActionBuilder UsingInstance(Func func) @@ -108,9 +108,9 @@ public override ClassWithFuncAndAction Build(bool useObjectInitializer) { instance = new ClassWithFuncAndAction { - Func1 = _func1.Value, - Func2 = _func2.Value, - FuncNull = _funcNull.Value, + Func1 = _func1.Value, + Func2 = _func2.Value, + FuncNull = _funcNull.Value, Action = _action.Value }; @@ -124,9 +124,9 @@ public override ClassWithFuncAndAction Build(bool useObjectInitializer) }); } - if (_func1IsSet) { Instance.Value.Func1 = _func1.Value; } - if (_func2IsSet) { Instance.Value.Func2 = _func2.Value; } - if (_funcNullIsSet) { Instance.Value.FuncNull = _funcNull.Value; } + if (_func1IsSet) { Instance.Value.Func1 = _func1.Value; } + if (_func2IsSet) { Instance.Value.Func2 = _func2.Value; } + if (_funcNullIsSet) { Instance.Value.FuncNull = _funcNull.Value; } if (_actionIsSet) { Instance.Value.Action = _action.Value; } PostBuild(Instance.Value); @@ -138,7 +138,7 @@ public override ClassWithFuncAndAction Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithInitPropertiesBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithInitPropertiesBuilder.g.cs index 841cea2..db729d8 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithInitPropertiesBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithInitPropertiesBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class ClassWithInitPropertiesBuilderExtensions - { - public static ClassWithInitPropertiesBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithInitProperties instance) - { - return new ClassWithInitPropertiesBuilder().UsingInstance(instance); - } - } - - public partial class ClassWithInitPropertiesBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class ClassWithInitPropertiesBuilderExtensions + { + public static ClassWithInitPropertiesBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithInitProperties instance) + { + return new ClassWithInitPropertiesBuilder().UsingInstance(instance); + } + } + + public partial class ClassWithInitPropertiesBuilder : Builder + { private bool _normalIsSet; private Lazy _normal = new Lazy(() => string.Empty); public ClassWithInitPropertiesBuilder WithNormal(string value) => WithNormal(() => value); @@ -73,12 +73,12 @@ public ClassWithInitPropertiesBuilder WithX(Func(func); return this; } - + private bool _Constructor1040722879_IsSet; private Lazy _Constructor1040722879 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.ClassWithInitProperties() { - RequiredTest = string.Empty, - RequiredTestInit = string.Empty, + RequiredTest = string.Empty, + RequiredTestInit = string.Empty, X = new FluentBuilderGeneratorTests.DTO.ClassWithInitProperties2() { X = string.Empty } }); public ClassWithInitPropertiesBuilder UsingConstructor() @@ -90,8 +90,8 @@ public ClassWithInitPropertiesBuilder UsingConstructor() ) { - RequiredTest = string.Empty, - RequiredTestInit = string.Empty, + RequiredTest = string.Empty, + RequiredTestInit = string.Empty, X = new FluentBuilderGeneratorTests.DTO.ClassWithInitProperties2() { X = string.Empty } }; }); @@ -100,7 +100,7 @@ public ClassWithInitPropertiesBuilder UsingConstructor() return this; } - + public ClassWithInitPropertiesBuilder UsingInstance(ClassWithInitProperties value) => UsingInstance(() => value); public ClassWithInitPropertiesBuilder UsingInstance(Func func) @@ -122,11 +122,11 @@ public override ClassWithInitProperties Build(bool useObjectInitializer) { instance = new ClassWithInitProperties { - Normal = _normal.Value, - SiteId = _siteId.Value, - ProductName = _productName.Value, - RequiredTest = _requiredTest.Value, - RequiredTestInit = _requiredTestInit.Value, + Normal = _normal.Value, + SiteId = _siteId.Value, + ProductName = _productName.Value, + RequiredTest = _requiredTest.Value, + RequiredTestInit = _requiredTestInit.Value, X = _x.Value }; @@ -140,7 +140,7 @@ public override ClassWithInitProperties Build(bool useObjectInitializer) }); } - if (_normalIsSet) { Instance.Value.Normal = _normal.Value; } + if (_normalIsSet) { Instance.Value.Normal = _normal.Value; } if (_requiredTestIsSet) { Instance.Value.RequiredTest = _requiredTest.Value; } PostBuild(Instance.Value); @@ -150,11 +150,11 @@ public override ClassWithInitProperties Build(bool useObjectInitializer) public static ClassWithInitProperties Default() => new ClassWithInitProperties() { - RequiredTest = string.Empty, - RequiredTestInit = string.Empty, + RequiredTest = string.Empty, + RequiredTestInit = string.Empty, X = new FluentBuilderGeneratorTests.DTO.ClassWithInitProperties2() { X = string.Empty } }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrimaryConstructorBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrimaryConstructorBuilder.g.cs index 0537306..5ae89ec 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrimaryConstructorBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrimaryConstructorBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class ClassWithPrimaryConstructorBuilderExtensions - { - public static ClassWithPrimaryConstructorBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithPrimaryConstructor instance) - { - return new ClassWithPrimaryConstructorBuilder().UsingInstance(instance); - } - } - - public partial class ClassWithPrimaryConstructorBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class ClassWithPrimaryConstructorBuilderExtensions + { + public static ClassWithPrimaryConstructorBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithPrimaryConstructor instance) + { + return new ClassWithPrimaryConstructorBuilder().UsingInstance(instance); + } + } + + public partial class ClassWithPrimaryConstructorBuilder : Builder + { private Lazy _test = new Lazy(() => string.Empty); public ClassWithPrimaryConstructorBuilder WithTest(string value) => WithTest(() => value); public ClassWithPrimaryConstructorBuilder WithTest(Func func) @@ -50,7 +50,7 @@ public ClassWithPrimaryConstructorBuilder WithNormal(Func func) _normalIsSet = true; return this; } - + private bool _Constructor827069805_IsSet; private Lazy _Constructor827069805 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.ClassWithPrimaryConstructor(string.Empty,default(int)) { @@ -62,7 +62,7 @@ public ClassWithPrimaryConstructorBuilder UsingConstructor(string test, int num) { return new FluentBuilderGeneratorTests.DTO.ClassWithPrimaryConstructor ( - test, + test, num ) { @@ -74,7 +74,7 @@ public ClassWithPrimaryConstructorBuilder UsingConstructor(string test, int num) return this; } - + public ClassWithPrimaryConstructorBuilder UsingInstance(ClassWithPrimaryConstructor value) => UsingInstance(() => value); public ClassWithPrimaryConstructorBuilder UsingInstance(Func func) @@ -115,7 +115,7 @@ public override ClassWithPrimaryConstructor Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter1Builder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter1Builder.g.cs index 8d3f256..c4bde17 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter1Builder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter1Builder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class ClassWithPrivateSetter1BuilderExtensions - { - public static ClassWithPrivateSetter1Builder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter1 instance) - { - return new ClassWithPrivateSetter1Builder().UsingInstance(instance); - } - } - - public partial class ClassWithPrivateSetter1Builder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class ClassWithPrivateSetter1BuilderExtensions + { + public static ClassWithPrivateSetter1Builder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter1 instance) + { + return new ClassWithPrivateSetter1Builder().UsingInstance(instance); + } + } + + public partial class ClassWithPrivateSetter1Builder : Builder + { private bool _value2IsSet; private Lazy _value2 = new Lazy(() => default(int)); public ClassWithPrivateSetter1Builder WithValue2(int value) => WithValue2(() => value); @@ -45,7 +45,7 @@ public ClassWithPrivateSetter1Builder WithValue1(Func func) _value1IsSet = true; return this; } - + private bool _Constructor126242367_IsSet; private Lazy _Constructor126242367 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter1() { @@ -68,7 +68,7 @@ public ClassWithPrivateSetter1Builder UsingConstructor() return this; } - + private void SetValue1(ClassWithPrivateSetter1 instance, int value) { InstanceType.GetProperty("Value1")?.SetValue(instance, value); @@ -119,7 +119,7 @@ public override ClassWithPrivateSetter1 Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter2Builder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter2Builder.g.cs index cd70baf..d8dece6 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter2Builder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter2Builder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class ClassWithPrivateSetter2BuilderExtensions - { - public static ClassWithPrivateSetter2Builder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter2 instance) - { - return new ClassWithPrivateSetter2Builder().UsingInstance(instance); - } - } - - public partial class ClassWithPrivateSetter2Builder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class ClassWithPrivateSetter2BuilderExtensions + { + public static ClassWithPrivateSetter2Builder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter2 instance) + { + return new ClassWithPrivateSetter2Builder().UsingInstance(instance); + } + } + + public partial class ClassWithPrivateSetter2Builder : Builder + { private bool _value2IsSet; private Lazy _value2 = new Lazy(() => default(int)); public ClassWithPrivateSetter2Builder WithValue2(int value) => WithValue2(() => value); @@ -36,7 +36,7 @@ public ClassWithPrivateSetter2Builder WithValue2(Func func) _value2IsSet = true; return this; } - + private bool _Constructor1164815551_IsSet; private Lazy _Constructor1164815551 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.ClassWithPrivateSetter2() { @@ -59,7 +59,7 @@ public ClassWithPrivateSetter2Builder UsingConstructor() return this; } - + public ClassWithPrivateSetter2Builder UsingInstance(ClassWithPrivateSetter2 value) => UsingInstance(() => value); public ClassWithPrivateSetter2Builder UsingInstance(Func func) @@ -105,7 +105,7 @@ public override ClassWithPrivateSetter2 Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPropertyValueSetBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPropertyValueSetBuilder.g.cs index 149602c..097b747 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPropertyValueSetBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ClassWithPropertyValueSetBuilder.g.cs @@ -1,35 +1,35 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; -using System.Globalization; -using MyNamespace; -using MyNamespace2; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class ClassWithPropertyValueSetBuilderExtensions - { - public static ClassWithPropertyValueSetBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithPropertyValueSet instance) - { - return new ClassWithPropertyValueSetBuilder().UsingInstance(instance); - } - } - - public partial class ClassWithPropertyValueSetBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; +using System.Globalization; +using MyNamespace; +using MyNamespace2; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class ClassWithPropertyValueSetBuilderExtensions + { + public static ClassWithPropertyValueSetBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.ClassWithPropertyValueSet instance) + { + return new ClassWithPropertyValueSetBuilder().UsingInstance(instance); + } + } + + public partial class ClassWithPropertyValueSetBuilder : Builder + { private bool _noIntValueSetIsSet; private Lazy _noIntValueSet = new Lazy(() => default(int)); public ClassWithPropertyValueSetBuilder WithNoIntValueSet(int value) => WithNoIntValueSet(() => value); @@ -129,7 +129,7 @@ public ClassWithPropertyValueSetBuilder WithStringEmpty(Func func) _stringEmptyIsSet = true; return this; } - + private bool _Constructor_1318089537_IsSet; private Lazy _Constructor_1318089537 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.ClassWithPropertyValueSet() { @@ -152,7 +152,7 @@ public ClassWithPropertyValueSetBuilder UsingConstructor() return this; } - + public ClassWithPropertyValueSetBuilder UsingInstance(ClassWithPropertyValueSet value) => UsingInstance(() => value); public ClassWithPropertyValueSetBuilder UsingInstance(Func func) @@ -174,16 +174,16 @@ public override ClassWithPropertyValueSet Build(bool useObjectInitializer) { instance = new ClassWithPropertyValueSet { - NoIntValueSet = _noIntValueSet.Value, - IntValueSet1 = _intValueSet1.Value, - IntValueSet2 = _intValueSet2.Value, - Locale = _locale.Value, - Locale2 = _locale2.Value, - Locale3 = _locale3.Value, - Locale4 = _locale4.Value, - Locale5 = _locale5.Value, - SuppressNullableWarningExpression = _suppressNullableWarningExpression.Value, - StringNull = _stringNull.Value, + NoIntValueSet = _noIntValueSet.Value, + IntValueSet1 = _intValueSet1.Value, + IntValueSet2 = _intValueSet2.Value, + Locale = _locale.Value, + Locale2 = _locale2.Value, + Locale3 = _locale3.Value, + Locale4 = _locale4.Value, + Locale5 = _locale5.Value, + SuppressNullableWarningExpression = _suppressNullableWarningExpression.Value, + StringNull = _stringNull.Value, StringEmpty = _stringEmpty.Value }; @@ -197,16 +197,16 @@ public override ClassWithPropertyValueSet Build(bool useObjectInitializer) }); } - if (_noIntValueSetIsSet) { Instance.Value.NoIntValueSet = _noIntValueSet.Value; } - if (_intValueSet1IsSet) { Instance.Value.IntValueSet1 = _intValueSet1.Value; } - if (_intValueSet2IsSet) { Instance.Value.IntValueSet2 = _intValueSet2.Value; } - if (_localeIsSet) { Instance.Value.Locale = _locale.Value; } - if (_locale2IsSet) { Instance.Value.Locale2 = _locale2.Value; } - if (_locale3IsSet) { Instance.Value.Locale3 = _locale3.Value; } - if (_locale4IsSet) { Instance.Value.Locale4 = _locale4.Value; } - if (_locale5IsSet) { Instance.Value.Locale5 = _locale5.Value; } - if (_suppressNullableWarningExpressionIsSet) { Instance.Value.SuppressNullableWarningExpression = _suppressNullableWarningExpression.Value; } - if (_stringNullIsSet) { Instance.Value.StringNull = _stringNull.Value; } + if (_noIntValueSetIsSet) { Instance.Value.NoIntValueSet = _noIntValueSet.Value; } + if (_intValueSet1IsSet) { Instance.Value.IntValueSet1 = _intValueSet1.Value; } + if (_intValueSet2IsSet) { Instance.Value.IntValueSet2 = _intValueSet2.Value; } + if (_localeIsSet) { Instance.Value.Locale = _locale.Value; } + if (_locale2IsSet) { Instance.Value.Locale2 = _locale2.Value; } + if (_locale3IsSet) { Instance.Value.Locale3 = _locale3.Value; } + if (_locale4IsSet) { Instance.Value.Locale4 = _locale4.Value; } + if (_locale5IsSet) { Instance.Value.Locale5 = _locale5.Value; } + if (_suppressNullableWarningExpressionIsSet) { Instance.Value.SuppressNullableWarningExpression = _suppressNullableWarningExpression.Value; } + if (_stringNullIsSet) { Instance.Value.StringNull = _stringNull.Value; } if (_stringEmptyIsSet) { Instance.Value.StringEmpty = _stringEmpty.Value; } PostBuild(Instance.Value); @@ -218,7 +218,7 @@ public override ClassWithPropertyValueSet Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.InternalClassBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.InternalClassBuilder.g.cs index dfc2b67..67443bb 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.InternalClassBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.InternalClassBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class InternalClassBuilderExtensions - { - internal static InternalClassBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.InternalClass instance) - { - return new InternalClassBuilder().UsingInstance(instance); - } - } - - internal partial class InternalClassBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class InternalClassBuilderExtensions + { + internal static InternalClassBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.InternalClass instance) + { + return new InternalClassBuilder().UsingInstance(instance); + } + } + + internal partial class InternalClassBuilder : Builder + { private bool _idIsSet; private Lazy _id = new Lazy(() => default(int)); public InternalClassBuilder WithId(int value) => WithId(() => value); @@ -36,7 +36,7 @@ public InternalClassBuilder WithId(Func func) _idIsSet = true; return this; } - + private bool _Constructor_1847127841_IsSet; private Lazy _Constructor_1847127841 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.InternalClass() { @@ -59,7 +59,7 @@ public InternalClassBuilder UsingConstructor() return this; } - + public InternalClassBuilder UsingInstance(InternalClass value) => UsingInstance(() => value); public InternalClassBuilder UsingInstance(Func func) @@ -105,7 +105,7 @@ public override InternalClass Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.MyDummyClassBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.MyDummyClassBuilder.g.cs index d3b8157..a399bb8 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.MyDummyClassBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.MyDummyClassBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class MyDummyClassBuilderExtensions - { - public static MyDummyClassBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.DummyClass instance) - { - return new MyDummyClassBuilder().UsingInstance(instance); - } - } - - public partial class MyDummyClassBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class MyDummyClassBuilderExtensions + { + public static MyDummyClassBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.DummyClass instance) + { + return new MyDummyClassBuilder().UsingInstance(instance); + } + } + + public partial class MyDummyClassBuilder : Builder + { private bool _idIsSet; private Lazy _id = new Lazy(() => default(int)); public MyDummyClassBuilder WithId(int value) => WithId(() => value); @@ -36,7 +36,7 @@ public MyDummyClassBuilder WithId(Func func) _idIsSet = true; return this; } - + private bool _Constructor921673711_IsSet; private Lazy _Constructor921673711 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.DummyClass() { @@ -59,7 +59,7 @@ public MyDummyClassBuilder UsingConstructor() return this; } - + public MyDummyClassBuilder UsingInstance(DummyClass value) => UsingInstance(() => value); public MyDummyClassBuilder UsingInstance(Func func) @@ -105,7 +105,7 @@ public override DummyClass Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.MyInternalClassBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.MyInternalClassBuilder.g.cs index e2a65d9..23afecb 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.MyInternalClassBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.MyInternalClassBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class MyInternalClassBuilderExtensions - { - internal static MyInternalClassBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.InternalClass instance) - { - return new MyInternalClassBuilder().UsingInstance(instance); - } - } - - internal partial class MyInternalClassBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class MyInternalClassBuilderExtensions + { + internal static MyInternalClassBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.InternalClass instance) + { + return new MyInternalClassBuilder().UsingInstance(instance); + } + } + + internal partial class MyInternalClassBuilder : Builder + { private bool _idIsSet; private Lazy _id = new Lazy(() => default(int)); public MyInternalClassBuilder WithId(int value) => WithId(() => value); @@ -36,7 +36,7 @@ public MyInternalClassBuilder WithId(Func func) _idIsSet = true; return this; } - + private bool _Constructor_1847127841_IsSet; private Lazy _Constructor_1847127841 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.InternalClass() { @@ -59,7 +59,7 @@ public MyInternalClassBuilder UsingConstructor() return this; } - + public MyInternalClassBuilder UsingInstance(InternalClass value) => UsingInstance(() => value); public MyInternalClassBuilder UsingInstance(Func func) @@ -105,7 +105,7 @@ public override InternalClass Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.RecordWithPrimaryConstructorBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.RecordWithPrimaryConstructorBuilder.g.cs index a03ab1f..405615d 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.RecordWithPrimaryConstructorBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.RecordWithPrimaryConstructorBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class RecordWithPrimaryConstructorBuilderExtensions - { - public static RecordWithPrimaryConstructorBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.RecordWithPrimaryConstructor instance) - { - return new RecordWithPrimaryConstructorBuilder().UsingInstance(instance); - } - } - - public partial class RecordWithPrimaryConstructorBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class RecordWithPrimaryConstructorBuilderExtensions + { + public static RecordWithPrimaryConstructorBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.RecordWithPrimaryConstructor instance) + { + return new RecordWithPrimaryConstructorBuilder().UsingInstance(instance); + } + } + + public partial class RecordWithPrimaryConstructorBuilder : Builder + { private Lazy _test = new Lazy(() => string.Empty); public RecordWithPrimaryConstructorBuilder WithTest(string value) => WithTest(() => value); public RecordWithPrimaryConstructorBuilder WithTest(Func func) @@ -50,7 +50,7 @@ public RecordWithPrimaryConstructorBuilder WithNormal(Func func) _normalIsSet = true; return this; } - + private bool _Constructor_380013639_IsSet; private Lazy _Constructor_380013639 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.RecordWithPrimaryConstructor(string.Empty,default(int)) { @@ -62,7 +62,7 @@ public RecordWithPrimaryConstructorBuilder UsingConstructor(string Test, int Num { return new FluentBuilderGeneratorTests.DTO.RecordWithPrimaryConstructor ( - Test, + Test, Num ) { @@ -74,7 +74,7 @@ public RecordWithPrimaryConstructorBuilder UsingConstructor(string Test, int Num return this; } - + public RecordWithPrimaryConstructorBuilder UsingInstance(RecordWithPrimaryConstructor value) => UsingInstance(() => value); public RecordWithPrimaryConstructorBuilder UsingInstance(Func func) @@ -115,7 +115,7 @@ public override RecordWithPrimaryConstructor Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.TestBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.TestBuilder.g.cs index f4545c2..02430f2 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.TestBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.TestBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class TestBuilderExtensions - { - public static TestBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Test instance) - { - return new TestBuilder().UsingInstance(instance); - } - } - - public partial class TestBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class TestBuilderExtensions + { + public static TestBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Test instance) + { + return new TestBuilder().UsingInstance(instance); + } + } + + public partial class TestBuilder : Builder + { private bool _classOnOtherNamespaceListIsSet; private Lazy> _classOnOtherNamespaceList = new Lazy>(() => new List()); public TestBuilder WithClassOnOtherNamespaceList(System.Collections.Generic.List value) => WithClassOnOtherNamespaceList(() => value); @@ -42,7 +42,7 @@ public TestBuilder WithClassOnOtherNamespaceList(Action) builder.Build(useObjectInitializer); }); - + private bool _Constructor1204588943_IsSet; private Lazy _Constructor1204588943 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.Test() { @@ -65,7 +65,7 @@ public TestBuilder UsingConstructor() return this; } - + public TestBuilder UsingInstance(Test value) => UsingInstance(() => value); public TestBuilder UsingInstance(Func func) @@ -111,7 +111,7 @@ public override Test Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ThingBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ThingBuilder.g.cs index f4a643b..991f390 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ThingBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.ThingBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class ThingBuilderExtensions - { - public static ThingBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Thing instance) - { - return new ThingBuilder().UsingInstance(instance); - } - } - - public partial class ThingBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class ThingBuilderExtensions + { + public static ThingBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Thing instance) + { + return new ThingBuilder().UsingInstance(instance); + } + } + + public partial class ThingBuilder : Builder + { private bool _tIsSet; private Lazy _t = new Lazy(() => new FluentBuilderGeneratorTests.DTO.Thing() { }); public ThingBuilder WithT(FluentBuilderGeneratorTests.DTO.Thing value) => WithT(() => value); @@ -42,7 +42,7 @@ public ThingBuilder WithT(Action a action(builder); return builder.Build(useObjectInitializer); }); - + private bool _Constructor_759650433_IsSet; private Lazy _Constructor_759650433 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.Thing() { @@ -65,7 +65,7 @@ public ThingBuilder UsingConstructor() return this; } - + public ThingBuilder UsingInstance(Thing value) => UsingInstance(() => value); public ThingBuilder UsingInstance(Func func) @@ -111,7 +111,7 @@ public override Thing Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserBuilder.g.cs index 6b616a3..6e04a54 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class UserBuilderExtensions - { - public static UserBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.User instance) - { - return new UserBuilder().UsingInstance(instance); - } - } - - public partial class UserBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class UserBuilderExtensions + { + public static UserBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.User instance) + { + return new UserBuilder().UsingInstance(instance); + } + } + + public partial class UserBuilder : Builder + { private bool _firstNameIsSet; private Lazy _firstName = new Lazy(() => string.Empty); public UserBuilder WithFirstName(string value) => WithFirstName(() => value); @@ -84,7 +84,7 @@ public UserBuilder WithOptions(Action) builder.Build(useObjectInitializer); }); - + private bool _Constructor_1436654309_IsSet; private Lazy _Constructor_1436654309 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.User() { @@ -107,7 +107,7 @@ public UserBuilder UsingConstructor() return this; } - + public UserBuilder UsingInstance(User value) => UsingInstance(() => value); public UserBuilder UsingInstance(Func func) @@ -129,10 +129,10 @@ public override User Build(bool useObjectInitializer) { instance = new User { - FirstName = _firstName.Value, - LastName = _lastName.Value, - QuitDate = _quitDate.Value, - TestDummyClass = _testDummyClass.Value, + FirstName = _firstName.Value, + LastName = _lastName.Value, + QuitDate = _quitDate.Value, + TestDummyClass = _testDummyClass.Value, Options = _options.Value }; @@ -146,10 +146,10 @@ public override User Build(bool useObjectInitializer) }); } - if (_firstNameIsSet) { Instance.Value.FirstName = _firstName.Value; } - if (_lastNameIsSet) { Instance.Value.LastName = _lastName.Value; } - if (_quitDateIsSet) { Instance.Value.QuitDate = _quitDate.Value; } - if (_testDummyClassIsSet) { Instance.Value.TestDummyClass = _testDummyClass.Value; } + if (_firstNameIsSet) { Instance.Value.FirstName = _firstName.Value; } + if (_lastNameIsSet) { Instance.Value.LastName = _lastName.Value; } + if (_quitDateIsSet) { Instance.Value.QuitDate = _quitDate.Value; } + if (_testDummyClassIsSet) { Instance.Value.TestDummyClass = _testDummyClass.Value; } if (_optionsIsSet) { Instance.Value.Options = _options.Value; } PostBuild(Instance.Value); @@ -161,7 +161,7 @@ public override User Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTBuilder_T_.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTBuilder_T_.g.cs index 9e121fa..27f4f1d 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTBuilder_T_.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTBuilder_T_.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class UserTBuilder_T_Extensions - { - public static UserTBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.UserT instance) where T : struct - { - return new UserTBuilder().UsingInstance(instance); - } - } - - public partial class UserTBuilder : Builder> where T : struct - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class UserTBuilder_T_Extensions + { + public static UserTBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.UserT instance) where T : struct + { + return new UserTBuilder().UsingInstance(instance); + } + } + + public partial class UserTBuilder : Builder> where T : struct + { private bool _tValueIsSet; private Lazy _tValue = new Lazy(() => default(T)); public UserTBuilder WithTValue(T value) => WithTValue(() => value); @@ -36,7 +36,7 @@ public UserTBuilder WithTValue(Func func) _tValueIsSet = true; return this; } - + private bool _Constructor302462813_IsSet; private Lazy> _Constructor302462813 = new Lazy>(() => new FluentBuilderGeneratorTests.DTO.UserT() { @@ -59,7 +59,7 @@ public UserTBuilder UsingConstructor() return this; } - + public UserTBuilder UsingInstance(UserT value) => UsingInstance(() => value); public UserTBuilder UsingInstance(Func> func) @@ -105,7 +105,7 @@ public override UserT Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTWithAddressAndConstructorBuilder_T_.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTWithAddressAndConstructorBuilder_T_.g.cs index bbf3bb8..afbfbff 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTWithAddressAndConstructorBuilder_T_.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTWithAddressAndConstructorBuilder_T_.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class UserTWithAddressAndConstructorBuilder_T_Extensions - { - public static UserTWithAddressAndConstructorBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.UserTWithAddressAndConstructor instance) where T : struct - { - return new UserTWithAddressAndConstructorBuilder().UsingInstance(instance); - } - } - - public partial class UserTWithAddressAndConstructorBuilder : Builder> where T : struct - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class UserTWithAddressAndConstructorBuilder_T_Extensions + { + public static UserTWithAddressAndConstructorBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.UserTWithAddressAndConstructor instance) where T : struct + { + return new UserTWithAddressAndConstructorBuilder().UsingInstance(instance); + } + } + + public partial class UserTWithAddressAndConstructorBuilder : Builder> where T : struct + { private bool _tValueIsSet; private Lazy _tValue = new Lazy(() => default(T)); public UserTWithAddressAndConstructorBuilder WithTValue(T value) => WithTValue(() => value); @@ -51,7 +51,7 @@ public UserTWithAddressAndConstructorBuilder WithAddress(Action> _Constructor1978124393 = new Lazy>(() => new FluentBuilderGeneratorTests.DTO.UserTWithAddressAndConstructor() { @@ -74,7 +74,7 @@ public UserTWithAddressAndConstructorBuilder UsingConstructor() return this; } - + public UserTWithAddressAndConstructorBuilder UsingInstance(UserTWithAddressAndConstructor value) => UsingInstance(() => value); public UserTWithAddressAndConstructorBuilder UsingInstance(Func> func) @@ -96,7 +96,7 @@ public override UserTWithAddressAndConstructor Build(bool useObjectInitialize { instance = new UserTWithAddressAndConstructor { - TValue = _tValue.Value, + TValue = _tValue.Value, Address = _address.Value }; @@ -110,7 +110,7 @@ public override UserTWithAddressAndConstructor Build(bool useObjectInitialize }); } - if (_tValueIsSet) { Instance.Value.TValue = _tValue.Value; } + if (_tValueIsSet) { Instance.Value.TValue = _tValue.Value; } if (_addressIsSet) { Instance.Value.Address = _address.Value; } PostBuild(Instance.Value); @@ -122,7 +122,7 @@ public override UserTWithAddressAndConstructor Build(bool useObjectInitialize { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTWithAddressTBuilder_T_.g.cs b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTWithAddressTBuilder_T_.g.cs index 26c2816..8e71ed0 100644 --- a/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTWithAddressTBuilder_T_.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO/FluentBuilderGeneratorTests.DTO.UserTWithAddressTBuilder_T_.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO -{ - public static partial class UserTWithAddressTBuilder_T_Extensions - { - public static UserTWithAddressTBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.UserTWithAddressT instance) where T : struct - { - return new UserTWithAddressTBuilder().UsingInstance(instance); - } - } - - public partial class UserTWithAddressTBuilder : Builder> where T : struct - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO +{ + public static partial class UserTWithAddressTBuilder_T_Extensions + { + public static UserTWithAddressTBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.UserTWithAddressT instance) where T : struct + { + return new UserTWithAddressTBuilder().UsingInstance(instance); + } + } + + public partial class UserTWithAddressTBuilder : Builder> where T : struct + { private bool _tValueIsSet; private Lazy _tValue = new Lazy(() => default(T)); public UserTWithAddressTBuilder WithTValue(T value) => WithTValue(() => value); @@ -51,7 +51,7 @@ public UserTWithAddressTBuilder WithAddress(Action> _Constructor1691800221 = new Lazy>(() => new FluentBuilderGeneratorTests.DTO.UserTWithAddressT() { @@ -74,7 +74,7 @@ public UserTWithAddressTBuilder UsingConstructor() return this; } - + public UserTWithAddressTBuilder UsingInstance(UserTWithAddressT value) => UsingInstance(() => value); public UserTWithAddressTBuilder UsingInstance(Func> func) @@ -96,7 +96,7 @@ public override UserTWithAddressT Build(bool useObjectInitializer) { instance = new UserTWithAddressT { - TValue = _tValue.Value, + TValue = _tValue.Value, Address = _address.Value }; @@ -110,7 +110,7 @@ public override UserTWithAddressT Build(bool useObjectInitializer) }); } - if (_tValueIsSet) { Instance.Value.TValue = _tValue.Value; } + if (_tValueIsSet) { Instance.Value.TValue = _tValue.Value; } if (_addressIsSet) { Instance.Value.Address = _address.Value; } PostBuild(Instance.Value); @@ -122,7 +122,7 @@ public override UserTWithAddressT Build(bool useObjectInitializer) { }; - - } -} + + } +} #nullable disable \ No newline at end of file diff --git a/tests/FluentBuilderGeneratorTests/DTO2/FluentBuilderGeneratorTests.DTO2.MyOptionBuilder.g.cs b/tests/FluentBuilderGeneratorTests/DTO2/FluentBuilderGeneratorTests.DTO2.MyOptionBuilder.g.cs index 1bb7049..c7a1eb1 100644 --- a/tests/FluentBuilderGeneratorTests/DTO2/FluentBuilderGeneratorTests.DTO2.MyOptionBuilder.g.cs +++ b/tests/FluentBuilderGeneratorTests/DTO2/FluentBuilderGeneratorTests.DTO2.MyOptionBuilder.g.cs @@ -1,32 +1,32 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#nullable enable -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using FluentBuilderGeneratorTests.FluentBuilder; -using FluentBuilderGeneratorTests.DTO; - -namespace FluentBuilderGeneratorTests.DTO2 -{ - public static partial class MyOptionBuilderExtensions - { - public static MyOptionBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Option instance) - { - return new MyOptionBuilder().UsingInstance(instance); - } - } - - public partial class MyOptionBuilder : Builder - { +//------------------------------------------------------------------------------ +// +// This code was generated by https://github.com/StefH/FluentBuilder version 0.15.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using FluentBuilderGeneratorTests.FluentBuilder; +using FluentBuilderGeneratorTests.DTO; + +namespace FluentBuilderGeneratorTests.DTO2 +{ + public static partial class MyOptionBuilderExtensions + { + public static MyOptionBuilder AsBuilder(this FluentBuilderGeneratorTests.DTO.Option instance) + { + return new MyOptionBuilder().UsingInstance(instance); + } + } + + public partial class MyOptionBuilder : Builder + { private bool _nameIsSet; private Lazy _name = new Lazy(() => string.Empty); public MyOptionBuilder WithName(string value) => WithName(() => value); @@ -36,7 +36,7 @@ public MyOptionBuilder WithName(Func func) _nameIsSet = true; return this; } - + private bool _Constructor155259363_IsSet; private Lazy _Constructor155259363 = new Lazy(() => new FluentBuilderGeneratorTests.DTO.Option() { @@ -59,7 +59,7 @@ public MyOptionBuilder UsingConstructor() return this; } - + public MyOptionBuilder UsingInstance(Option value) => UsingInstance(() => value); public MyOptionBuilder UsingInstance(Func