[Modify] Polish it

This commit is contained in:
sta 2017-04-21 17:39:22 +09:00
parent 0c1d10d60e
commit ac311e7759

View File

@ -47,7 +47,7 @@ namespace WebSocketSharp.Net
#region Internal Constructors #region Internal Constructors
internal HttpDigestIdentity (NameValueCollection parameters) internal HttpDigestIdentity (NameValueCollection parameters)
: base (parameters ["username"], "Digest") : base (parameters["username"], "Digest")
{ {
_parameters = parameters; _parameters = parameters;
} }
@ -64,7 +64,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Algorithm { public string Algorithm {
get { get {
return _parameters ["algorithm"]; return _parameters["algorithm"];
} }
} }
@ -76,7 +76,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Cnonce { public string Cnonce {
get { get {
return _parameters ["cnonce"]; return _parameters["cnonce"];
} }
} }
@ -88,7 +88,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Nc { public string Nc {
get { get {
return _parameters ["nc"]; return _parameters["nc"];
} }
} }
@ -100,7 +100,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Nonce { public string Nonce {
get { get {
return _parameters ["nonce"]; return _parameters["nonce"];
} }
} }
@ -112,7 +112,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Opaque { public string Opaque {
get { get {
return _parameters ["opaque"]; return _parameters["opaque"];
} }
} }
@ -124,7 +124,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Qop { public string Qop {
get { get {
return _parameters ["qop"]; return _parameters["qop"];
} }
} }
@ -136,7 +136,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Realm { public string Realm {
get { get {
return _parameters ["realm"]; return _parameters["realm"];
} }
} }
@ -148,7 +148,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Response { public string Response {
get { get {
return _parameters ["response"]; return _parameters["response"];
} }
} }
@ -160,7 +160,7 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public string Uri { public string Uri {
get { get {
return _parameters ["uri"]; return _parameters["uri"];
} }
} }
@ -171,12 +171,12 @@ namespace WebSocketSharp.Net
internal bool IsValid (string password, string realm, string method, string entity) internal bool IsValid (string password, string realm, string method, string entity)
{ {
var parameters = new NameValueCollection (_parameters); var parameters = new NameValueCollection (_parameters);
parameters ["password"] = password; parameters["password"] = password;
parameters ["realm"] = realm; parameters["realm"] = realm;
parameters ["method"] = method; parameters["method"] = method;
parameters ["entity"] = entity; parameters["entity"] = entity;
return _parameters ["response"] == AuthenticationResponse.CreateRequestDigest (parameters); return _parameters["response"] == AuthenticationResponse.CreateRequestDigest (parameters);
} }
#endregion #endregion