Skip to content

Commit 008865f

Browse files
committed
Find references, fix for data flow task with property expressions. Minor code clean-up.
1 parent 8d1a8f2 commit 008865f

4 files changed

Lines changed: 85 additions & 95 deletions

File tree

SSIS/FindUnusedVariables.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ namespace BIDSHelper.SSIS
1010
public partial class FindUnusedVariables : Form
1111
{
1212
private BackgroundWorker processPackage = null;
13-
private System.Diagnostics.Stopwatch stopwatch;
1413
private FindVariables finder = new FindVariables();
1514
private Package package;
1615
private List<string> unusedVariablesList;
17-
16+
#if DEBUG
17+
private System.Diagnostics.Stopwatch stopwatch;
18+
#endif
19+
1820
public FindUnusedVariables(VariablesDisplayMode displayMode)
1921
{
2022
this.DisplayMode = displayMode;
@@ -84,7 +86,9 @@ public DialogResult Show(Package package)
8486
}
8587
}
8688

89+
#if DEBUG
8790
stopwatch = new System.Diagnostics.Stopwatch();
91+
#endif
8892
processPackage.RunWorkerAsync(variables.ToArray());
8993

9094
return this.ShowDialog();
@@ -116,8 +120,8 @@ private void VariableFound(object sender, VariableFoundEventArgs e)
116120
private void processPackage_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
117121
{
118122
this.progressBar.Visible = false;
119-
stopwatch.Stop();
120123
#if DEBUG
124+
stopwatch.Stop();
121125
this.Text = string.Format("{0} ({1})", this.Text, stopwatch.ElapsedMilliseconds);
122126
#endif
123127
this.selectionList.ClearItems();
@@ -126,8 +130,9 @@ private void processPackage_RunWorkerCompleted(object sender, RunWorkerCompleted
126130

127131
private void processPackage_DoWork(object sender, DoWorkEventArgs e)
128132
{
133+
#if DEBUG
129134
stopwatch.Start();
130-
135+
#endif
131136
Variable[] variables = e.Argument as Variable[];
132137
finder.FindReferences(this.package, variables, null);
133138
}

SSIS/FindVariableReferences.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ namespace BIDSHelper.SSIS
1010
public partial class FindVariableReferences : Form
1111
{
1212
private BackgroundWorker processPackage = null;
13+
#if DEBUG
1314
private System.Diagnostics.Stopwatch stopwatch;
15+
#endif
1416
private FindVariables finder = new FindVariables();
1517
private Package package;
1618
private Variable variable;
@@ -43,8 +45,9 @@ public void Show(Package package, Variable variable)
4345
this.progressBar.Visible = true;
4446

4547
InitializeTreeView();
46-
48+
#if DEBUG
4749
stopwatch = new System.Diagnostics.Stopwatch();
50+
#endif
4851
processPackage.RunWorkerAsync();
4952

5053
this.Show();
@@ -78,17 +81,20 @@ private void processPackage_RunWorkerCompleted(object sender, RunWorkerCompleted
7881
{
7982
TreeNode parent = this.treeView.Nodes[0];
8083

84+
#if DEBUG
8185
stopwatch.Stop();
8286
this.Text += (" " + stopwatch.ElapsedMilliseconds.ToString());
83-
87+
#endif
8488
this.treeView.Enabled = true;
8589

8690
this.progressBar.Visible = false;
8791
}
8892

8993
private void processPackage_DoWork(object sender, DoWorkEventArgs e)
9094
{
91-
stopwatch.Start();
95+
#if DEBUG
96+
stopwatch.Start();
97+
#endif
9298
finder.FindReferences(this.package, this.variable, this.treeView);
9399
}
94100
#endregion

0 commit comments

Comments
 (0)