CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
ServiceCollectionExtensions.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="ServiceCollectionExtensions.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Wiring up of DI for Csla, for enabling test projects</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Text;
12using Csla.TestHelpers;
14using Microsoft.Extensions.Hosting;
15
17{
18
22 public static class ServiceCollectionExtensions
23 {
24
30 public static IServiceCollection AddCslaTesting(this IServiceCollection services)
31 {
32 services.TryAddTransient<IHostEnvironment, TestHostEnvironment>();
33 services.AddLogging();
34 services.AddCsla();
36 services.TryAddSingleton<Csla.Server.Dashboard.IDashboard, Csla.Server.Dashboard.Dashboard>();
37
38 return services;
39 }
40
41 }
42}
Context manager for the user property and local/client/global context dictionaries that uses static f...
Data portal server dashboard.
Definition: Dashboard.cs:21
Basic implementation of IHostEnvironment, to support testing of anything that is dependent upon there...
Defines the interface for an application context manager type.
Data portal server dashboard.
Definition: IDashboard.cs:17