Esempio n. 1
0
 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);
         }
     }
 }
Esempio n. 2
0
		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));
		}
Esempio n. 3
0
		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);
		}
Esempio n. 4
0
 /// <summary>
 /// Removes an item from the list
 /// </summary>
 /// <param name="stringAttribute"></param>
 public void Remove(StringAttribute stringAttribute)
 {
     List.Remove(stringAttribute);
 }
Esempio n. 5
0
 /// <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);
 }
Esempio n. 6
0
		public StringExpression(StringAttribute property, StringOperator op, StringAttribute value)
		{
			_binExp = new BinaryExpression((NodeAttribute)property, BinaryExpression.GetOperator(op), BinaryExpression.GetNodeAttribute(value));
		}
 public StringAttributeChange()
 {
     StringAttribute = new StringAttribute();
 }
Esempio n. 8
0
		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");
			}
		}
Esempio n. 9
0
		public SearchOrder(StringAttribute propertyToOrder, OrderDirection direction) : this((NodeAttribute)propertyToOrder, direction) { }
 public StringAttributeChange(StringAttribute stringAttribute, string selectedString, bool isUserEntered)
 {
     StringAttribute = stringAttribute;
     SelectedString = selectedString;
     IsUserEntered = isUserEntered;
 }
Esempio n. 11
0
		public SearchOrder(StringAttribute propertyToOrder) : this(propertyToOrder, OrderDirection.Asc) { }
Esempio n. 12
0
        /// <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");
        }
Esempio n. 13
0
        /// <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));
        }
Esempio n. 14
0
 public SearchOrder(StringAttribute propertyToOrder, OrderDirection direction) : this((NodeAttribute)propertyToOrder, direction)
 {
 }
Esempio n. 15
0
 public SearchOrder(StringAttribute propertyToOrder) : this(propertyToOrder, OrderDirection.Asc)
 {
 }