Fix due to the modified ServiceManager.cs

This commit is contained in:
sta
2012-11-02 17:55:00 +09:00
parent 746c883b82
commit 2addc16f91
30 changed files with 65 additions and 11 deletions

View File

@@ -29,6 +29,7 @@
#endregion
using System;
using System.Collections.Generic;
using System.Net.Sockets;
using WebSocketSharp.Net;
@@ -76,6 +77,16 @@ namespace WebSocketSharp.Server {
#region Property
public IEnumerable<string> ServicePath {
get {
var url = BaseUri.IsAbsoluteUri
? BaseUri.ToString().TrimEnd('/')
: String.Empty;
foreach (var path in _services.Path)
yield return url + path;
}
}
public bool Sweeped {
get {
return _services.Sweeped;
@@ -133,6 +144,12 @@ namespace WebSocketSharp.Server {
}
var svcHost = new WebSocketServiceHost<T>();
svcHost.Uri = BaseUri.IsAbsoluteUri
? new Uri(BaseUri, absPath)
: absPath.ToUri();
if (!Sweeped)
svcHost.Sweeped = Sweeped;
_services.Add(absPath, svcHost);
}