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.
Go to the documentation of this file.
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>Class containing the default implementation for</summary>
8using System;
9using Csla.Properties;
10using Microsoft.Extensions.DependencyInjection;
12namespace Csla.Server
19 {
29 public Type GetFactoryType(string factoryName)
30 {
31 return Type.GetType(factoryName);
32 }
48 public object GetFactory(string factoryName)
49 {
50 var ft = GetFactoryType(factoryName);
51 if (ft == null)
52 throw new InvalidOperationException(
53 string.Format(Resources.FactoryTypeNotFoundException, factoryName));
54 return Reflection.MethodCaller.CreateInstance(ft);
55 }
56 }
A strongly-typed resource class, for looking up localized strings, etc.
static string FactoryTypeNotFoundException
Looks up a localized string similar to Factory type or assembly could not be loaded ({0}).
Class containing the default implementation for the FactoryLoader delegate used by the data portal ho...
object GetFactory(string factoryName)
Creates an instance of an object factory object for use by the data portal.
Type GetFactoryType(string factoryName)
Gets the type of the object factory.
Defines an interface to be implemented by a factory loader object that returns ObjectFactory objects ...