@@ -169,17 +169,18 @@ public SwitchParameter SuppressedOnly
169
169
private bool suppressedOnly ;
170
170
171
171
/// <summary>
172
- /// Returns path to the file that contains user profile for ScriptAnalyzer
172
+ /// Returns path to the file that contains user profile or hash table for ScriptAnalyzer
173
173
/// </summary>
174
174
[ Alias ( "Profile" ) ]
175
175
[ Parameter ( Mandatory = false ) ]
176
176
[ ValidateNotNull ]
177
- public string Configuration
177
+ public object Settings
178
178
{
179
- get { return configuration ; }
180
- set { configuration = value ; }
179
+ get { return settings ; }
180
+ set { settings = value ; }
181
181
}
182
- private string configuration ;
182
+
183
+ private object settings ;
183
184
184
185
private bool stopProcessing ;
185
186
@@ -195,7 +196,7 @@ protected override void BeginProcessing()
195
196
string [ ] rulePaths = Helper . ProcessCustomRulePaths ( customRulePath ,
196
197
this . SessionState , recurseCustomRulePath ) ;
197
198
198
- if ( ! ScriptAnalyzer . Instance . ParseProfile ( this . configuration , this . SessionState . Path , this ) )
199
+ if ( ! ScriptAnalyzer . Instance . ParseProfile ( this . settings , this . SessionState . Path , this ) )
199
200
{
200
201
stopProcessing = true ;
201
202
return ;
@@ -208,8 +209,7 @@ protected override void BeginProcessing()
208
209
this . excludeRule ,
209
210
this . severity ,
210
211
null == rulePaths ? true : this . includeDefaultRules ,
211
- this . suppressedOnly ,
212
- this . configuration ) ;
212
+ this . suppressedOnly ) ;
213
213
}
214
214
215
215
/// <summary>
@@ -238,6 +238,18 @@ protected override void ProcessRecord()
238
238
}
239
239
}
240
240
241
+ protected override void EndProcessing ( )
242
+ {
243
+ ScriptAnalyzer . Instance . CleanUp ( ) ;
244
+ base . EndProcessing ( ) ;
245
+ }
246
+
247
+ protected override void StopProcessing ( )
248
+ {
249
+ ScriptAnalyzer . Instance . CleanUp ( ) ;
250
+ base . StopProcessing ( ) ;
251
+ }
252
+
241
253
#endregion
242
254
243
255
#region Methods
0 commit comments