Beispiel #1
0
 /// <summary>
 /// Adds a <see cref="TypedValue"/> based on the <c>value</c>
 /// and <c>type</c> parameters to the <see cref="IList"/> in the
 /// <c>list</c> parameter.
 /// </summary>
 /// <param name="value">The value of the Property.</param>
 /// <param name="type">The <see cref="IType"/> of the Property.</param>
 /// <param name="list">The <see cref="IList"/> to add the <see cref="TypedValue"/> to.</param>
 /// <remarks>
 /// This method will add <see cref="TypedValue"/> objects to the <c>list</c> parameter.
 /// </remarks>
 protected void AddPropertyTypedValue(object value, IType type, IList list)
 {
     // TODO: I don't like this at all - why don't we have it return a TypedValue[]
     // or an ICollection that can be added to the list instead of modifying the
     // parameter passed in.
     if (value != null)
     {
         if (value is string)
         {
             string stringValue = (string)value;
             if (_isIgnoreCaseEnabled)
             {
                 stringValue = stringValue.ToLower();
             }
             if (_isLikeEnabled)
             {
                 stringValue = _matchMode.ToMatchString(stringValue);
             }
             value = stringValue;
         }
         list.Add(new TypedValue(type, value));
     }
 }
		public InsensitiveLikeExpression( string propertyName, string value, MatchMode matchMode )
			: this( propertyName, matchMode.ToMatchString( value ) )
		{
		}
Beispiel #3
0
 public InsensitiveLikeExpression(string propertyName, string value, MatchMode matchMode)
     : this(propertyName, matchMode.ToMatchString(value))
 {
 }