Class Property
Definition class for properties.
Inheritance
Implements
Inherited Members
Namespace: Kephas.Model.Elements
Assembly: Kephas.Model.dll
Syntax
public class Property : ModelElementBase<IProperty>, IConstructibleElement, IProperty, IModelElement, INamedElement, IAggregatedElementInfo, IPropertyInfo, IValueElementInfo, IElementInfo, IExpando, IDynamicMetaObjectProvider, IIndexable, IAttributeProvider
Constructors
| Improve this Doc View SourceProperty(IModelConstructionContext, String)
Initializes a new instance of the Property class.
Declaration
public Property(IModelConstructionContext constructionContext, string name)
Parameters
Type | Name | Description |
---|---|---|
IModelConstructionContext | constructionContext | Context for the construction. |
System.String | name | The name. |
Properties
| Improve this Doc View SourceCanRead
Gets or sets a value indicating whether the property value can be read.
Declaration
public virtual bool CanRead { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
CanWrite
Gets or sets a value indicating whether the property can be written to.
Declaration
public virtual bool CanWrite { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ValueType
Gets or sets the type of the property.
Declaration
public ITypeInfo ValueType { get; protected set; }
Property Value
Type | Description |
---|---|
ITypeInfo | The type of the property. |
Methods
| Improve this Doc View SourceComputeValueType()
Calculates the property type.
Declaration
protected virtual ITypeInfo ComputeValueType()
Returns
Type | Description |
---|---|
ITypeInfo | The calculated property type. |
Exceptions
Type | Condition |
---|---|
ModelException | Thrown when the property has no parts which can be used to get the classifier. |
GetValue(Object)
Gets the value from the specified object.
Declaration
public object GetValue(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object. |
Returns
Type | Description |
---|---|
System.Object | The value. |
OnCompleteConstruction(IModelConstructionContext)
Called when the construction is complete.
Declaration
protected override void OnCompleteConstruction(IModelConstructionContext constructionContext)
Parameters
Type | Name | Description |
---|---|---|
IModelConstructionContext | constructionContext | Context for the construction. |
Overrides
SetValue(Object, Object)
Sets the specified value.
Declaration
public void SetValue(object obj, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object. |
System.Object | value | The value. |
TryGetRuntimePropertyInfo()
Tries to get the runtime property information for this property.
Declaration
protected virtual IRuntimePropertyInfo TryGetRuntimePropertyInfo()
Returns
Type | Description |
---|---|
IRuntimePropertyInfo | A IRuntimePropertyInfo or |