You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A package reference will be added to your `csproj` file. Moreover, since this library provides code via source code generation, consumers of your project don't need the reference to `M31.FluentApi`. Therefore, it is recommended to use the `PrivateAssets` metadata tag:
If you would like to examine the generated code, you may emit it by adding the following lines to your `csproj` file:
@@ -222,11 +222,11 @@ FluentCollection(
222
222
intbuilderStep,
223
223
stringsingularName,
224
224
stringwithItems="With{Name}",
225
-
stringwithItem="With{SingularName}",
226
-
stringwithZeroItems="WithZero{Name}")
225
+
string?withItem="With{SingularName}",
226
+
string?withZeroItems="WithZero{Name}")
227
227
```
228
228
229
-
Can be used instead of the `FluentMember` attribute if the decorated member is a collection. This attribute generates methods for setting multiple items, one item and zero items. The supported collection types can be seen in the source file [CollectionInference.cs](src/M31.FluentApi.Generator/SourceGenerators/Collections/CollectionInference.cs).
229
+
Can be used instead of the `FluentMember` attribute if the decorated member is a collection. This attribute generates methods for setting multiple items, one item and zero items. The supported collection types can be seen in the source file [CollectionInference.cs](src/M31.FluentApi.Generator/SourceGenerators/Collections/CollectionInference.cs). If `withItem` or `withZeroItems` is set to `null`, the corresponding method will not be generated.
Copy file name to clipboardexpand all lines: src/M31.FluentApi.Generator/CodeGeneration/CodeBoardActors/MethodCreation/Collections/CollectionMethodCreator.cs
0 commit comments