Solid.Http.Extensions.Xml Initialization - SOLIDSoftworks/Solid.Http GitHub Wiki
Initialization
Solid.Http.Extensions.Xml is designed to work with Solid.Http and Solid.Http.Core.
Basic initialization with Solid.Http.Core
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSolidHttpCore(builder => builder.AddXml());
}
}
Intermediate initialization with Solid.Http.Core
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
var settings = new DataContractSerializerSettings();
// set custom serializer settings
services.AddSolidHttpCore(builder => builder.AddXml(settings));
}
}
Basic initialization with Solid.Http
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSolidHttp(builder => builder.AddXml());
}
}
Intermediate initialization with Solid.Http
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
var settings = new DataContractSerializerSettings();
// set custom serializer settings
services.AddSolidHttp(builder => builder.AddXml(settings));
}
}