* Support for non absolute URIs
* Fix test (URIs now return escaped strings) git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3367 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -664,7 +664,18 @@ namespace OpenMetaverse.StructuredData
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public override string AsString() { return value != null ? value.AbsoluteUri : String.Empty; }
|
||||
public override string AsString()
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
if (value.IsAbsoluteUri)
|
||||
return value.AbsoluteUri;
|
||||
else
|
||||
return value.ToString();
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public override Uri AsUri() { return value; }
|
||||
public override byte[] AsBinary() { return Encoding.UTF8.GetBytes(AsString()); }
|
||||
public override string ToString() { return AsString(); }
|
||||
|
||||
Reference in New Issue
Block a user