public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues) { dynamic obj = new FluidObject(); foreach (var key in propertyValues.Keys) { obj[key.ToString()] = propertyValues[key]; } return(obj); }
object ICloneable.Clone() { var clone = new FluidObject(null, this._value) as IDictionary <string, object>; foreach (var key in this._values.Keys) { clone[key] = (this._values[key] is ICloneable) ? (this._values[key] as ICloneable).Clone() : this._values[key]; } return(clone); }
public FluidObjectTypeDescriptor(object instance) { this._instance = instance as FluidObject; }
internal FluidObject(FluidObject parent, object value) { this._parent = parent; this._value = (value is FluidObject) ? ((FluidObject)value)._value : value; }