private void EndConventions(RunspaceContext context, IEnumerable results) { if (_Conventions == null || _Conventions.Length == 0) { return; } try { context.PushScope(RunspaceScope.ConventionEnd); for (var i = 0; i < _Conventions.Length; i++) { _Conventions[i].End(context, results); } } finally { context.PopScope(); } }
private void ProcessConventions(RunspaceContext context, PSObject sourceObject) { if (_Conventions == null || _Conventions.Length == 0) { return; } try { context.PushScope(RunspaceScope.ConventionProcess); for (var i = 0; i < _Conventions.Length; i++) { _Conventions[i].Process(context, new PSObject[] { sourceObject }); } } finally { context.PopScope(); } }