protected virtual void DeserializePropertyElement(XmlReader reader) { if (reader == null) { throw new ArgumentNullException("reader"); } switch (reader.Name) { case "name": Name = reader.ReadString().Trim(); break; case "dataType": DataType = reader.ReadString().Trim(); Type = controller.DeserializeDataType(DataType); break; case "defaultValue": DefaultValue = reader.ReadString(); break; case "allowedValueList": DeserializeAllowedValues(reader); break; case "allowedValueRange": AllowedValueRange = new AllowedValueRange(Type, reader.ReadSubtree()); break; default: // This is a workaround for Mono bug 334752 reader.Skip(); break; } }
public StateVariable(string name, string dataType, AllowedValueRange allowedValueRange, StateVariableOptions options) : this(name, dataType, options) { AllowedValueRange = allowedValueRange; }
public override bool Equals(object obj) { AllowedValueRange range = obj as AllowedValueRange; return(range == this); }
public StateVariable(string name, string dataType, AllowedValueRange allowedValueRange) : this(name, dataType, allowedValueRange, null) { }
protected virtual void DeserializePropertyElement(XmlReader reader) { if (reader == null) throw new ArgumentNullException ("reader"); switch (reader.Name) { case "name": Name = reader.ReadString ().Trim (); break; case "dataType": DataType = reader.ReadString ().Trim (); Type = controller.DeserializeDataType (DataType); break; case "defaultValue": DefaultValue = reader.ReadString (); break; case "allowedValueList": DeserializeAllowedValues (reader); break; case "allowedValueRange": AllowedValueRange = new AllowedValueRange (Type, reader.ReadSubtree ()); break; default: // This is a workaround for Mono bug 334752 reader.Skip (); break; } }