Obviously.SemanticTypes
0.0.1-preview.6
This is a prerelease version of Obviously.SemanticTypes.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
Requires NuGet 4.3.0 or higher.
dotnet add package Obviously.SemanticTypes --version 0.0.1-preview.6
NuGet\Install-Package Obviously.SemanticTypes -Version 0.0.1-preview.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Obviously.SemanticTypes" Version="0.0.1-preview.6"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Obviously.SemanticTypes --version 0.0.1-preview.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Obviously.SemanticTypes, 0.0.1-preview.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Obviously.SemanticTypes as a Cake Addin #addin nuget:?package=Obviously.SemanticTypes&version=0.0.1-preview.6&prerelease // Install Obviously.SemanticTypes as a Cake Tool #tool nuget:?package=Obviously.SemanticTypes&version=0.0.1-preview.6&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Installation
The following NuGet packages have to be added to the project
The project file should look like this
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Obviously.SemanticTypes" Version="0.0.1-preview.6" />
<PackageReference Include="CodeGeneration.Roslyn.Tool" Version="0.7.63">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
Usage
Basic
The functionality can be easily used.
Declare a partial class and add the attribute SemanticType
.
The only parameter of this attribute is the actual type of the semantic type. Here it is string
.
[SemanticType(typeof(string))]
public partial class EmailAddress { }
⚠ The class must have the
partial
modifier
ℹ The class can besealed
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.1-preview.7 | 11,954 | 4/15/2020 |
0.0.1-preview.6 | 815 | 4/8/2020 |
0.0.1-preview.5 | 345 | 1/12/2020 |
0.0.1-preview.4 | 306 | 1/12/2020 |