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.PropertyInfo< T > Class Template Reference

Maintains metadata about a property. More...

Inheritance diagram for Csla.PropertyInfo< T >:
Csla.Core.IPropertyInfo Csla.Core.IMemberInfo

Public Member Functions

 PropertyInfo (string name)
 Creates a new instance of this class. More...
 
 PropertyInfo (string name, RelationshipTypes relationship)
 Creates a new instance of this class. More...
 
 PropertyInfo (string name, T defaultValue)
 Creates a new instance of this class. More...
 
 PropertyInfo (string name, string friendlyName)
 Creates a new instance of this class. More...
 
 PropertyInfo (string name, string friendlyName, Type containingType)
 Creates a new instance of this class. More...
 
 PropertyInfo (string name, string friendlyName, Type containingType, T defaultValue)
 Creates a new instance of this class. More...
 
 PropertyInfo (string name, string friendlyName, Type containingType, RelationshipTypes relationship)
 Creates a new instance of this class. More...
 
 PropertyInfo (string name, string friendlyName, Type containingType, T defaultValue, RelationshipTypes relationship)
 Creates a new instance of this class. More...
 
System.Reflection.PropertyInfo GetPropertyInfo ()
 Gets the System.Reflection.PropertyInfo object representing the property. More...
 

Static Public Member Functions

static T DataBindingFriendlyDefault ()
 Creates the CSLA Data Binding Friendly default for the given type T. More...
 

Protected Member Functions

virtual Core.FieldManager.IFieldData NewFieldData (string name)
 Create and return a new IFieldData object to store an instance value for this property. More...
 

Properties

string Name [get]
 Gets the property name value. More...
 
Type Type [get]
 Gets the type of the property. More...
 
virtual string FriendlyName [get]
 Gets the friendly display name for the property. More...
 
virtual T DefaultValue [get]
 Gets the default initial value for the property. More...
 
RelationshipTypes RelationshipType [get]
 Gets the relationship between the declaring object and the object reference in the property. More...
 
bool IsChild [get]
 Gets a value indicating whether this property references a child in the object graph. More...
 
- Properties inherited from Csla.Core.IPropertyInfo
Type Type [get]
 Gets the type of the property. More...
 
string FriendlyName [get]
 Gets the friendly display name for the property. More...
 
object DefaultValue [get]
 Gets the default initial value for the property. More...
 
RelationshipTypes RelationshipType [get]
 Gets the relationship between the declaring object and the object reference in the property. More...
 
int Index [getset]
 Gets or sets the index position for the managed field storage behind the property. More...
 
bool IsChild [get]
 Gets a value indicating whether this property references a child in the object graph. More...
 
- Properties inherited from Csla.Core.IMemberInfo
string Name [get]
 Gets the member name value. More...
 

Detailed Description

Maintains metadata about a property.

Template Parameters
TData type of the property.

Definition at line 21 of file Csla/PropertyInfo.cs.

Constructor & Destructor Documentation

◆ PropertyInfo() [1/8]

Csla.PropertyInfo< T >.PropertyInfo ( string  name)

Creates a new instance of this class.

Parameters
nameName of the property.

Definition at line 27 of file Csla/PropertyInfo.cs.

◆ PropertyInfo() [2/8]

Csla.PropertyInfo< T >.PropertyInfo ( string  name,
RelationshipTypes  relationship 
)

Creates a new instance of this class.

Parameters
nameName of the property.
relationshipRelationship with referenced object.

Definition at line 36 of file Csla/PropertyInfo.cs.

◆ PropertyInfo() [3/8]

Csla.PropertyInfo< T >.PropertyInfo ( string  name,
defaultValue 
)

Creates a new instance of this class.

Parameters
nameName of the property.
defaultValueDefault value for the property.

Definition at line 47 of file Csla/PropertyInfo.cs.

◆ PropertyInfo() [4/8]

Csla.PropertyInfo< T >.PropertyInfo ( string  name,
string  friendlyName 
)

Creates a new instance of this class.

Parameters
nameName of the property.
friendlyNameFriendly display name for the property.

Definition at line 58 of file Csla/PropertyInfo.cs.

◆ PropertyInfo() [5/8]

Csla.PropertyInfo< T >.PropertyInfo ( string  name,
string  friendlyName,
Type  containingType 
)

Creates a new instance of this class.

Parameters
nameName of the property.
friendlyNameFriendly display name for the property.
containingTypeFactory to provide display name from attributes.

Definition at line 72 of file Csla/PropertyInfo.cs.

◆ PropertyInfo() [6/8]

Csla.PropertyInfo< T >.PropertyInfo ( string  name,
string  friendlyName,
Type  containingType,
defaultValue 
)

Creates a new instance of this class.

Parameters
nameName of the property.
friendlyNameFriendly display name for the property.
containingTypeFactory to provide display name from attributes.
defaultValueDefault value for the property.

Definition at line 89 of file Csla/PropertyInfo.cs.

◆ PropertyInfo() [7/8]

Csla.PropertyInfo< T >.PropertyInfo ( string  name,
string  friendlyName,
Type  containingType,
RelationshipTypes  relationship 
)

Creates a new instance of this class.

Parameters
nameName of the property.
friendlyNameFriendly display name for the property.
containingTypeFactory to provide display name from attributes.
relationshipRelationship with referenced object.

Definition at line 104 of file Csla/PropertyInfo.cs.

◆ PropertyInfo() [8/8]

Csla.PropertyInfo< T >.PropertyInfo ( string  name,
string  friendlyName,
Type  containingType,
defaultValue,
RelationshipTypes  relationship 
)

Creates a new instance of this class.

Parameters
nameName of the property.
friendlyNameFriendly display name for the property.
containingTypeFactory to provide display name from attributes.
defaultValueDefault value for the property.
relationshipRelationship with referenced object.

Definition at line 123 of file Csla/PropertyInfo.cs.

Member Function Documentation

◆ DataBindingFriendlyDefault()

static T Csla.PropertyInfo< T >.DataBindingFriendlyDefault ( )
static

Creates the CSLA Data Binding Friendly default for the given type T.

Returns
Default value for T which is compatible with Data Binding

Definition at line 278 of file Csla/PropertyInfo.cs.

◆ GetPropertyInfo()

System.Reflection.PropertyInfo Csla.PropertyInfo< T >.GetPropertyInfo ( )

Gets the System.Reflection.PropertyInfo object representing the property.

Returns

Implements Csla.Core.IPropertyInfo.

◆ NewFieldData()

virtual Core.FieldManager.IFieldData Csla.PropertyInfo< T >.NewFieldData ( string  name)
protectedvirtual

Create and return a new IFieldData object to store an instance value for this property.

Parameters
nameProperty name.

Implements Csla.Core.IPropertyInfo.

Definition at line 221 of file Csla/PropertyInfo.cs.

Property Documentation

◆ DefaultValue

virtual T Csla.PropertyInfo< T >.DefaultValue
get

Gets the default initial value for the property.

This value is used to initialize the property's value, and is returned from a property get if the user is not authorized to read the property.

Definition at line 198 of file Csla/PropertyInfo.cs.

◆ FriendlyName

virtual string Csla.PropertyInfo< T >.FriendlyName
get

Gets the friendly display name for the property.

If no friendly name was provided, the property name itself is returned as a result.

Definition at line 159 of file Csla/PropertyInfo.cs.

◆ IsChild

bool Csla.PropertyInfo< T >.IsChild
get

Gets a value indicating whether this property references a child in the object graph.

Definition at line 256 of file Csla/PropertyInfo.cs.

◆ Name

string Csla.PropertyInfo< T >.Name
get

Gets the property name value.

Definition at line 137 of file Csla/PropertyInfo.cs.

◆ RelationshipType

RelationshipTypes Csla.PropertyInfo< T >.RelationshipType
get

Gets the relationship between the declaring object and the object reference in the property.

Definition at line 234 of file Csla/PropertyInfo.cs.

◆ Type

Type Csla.PropertyInfo< T >.Type
get

Gets the type of the property.

Definition at line 142 of file Csla/PropertyInfo.cs.