[Modify] Rename it

This commit is contained in:
sta 2017-03-03 15:58:44 +09:00
parent 64925eaa9e
commit 2fe5697c0d
2 changed files with 4 additions and 4 deletions

View File

@ -905,7 +905,7 @@ namespace WebSocketSharp
return BitConverter.ToUInt64 (source.ToHostOrder (sourceOrder), 0);
}
internal static string TrimEndSlash (this string value)
internal static string TrimSlashFromEnd (this string value)
{
var ret = value.TrimEnd ('/');
return ret.Length > 0 ? ret : "/";

View File

@ -285,7 +285,7 @@ namespace WebSocketSharp.Server
internal void Add<TBehavior> (string path, Func<TBehavior> initializer)
where TBehavior : WebSocketBehavior
{
path = HttpUtility.UrlDecode (path).TrimEndSlash ();
path = HttpUtility.UrlDecode (path).TrimSlashFromEnd ();
lock (_sync) {
WebSocketServiceHost host;
@ -315,7 +315,7 @@ namespace WebSocketSharp.Server
string path, out WebSocketServiceHost host
)
{
path = HttpUtility.UrlDecode (path).TrimEndSlash ();
path = HttpUtility.UrlDecode (path).TrimSlashFromEnd ();
lock (_sync)
return _hosts.TryGetValue (path, out host);
@ -323,7 +323,7 @@ namespace WebSocketSharp.Server
internal bool Remove (string path)
{
path = HttpUtility.UrlDecode (path).TrimEndSlash ();
path = HttpUtility.UrlDecode (path).TrimSlashFromEnd ();
WebSocketServiceHost host;
lock (_sync) {