Dreamine.Hybrid.Wpf
WPF 애플리케이션 안에 Blazor UI를 임베드하기 위한
BlazorWebView(WebView2) 기반 하이브리드 호스팅 레이어입니다.
Dreamine 아키텍처의 "WPF Shell + Blazor 화면" 조합을 명시적(Explicit) 방식으로 구현하는 데 초점을 둡니다.
Screenshots
Embedded Mode

Server Mode (WebView2)

External Browser Access

이 라이브러리가 해결하는 문제
이 모듈은 아래 요구를 동시에 만족시키기 위해 만들어졌습니다.
- WPF Shell은 그대로 유지 (창 관리 / 장비 UI / 기존 자산)
- Blazor 컴포넌트 (대시보드 / 리치 UI / 빠른 반복 개발)를 WPF 안에 호스팅
- MVVM 관점에서 "마법(자동)"이 아니라 "명시적 연결" 로 관리
- WebView2 흔한 문제 (캐시 경로 / 초기화 타이밍 / 디자이너 크래시) 를 회피
주요 기능
- HybridHostControl: WPF
UserControl안에BlazorWebView를 호스팅 - 명시적 와이어링(MVVM 친화):
HostPage,RootComponentType,RootSelector,Services - DI 확장 메서드:
AddDreamineHybridWpf()한 번 호출로 필수 서비스 일괄 등록 - 디자인 타임 안전: Visual Studio 디자이너에서 초기화를 자동 회피
- 내부 WebView2 진단 / 안전 캐시 경로 적용 (한글 경로 문제 완화)
요구사항
- .NET:
net8.0-windows - WPF: 사용 (
<UseWPF>true</UseWPF>) - 패키지:
Microsoft.AspNetCore.Components.WebView.Wpf8.xMicrosoft.Web.WebView21.x
- WebView2 Runtime 설치 필요 (대부분 PC는 Evergreen 런타임으로 자동 충족)
프로젝트 참조:
Dreamine.Hybrid— 코어 인터페이스 (예:IHybridMessageBus)- 사용자의 Blazor 컴포넌트 프로젝트 —
HybridHostControl에 전달할 루트 컴포넌트 타입
설치
옵션 A) 프로젝트 참조 (현재 권장)
WPF Shell 프로젝트에서 Dreamine.Hybrid.Wpf를 프로젝트 참조로 추가합니다.
<ItemGroup>
<ProjectReference Include="..\Dreamine.Hybrid.Wpf\Dreamine.Hybrid.Wpf.csproj" />
</ItemGroup>
옵션 B) (향후) NuGet
NuGet으로 배포되면 동일한 퀵스타트 절차로 사용합니다.
프로젝트 구조
Dreamine.Hybrid.Wpf/
├── Controls/
│ ├── HybridHostControl.xaml # BlazorWebView를 호스팅하는 UserControl
│ └── HybridHostControl.xaml.cs # HostPage, Services, RootComponent 연결 코드
├── Converters/
│ └── BooleanToVisibilityConverter.cs # bool → Visibility 변환기 (싱글톤)
├── DependencyInjection/
│ └── ServiceCollectionExtensions.cs # AddDreamineHybridWpf() 확장 메서드
├── Internal/
│ └── WebView2Initializer.cs # WebView2 안전 생성 및 오프라인 안내 페이지
├── Utility/
│ └── DesignTimeGuard.cs # XAML 디자이너 감지 유틸리티
└── Dreamine.Hybrid.Wpf.csproj
아키텍처
WPF Shell (Window / UserControl)
│
├── HybridHostControl
│ └── BlazorWebView (WebView2)
│ └── Blazor 루트 컴포넌트 (예: App.razor)
│
└── IHybridMessageBus (InMemoryHybridMessageBus)
↔ WPF ViewModel ↔ Blazor 컴포넌트 간 공유
퀵스타트
1) 서비스 등록 (DI)
WPF 앱 시작 시점 (예: App.xaml.cs) 에서:
using Dreamine.Hybrid.Wpf.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using System;
public partial class App
{
private IServiceProvider? _services;
protected override void OnStartup(System.Windows.StartupEventArgs e)
{
base.OnStartup(e);
var services = new ServiceCollection();
services.AddDreamineHybridWpf();
_services = services.BuildServiceProvider();
new MainWindow().Show();
}
public IServiceProvider Services => _services
?? throw new InvalidOperationException("ServiceProvider가 초기화되지 않았습니다.");
}
AddDreamineHybridWpf()내부에서AddWpfBlazorWebView()호출 및
IHybridMessageBus → InMemoryHybridMessageBus(싱글톤) 등록을 수행합니다. Debug 빌드에서는 BlazorWebView 개발자 도구도 활성화합니다.
2) XAML에 HybridHostControl 배치
<Window x:Class="Sample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hybrid="clr-namespace:Dreamine.Hybrid.Wpf.Controls;assembly=Dreamine.Hybrid.Wpf"
Title="Hybrid Shell" Width="1200" Height="800">
<Grid>
<hybrid:HybridHostControl x:Name="HybridHost"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"/>
</Grid>
</Window>
3) 런타임에서 RootComponent + Services 연결
public partial class MainWindow
{
public MainWindow()
{
InitializeComponent();
HybridHost.HostPage = "wwwroot/index.html";
HybridHost.RootSelector = "#app";
HybridHost.RootComponentType = typeof(MyBlazorApp.App);
HybridHost.Services = ((App)System.Windows.Application.Current).Services;
}
}
컨트롤은 Loaded 이벤트 시 자동으로 한 번만 초기화됩니다.
Services 또는 RootComponentType이 설정되지 않으면 InvalidOperationException을 발생시킵니다.
컴포넌트 레퍼런스
HybridHostControl
BlazorWebView를 래핑하는 WPF UserControl입니다. 컨트롤이 로드되기 전에 아래 프로퍼티를 설정해야 합니다:
| 프로퍼티 | 타입 | 기본값 | 필수 여부 | 설명 |
|---|---|---|---|---|
HostPage |
string |
"wwwroot/index.html" |
선택 | Blazor 호스트 HTML 경로 |
RootComponentType |
Type? |
null |
필수 | Blazor 루트 컴포넌트 타입 |
RootSelector |
string |
"#app" |
선택 | 루트 마운트 CSS 셀렉터 |
Services |
IServiceProvider? |
null |
필수 | BlazorWebView 등록이 포함된 DI 컨테이너 |
BooleanToVisibilityConverter
표준 bool → Visibility 변환기입니다. XAML에서 싱글톤으로 사용:
<TextBlock Visibility="{Binding IsVisible,
Converter={x:Static converters:BooleanToVisibilityConverter.Instance}}" />
DesignTimeGuard
Visual Studio 디자이너 실행 여부를 감지하는 정적 클래스입니다.
IsInDesignMode 프로퍼티를 XAML 트리거 또는 코드 비하인드에서 활용하여 런타임 로직이 디자이너에서 실행되는 것을 방지합니다.
디자인 타임 안정성
Visual Studio 디자이너에서 WebView2/Blazor 초기화가 동작하면 크래시가 나기 쉽습니다.
이 모듈은 이를 회피하기 위한 장치를 포함합니다:
HybridHostControl내부에서DesignerProperties.GetIsInDesignMode(this)체크 후 조기 반환DesignTimeGuard.IsInDesignMode제공 (XAML에서 사용 가능)
<!-- 디자이너에서만 숨김 처리 예시 -->
<hybrid:HybridHostControl
Visibility="{Binding Source={x:Static local:DesignTimeGuard.IsInDesignMode},
Converter={x:Static converters:BooleanToVisibilityConverter.Instance}}"/>
WebView2 안전 캐시 경로 / 진단 로그
사용자 프로필 경로에 한글 / 특수문자가 포함되어 WebView2가 문제를 일으키는 경우가 있습니다.
이 패키지는 WebView2 초기화 헬퍼를 internal로 유지해서 WebView2 세부 설정이 public API로 굳어지지 않게 합니다. 번들 호스트는 %LocalAppData%\Dreamine\WebView2Cache 아래 ASCII-safe 캐시 경로를 사용하고, 초기화/네비게이션 진단을 Debug.WriteLine으로 남깁니다.
직접 WebView2를 저수준으로 호스팅해야 한다면 애플리케이션 레이어에서 CoreWebView2CreationProperties.UserDataFolder를 명시적으로 설정하세요.
로드맵
- NuGet 배포 (버전 정책 / 패키징 / 샘플 포함)
- 서비스 등록 옵션 확장 (로그 / 캐시 정책 / 환경별 설정)
- WPF Shell 부트스트랩 (Host Builder 스타일) 제공
- 메시지 버스 브릿지 / 네비게이션 / ViewModel 패턴 샘플 강화
License
LICENSE 참고.
구조 다이어그램
graph TD
subgraph WPF_Host["WPF 호스트 레이어"]
WpfApp["App.xaml.cs\nWPF Application"]
MainWindow["MainWindow\nWebView2 컨테이너"]
WpfHybridHost["WpfHybridHost\nIHybridHost 구현"]
end
subgraph Blazor_Server["Blazor Server 레이어"]
BlazorHost["Blazor ASP.NET Host\nKestrel 내장 서버"]
AppShell["AppShell.razor\nHTML 루트"]
Components["Blazor Components"]
end
subgraph DI["의존성 주입"]
SharedDI["SharedServiceTypes\n루트 DI → Blazor DI 공유"]
AddDreamineHybridWpf["AddDreamineHybridWpf()"]
AddDreamineBlazorServer["AddDreamineBlazorServer~T~()"]
RunDreamineWpfApp["RunDreamineWpfApp~T~()"]
end
WpfApp --> WpfHybridHost
WpfHybridHost --> MainWindow
MainWindow -->|WebView2 navigate| BlazorHost
BlazorHost --> AppShell
AppShell --> Components
AddDreamineHybridWpf --> WpfHybridHost
AddDreamineBlazorServer --> BlazorHost
SharedDI --> BlazorHost
RunDreamineWpfApp --> WpfAppAPI 문서
타입
\if KO 부울 값과 WPF 값을 상호 변환합니다. \endif \if EN Converts between Boolean values and WPF values. \endif
\if KO 캐시된 WPF 디자인 타임 감지 기능을 제공합니다. \endif \if EN Provides cached WPF design-time detection. \endif
\if KO WPF 프로세스 내부에서 Blazor Server 애플리케이션의 생명 주기를 호스팅합니다. \endif \if EN Hosts the lifecycle of a Blazor Server application inside the WPF process. \endif
\if KO WPF 프로세스 내부에 Blazor Server 엔드포인트를 호스팅하는 옵션을 나타냅니다. \endif \if EN Represents options for hosting a Blazor Server endpoint inside a WPF process. \endif
\if KO WPF 프로세스 내부 Dreamine Blazor Server 호스팅을 위한 서비스 등록 확장을 제공합니다. \endif \if EN Provides service-registration extensions for hosting Dreamine Blazor Server inside a WPF process. \endif
\if KO Generic Host와 함께 WPF 애플리케이션을 실행하는 확장 메서드를 제공합니다. \endif \if EN Provides extensions for running WPF applications with a Generic Host. \endif
\if KO WPF 안에서 Blazor UI를 포함 형태로 호스팅하는 컨트롤입니다. \endif \if EN Hosts an embedded Blazor UI inside WPF. \endif
\if KO Dreamine Hybrid WPF가 지원하는 공개 WebView2 호스트 도우미를 제공합니다. \endif \if EN Provides the public WebView2 host helpers supported by Dreamine Hybrid WPF. \endif
\if KO 루트 서비스 공급자에 접근해야 하는 애플리케이션의 계약을 정의합니다. \endif \if EN Defines a contract for applications that need access to the root service provider. \endif
\if KO Dreamine Hybrid WPF 서비스 등록 확장 메서드를 제공합니다. \endif \if EN Provides service-registration extensions for Dreamine Hybrid WPF. \endif
\if KO 안전한 사용자 데이터 경로와 저자원 브라우저 구성을 사용하여 WebView2를 초기화합니다. \endif \if EN Initializes WebView2 with a safe user-data path and low-resource browser configuration. \endif
BooleanToVisibilityConverter
\if KO 를 Visible로, 나머지를 Collapsed로 변환합니다. \endif \if EN Converts to Visible and all other values to Collapsed. \endif
value— \if KO 변환할 값입니다. \endif \if EN The value to convert. \endiftargetType— \if KO 바인딩 대상 형식입니다. \endif \if EN The binding target type. \endifparameter— \if KO 선택적 변환기 매개 변수입니다. \endif \if EN The optional converter parameter. \endifculture— \if KO 변환 문화권입니다. \endif \if EN The conversion culture. \endif반환: \if KO 대응하는 가시성 값입니다. \endif \if EN The corresponding visibility value. \endif
\if KO Visible을 로, 나머지를 로 변환합니다. \endif \if EN Converts Visible to and all other values to . \endif
value— \if KO 역변환할 값입니다. \endif \if EN The value to convert back. \endiftargetType— \if KO 바인딩 대상 형식입니다. \endif \if EN The binding target type. \endifparameter— \if KO 선택적 변환기 매개 변수입니다. \endif \if EN The optional converter parameter. \endifculture— \if KO 변환 문화권입니다. \endif \if EN The conversion culture. \endif반환: \if KO 가시성에 대응하는 부울 값입니다. \endif \if EN The Boolean value corresponding to the visibility. \endif
\if KO 공유 싱글턴 인스턴스를 가져옵니다. \endif \if EN Gets the shared singleton instance. \endif
DesignTimeGuard
\if KO Dispatcher 스레드 안전성을 지키면서 WPF 디자인 모드를 감지합니다. \endif \if EN Detects WPF design mode while respecting dispatcher thread affinity. \endif
반환: \if KO 디자인 모드이면 , 감지할 수 없거나 런타임이면 입니다. \endif \if EN in design mode; at runtime or when detection is unavailable. \endif
\if KO 현재 프로세스가 WPF 디자이너에서 실행 중인지 여부를 가져옵니다. \endif \if EN Gets whether the current process is running in the WPF designer. \endif
\if KO is In Design Mode 값을 보관합니다. \endif \if EN Stores the is in design mode value. \endif
DreamineBlazorServerHostedService`1
\if KO 루트 서비스 공급자, 공유 메시지 버스 및 호스트 옵션으로 새 호스팅 서비스를 초기화합니다. \endif \if EN Initializes a new hosted service with the root service provider, shared message bus, and host options. \endif
rootServiceProvider— \if KO WPF 루트 서비스 공급자입니다. \endif \if EN The WPF root service provider. \endifmessageBus— \if KO 공유 하이브리드 메시지 버스입니다. \endif \if EN The shared hybrid message bus. \endifoptions— \if KO Blazor Server 호스트 옵션입니다. \endif \if EN The Blazor Server host options. \endif\if KO WPF 루트 공급자의 구성된 서비스 인스턴스를 Blazor Server 컨테이너에 공유합니다. \endif \if EN Shares configured service instances from the WPF root provider with the Blazor Server container. \endif
services— \if KO 공유 서비스를 등록할 Blazor Server 서비스 컬렉션입니다. \endif \if EN The Blazor Server service collection receiving shared services. \endif\if KO 지정한 어셈블리의 공개 비추상 ViewModel 클래스를 Scoped 서비스로 등록합니다. \endif \if EN Registers public, non-abstract ViewModel classes from the specified assembly as scoped services. \endif
services— \if KO ViewModel을 등록할 서비스 컬렉션입니다. \endif \if EN The service collection receiving the ViewModels. \endifassembly— \if KO 검색할 어셈블리입니다. \endif \if EN The assembly to scan. \endif\if KO Kestrel, Razor 구성 요소, 공유 서비스 및 미들웨어를 구성하고 내부 웹 호스트를 시작합니다. \endif \if EN Configures Kestrel, Razor components, shared services, and middleware, then starts the internal web host. \endif
cancellationToken— \if KO 호스트 시작 취소 토큰입니다. \endif \if EN A token used to cancel host startup. \endif반환: \if KO 내부 웹 호스트 시작 작업입니다. \endif \if EN A task representing startup of the internal web host. \endif
\if KO 실행 중인 내부 웹 호스트를 중지하고 해제합니다. \endif \if EN Stops and disposes the running internal web host. \endif
cancellationToken— \if KO 호스트 중지 취소 토큰입니다. \endif \if EN A token used to cancel host shutdown. \endif반환: \if KO 내부 웹 호스트 중지 작업입니다. \endif \if EN A task representing shutdown of the internal web host. \endif
\if KO 안전한 디렉터리형 GET 또는 HEAD 요청을 게시된 wwwroot/index.html 파일에 매핑합니다. \endif \if EN Maps a safe directory-style GET or HEAD request to a published wwwroot/index.html file. \endif
contentRootPath— \if KO 애플리케이션 콘텐츠 루트입니다. \endif \if EN The application content root. \endifrequest— \if KO 검사할 HTTP 요청입니다. \endif \if EN The HTTP request to inspect. \endifindexPath— \if KO 성공하면 확인된 index.html 절대 경로입니다. \endif \if EN When successful, receives the verified absolute index.html path. \endif반환: \if KO 안전하고 존재하는 인덱스 파일을 찾았는지 여부입니다. \endif \if EN Whether a safe, existing index file was found. \endif
\if KO message Bus 값을 보관합니다. \endif \if EN Stores the message bus value. \endif
\if KO options 값을 보관합니다. \endif \if EN Stores the options value. \endif
\if KO root Service Provider 값을 보관합니다. \endif \if EN Stores the root service provider value. \endif
\if KO web Host 값을 보관합니다. \endif \if EN Stores the web host value. \endif
DreamineBlazorServerHostOptions
\if KO 물리 디렉터리를 지정한 요청 경로의 추가 정적 파일 공급자로 등록합니다. \endif \if EN Adds a physical directory as an additional static-file provider at the specified request path. \endif
physicalPath— \if KO 제공할 물리 디렉터리 경로입니다. \endif \if EN The physical directory path to serve. \endifrequestPath— \if KO 정적 파일을 노출할 요청 경로입니다. \endif \if EN The request path on which files are exposed. \endif반환: \if KO 연속 구성을 위한 현재 옵션 인스턴스입니다. \endif \if EN The current options instance for chaining. \endif
\if KO 해제 가능한 공유 서비스 인스턴스를 Blazor Server 컨테이너에 등록할 수 있는지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether disposable shared-service instances may be registered in the Blazor Server container. \endif
\if KO 공개 ViewModel 클래스를 자동 등록할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether public ViewModel classes are registered automatically. \endif
\if KO 기본 파이프라인이 구성된 뒤 호출되는 선택적 콜백을 가져오거나 설정합니다. 추가 미들웨어나 정적 파일 공급자를 등록하는 데 사용합니다. \endif \if EN Gets or sets an optional callback invoked after the default pipeline is configured, used to add middleware or static-file providers. \endif
\if KO UseRouting 직후와 UseAntiforgery 전에 호출되는 선택적 콜백을 가져오거나 설정합니다. UseAuthorization 같은 엔드포인트 라우팅 의존 미들웨어를 추가합니다. \endif \if EN Gets or sets an optional callback invoked immediately after UseRouting and before UseAntiforgery for endpoint-routing-dependent middleware such as UseAuthorization. \endif
\if KO Blazor Server 호스트를 빌드하기 전에 호출되는 선택적 콜백을 가져오거나 설정합니다. 서버 DI 컨테이너에 Scoped 또는 Transient 서비스를 등록하는 데 사용합니다. \endif \if EN Gets or sets an optional callback invoked before the Blazor Server host is built, used to register scoped or transient services in the server container. \endif
\if KO 포함된 Blazor Server 호스트의 콘텐츠 루트 경로를 가져오거나 설정합니다. \endif \if EN Gets or sets the content-root path used by the embedded Blazor Server host. \endif
\if KO 가 일 때 사용할 호스트 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the host name used when is . \endif
\if KO 현재 프로세스 내부 서버 인스턴스의 고유 ID를 가져옵니다. \endif \if EN Gets the unique ID of the current in-process server instance. \endif
\if KO Kestrel이 모든 네트워크 인터페이스에서 수신할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether Kestrel listens on every network interface. \endif
\if KO 포함된 Blazor Server 호스트의 수신 포트를 가져오거나 설정합니다. \endif \if EN Gets or sets the listening port used by the embedded Blazor Server host. \endif
\if KO WPF 루트 공급자에서 Blazor Server 호스트로 공유할 서비스 형식 목록을 가져옵니다. \endif \if EN Gets the service types shared from the WPF root provider to the Blazor Server host. \endif
\if KO WPF 셸이 포함된 WebView2 컨트롤을 호스팅할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the WPF shell hosts an embedded WebView2 control. \endif
DreamineBlazorServerServiceCollectionExtensions
\if KO WPF 프로세스 안에서 실행될 Blazor Server 호스트를 등록합니다. \endif \if EN Registers a Blazor Server host that runs inside the WPF process. \endif
services— \if KO 호스트 서비스를 추가할 컬렉션입니다. \endif \if EN The collection to which host services are added. \endifconfigure— \if KO 선택적 호스트 옵션 구성 콜백입니다. \endif \if EN The optional host-options configuration callback. \endif반환: \if KO 연속 구성을 위한 동일한 서비스 컬렉션입니다. \endif \if EN The same service collection for chaining. \endif
DreamineWpfHostExtensions
\if KO 환경 변수 요청에 따라 프로세스 렌더링 모드를 소프트웨어 전용으로 설정합니다. \endif \if EN Sets the process rendering mode to software-only when requested by the environment variable. \endif
\if KO Generic Host를 시작하고 WPF 애플리케이션을 실행한 뒤 종료 시 호스트를 정리합니다. \endif \if EN Starts the Generic Host, runs the WPF application, and cleans up the host when the application exits. \endif
host— \if KO 구성된 Generic Host입니다. \endif \if EN The configured Generic Host. \endif\if KO Software Rendering Environment Variable 값을 보관합니다. \endif \if EN Stores the software rendering environment variable value. \endif
HybridHostControl
\if KO 컨트롤을 초기화하고 런타임 Loaded 처리기를 등록합니다. \endif \if EN Initializes the control and registers its runtime Loaded handler. \endif
InitializeComponent
\if KO 최초 로드 시 BlazorWebView와 루트 구성 요소를 구성합니다. \endif \if EN Configures the BlazorWebView and root component on the first load. \endif
sender— \if KO 로드된 컨트롤입니다. \endif \if EN The loaded control. \endife— \if KO 라우트된 로드 이벤트 데이터입니다. \endif \if EN The routed load-event data. \endif\if KO Blazor 호스트 페이지 경로를 가져오거나 설정합니다. \endif \if EN Gets or sets the Blazor host-page path. \endif
\if KO 마운트할 루트 Razor 구성 요소 형식을 가져오거나 설정합니다. \endif \if EN Gets or sets the root Razor component type to mount. \endif
\if KO 루트 구성 요소를 마운트할 CSS 선택자를 가져오거나 설정합니다. \endif \if EN Gets or sets the CSS selector on which the root component is mounted. \endif
\if KO Blazor에 제공할 서비스 공급자를 가져오거나 설정합니다. \endif \if EN Gets or sets the service provider supplied to Blazor. \endif
\if KO is Initialized 값을 보관합니다. \endif \if EN Stores the is initialized value. \endif
HybridWebViewHost
\if KO 안전한 캐시 경로와 브라우저 인수를 적용한 WebView2 인스턴스를 만듭니다. \endif \if EN Creates a WebView2 instance with a safe cache path and configured browser arguments. \endif
반환: \if KO 구성된 WebView2 인스턴스입니다. \endif \if EN The configured WebView2 instance. \endif
\if KO 지정한 WebView2에 서버 오프라인 안내 HTML을 표시합니다. \endif \if EN Displays server-offline HTML in the specified WebView2 instance. \endif
webView— \if KO 안내를 표시할 WebView2입니다. \endif \if EN The WebView2 in which to display the message. \endifurl— \if KO 연결할 수 없었던 URL입니다. \endif \if EN The URL that could not be reached. \endif반환: \if KO 안내 표시 작업입니다. \endif \if EN A task representing display of the message. \endif
IDreamineServiceProviderAware
\if KO 애플리케이션이 사용할 루트 서비스 공급자를 설정합니다. \endif \if EN Sets the root service provider used by the application. \endif
serviceProvider— \if KO 구성된 루트 서비스 공급자입니다. \endif \if EN The configured root service provider. \endifServiceCollectionExtensions
\if KO Dreamine Hybrid WPF 실행에 필요한 BlazorWebView와 메시지 버스 서비스를 등록합니다. \endif \if EN Registers the BlazorWebView and message-bus services required to run Dreamine Hybrid WPF. \endif
services— \if KO 서비스를 추가할 컬렉션입니다. \endif \if EN The collection to which services are added. \endif반환: \if KO 연속 구성을 위한 동일한 서비스 컬렉션입니다. \endif \if EN The same service collection for chaining. \endif
WebView2Initializer
\if KO 안전한 캐시 경로, 브라우저 인수 및 진단 이벤트를 적용한 WebView2를 만듭니다. \endif \if EN Creates a WebView2 with a safe cache path, browser arguments, and diagnostic events. \endif
반환: \if KO 구성된 WebView2 인스턴스입니다. \endif \if EN The configured WebView2 instance. \endif
\if KO 환경 변수 설정에 따라 저자원 WebView2 브라우저 인수를 만듭니다. \endif \if EN Builds low-resource WebView2 browser arguments according to the environment setting. \endif
반환: \if KO 추가 브라우저 인수 문자열이며 저자원 모드가 꺼졌으면 빈 문자열입니다. \endif \if EN The additional browser-argument string, or an empty string when low-resource mode is disabled. \endif
\if KO 현재 프로세스와 권한 수준별 WebView2 사용자 데이터 디렉터리를 만들고 반환합니다. \endif \if EN Creates and returns a WebView2 user-data directory scoped by process and integrity level. \endif
반환: \if KO 생성이 보장된 사용자 데이터 디렉터리 경로입니다. \endif \if EN The path of the ensured user-data directory. \endif
\if KO 현재 Windows ID가 관리자 역할에 속하는지 안전하게 확인합니다. \endif \if EN Safely determines whether the current Windows identity belongs to the administrator role. \endif
반환: \if KO 관리자이면 , 확인 실패 또는 일반 사용자이면 입니다. \endif \if EN for an administrator; for a standard user or when detection fails. \endif
\if KO WebView2 초기화를 보장하고 HTML 인코딩된 대상 URL과 함께 오프라인 안내를 표시합니다. \endif \if EN Ensures WebView2 initialization and displays an offline message containing the HTML-encoded target URL. \endif
webView— \if KO 안내를 표시할 WebView2입니다. \endif \if EN The WebView2 in which to display the message. \endifurl— \if KO 연결하지 못한 대상 URL입니다. \endif \if EN The target URL that could not be reached. \endif반환: \if KO WebView2 초기화 및 안내 표시 작업입니다. \endif \if EN A task representing WebView2 initialization and message display. \endif
\if KO Low Resource Mode Environment Variable 값을 보관합니다. \endif \if EN Stores the low resource mode environment variable value. \endif