static public ToGuid ( string value ) : System.Guid | ||
value | string | |
return | System.Guid |
static public Guid ToGuid(string value)
{
try
{
return new Guid(Trim(value));
}
catch (FormatException exception)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(value, "Guid", exception));
}
catch (ArgumentException exception)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(value, "Guid", exception));
}
catch (OverflowException exception)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(value, "Guid", exception));
}
}
XmlConverter::ToGuid ( byte buffer, int offset, int count ) : System.Guid |
public Guid ToGuid() { if (_type == ValueHandleType.Guid) { return(GetGuid()); } if (_type == ValueHandleType.UTF8) { return(XmlConverter.ToGuid(_bufferReader.Buffer, _offset, _length)); } return(XmlConverter.ToGuid(GetString())); }