File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,17 @@ public readonly partial struct EndDate { }
266266public 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
You can’t perform that action at this time.
0 commit comments