public void SetValueType(Uri valueType) { if (valueType != null) { _valueType = ValueTypeExtension.FromString(valueType.ToString()); } else { _valueType = ValueType.Unknown; } }
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); }