-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update package version and documentation content
The Installation instruction now uses a variable for the package version, improving the ease of maintenance when new releases are made. Detailed information on shared types in the package has been added, and the 'Working-with-Guids' document has been renamed to 'Working-with-IDs'. Other minor text updates have also been applied throughout the documentation.
- Loading branch information
Showing
7 changed files
with
61 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Installing Vogen | ||
|
||
<note> | ||
These tutorials assume a working knowledge of .NET and C#, so won't include the basics necessary to start the | ||
tutorials, e.g. things like creating new projects, creating new types, compiling, viewing error output, etc. | ||
</note> | ||
|
||
<tabs> | ||
<tab title=".NET CLI"> | ||
<code xml:lang="bash">dotnet add package Vogen --version %latest_version%</code> | ||
</tab> | ||
<tab title="Package Manger"> | ||
<code xml:lang="bash">NuGet\Install-Package Vogen -Version %latest_version%</code> | ||
</tab> | ||
<tab title="Package Reference"> | ||
<code-block> | ||
<![CDATA[ | ||
<PackageReference Include="Vogen" Version="%latest_version%" /> | ||
]]> | ||
</code-block> | ||
</tab> | ||
</tabs> | ||
|
||
<note> | ||
Change `%latest_version%` for the <a href="https://www.nuget.org/packages/Vogen">latest version listed on NuGet</a> | ||
</note> | ||
|
||
When added to your project, the **source generator** generates the wrappers for your primitives and the **code analyzer** | ||
will let you know if you try to create invalid Value Objects. | ||
|
||
Vogen consists of two dlls: | ||
|
||
1. `Vogen.dll` - this is the source generator and analyzers and is not needed at runtime | ||
2. `Vogen.SharedTypes.dll` - this contains the types that **are** referenced at runtime, e.g. `ValueObjectValidationException` and `ValueObjectOrError` which is used by the `TryFrom` method. | ||
|
||
Unlike using some other source generators, specifying `PrivateAssets="all" ExcludeAssets="runtime"` with Vogen will cause exceptions at runtime because of missing types. | ||
|
||
`Vogen.SharedTypes.dll` is about 18KB, so will add little to your application's size. | ||
It is referenced on its own. | ||
Here is a snippet from a `deps.json` file with it specified: | ||
|
||
```xml | ||
"Vogen/4.0.14": { | ||
"runtime": { | ||
"lib/net8.0/Vogen.SharedTypes.dll": { | ||
"assemblyVersion": "4.0.0.0", | ||
"fileVersion": "%latest_version%" | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<vars> | ||
<var name="latest_version" | ||
instance="hi" | ||
value="4.0.14" | ||
type="string" | ||
/> | ||
</vars> |