C# Class ExoModel.ModelValueProperty

Represents a property that exposes strongly-typed data as leaves of a model hierarchy.
Inheritance: ModelProperty
Exibir arquivo Open project: vc3/ExoModel

Private Properties

Property Type Description

Public Methods

Method Description
CoerceValue ( object value ) : object

Attempts to coerce the specific value into the appropriate object representation for the current property type.

FormatValue ( object value ) : string

Gets the formatted representation of a value based on the formatting rules defined for the current property.

FormatValue ( object value, string format ) : string

Gets the formatted representation of a value based on the formatting rules defined for the current property.

FormatValue ( object value, string format, IFormatProvider provider ) : string

Gets the formatted representation of a value based on the formatting rules defined for the current property.

GetDefaultValue ( ) : object

Gets the current default value for this property, or null if no default value has been specified.

Protected Methods

Method Description
GetFormattedValue ( ModelInstance instance, string format ) : string

Gets the formatted value of the property for the specified instance.

GetFormattedValue ( ModelInstance instance, string format, IFormatProvider provider ) : string

Gets the formatted value of the property for the specified instance.

ModelValueProperty ( ModelType declaringType, string name, string label, string helptext, string format, bool isStatic, Type propertyType, TypeConverter converter, bool isList = false, bool isReadOnly = false, bool isPersisted = true, Attribute attributes = null, LambdaExpression defaultValue = null ) : System

Method Details

CoerceValue() public method

Attempts to coerce the specific value into the appropriate object representation for the current property type.
public CoerceValue ( object value ) : object
value object
return object

FormatValue() public method

Gets the formatted representation of a value based on the formatting rules defined for the current property.
public FormatValue ( object value ) : string
value object The correct value type to format
return string

FormatValue() public method

Gets the formatted representation of a value based on the formatting rules defined for the current property.
public FormatValue ( object value, string format ) : string
value object The correct value type to format
format string The format specifier, or null to use the default property format
return string

FormatValue() public method

Gets the formatted representation of a value based on the formatting rules defined for the current property.
public FormatValue ( object value, string format, IFormatProvider provider ) : string
value object The correct value type to format
format string The format specifier, or null to use the default property format
provider IFormatProvider The format provider, or null to use the property's default format provider
return string

GetDefaultValue() public method

Gets the current default value for this property, or null if no default value has been specified.
public GetDefaultValue ( ) : object
return object

GetFormattedValue() protected method

Gets the formatted value of the property for the specified instance.
protected GetFormattedValue ( ModelInstance instance, string format ) : string
instance ModelInstance
format string
return string

GetFormattedValue() protected method

Gets the formatted value of the property for the specified instance.
protected GetFormattedValue ( ModelInstance instance, string format, IFormatProvider provider ) : string
instance ModelInstance
format string
provider IFormatProvider
return string

ModelValueProperty() protected method

protected ModelValueProperty ( ModelType declaringType, string name, string label, string helptext, string format, bool isStatic, Type propertyType, TypeConverter converter, bool isList = false, bool isReadOnly = false, bool isPersisted = true, Attribute attributes = null, LambdaExpression defaultValue = null ) : System
declaringType ModelType
name string
label string
helptext string
format string
isStatic bool
propertyType System.Type
converter System.ComponentModel.TypeConverter
isList bool
isReadOnly bool
isPersisted bool
attributes System.Attribute
defaultValue System.Linq.Expressions.LambdaExpression
return System