public override bool Initialize() { if (base.Initialize()) { if (basePipe == null) { basePipe = this; } return(true); } return(false); }
protected virtual Boolean FillPipes() { bool result = true; Dictionary <Guid, ModuleConfig> .Enumerator modInstEnum = moduleInstances.GetEnumerator(); Dictionary <Guid, ModuleConfig> .Enumerator modRefEnum = moduleReferences.GetEnumerator(); ModuleConfig module = null; while (modInstEnum.MoveNext()) { module = modInstEnum.Current.Value; if (module.IsBasePipe()) { IBasePipe bucket = module.Instance as IBasePipe; IEnumerator pipeContentEnum = module.ModuleConfigCollection.GetEnumerator(); while (pipeContentEnum.MoveNext()) { ModuleConfig pipeContent = pipeContentEnum.Current as ModuleConfig; if ((pipeContent != null) && (!pipeContent.HasProperty("Property", false))) { bucket.PushObject(pipeContent.Instance); } } } } while (modRefEnum.MoveNext()) { module = modRefEnum.Current.Value; if (module.IsBasePipe()) { IBasePipe bucket = module.Instance as IBasePipe; IEnumerator pipeContentEnum = module.ModuleConfigCollection.GetEnumerator(); while (pipeContentEnum.MoveNext()) { ModuleConfig pipeContent = pipeContentEnum.Current as ModuleConfig; if ((pipeContent != null) && (!pipeContent.HasProperty("Property", false))) { bucket.PushObject(pipeContent.Instance); } } } } return(result); }