Greentube.Serialization.DependencyInjection.Xml 1.0.0-alpha2

Integration of Greentube.Serialization.Xml with Microsoft.DependencyInjection.

This is a prerelease version of Greentube.Serialization.DependencyInjection.Xml.
Install-Package Greentube.Serialization.DependencyInjection.Xml -Version 1.0.0-alpha2
dotnet add package Greentube.Serialization.DependencyInjection.Xml --version 1.0.0-alpha2
<PackageReference Include="Greentube.Serialization.DependencyInjection.Xml" Version="1.0.0-alpha2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Greentube.Serialization.DependencyInjection.Xml --version 1.0.0-alpha2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Greentube.Serialization.DependencyInjection.Xml NuGet

Brings Greentube.Serialization.Xml to your application with Microsoft.Extensions.DependencyInjection.

More information at: Greentube.Serialization.DependencyInjection.

Extensions to IServiceCollection

public void ConfigureServices(IServiceCollection services)
{
    services.AddXmlSerializer();
}

With an action to configure XmlOptions:

public void ConfigureServices(IServiceCollection services)
{
    services.AddXmlSerializer(o => o.DefaultNamespace = "some-namespace");
    // Or with your own factory delegate:
    services.AddXmlSerializer(o => 
        o.Factory = type => new XmlSerializer(type, new XmlRootAttribute("messaging")));
}

SerializationBuilder

public void ConfigureServices(IServiceCollection services)
{
    services.AddSerialization(builder =>
        builder.AddXml();
        // Or with options:
        builder.AddXml(o => { /* ... */ });
    );

Greentube.Serialization.DependencyInjection.Xml NuGet

Brings Greentube.Serialization.Xml to your application with Microsoft.Extensions.DependencyInjection.

More information at: Greentube.Serialization.DependencyInjection.

Extensions to IServiceCollection

public void ConfigureServices(IServiceCollection services)
{
    services.AddXmlSerializer();
}

With an action to configure XmlOptions:

public void ConfigureServices(IServiceCollection services)
{
    services.AddXmlSerializer(o => o.DefaultNamespace = "some-namespace");
    // Or with your own factory delegate:
    services.AddXmlSerializer(o => 
        o.Factory = type => new XmlSerializer(type, new XmlRootAttribute("messaging")));
}

SerializationBuilder

public void ConfigureServices(IServiceCollection services)
{
    services.AddSerialization(builder =>
        builder.AddXml();
        // Or with options:
        builder.AddXml(o => { /* ... */ });
    );

Version History

Version Downloads Last updated
1.0.0-alpha2 299 11/26/2017
1.0.0-alpha 190 11/25/2017