private static void Main(string[] args) { Startup.LoadConfiguration(); var reader = new PNGMapReader("DefaultMap"); TMap map = reader.ReadMap(); MapIO.Export(map, MapFileProvider.GetMapExportStream()); Console.WriteLine("Map generated!"); }
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IMapService mapService, IStaticDefinitionsService staticDefinitionsService) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseDefaultFiles(); app.UseStaticFiles(); app.UseHttpsRedirection(); app.UseMvc(); using (Stream stream = MapFileProvider.GetMapImportStream()) { mapService.SetMap(MapIO.Import(stream)); } staticDefinitionsService.SetDefinitions(DefinitionsReader.Import()); }