Ejemplo n.º 1
0
        internal virtual void OnFailGetRegItem(RegItemEventArgs ea)
        {
            EventHandler <RegItemEventArgs> handler = FailGetRegItem;

            if (handler != null)
            {
                handler(this, ea);
            }
        }
Ejemplo n.º 2
0
 private void AddStandardCodeTable(object sender, RegItemEventArgs e)
 {
     if (e.RegName.StartsWith("CD_", StringComparison.Ordinal))
     {
         StandardDbCodeTable    codeTable = new StandardDbCodeTable(e.RegName);
         CodeTablePlugInFactory factory   = sender.Convert <CodeTablePlugInFactory>();
         InstanceRegItem        regItem   = factory.AddInstance(e.RegName, codeTable.Attribute,
                                                                codeTable, new DayChangeDependency());
         e.RegItem = regItem;
     }
 }
Ejemplo n.º 3
0
        internal virtual BaseRegItem GetRegItem(string regName)
        {
            BaseRegItem result = ObjectUtil.TryGetValue(fCodePlugIns, regName);

            if (result == null)
            {
                RegItemEventArgs eventArgs = new RegItemEventArgs(regName);
                OnFailGetRegItem(eventArgs);
                result = eventArgs.RegItem;
            }

            TkDebug.AssertNotNull(result, string.Format(ObjectUtil.SysCulture,
                                                        "在{1}的插件工厂中没有找到注册名为{0}的插件", regName, Name), this);
            return(result);
        }