Hsu.Sg.FluentMember
2026.101.6
dotnet add package Hsu.Sg.FluentMember --version 2026.101.6
NuGet\Install-Package Hsu.Sg.FluentMember -Version 2026.101.6
<PackageReference Include="Hsu.Sg.FluentMember" Version="2026.101.6"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Hsu.Sg.FluentMember" Version="2026.101.6" />
<PackageReference Include="Hsu.Sg.FluentMember"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Hsu.Sg.FluentMember --version 2026.101.6
#r "nuget: Hsu.Sg.FluentMember, 2026.101.6"
#:package Hsu.Sg.FluentMember@2026.101.6
#addin nuget:?package=Hsu.Sg.FluentMember&version=2026.101.6
#tool nuget:?package=Hsu.Sg.FluentMember&version=2026.101.6
Hsu.Sg.FluentMember
Generate a fluent method for fields and properties from a struct or class.
Package Version
| Name | Source | Stable | Preview |
|---|---|---|---|
| Hsu.Sg.FluentMember | Nuget | ||
| Hsu.Sg.FluentMember | MyGet |
Usages
Install
- Hsu.Sg.FluentMember
You can install the package from nuget.
<PackageReference Include="Hsu.Sg.FluentMember" Version="2023.412.12">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Attributes
Add the FluentMember attribute and partial keyword to the class or struct.
[FluentMember]
public partial class ClassSamplePartial
{
}
If you want to specify fluent members to generate, you just need to set [FluentMember(Only = true)] and add [FluentMemberGen] attribute to the members.
[FluentMember(Only = true)]
public partial class ClassSampleSyncOnly
{
[FluentMemberGen(Ignore = true)]
public DayOfWeek Week { get; set; }
[FluentMemberGen(Ignore = true)]
private DayOfWeek PrivateWeek;
[FluentMemberGen(Ignore = true)]
public event Action EventAction;
}
If you want to ignore generate fluent members, you just need to add [FluentMemberGen(Ignore=true)] attribute to the members.
[FluentMember]
public partial class ClassSampleSyncOnly
{
[FluentMemberGen(Ignore = true)]
public event Action EventAction;
}
If you want to specify an identifier with generated a proxy member, you just need to add [FluentMemberGen(Identifier = "UseOnEnterWithArgs")] attribute to that member.
[FluentMember(Private = true)]
public partial class TestEventClass
{
[FluentMemberGen(Identifier = "UseOnEnterWithArgs")]
public event EventHandler<EventArgs> OnEnterWithArgs;
}
If you want to specify an prefix with generated a fluent object, you just need to add [FluentMember(Prefix = "With")] attribute to that object or add [FluentMemberGen(Prefix = "Add")] attribute to that member.
[FluentMember(Internal = true,Private = true,Prefix = "With")]
public partial class TestFieldClass
{
[FluentMemberGen(Prefix = "Add",Modifier = Accessibility.Internal)]
protected event Action<object> onResult;
}
If you want to specify an accessible with generated a fluent object, you just need to add [FluentMemberGen(Modifier = Accessibility.Internal)] attribute to that member.
[FluentMember]
public partial class TestFieldClass
{
[FluentMemberGen(Modifier = Accessibility.Internal)]
private event Action<object> onResult;
}
References
License
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Nito.AsyncEx.Context (>= 5.1.2)
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 |
|---|---|---|
| 2026.101.6 | 95 | 1/6/2026 |
| 2026.101.5 | 90 | 1/5/2026 |
| 2026.101.5-rc173948 | 96 | 1/5/2026 |
| 2026.101.5-rc145021 | 90 | 1/5/2026 |
| 2024.101.8-rc175707 | 264 | 1/8/2024 |
| 2023.412.21 | 353 | 12/21/2023 |
| 2023.412.21-rc202346 | 207 | 12/21/2023 |
| 2023.412.17 | 254 | 12/17/2023 |
| 2023.412.17-rc170547 | 264 | 12/17/2023 |
| 2023.412.13 | 297 | 12/13/2023 |
| 2023.412.12.1 | 212 | 12/12/2023 |
| 2023.412.12 | 214 | 12/12/2023 |