Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDunn committed Dec 8, 2023
1 parent 475492f commit 5c6a789
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 15 deletions.
1 change: 0 additions & 1 deletion docs/site/Writerside/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<variables></variables>
<build-profile instance="hi">
<variables>
<noindex-content>false</noindex-content>
Expand Down
1 change: 1 addition & 0 deletions docs/site/Writerside/topics/Tutorials.topic
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
For other groups, try to keep the number between 2 and 6, but you can add more if necessary.-->

<section-starting-page>
<title>Tutorials</title>
<description>
These focus on how to achieve various things using Vogen, from creating your first
value object, to handling nuances of decimals when deserializing from JavaScript.
Expand Down
12 changes: 8 additions & 4 deletions docs/site/Writerside/topics/Vogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

How this documentation is organized:

Tutorials—take you by the hand through a series of steps to create an application that uses Vogen. Start here if you’re new to Vogen.
Tutorials—take you by the hand through a series of steps to create an application that uses Vogen.
Start here if you’re new to Vogen.

Topic guides—discuss key topics and concepts at a fairly high level and provide useful background information and explanation.
Topic guides—discuss key topics and concepts at a fairly high level and provide useful background information
and explanation.

Reference guides-contains technical reference for Vogen usage, describing how it works and how to use it. The Assumption is that you have a basic understanding of key concepts.
Reference guides-contains technical reference for Vogen usage, describing how it works and how to use it.
The Assumption is that you have a basic understanding of key concepts.

How-to guides—recipes guiding you through the steps involved in addressing key problems and use-cases. They are more advanced than tutorials and assume some knowledge of how Vogen works.
How-to guides—recipes guiding you through the steps involved in addressing key problems and use-cases.
They are more advanced than tutorials, and they assume some knowledge of how Vogen works.
7 changes: 4 additions & 3 deletions docs/site/Writerside/topics/Vogen.topic
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
</spotlight>

<primary>
<title>Discover</title>
<a type="learn" href="Tutorials.topic" summary="Step by step guides on working with Vogen"/>
<a type="learn" href="How-to guides.topic" summary="Get details on common usage scenarios">How-to guides</a>
</primary>
<secondary>
</secondary>

<secondary><title>Learn</title>
<a type="learn" href="how-to-guides.topic" summary="Get details on common usage scenarios">How-to guides</a>
</secondary>

</section-starting-page>
</topic>
2 changes: 1 addition & 1 deletion docs/site/Writerside/topics/discussions/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ One of the main goals of Vogen is to achieve **almost the same speed and memory
primitives directly**.
Put another way, if your `decimal` primitive represents an Account Balance, then there
is **extremely** low overhead of using an `AccountBalance` Value Object instead.
Please see the [performance metrics](#Performance.md) for more information.
Please see the [performance metrics](Performance.md) for more information.
11 changes: 9 additions & 2 deletions docs/site/Writerside/topics/how-to/Testing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Testing
Testing source generators are tricky. You can't run the generators directly from code because it's the IDE that loads the generators, not your tests.
Testing source generators is tricky.
You can't run the generators directly from code because it's the IDE that loads the generators, not your tests.

So the tests are in two solutions:

Expand All @@ -14,7 +15,13 @@ These are slow to run because they use many different permutations of features a

The snapshot tests in the IDE run in about 5 minutes. In the CI build, we set a `THOROUGH` flag which exercises more variations, and that can take up to **several hours**.

* In the **consumer solution**, the tests involve consuming the 'real' Vogen NuGet package and exercising it via _real_ C# code. To ensure it tests the latest version of Vogen, `test.ps1` first builds Vogen, then forces a NuGet package to be built locally with version `999.9.xxx`. These tests are much quicker to run. They verify the behaviour of created Value Objects, such as:
* In the **consumer solution**, the tests involve consuming the 'real' Vogen NuGet package and exercising it via
_real_ C# code.
To ensure it tests the latest version of Vogen, `test.ps1` first builds Vogen, then forces a NuGet
package to be built locally with a version of `999.9.xxx`.
These tests are much quicker to run.
They verify the behavior
of created Value Objects, such as:
* [Normalization](https://github.com/SteveDunn/Vogen/wiki/Normalization)
* Equality
* Hashing
Expand Down
2 changes: 1 addition & 1 deletion docs/site/Writerside/topics/reference/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ correct.
## How do I identify types that are generated by Vogen?
_I'd like to be able to identify types that are generated by Vogen so that I can integrate them in things like EFCore._

**A:** You can use this information in [this page](../how-to/How-to-identify-a-type-that-is-generated-by-Vogen.md)
**A: ** You can use this information on [this page](How-to-identify-a-type-that-is-generated-by-Vogen.md)
3 changes: 2 additions & 1 deletion docs/site/Writerside/topics/tutorials/Overriding-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ If you supply your own `GetHashCode()`, then Vogen won't generate it.

## Equals

You can override `Equals` for the Value Object itself (e.g. `Equals(MyId myId)`, or equals for the underlying primitive, e.g. `Equals(int primitive)`).
You can override `Equals` for the Value Object itself (e.g. `Equals(MyId myId)`, or equals for the underlying
primitive, e.g. `Equals(int primitive)`).

All other `Equals` methods are always generated, e.g.

Expand Down
4 changes: 3 additions & 1 deletion docs/site/Writerside/topics/tutorials/String-Comparisons.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public bool Equals(MyVo other, IEqualityComparer<MyVo> comparer)



As with strings, the Value Object itself doesn't change. `GetHashCode` is different for two objects with different strings if you don't specify a comparer.
As with strings, the Value Object itself doesn't change.
`GetHashCode` is different for two objects with different
strings if you don't specify a comparer.

```c#
MyString s1 = MyString.From("abc");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Set the value with the `From` method instead of the constructor:
var customerId = CustomerId.From(42);
```

If you try to use the constructors, the [analyzer rules](../reference/Analyzer-Rules.md) will catch this and stop you.
If you try to use the constructors, the [analyzer rules](Analyzer-Rules.md) will catch this and stop you.

You can now be more explicit in your methods with signatures such as:

Expand Down

0 comments on commit 5c6a789

Please sign in to comment.