Refactored a few for HttpListenerPrefix.cs

This commit is contained in:
sta 2015-03-05 17:00:11 +09:00
parent 7d678fec4c
commit 236846a7c3

View File

@ -47,20 +47,20 @@ namespace WebSocketSharp.Net
{ {
#region Private Fields #region Private Fields
IPAddress[] _addresses; private IPAddress[] _addresses;
string _host; private string _host;
HttpListener _listener; private HttpListener _listener;
string _original; private string _original;
string _path; private string _path;
ushort _port; private ushort _port;
bool _secure; private bool _secure;
#endregion #endregion
#region Public Constructors #region Internal Constructors
// Must be called after calling HttpListenerPrefix.CheckPrefix. // Must be called after calling the CheckPrefix method.
public HttpListenerPrefix (string uriPrefix) internal HttpListenerPrefix (string uriPrefix)
{ {
_original = uriPrefix; _original = uriPrefix;
parse (uriPrefix); parse (uriPrefix);
@ -148,7 +148,7 @@ namespace WebSocketSharp.Net
#endregion #endregion
#region public Methods #region Public Methods
public static void CheckPrefix (string uriPrefix) public static void CheckPrefix (string uriPrefix)
{ {
@ -190,7 +190,7 @@ namespace WebSocketSharp.Net
throw new ArgumentException ("Ends without '/'."); throw new ArgumentException ("Ends without '/'.");
} }
// Equals and GetHashCode are required to detect duplicates in any collection. // The Equals and GetHashCode methods are required to detect duplicates in any collection.
public override bool Equals (Object obj) public override bool Equals (Object obj)
{ {
var pref = obj as HttpListenerPrefix; var pref = obj as HttpListenerPrefix;