Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc authored May 7, 2021
1 parent 7ad6691 commit 3cbd165
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,17 @@ public readonly partial struct EndDate { }
public readonly partial struct AllOptionsStruct { }
```

> Currently UnitGenerateOptions only supports to use directly. For example, `[UnitOf(typeof(int)), MyConstants.MyOptions]` is invalid.
You can setup project default options like this.

```csharp
internal static class UnitOfOptions
{
public const UnitGenerateOptions Default = UnitGenerateOptions.ArithmeticOperator | UnitGenerateOptions.ValueArithmeticOperator | UnitGenerateOptions.Comparable | UnitGenerateOptions.MinMaxMethod;
}

[UnitOf(typeof(int), UnitOfOptions.Default)]
public readonly partial struct Hp { }
```

### ImplicitOperator

Expand Down

0 comments on commit 3cbd165

Please sign in to comment.