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.
DefaultPropertyInfoFactory.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="DefaultPropertyInfoFactory.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Creates PropertyInfo objects.</summary>
7//-----------------------------------------------------------------------
8using System;
9
11{
15 internal class DefaultPropertyInfoFactory : Csla.Core.IPropertyInfoFactory
16 {
25 public Csla.PropertyInfo<T> Create<T>(Type containingType, string name)
26 {
27 return new Csla.PropertyInfo<T>(name, null, containingType, PropertyInfo<T>.DataBindingFriendlyDefault(), RelationshipTypes.None);
28 }
29
41 public Csla.PropertyInfo<T> Create<T>(Type containingType, string name, string friendlyName)
42 {
43 return new Csla.PropertyInfo<T>(name, friendlyName, containingType, PropertyInfo<T>.DataBindingFriendlyDefault(), RelationshipTypes.None);
44 }
45
59 public Csla.PropertyInfo<T> Create<T>(Type containingType, string name, string friendlyName, RelationshipTypes relationship)
60 {
61 return new Csla.PropertyInfo<T>(name, friendlyName, containingType, PropertyInfo<T>.DataBindingFriendlyDefault(), relationship);
62 }
63
78 public Csla.PropertyInfo<T> Create<T>(Type containingType, string name, string friendlyName, T defaultValue)
79 {
80 return new Csla.PropertyInfo<T>(name, friendlyName, containingType, defaultValue, RelationshipTypes.None);
81 }
82
99 public Csla.PropertyInfo<T> Create<T>(Type containingType, string name, string friendlyName, T defaultValue, RelationshipTypes relationship)
100 {
101 return new Csla.PropertyInfo<T>(name, friendlyName, containingType, defaultValue, relationship);
102 }
103 }
104}
Maintains metadata about a property.
static T DataBindingFriendlyDefault()
Creates the CSLA Data Binding Friendly default for the given type T.
Defines the interface for a factory object that creates IPropertyInfo objects.
RelationshipTypes
List of valid relationship types between a parent object and another object through a managed propert...