/*
Copyright (C) 2014-2019 de4dot@gmail.com
This file is part of dnSpy
dnSpy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
dnSpy is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with dnSpy. If not, see .
*/
using System;
using dnSpy.Contracts.Text;
namespace dnSpy.Contracts.Scripting.Roslyn {
///
/// Prints text
///
public interface ITextPrinter : IOutputWriter {
///
/// Print options
///
IPrintOptions PrintOptions { get; }
///
/// Prints text to the screen
///
/// Text
void PrintError(string? text);
///
/// Prints text to the screen
///
/// Format
/// Args
void PrintError(string fmt, params object[] args);
///
/// Prints text followed by a new line to the screen
///
/// Text or null
void PrintLineError(string? text);
///
/// Prints text followed by a new line to the screen
///
/// Format
/// Args
void PrintLineError(string fmt, params object[] args);
///
/// Prints text to the screen
///
/// Color
/// Text
void Print(object? color, string? text);
///
/// Prints text to the screen
///
/// Color
/// Text
void Print(TextColor color, string? text);
///
/// Prints text to the screen
///
/// Text
void Print(string? text);
///
/// Prints text to the screen
///
/// Color
/// Format
/// Args
void Print(object? color, string fmt, params object[] args);
///
/// Prints text to the screen
///
/// Color
/// Format
/// Args
void Print(TextColor color, string fmt, params object[] args);
///
/// Prints text to the screen
///
/// Format
/// Args
void Print(string fmt, params object[] args);
///
/// Prints text followed by a new line to the screen
///
/// Color
/// Text or null
void PrintLine(object? color, string? text);
///
/// Prints text followed by a new line to the screen
///
/// Color
/// Text or null
void PrintLine(TextColor color, string? text);
///
/// Prints text followed by a new line to the screen
///
/// Text or null
void PrintLine(string? text = null);
///
/// Prints text followed by a new line to the screen
///
/// Color
/// Format
/// Args
void PrintLine(object? color, string fmt, params object[] args);
///
/// Prints text followed by a new line to the screen
///
/// Color
/// Format
/// Args
void PrintLine(TextColor color, string fmt, params object[] args);
///
/// Prints text followed by a new line to the screen
///
/// Format
/// Args
void PrintLine(string fmt, params object[] args);
///
/// Formats and prints a value to the screen
///
/// Value, can be null
/// Color
void Print(object value, object? color);
///
/// Formats and prints a value to the screen
///
/// Value, can be null
/// Color
void Print(object value, TextColor color = TextColor.ReplScriptOutputText);
///
/// Formats and prints a value followed by a new line to the screen
///
/// Value or null
/// Color
void PrintLine(object value, object? color);
///
/// Formats and prints a value followed by a new line to the screen
///
/// Value or null
/// Color
void PrintLine(object value, TextColor color = TextColor.ReplScriptOutputText);
///
/// Formats and prints an exception to the screen
///
/// Exception
/// Color
void Print(Exception ex, object? color);
///
/// Formats and prints an exception to the screen
///
/// Exception
/// Color
void Print(Exception ex, TextColor color = TextColor.Error);
///
/// Formats and prints an exception followed by a new line to the screen
///
/// Exception
/// Color
void PrintLine(Exception ex, object? color);
///
/// Formats and prints an exception followed by a new line to the screen
///
/// Exception
/// Color
void PrintLine(Exception ex, TextColor color = TextColor.Error);
}
}