Skip to content

Commit

Permalink
Minor mods to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDunn committed Nov 3, 2023
1 parent a07d4f7 commit a368901
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/site/Writerside/hi.tree
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">

<instance-profile id="hi" name="Vogen"
start-page="Casting.md">
start-page="Home.md">

<toc-element topic="Home.md"/>
<toc-element topic="Value-Objects-in-EFCore.md"/>
Expand Down
8 changes: 4 additions & 4 deletions docs/site/Writerside/topics/String-Comparisons.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ It is possible to generate `StringComparer` types for your Value Objects that wr

This is done by specifying the `stringComparers` parameter in either local or global config:

```
```c#
[ValueObject<string>(stringComparers: StringComparersGeneration.Generate)]
public partial class MyVo
{
Expand All @@ -15,7 +15,7 @@ This parameter is an enum with options `Omit` and `Generate`. It defaults to `Om

If it's set to `Generate`, then it generates a bunch of comparers (`Ordinal`, `IgnoreCase` etc.) which can then be used in `Equals` or in collections, e.g.

```
```c#
var left = MyVo.From("abc");
var right = MyVo.From("AbC");

Expand All @@ -26,7 +26,7 @@ If it's set to `Generate`, then it generates a bunch of comparers (`Ordinal`, `I

... and in a dictionary

```
```c#
Dictionary<MyVo, int> d = new(MyVo.Comparers.OrdinalIgnoreCase);

MyVo key1Lower = MyVo.From("abc");
Expand All @@ -38,7 +38,7 @@ If it's set to `Generate`, then it generates a bunch of comparers (`Ordinal`, `I

Also generated is an `Equals` method that takes an `IEqualityComparer<>`:

```
```c#
public bool Equals(MyVo other, IEqualityComparer<MyVo> comparer)
{
return comparer.Equals(this, other);
Expand Down

0 comments on commit a368901

Please sign in to comment.