forked from PowerShell/PSScriptAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIOutputWriter.cs
More file actions
52 lines (46 loc) · 1.81 KB
/
Copy pathIOutputWriter.cs
File metadata and controls
52 lines (46 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Copyright (c) Microsoft Corporation.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using System.Management.Automation;
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer
{
/// <summary>
/// Provides an interface for writing output to a PowerShell session.
/// </summary>
public interface IOutputWriter
{
/// <summary>
/// Writes an error to the session.
/// </summary>
/// <param name="error">The ErrorRecord to write.</param>
void WriteError(ErrorRecord error);
/// <summary>
/// Writes a warning to the session.
/// </summary>
/// <param name="message">The warning string to write.</param>
void WriteWarning(string message);
/// <summary>
/// Writes a verbose message to the session.
/// </summary>
/// <param name="message">The verbose message to write.</param>
void WriteVerbose(string message);
/// <summary>
/// Writes a debug message to the session.
/// </summary>
/// <param name="message">The debug message to write.</param>
void WriteDebug(string message);
/// <summary>
/// Throws a terminating error in the session.
/// </summary>
/// <param name="record">The ErrorRecord which describes the failure.</param>
void ThrowTerminatingError(ErrorRecord record);
}
}