-
Notifications
You must be signed in to change notification settings - Fork 0
Solid.Http.Extensions.SharpCompress Initialization
HX-Rd edited this page May 9, 2018
·
11 revisions
Solid.Http.Extensions.Zip is designed to work with Solid.Http and Solid.Http.Core.
-
ReaderOptionsThis is theSharpCompress.Readers.ReaderOptionsand will be used when the archives are constructed -
MimeTypesThe mimetypes that are associated with the extension. If the mimetypes are encountered, the extension will try to create the requested Archive. There are some default mimetypes that are provided by default. These are
"application/zip",
"application/x-rar-compressed",
"application/x-tar",
"application/x-7z-compressed"public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services
.AddSolidHttpCore()
.AddSharpCompress();
}
}public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services
.AddSolidHttpCore()
.AddSharpCompress(
new SharpCompressOptions(
options: new ReaderOptions
{
LookForHeader = false
},
mimeTypes: new List<string>()
{
"application/octet-stream"
},
useDefaultMimeTypes: false,
tarArchivesAreGziped: false
)
);
}
}public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services
.AddSolidHttp()
.AddSharpCompress();
}
}public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services
.AddSolidHttp()
.AddSharpCompress(
new SharpCompressOptions(
options: new ReaderOptions
{
LookForHeader = false
},
mimeTypes: new List<string>()
{
"application/octet-stream"
},
useDefaultMimeTypes: false,
tarArchivesAreGziped: false
)
);
}
}