示例#1
0
 protected BusinessItem(string name, T value, BusinessData parent, PermissionFeature feature)
     : base(name, parent)
 {
     this._feature    = feature;
     this._value      = value;
     this.IsAttribute = true;
 }
示例#2
0
        private void InitializeParent(BusinessData parent)
        {
            if (parent == null)
            {
                return;
            }
            this.Parent = parent;
            var businessRecord = parent as BusinessRecord;

            if (businessRecord != null)
            {
                businessRecord.AddChild(this);
            }
        }
示例#3
0
 internal void AddChild(BusinessData child)
 {
     _items.Add(child);
     child.Parent = this;
 }
示例#4
0
 internal ReadOnlyBusinessItem(string name, T value, BusinessData parent, bool isKey)
     : base(name, value, parent, (isKey ? PermissionFeature.Key : PermissionFeature.ReadOnly))
 {
 }
示例#5
0
 internal VolatileBusinessItem(string name, Func <T> producer, BusinessData parent)
     : base(name, default(T), parent, PermissionFeature.Volatile)
 {
     _producer = producer;
 }
示例#6
0
 internal AlwaysSoundItem(string name, T value, BusinessData parent)
     : base(name, value, parent, PermissionFeature.AlwaysSound)
 {
 }
示例#7
0
 internal TransactionalBusinessItem(string name, T value, BusinessData parent)
     : base(name, value, parent, PermissionFeature.Sound)
 {
 }
示例#8
0
 protected SoundBusinessItemBase(string name, T value, BusinessData parent, PermissionFeature feature)
     : base(name, value, parent, feature)
 {
 }
示例#9
0
 internal DumpBusinessItem(string name, T value, BusinessData parent)
     : base(name, value, parent, PermissionFeature.Dumb)
 {
     _oldValue = default(T);
 }
示例#10
0
 protected BusinessData(string name, BusinessData parent)
 {
     _name = name;
     this.InitializeParent(parent);
     _status = ChangeStatus.Modified;
 }
示例#11
0
 public BusinessRecordDictionary(string name, BusinessData parent, int capacity)
     : base(name, parent)
 {
     _items = new Dictionary <TKey, TValue>(capacity);
 }
示例#12
0
 public BusinessRecordDictionary(string name, BusinessData parent)
     : this(name, parent, DEFAULT_LOAD_FACTOR)
 {
 }
示例#13
0
 public BusinessRecordCollection(string name, BusinessData parent)
     : base(name, parent)
 {
     _xmlRecords = new List <T>(10);
     _cache      = new CacheData <List <T> >(() => new List <T>(this.InnerGetValues()));
 }
示例#14
0
 public BusinessRecordList(string name, BusinessData parent, int capacity = 0)
     : base(name, parent)
 {
     _records = new List <T>(capacity);
 }