Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,16 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
.UseConfiguration(configure: configBuilder =>
configBuilder
.EmbeddedSource<App>()
#pragma warning disable IL2026 // Suppress trimming warnings for Configuration extensions
.Section<AppConfig>()
#pragma warning restore IL2026
)
#endif
#if useLocalization
// Enable localization (see appsettings.json for supported languages)
#pragma warning disable IL2026 // Suppress trimming warnings for Localization extensions
.UseLocalization()
#pragma warning restore IL2026
#endif
#if (useServer && (useHttpKiota || useHttpRefit))
// Register Json serializers (ISerializer and ISerializer)
Expand Down Expand Up @@ -206,9 +210,13 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
//services.AddSingleton<IMyService, MyService>();
})
#if (useReactiveExtensionsNavigation)
#pragma warning disable IL2026 // Suppress trimming warnings for Navigation extensions
.UseNavigation(ReactiveViewModelMappings.ViewModelMappings, RegisterRoutes)
#pragma warning restore IL2026
#elif (useExtensionsNavigation)
#pragma warning disable IL2026 // Suppress trimming warnings for Navigation extensions
.UseNavigation(RegisterRoutes)
#pragma warning restore IL2026
#endif
);
MainWindow = builder.Window;
Expand All @@ -222,7 +230,9 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)

#if useFrameNav
//-:cnd:noEmit
#pragma warning disable IL2026 // Suppress trimming warnings for IApplicationBuilder.Build
Host = builder.Build();
#pragma warning restore IL2026

// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
Expand Down Expand Up @@ -253,13 +263,16 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
//+:cnd:noEmit
#elif (!useAuthentication)
#if (!enableDeveloperMode)
#pragma warning disable IL2026 // Suppress trimming warnings for NavigateAsync
Host = await builder.NavigateAsync<Shell>();
#pragma warning restore IL2026
#else
$$EnableDeveloperMode_Region_Navigate$$
();
#endif
#else
#if (!enableDeveloperMode)
#pragma warning disable IL2026 // Suppress trimming warnings for NavigateAsync
Host = await builder.NavigateAsync<Shell>
#else
$$EnableDeveloperMode_Region_Navigate$$
Expand All @@ -277,6 +290,7 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
await navigator.NavigateViewModelAsync<$loginRouteViewModel$>(this, qualifier: Qualifiers.Nested);
}
});
#pragma warning restore IL2026
#endif
}
#if (useExtensionsNavigation)
Expand Down
Loading