CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Xaml.Shared/ConfigurationExtensions.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="WebConfiguration.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Implement extension methods for .NET Core configuration</summary>
7//-----------------------------------------------------------------------
8using System;
9using Microsoft.Extensions.Hosting;
10
11namespace Csla.Configuration
12{
16 public static class XamlConfigurationExtensions
17 {
22 public static HostBuilder UseCsla(this HostBuilder builder)
23 {
24 UseCsla(builder, null);
25 return builder;
26 }
27
33 public static HostBuilder UseCsla(
34 this HostBuilder builder, Action<CslaConfiguration> config)
35 {
36 CslaConfiguration.Configure().
37 ContextManager(typeof(Csla.Xaml.ApplicationContextManager));
38 config?.Invoke(CslaConfiguration.Configure());
39 return builder;
40 }
41 }
42}
ApplicationContextManager for WPF applications