コード例 #1
0
 /// <summary>
 /// Override EndProcessing.
 /// </summary>
 protected override void EndProcessing()
 {
     if (stepPipe != null)
     {
         stepPipe.End();
     }
 }
コード例 #2
0
        protected override void EndProcessing()
        {
            foreach (object lineObj in _pipe.End())
            {
                object baseObj = lineObj is PSObject pso ? pso.BaseObject : lineObj;
                if (baseObj is null)
                {
                    continue;
                }

                if (!(baseObj is string line))
                {
                    throw new InvalidOperationException(
                              "Out-String wrote a non-string object as output. Please report this exception on GitHub.");
                }

                _writer.Write(line);
                _writer.WriteLine();
            }
        }
 /// <summary>
 /// EndProcessing override.
 /// </summary>
 protected override void EndProcessing()
 {
     _stepPipeline.End();
 }