Inheritance: RmAttributeValue
示例#1
0
 /// <summary>
 /// Sets the value of a nullable attribute.
 /// </summary>
 /// <typeparam name="TValue">The type of the value.</typeparam>
 /// <param name="attributeName">Name of the attribute.</param>
 /// <param name="value">The value.</param>
 protected void SetNullable <TValue>(RmAttributeName attributeName, Nullable <TValue> value)
     where TValue : struct, IComparable
 {
     if (value.HasValue)
     {
         this[attributeName].Value = value.Value;
     }
     else
     {
         this[attributeName] = new RmAttributeValueSingle();
     }
 }