Ejemplo n.º 1
0
        public IModulePipeline GetPipeLineByFrom(IModulePipeline from, IModuleInstance to)
        {
            var fromstr = from.IsLocal ? from.path : (from.system.Remote.ToString() + "/" + from.path);
            var pipestr = to.path + "_" + fromstr;

            if (this.refPipelines.TryGetValue(pipestr, out IModulePipeline pipe))
            {
                return(pipe);
            }
            PipelineRefLocal _pipe = new PipelineRefLocal(_System, to);

            this.refPipelines[pipestr] = _pipe;

            _pipe.SetFromPipeline(from);
            return(_pipe);
        }
Ejemplo n.º 2
0
        public IModulePipeline GetPipeline(IModuleInstance user, string path)
        {
            var pipestr = path + "_";

            if (user != null)
            {
                pipestr += user.path;
            }
            if (this.refPipelines.TryGetValue(pipestr, out IModulePipeline pipe))
            {
                return(pipe);
            }
            IModuleInstance module = this._System.GetModule(path);

            PipelineRefLocal _pipe = new PipelineRefLocal(_System, module);

            this.refPipelines[pipestr] = _pipe;

            var userpipe = user == null ? null : _System.GetPipeline(module, "this/" + user.path);

            _pipe.SetFromPipeline(userpipe);
            return(_pipe);
        }