Albatross.Messaging.CodeGen
8.0.1
Prefix Reserved
dotnet add package Albatross.Messaging.CodeGen --version 8.0.1
NuGet\Install-Package Albatross.Messaging.CodeGen -Version 8.0.1
<PackageReference Include="Albatross.Messaging.CodeGen" Version="8.0.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Albatross.Messaging.CodeGen --version 8.0.1
#r "nuget: Albatross.Messaging.CodeGen, 8.0.1"
// Install Albatross.Messaging.CodeGen as a Cake Addin #addin nuget:?package=Albatross.Messaging.CodeGen&version=8.0.1 // Install Albatross.Messaging.CodeGen as a Cake Tool #tool nuget:?package=Albatross.Messaging.CodeGen&version=8.0.1
Usage: Reference the project as an analyzer:
<PackageReference Include="Albatross.Messaging.CodeGen" Version="7.3.0" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
If the referenced project has a partial interface that start with I and ends with Command, the code generator will find any concrete class that implements the inteface and add the JsonDerivedType attribute for that class to the interface.
For example, if you have the following interface:
public partial interface IMyCommand
{
}
And the following class:
public class MyCommand : IMyCommand
{
}
The code generator will create a partial interface of the same name and add the following attribute to the interface:
[JsonDerivedType(typeof(MyCommand), "MyCommand")]
public partial interface IMyCommand
{}
This allows the proper json serialization of the interface IMyCommand. Note that the type discriminator is the name of the class without the namespace.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Albatross.Messaging.CodeGen:
Package | Downloads |
---|---|
Albatross.Messaging
A durable messaging library built on top of ZeroMQ |
GitHub repositories
This package is not used by any popular GitHub repositories.