public ExtractKthCoreElement Create(IElementTicket ticket, IElementDefinition defType) { if (ticket.TypeId != defType.ElementTypeId) { throw new InvalidOperationException(Properties.Resources.MssgTicketTypeIdDoesNotMatchDefTypeIdFormat(ticket.TypeId, defType.ElementTypeId)); } ExtractKthCoreElement el = new ExtractKthCoreElement(ticket.ElementId, defType); IInputPortMgr inPortMgr = CreateInputPortMgr(el, ticket.InputPortMgrId, ticket.InputPortIds[0]); IOutputPortMgr outPortMgr = CreateOutputPortMgr(el, ticket.OutputPortMgrId, ticket.OutputPortIds[0]); el.InPortMgr = inPortMgr; el.OutPortMgr = outPortMgr; IExtractKthCoreParamMgr paramMgr = CreateParamMgr(ticket.ParamMgrId); el.ParamMgr = paramMgr; IExtractKthCoreFx fx = CreateMyFx(ticket.FxId, ticket.ElementId); el.Fx = fx; using (SettingsMgrFactory fac = new SettingsMgrFactory()) { ISimpleSettingsMgr settingsMgr = fac.CreateSettingsMgr(el); el.SettingsMgr = settingsMgr; } using (OptionsMgrFactory fac = new OptionsMgrFactory()) { ISimpleOptionsMgr optsMgr = fac.CreateOptionsMgr(el); el.OptionsMgr = optsMgr; } return el; }
public IElement CreateElement(IElementTicket ticket, IElementDefinition defType) { return Create(ticket, defType); }
internal IElement ReConstitute(IElementTicket ticket) { using (var dic = _provider.GetDefinitionDic()) { IElementDefinition def = dic[ticket.TypeId]; IElement element = null; using (IElementFactoryProvider fp = _provider.GetFactoryByPackageName<IElementFactoryProvider>(def.PackageName)) { IElementFactory fac = fp.Create(def); if (fac != null) element = fac.CreateElement(ticket, def); return element; } } }
public abstract IElement CreateElement(IElementTicket ticket, IElementDefinition defType);
public void CopyElementTicketsTo(IElementTicket[] array, int arrayIndex) { ElementTickets.Values.CopyTo(array, arrayIndex); }