コード例 #1
0
ファイル: 96.cs プロジェクト: rokite/openrasta-stable
        public void the_results_should_be_the_same_instance()
        {
            var host = new HttpListenerHost();
            host.Initialize(new[] { "http://+:" + PORT + "/" }, "/", typeof(DependencyResolverAccessorStub));
            var instance1 = host.ResolverAccessor;
            var instance2 = host.ResolverAccessor;

            instance1.ShouldBeTheSameInstanceAs(instance2);
        }
コード例 #2
0
 public override void Initialize()
 {
     this.host = new HttpListenerHostWithConfiguration(new Configurator());
     this.host.Initialize(new[] { "http://+:" + Port + "/" }, "/", null);
     this.host.StartListening();
 }
コード例 #3
0
 public override void Dispose()
 {
     this.host.Close();
     this.host = null;
 }
コード例 #4
0
 public override void Dispose()
 {
     _host.Close();
     _host = null;
 }