Skip to content

Commit 24ef987

Browse files
committed
enhanced demo for
#42
1 parent 6fc79c1 commit 24ef987

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

ElectronNET.WebApp/Startup.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
using ElectronNET.API.Entities;
33
using Microsoft.AspNetCore.Builder;
44
using Microsoft.AspNetCore.Hosting;
5+
using Microsoft.Extensions.Configuration;
56
using Microsoft.Extensions.DependencyInjection;
67
using Microsoft.Extensions.Logging;
78

89
namespace ElectronNET.WebApp
910
{
1011
public class Startup
1112
{
13+
public IConfiguration Configuration { get; }
14+
15+
public Startup(IConfiguration configuration)
16+
{
17+
Configuration = configuration;
18+
}
19+
1220
// This method gets called by the runtime. Use this method to add services to the container.
1321
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
1422
public void ConfigureServices(IServiceCollection services)
@@ -36,6 +44,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
3644
});
3745

3846

47+
3948
if(HybridSupport.IsElectronActive)
4049
{
4150
ElectronBootstrap();
@@ -52,7 +61,7 @@ public async void ElectronBootstrap()
5261
});
5362

5463
browserWindow.OnReadyToShow += () => browserWindow.Show();
55-
browserWindow.SetTitle("Electron.NET API Demos");
64+
browserWindow.SetTitle(Configuration["DemoTitleInSettings"] );
5665
}
5766
}
5867
}

ElectronNET.WebApp/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"LogLevel": {
55
"Default": "Warning"
66
}
7-
}
7+
},
8+
"DemoTitleInSettings": "Electron.NET API Demos"
89
}

0 commit comments

Comments
 (0)