static void Main(string[] args) { int poolSize; if (!(args.Length > 0 && int.TryParse(args[0], out poolSize))) { poolSize = AppHostHttpListenerBase.CalculatePoolSize(); } DbProvider db; if (!(args.Length > 1 && Enum.TryParse(args[1], true, out db))) { db = DbProvider.InMemory; } new AppHost(poolSize, db) .Init() .Start("http://*:55003/"); "\nSmartPool started with ThreadPool size of {0} using {1} listening on tcp port 55003" .Print(poolSize, db); "Press Enter to Quit".Print(); Console.ReadLine(); }
public WinService(AppHostHttpListenerBase appHost, string listeningOn) { this.appHost = appHost; this.listeningOn = listeningOn; this.appHost.Init(); InitializeComponent(); }
public void Dispose() { if (appHost == null) { return; } appHost.Dispose(); appHost = null; }
public virtual void TestFixtureSetUp() { appHost = CreateListener(); appHost.Init(); appHost.Start(BaseUrl); }
public virtual void TestFixtureSetUp() { listener = CreateListener(); listener.Init(); listener.Start(BaseUrl); }