コード例 #1
0
 public IDisposable Start(IServerInformation serverInformation, Func<IFeatureCollection, Task> application)
 {
     if (serverInformation.GetType() != typeof(StdioServerInformation))
     {
         throw new ArgumentException("wrong server", "serverInformation");
     }
     return new StdioServer(_input, _output, application);
 }
コード例 #2
0
 public IDisposable Start(IServerInformation serverInformation, Func <IFeatureCollection, Task> application)
 {
     if (serverInformation.GetType() != typeof(StdioServerInformation))
     {
         throw new ArgumentException("wrong server", "serverInformation");
     }
     return(new StdioServer(_input, _output, application));
 }
コード例 #3
0
        public IDisposable Start(IServerInformation serverInformation, Func <IFeatureCollection, Task> application)
        {
            if (!(serverInformation.GetType() == typeof(ServerInformation)))
            {
                throw new ArgumentException(string.Format("The server must be {0}", ServerName), "serverInformation");
            }

            _appDelegate = application;

            return(this);
        }
コード例 #4
0
ファイル: TestServer.cs プロジェクト: humblelistener/Hosting
        public IDisposable Start(IServerInformation serverInformation, Func<IFeatureCollection, Task> application)
        {
            if (!(serverInformation.GetType() == typeof(ServerInformation)))
            {
                throw new ArgumentException(string.Format("The server must be {0}", ServerName), "serverInformation");
            }

            _appDelegate = application;

            return this;
        }