Dreamine.Hybrid.Wpf 1.0.3
`AddDreamineHybridWpf()` 내부에서 `AddWpfBlazorWebView()` 호출 및
로딩중...
검색중...
일치하는것 없음
DreamineBlazorServerHostOptions.cs
이 파일의 문서화 페이지로 가기
1using Microsoft.AspNetCore.Builder;
2using Microsoft.Extensions.DependencyInjection;
3using System;
4using System.Collections.Generic;
5
7{
17 {
26 public int Port { get; set; } = 5000;
27
36 public string InstanceId { get; } = Guid.NewGuid().ToString("N");
37
46 public bool ListenAnyIp { get; set; }
47
56 public string Host { get; set; } = "localhost";
57
66 public string ContentRootPath { get; set; } = AppContext.BaseDirectory;
67
76 public bool AutoRegisterViewModels { get; set; } = true;
77
86 public IList<Type> SharedServiceTypes { get; } = new List<Type>();
87
104 public bool AllowDisposableSharedServices { get; set; }
105
122 public bool UseEmbeddedWebView { get; set; } = true;
123
132 public Action<IServiceCollection>? ConfigureServices { get; set; }
133
142 public Action<WebApplication>? ConfigurePipeline { get; set; }
143
152 public Action<WebApplication>? ConfigurePipelineAfterRouting { get; set; }
153
186 public DreamineBlazorServerHostOptions AddPhysicalStaticFiles(string physicalPath, string requestPath)
187 {
188 var prev = ConfigurePipeline;
189 ConfigurePipeline = app =>
190 {
191 prev?.Invoke(app);
192 System.IO.Directory.CreateDirectory(physicalPath);
193 app.UseStaticFiles(new Microsoft.AspNetCore.Builder.StaticFileOptions
194 {
195 FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(physicalPath),
196 RequestPath = requestPath
197 });
198 };
199 return this;
200 }
201 }
202}
DreamineBlazorServerHostOptions AddPhysicalStaticFiles(string physicalPath, string requestPath)