示例#1
0
 public void SetValueType(Uri valueType)
 {
     if (valueType != null)
     {
         _valueType = ValueTypeExtension.FromString(valueType.ToString());
     }
     else
     {
         _valueType = ValueType.Unknown;
     }
 }
示例#2
0
        public Uri GetValueType()
        {
            if (valueType != ValueType.Unknown)
            {
                try {
                    return(new Uri(ValueTypeExtension.ToString(valueType)));
                } catch (UriFormatException exception) {
                    // This should never happen since we control the possible values of the ValueType enum.
                    throw new SystemException(exception.Message, exception);
                }
            }

            return(null);
        }