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.
▼
CSLA.NET
AnalyzerReleases.Shipped
AnalyzerReleases.Unshipped
CSLA .NET
►
Packages
►
Classes
▼
Files
►
File List
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Macros
Pages
ObjectFactoryLoaderT.cs
Go to the documentation of this file.
1
//-----------------------------------------------------------------------
2
// <copyright file="ObjectFactoryLoader.cs" company="Marimer LLC">
3
// Copyright (c) Marimer LLC. All rights reserved.
4
// Website: https://cslanet.com
5
// </copyright>
6
// <summary>no summary</summary>
7
//-----------------------------------------------------------------------
8
using
System;
9
using
System.Collections.Generic;
10
using
System.Linq;
11
using
System.Text;
12
13
namespace
Csla.Test.ObjectFactory
14
{
15
public
class
ObjectFactoryLoader
<T> :
Csla
.Server.IObjectFactoryLoader where T: class
16
{
17
private
readonly
ApplicationContext
_applicationContext;
18
public
ObjectFactoryLoader
(
ApplicationContext
applicationContext)
19
{
20
_applicationContext = applicationContext;
21
}
22
23
public
Type
GetFactoryType
(
string
factoryName)
24
{
25
if
(factoryName ==
"Csla.Test.ObjectFactory.RootFactory, Csla.Tests"
)
26
{
27
return
typeof(T);
28
}
29
else
30
return
null
;
31
}
32
33
public
object
GetFactory
(
string
factoryName)
34
{
35
if
(factoryName ==
"Csla.Test.ObjectFactory.RootFactory, Csla.Tests"
)
36
{
37
return
_applicationContext.CreateInstanceDI<T>();
38
}
39
else
40
return
null
;
41
}
42
}
43
}
Csla.ApplicationContext
Provides consistent context information between the client and server DataPortal objects.
Definition:
ApplicationContext.cs:22
Csla.Test.ObjectFactory.ObjectFactoryLoader
Definition:
ObjectFactoryLoaderT.cs:16
Csla.Test.ObjectFactory.ObjectFactoryLoader.ObjectFactoryLoader
ObjectFactoryLoader(ApplicationContext applicationContext)
Definition:
ObjectFactoryLoaderT.cs:18
Csla.Test.ObjectFactory.ObjectFactoryLoader.GetFactoryType
Type GetFactoryType(string factoryName)
Returns the type of the factory object.
Definition:
ObjectFactoryLoaderT.cs:23
Csla.Test.ObjectFactory.ObjectFactoryLoader.GetFactory
object GetFactory(string factoryName)
Returns an ObjectFactory object.
Definition:
ObjectFactoryLoaderT.cs:33
Csla.Test.ObjectFactory
Definition:
Csla.test/ObjectFactory/CommandObject.cs:14
Csla
Definition:
BusinessRuleCases.cs:5
Generated by
1.9.2