示例#1
0
        internal void Changes(IndexedCollection indexedCollection, NotifyCollectionChangedEventArgs arg)
        {
            if (this.CollectionChanged != null)
            {
                this.CollectionChanged(indexedCollection, arg);
            }

            switch (arg.Action)
            {
            case NotifyCollectionChangedAction.Add:
                foreach (var i in arg.NewItems)
                {
                    if (i is ItemBase item)
                    {
                        this.References.Add(item);
                    }
                }
                break;

            case NotifyCollectionChangedAction.Remove:
                foreach (var i in arg.OldItems)
                {
                    if (i is ItemBase item)
                    {
                        this.References.Remove(item);
                    }
                }
                break;

            case NotifyCollectionChangedAction.Replace:
                foreach (var i in arg.OldItems)
                {
                    if (i is ItemBase item)
                    {
                        this.References.Remove(item);
                    }
                }
                foreach (var i in arg.NewItems)
                {
                    if (i is ItemBase item)
                    {
                        this.References.Add(item);
                    }
                }
                break;

            case NotifyCollectionChangedAction.Move:
            case NotifyCollectionChangedAction.Reset:
            default:
                break;
            }
        }
示例#2
0
 /// <summary>
 /// Ctor
 /// </summary>
 static PropertyCollection()
 {
     PropertyCollection.Key = IndexedCollection <PropertyModel> .GetMethodKey(c => c.Name);
 }
 /// <summary>
 /// Ctor
 /// </summary>
 static PartitionRefCollection()
 {
     PartitionRefCollection.Key = IndexedCollection <PartitionRefModel> .GetMethodKey(c => c.PartitionName);
 }
示例#4
0
 /// <summary>
 /// Ctor
 /// </summary>
 static FileCollection()
 {
     FileCollection.Key = IndexedCollection <FileElement> .GetMethodKey(c => c.Path);
 }
 /// <summary>
 /// Ctor
 /// </summary>
 static ConstraintColumnCollection()
 {
     ConstraintColumnCollection.Key = IndexedCollection <ConstraintColumnModel> .GetMethodKey(c => c.ColumnName);
 }
示例#6
0
 static ColumnCollection()
 {
     ColumnCollection.Key = IndexedCollection <ColumnModel> .GetMethodKey(c => c.Key);
 }
 /// <summary>
 /// Ctor
 /// </summary>
 static ConstraintCollection()
 {
     ConstraintCollection.Key = IndexedCollection <ConstraintModel> .GetMethodKey(c => c.Key);
 }
 /// <summary>
 /// Ctor
 /// </summary>
 static SubPartitionCollection()
 {
     SubPartitionCollection.Key = IndexedCollection <SubPartitionModel> .GetMethodKey(c => c.Name);
 }
 /// <summary>
 /// Ctor
 /// </summary>
 static TablespaceCollection()
 {
     TablespaceCollection.Key = IndexedCollection <TablespaceModel> .GetMethodKey(c => c.Name);
 }
示例#10
0
 static PackageCollection()
 {
     PackageCollection.Key = IndexedCollection <PackageModel> .GetMethodKey(c => c.Key);
 }
示例#11
0
 /// <summary>
 /// Ctor
 /// </summary>
 static ProcedureCollection()
 {
     ProcedureCollection.Key = IndexedCollection <ProcedureModel> .GetMethodKey(c => c.Key);
 }
示例#12
0
 /// <summary>
 /// Ctor
 /// </summary>
 static PrivilegeCollection()
 {
     PrivilegeCollection.Key = IndexedCollection<PrivilegeModel>.GetMethodKey(c => c.Name);
 }
示例#13
0
 /// <summary>
 /// Ctor
 /// </summary>
 static IndexCollection()
 {
     IndexCollection.Key = IndexedCollection <IndexModel> .GetMethodKey(c => c.Key);
 }
示例#14
0
 /// <summary>
 /// Ctor
 /// </summary>
 static SynonymCollection()
 {
     SynonymCollection.Key = IndexedCollection <SynonymModel> .GetMethodKey(c => c.Key);
 }
示例#15
0
 /// <summary>
 /// Ctor
 /// </summary>
 static SequenceCollection()
 {
     SequenceCollection.Key = IndexedCollection <SequenceModel> .GetMethodKey(c => c.Key);
 }
示例#16
0
 /// <summary>
 /// Ctor
 /// </summary>
 static TableCollection()
 {
     IndexedCollection <TableModel> .Key = IndexedCollection <TableModel> .GetMethodKey(c => c.Key);
 }
示例#17
0
 /// <summary>
 /// Ctor
 /// </summary>
 static TypeCollection()
 {
     TypeCollection.Key = IndexedCollection <TypeItem> .GetMethodKey(c => c.Key);
 }
 /// <summary>
 /// Ctor
 /// </summary>
 static PartitionColumnCollection()
 {
     PartitionColumnCollection.Key = IndexedCollection <PartitionColumnModel> .GetMethodKey(c => c.ColumnName);
 }
示例#19
0
 /// <summary>
 /// Ctor
 /// </summary>
 static TriggerCollection()
 {
     TriggerCollection.Key = IndexedCollection <TriggerModel> .GetMethodKey(c => c.Key);
 }
示例#20
0
 /// <summary>
 /// Ctor
 /// </summary>
 static GrantCollection()
 {
     GrantCollection.Key = IndexedCollection <GrantModel> .GetMethodKey(c => c.Key);
 }
示例#21
0
 /// <summary>
 /// Ctor
 /// </summary>
 static ArgumentCollection()
 {
     ArgumentCollection.Key = IndexedCollection <ArgumentModel> .GetMethodKey(c => c.Key);
 }
示例#22
0
 static IndexColumnCollection()
 {
     IndexColumnCollection.Key = IndexedCollection <IndexColumnModel> .GetMethodKey(c => c.Name);
 }