Chronos Plugins 5.9.0
This documentation covers the plugin interfaces definitions and an example implementation.
Loading...
Searching...
No Matches
MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor Class Reference

Custom property descriptor, redirecting get/set into our mPropsValues dictionary. More...

+ Inheritance diagram for MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor:
+ Collaboration diagram for MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor:

Public Member Functions

 MyPropertyDescriptor (string name, Type proptype, string unit=null)
 
void AddAttribute (Attribute someAttr)
 
override void SetValue (object component, object value)
 
override object GetValue (object component)
 
override bool CanResetValue (object component)
 
override void ResetValue (object component)
 
override bool ShouldSerializeValue (object component)
 

Protected Member Functions

override void FillAttributes (System.Collections.IList attributeList)
 

Properties

override Type PropertyType [get]
 
override Type ComponentType [get]
 
override bool IsReadOnly [get]
 

Private Attributes

readonly List< Attribute > mExtraAttributes = new List<Attribute>()
 
readonly string mName
 

Detailed Description

Custom property descriptor, redirecting get/set into our mPropsValues dictionary.

Definition at line 100 of file MockDynamicProperties.cs.

Constructor & Destructor Documentation

◆ MyPropertyDescriptor()

MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.MyPropertyDescriptor ( string name,
Type proptype,
string unit = null )

Member Function Documentation

◆ AddAttribute()

void MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.AddAttribute ( Attribute someAttr)

◆ CanResetValue()

override bool MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.CanResetValue ( object component)

Definition at line 143 of file MockDynamicProperties.cs.

144 {
145 return false;
146 }

◆ FillAttributes()

override void MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.FillAttributes ( System.Collections.IList attributeList)
protected

Definition at line 118 of file MockDynamicProperties.cs.

119 {
120 base.FillAttributes(attributeList);
121 foreach (var someAttr in mExtraAttributes)
122 {
123 attributeList.Add(someAttr);
124 }
125 }

References MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.mExtraAttributes.

◆ GetValue()

override object MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.GetValue ( object component)

Definition at line 136 of file MockDynamicProperties.cs.

137 {
138 ((FlexibleArguments) component).mPropsValues.TryGetValue(mName, out var retval);
139 return retval;
140 }
readonly Dictionary< string, object > mPropsValues
Storage for fake property names and values.

References MockPlugin.Tasks.FlexibleArguments.FlexibleArguments(), MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.mName, and MockPlugin.Tasks.FlexibleArguments.mPropsValues.

◆ ResetValue()

override void MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.ResetValue ( object component)

Definition at line 148 of file MockDynamicProperties.cs.

149 {
150 // nothing
151 }

◆ SetValue()

override void MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.SetValue ( object component,
object value )

◆ ShouldSerializeValue()

override bool MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.ShouldSerializeValue ( object component)

Definition at line 155 of file MockDynamicProperties.cs.

156 {
157 return true;
158 }

Member Data Documentation

◆ mExtraAttributes

readonly List<Attribute> MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.mExtraAttributes = new List<Attribute>()
private

◆ mName

Property Documentation

◆ ComponentType

override Type MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.ComponentType
get

Definition at line 129 of file MockDynamicProperties.cs.

◆ IsReadOnly

override bool MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.IsReadOnly
get

Definition at line 153 of file MockDynamicProperties.cs.

◆ PropertyType

override Type MockPlugin.Tasks.FlexibleArguments.MyPropertyDescriptor.PropertyType
get

The documentation for this class was generated from the following file: