public virtual void Close() { if (isClosed) { return; } isClosed = true; this.PipesChain = null; this.ChainsFactory = null; }
public HttpPipe GetPipeInstance(String pipeName, HttpPipesChainsFactory httpPipesChainsFactory) { if (!availablePipes.ContainsKey(pipeName)) { throw new HttpPipeNotFoundException(); } HttpPipeMeta mi = availablePipes[pipeName]; Assembly pipeAssembly = null; if (String.IsNullOrEmpty(mi.Assembly) == false) { String location = mi.Assembly; if (File.Exists(location) == false) { location = (Path.GetDirectoryName(Assembly.GetAssembly(typeof(HttpPipesRepository)).Location).Replace("\\", "/") + "/" + location); } if (File.Exists(location)) { pipeAssembly = Assembly.LoadFrom(location); } } if (pipeAssembly == null) { pipeAssembly = Assembly.GetAssembly(typeof(HttpPipesRepository)); } HttpPipe pipe = (HttpPipe)pipeAssembly.CreateInstance(mi.Classname); pipe.Configuration = this.config; pipe.ChainsFactory = httpPipesChainsFactory; pipe.Init(mi.Config); return(pipe); }