public string this[string name] { get { foreach (StringAttribute stringAttribute in this) { if (stringAttribute.Name == name) return stringAttribute.Value; } return null; } set { foreach (StringAttribute stringAttribute in this) { if (stringAttribute.Name == name) { if (value == null) List.Remove(stringAttribute); else stringAttribute.Value = value; return; } } if (value != null) { var stringAttribute = new StringAttribute { Name = name, Value = value }; List.Add(stringAttribute); } } }
public StringExpression(PropertyType property, StringOperator op, StringAttribute value) { if (property == null) throw new ArgumentNullException("property"); if (property.DataType != DataType.String) throw GetWrongPropertyDataTypeException("property", DataType.String); _binExp = new BinaryExpression(property, BinaryExpression.GetOperator(op), BinaryExpression.GetNodeAttribute(value)); }
public StringExpression(StringAttribute property, StringOperator op, PropertyType value) { if (value == null) throw new ArgumentNullException("value"); if (value.DataType != DataType.String) throw GetWrongPropertyDataTypeException("value", DataType.String); _binExp = new BinaryExpression((NodeAttribute)property, BinaryExpression.GetOperator(op), value); }
/// <summary> /// Removes an item from the list /// </summary> /// <param name="stringAttribute"></param> public void Remove(StringAttribute stringAttribute) { List.Remove(stringAttribute); }
/// <summary> /// Add's an item to the list and returns the index /// </summary> /// <param name="stringAttribute"></param> /// <returns></returns> public int Add(StringAttribute stringAttribute) { return List.Add(stringAttribute); }
public StringExpression(StringAttribute property, StringOperator op, StringAttribute value) { _binExp = new BinaryExpression((NodeAttribute)property, BinaryExpression.GetOperator(op), BinaryExpression.GetNodeAttribute(value)); }
public StringAttributeChange() { StringAttribute = new StringAttribute(); }
public static NodeAttribute GetNodeAttribute(StringAttribute attr) { switch (attr) { case StringAttribute.Name: return NodeAttribute.Name; case StringAttribute.Path: return NodeAttribute.Path; case StringAttribute.ETag: return NodeAttribute.ETag; case StringAttribute.LockToken: return NodeAttribute.LockToken; default: throw new NotImplementedException("Unknown StringAttribute"); } }
public SearchOrder(StringAttribute propertyToOrder, OrderDirection direction) : this((NodeAttribute)propertyToOrder, direction) { }
public StringAttributeChange(StringAttribute stringAttribute, string selectedString, bool isUserEntered) { StringAttribute = stringAttribute; SelectedString = selectedString; IsUserEntered = isUserEntered; }
public SearchOrder(StringAttribute propertyToOrder) : this(propertyToOrder, OrderDirection.Asc) { }
/// <summary> /// Populates the element (including children) with information from its XML definition. /// </summary> /// <param name="Input">XML definition.</param> public override void FromXml(XmlElement Input) { base.FromXml(Input); this.url = new StringAttribute(Input, "url"); }
/// <summary> /// Sets properties and attributes of class in accordance with XML definition. /// </summary> /// <param name="Definition">XML definition</param> public override Task FromXml(XmlElement Definition) { this.name = new StringAttribute(XML.Attribute(Definition, "name")); return(base.FromXml(Definition)); }
public SearchOrder(StringAttribute propertyToOrder, OrderDirection direction) : this((NodeAttribute)propertyToOrder, direction) { }
public SearchOrder(StringAttribute propertyToOrder) : this(propertyToOrder, OrderDirection.Asc) { }