示例#1
0
 private void AstTableIndexNode_CollectionPropertyChanged(object sender, VulcanCollectionPropertyChangedEventArgs e)
 {
     if (e.PropertyName == "Columns" || e.PropertyName == "Leafs")
     {
         VulcanCompositeCollectionChanged(_items, e);
     }
 }
示例#2
0
 private void AstMulticastNode_CollectionPropertyChanged(object sender, VulcanCollectionPropertyChangedEventArgs e)
 {
     if (e.PropertyName == "OutputPaths")
     {
         for (int outputIndex = 0; outputIndex < OutputPaths.Count; outputIndex++)
         {
             OutputPaths[outputIndex].SsisName = String.Format(CultureInfo.InvariantCulture, "Multicast Output {0}", outputIndex + 1);
         }
     }
 }
示例#3
0
 private void AstRootNode_CollectionPropertyChanged(object sender, VulcanCollectionPropertyChangedEventArgs e)
 {
     if (e.PropertyName == "Connections" 
         || e.PropertyName == "Tables" 
         || e.PropertyName == "Dimensions" 
         || e.PropertyName == "Facts" 
         || e.PropertyName == "Packages" 
         || e.PropertyName == "Schemas" 
         || e.PropertyName == "Principals")
     {
         VulcanCompositeCollectionChanged(Items, e);
     }
 }
示例#4
0
        private void CollectionActionSyncToStaticSource(VulcanCollectionPropertyChangedEventArgs e)
        {
            foreach (AstTableStaticSourceNode staticSource in Sources)
            {
                if (e.Action == NotifyCollectionChangedAction.Remove
                    || e.Action == NotifyCollectionChangedAction.Replace
                    || e.Action == NotifyCollectionChangedAction.Reset)
                {
                    for (int i = 0; i < e.OldItems.Count; i++)
                    {
                        foreach (var row in staticSource.Rows)
                        {
                            // Column will be null since the table column will have been undefined in its StaticSourceColumnValueNode object.
                            // Thus, search for the StaticSourceColumnValueNode whose Column is null.
                            AstStaticSourceColumnValueNode columnValueNode = row.ColumnValues.FirstOrDefault(columnValue => columnValue.Column == null);
                            row.ColumnValues.Remove(columnValueNode);
                        }
                    }
                }

                if (e.Action == NotifyCollectionChangedAction.Add || e.Action == NotifyCollectionChangedAction.Replace)
                {
                    foreach (AstTableColumnBaseNode newItem in e.NewItems)
                    {
                        foreach (var row in staticSource.Rows)
                        {
                            row.ColumnValues.Add(new AstStaticSourceColumnValueNode(row) { Column = newItem, Value = newItem.DefaultValue });
                        }
                    }
                }
            }
        }
示例#5
0
        private void AstTableNode_CollectionPropertyChanged(object sender, VulcanCollectionPropertyChangedEventArgs e)
        {
            if (e.PropertyName == "Sources" || e.PropertyName == "Lookups")
            {
                VulcanCompositeCollectionChanged(_dataItems, e);
            }

            if (e.PropertyName == "Columns" && SideEffectManager.SideEffectMode == AstSideEffectMode.ConsistencySideEffects)
            {
                CollectionActionSyncToStaticSource(e);
            }
        }
示例#6
0
 private void AstAttributeNode_CollectionPropertyChanged(object sender, VulcanCollectionPropertyChangedEventArgs e)
 {
     VulcanCompositeCollectionChanged(_columns, e);
 }