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.
PropertyInfoFactory.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="PropertyInfoFactory.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Creates the factory object that</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Linq;
11using System.Text;
12
14{
19 public static class PropertyInfoFactory
20 {
21 private static Csla.Core.IPropertyInfoFactory _factory;
22
27 public static Csla.Core.IPropertyInfoFactory Factory
28 {
29 get
30 {
31 if (_factory == null)
32 {
33 var typeName = Csla.Configuration.ConfigurationManager.AppSettings["CslaPropertyInfoFactory"];
34 if (string.IsNullOrEmpty(typeName))
35 {
36 _factory = new DefaultPropertyInfoFactory();
37 }
38 else
39 {
40 var type = Type.GetType(typeName);
41 _factory = (Csla.Core.IPropertyInfoFactory)Reflection.MethodCaller.CreateInstance(type);
42 }
43 }
44 return _factory;
45 }
46 set
47 {
48 _factory = value;
49 }
50 }
51 }
52}
Defines the interface for a factory object that creates IPropertyInfo objects.