Skip to content

Commit 3cbd165

Browse files
authored
Update README.md
1 parent 7ad6691 commit 3cbd165

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,17 @@ public readonly partial struct EndDate { }
266266
public readonly partial struct AllOptionsStruct { }
267267
```
268268

269-
> Currently UnitGenerateOptions only supports to use directly. For example, `[UnitOf(typeof(int)), MyConstants.MyOptions]` is invalid.
269+
You can setup project default options like this.
270+
271+
```csharp
272+
internal static class UnitOfOptions
273+
{
274+
public const UnitGenerateOptions Default = UnitGenerateOptions.ArithmeticOperator | UnitGenerateOptions.ValueArithmeticOperator | UnitGenerateOptions.Comparable | UnitGenerateOptions.MinMaxMethod;
275+
}
276+
277+
[UnitOf(typeof(int), UnitOfOptions.Default)]
278+
public readonly partial struct Hp { }
279+
```
270280

271281
### ImplicitOperator
272282

0 commit comments

Comments
 (0)