コード例 #1
0
        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;
        }
コード例 #2
0
 public IElement CreateElement(IElementTicket ticket, IElementDefinition defType)
 {
     return Create(ticket, defType);
 }
コード例 #3
0
        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;
                }
            }
        }
コード例 #4
0
ファイル: SimpleElFactoryBase.cs プロジェクト: BgRva/Blob1
 public abstract IElement CreateElement(IElementTicket ticket, IElementDefinition defType);
コード例 #5
0
ファイル: WorkSpaceUnpersister.cs プロジェクト: BgRva/Blob1
 public void CopyElementTicketsTo(IElementTicket[] array, int arrayIndex)
 {
     ElementTickets.Values.CopyTo(array, arrayIndex);
 }