internal override BaseRegItem GetRegItem(string regName) { InstanceRegItem item = ObjectUtil.TryGetValue(fInstancePlugIns, regName); if (item != null) { return(item); } return(base.GetRegItem(regName)); }
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; } }
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); } }