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.
ApplicationContextFactory.cs
Go to the documentation of this file.
1
//-----------------------------------------------------------------------
2
// <copyright file="ApplicationContextFactory.cs" company="Marimer LLC">
3
// Copyright (c) Marimer LLC. All rights reserved.
4
// Website: https://cslanet.com
5
// </copyright>
6
// <summary>Factory for creation of ApplicationContext instances for use in tests</summary>
7
//-----------------------------------------------------------------------
8
using
System;
9
using
System.Collections.Generic;
10
using
System.Text;
11
using
Microsoft
.
Extensions
.
DependencyInjection
;
12
13
namespace
Csla.TestHelpers
14
{
15
public
static
class
ApplicationContextFactory
16
{
17
23
public
static
ApplicationContext
CreateTestApplicationContext(
TestDIContext
context)
24
{
25
ApplicationContext
applicationContext;
26
27
applicationContext = context.
ServiceProvider
.GetRequiredService<
ApplicationContext
>();
28
return
applicationContext;
29
}
30
31
}
32
}
Csla.ApplicationContext
Provides consistent context information between the client and server DataPortal objects.
Definition:
ApplicationContext.cs:22
Csla.TestHelpers.TestDIContext
Type to carry context information for DI in unit tests
Definition:
TestDIContext.cs:19
Csla.TestHelpers.TestDIContext.ServiceProvider
IServiceProvider ServiceProvider
The service provider used to perform DI operations
Definition:
TestDIContext.cs:33
Csla.TestHelpers
Definition:
ApplicationContextFactory.cs:14
Microsoft.Extensions.DependencyInjection
Definition:
ServiceCollectionExtensions.cs:17
Microsoft.Extensions
Definition:
ServiceCollectionExtensions.cs:17
Microsoft
Definition:
ServiceCollectionExtensions.cs:17
Generated by
1.9.2