[Modify] Polish it
This commit is contained in:
parent
4729a77679
commit
4c7ebbc8ef
@ -355,14 +355,19 @@ namespace WebSocketSharp.Net
|
|||||||
}
|
}
|
||||||
|
|
||||||
set {
|
set {
|
||||||
checkDisposed ();
|
if (_disposed)
|
||||||
|
throw new ObjectDisposedException (GetType ().ToString ());
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
_location = null;
|
_location = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Uri uri = null;
|
if (!value.MaybeUri ())
|
||||||
if (!value.MaybeUri () || !Uri.TryCreate (value, UriKind.Absolute, out uri))
|
throw new ArgumentException ("Not an absolute URL.", "value");
|
||||||
|
|
||||||
|
Uri uri;
|
||||||
|
if (!Uri.TryCreate (value, UriKind.Absolute, out uri))
|
||||||
throw new ArgumentException ("Not an absolute URL.", "value");
|
throw new ArgumentException ("Not an absolute URL.", "value");
|
||||||
|
|
||||||
_location = value;
|
_location = value;
|
||||||
|
Loading…
Reference in New Issue
Block a user