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
//-----------------------------------------------------------------------
8
using
System;
9
using
System.Collections.Generic;
10
using
System.Text;
11
using
Csla
.
Configuration
;
12
using
Csla
.
TestHelpers
;
13
using
Microsoft
.
Extensions
.
DependencyInjection
.Extensions;
14
using
Microsoft
.
Extensions
.Hosting;
15
16
namespace
Microsoft.Extensions.DependencyInjection
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();
35
services.TryAddSingleton<
Csla
.
Core
.
IContextManager
,
Csla
.
Core
.
ApplicationContextManagerStatic
>();
36
services.TryAddSingleton<
Csla
.
Server
.
Dashboard
.
IDashboard
,
Csla
.
Server
.
Dashboard
.
Dashboard
>();
37
38
return
services;
39
}
40
41
}
42
}
Csla.Core.ApplicationContextManagerStatic
Context manager for the user property and local/client/global context dictionaries that uses static f...
Definition:
ApplicationContextManagerStatic.cs:21
Csla.Server.Dashboard.Dashboard
Data portal server dashboard.
Definition:
Dashboard.cs:21
Csla.TestHelpers.TestHostEnvironment
Basic implementation of IHostEnvironment, to support testing of anything that is dependent upon there...
Definition:
TestHostEnvironment.cs:22
Csla.Core.IContextManager
Defines the interface for an application context manager type.
Definition:
IContextManager.cs:18
Csla.Server.Dashboard.IDashboard
Data portal server dashboard.
Definition:
IDashboard.cs:17
Csla.Configuration
Definition:
Csla.AspNetCore/ConfigurationExtensions.cs:20
Csla.Core
Definition:
AddedNewEventArgs.cs:11
Csla.Server.Dashboard
Definition:
Activity.cs:4
Csla.Server
Definition:
HttpPortal.cs:22
Csla.TestHelpers
Definition:
ApplicationContextFactory.cs:14
Csla
Definition:
BusinessRuleCases.cs:5
Microsoft.Extensions.DependencyInjection
Definition:
ServiceCollectionExtensions.cs:17
Microsoft.Extensions
Definition:
ServiceCollectionExtensions.cs:17
Microsoft
Definition:
ServiceCollectionExtensions.cs:17
Generated by
1.9.2