Esempio n. 1
0
        internal override BaseRegItem GetRegItem(string regName)
        {
            InstanceRegItem item = ObjectUtil.TryGetValue(fInstancePlugIns, regName);

            if (item != null)
            {
                return(item);
            }
            return(base.GetRegItem(regName));
        }
Esempio 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;
     }
 }
Esempio n. 3
0
 internal InstanceRegItem AddInstance(string regName, BasePlugInAttribute attribute,
                                      object instance, ICacheDependency dependency)
 {
     lock (this)
     {
         if (!Contains(regName))
         {
             InstanceRegItem instanceRegItem = new InstanceRegItem(regName,
                                                                   attribute, instance, dependency);
             fInstancePlugIns.Add(regName, instanceRegItem);
             return(instanceRegItem);
         }
         return(null);
     }
 }