release
This commit is contained in:
parent
93b41bfa94
commit
e868c152e0
48 changed files with 372 additions and 34 deletions
21
Program.cs
21
Program.cs
|
|
@ -1,19 +1,20 @@
|
|||
using lilos_stitcher;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
||||
// builder.Services.AddOpenApi();
|
||||
NetVips.NetVips.Init();
|
||||
NetVips.NetVips.Concurrency = 3;
|
||||
|
||||
builder.Services.AddControllers().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNameCaseInsensitive = true);
|
||||
builder.Services.AddControllers().AddJsonOptions(o => o.JsonSerializerOptions.PropertyNameCaseInsensitive = true);
|
||||
|
||||
builder.Services.AddMemoryCache(o => o.SizeLimit = 256 * 1024 * 1024);
|
||||
builder.Services.AddMemoryCache(o => o.SizeLimit = 128L * 1024 * 1024);
|
||||
|
||||
builder.Services.AddSingleton<LiloStitcher.TileCache>();
|
||||
builder.Services.AddSingleton<LiloStitcher.TileLoader>();
|
||||
builder.Services.AddSingleton<LiloStitcher.LiloStitcher>();
|
||||
string assetDir = Path.GetFullPath("../tiles1705");
|
||||
|
||||
builder.Services.AddSingleton<TileCache>();
|
||||
builder.Services.AddSingleton(provider => new TileLoader(provider.GetRequiredService<TileCache>(), assetDir));
|
||||
builder.Services.AddSingleton<lilos_stitcher.LiloStitcher>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
Loading…
Add table
Add a link
Reference in a new issue