Show / Hide Table of Contents

Interface ITrace

Represents the application's tracing system.

Inherited Members
IDisposable.Dispose()
Namespace: GitCredentialManager
Assembly: Algenta.Colectica.Repository.Client.dll
Syntax
public interface ITrace : IDisposable

Properties

HasListeners

True if any listeners have been added to the tracing system.

Declaration
bool HasListeners { get; }
Property Value
Type Description
bool

IsSecretTracingEnabled

Get or set whether or not sensitive information such as secrets and credentials should be output to attached trace listeners.

Declaration
bool IsSecretTracingEnabled { get; set; }
Property Value
Type Description
bool

Methods

AddListener(TextWriter)

Add a listener to the trace writer.

Declaration
void AddListener(TextWriter listener)
Parameters
Type Name Description
TextWriter listener

The listener to add.

Flush()

Forces any pending trace messages to be written to any listeners.

Declaration
void Flush()

WriteDictionarySecrets<TKey, TValue>(IDictionary<TKey, TValue>, TKey[], IEqualityComparer<TKey>, string, int, string)

Write the contents of a dictionary that contains sensitive information to the trace writer.

Calls ToString() on all keys and values, except keys specified as secret.
Declaration
void WriteDictionarySecrets<TKey, TValue>(IDictionary<TKey, TValue> dictionary, TKey[] secretKeys, IEqualityComparer<TKey> keyComparer = null, string filePath = "", int lineNumber = 0, string memberName = "")
Parameters
Type Name Description
IDictionary<TKey, TValue> dictionary

The dictionary to write.

TKey[] secretKeys

Dictionary keys that contain secrets/sensitive information.

IEqualityComparer<TKey> keyComparer

Comparer to use for secretKeys.

string filePath

Path of the file this method is called from.

int lineNumber

Line number of file this method is called from.

string memberName

Name of the member in which this method is called.

Type Parameters
Name Description
TKey
TValue

WriteDictionary<TKey, TValue>(IDictionary<TKey, TValue>, string, int, string)

Write the contents of a dictionary to the trace writer.

Calls ToString() on all keys and values.
Declaration
void WriteDictionary<TKey, TValue>(IDictionary<TKey, TValue> dictionary, string filePath = "", int lineNumber = 0, string memberName = "")
Parameters
Type Name Description
IDictionary<TKey, TValue> dictionary

The dictionary to write.

string filePath

Path of the file this method is called from.

int lineNumber

Line number of file this method is called from.

string memberName

Name of the member in which this method is called.

Type Parameters
Name Description
TKey
TValue

WriteException(Exception, string, int, string)

Writes an exception as a message to the trace writer.

Expands exceptions' inner exceptions into additional trace lines.
Declaration
void WriteException(Exception exception, string filePath = "", int lineNumber = 0, string memberName = "")
Parameters
Type Name Description
Exception exception

The exception to write.

string filePath

Path of the file this method is called from.

int lineNumber

Line number of file this method is called from.

string memberName

Name of the member in which this method is called.

WriteLine(string, string, int, string)

Writes a message to the trace writer followed by a line terminator.

Declaration
void WriteLine(string message, string filePath = "", int lineNumber = 0, string memberName = "")
Parameters
Type Name Description
string message

The message to write.

string filePath

Path of the file this method is called from.

int lineNumber

Line number of file this method is called from.

string memberName

Name of the member in which this method is called.

WriteLineSecrets(string, object[], string, int, string)

Writes a message containing sensitive information to the trace writer followed by a line terminator.

Attached listeners will only receive the fully formatted message if IsSecretTracingEnabled is set to true, otherwise the secret arguments will be masked.
Declaration
void WriteLineSecrets(string format, object[] secrets, string filePath = "", int lineNumber = 0, string memberName = "")
Parameters
Type Name Description
string format

The format string to write.

object[] secrets

Sensitive/secret arguments for the format string.

string filePath

Path of the file this method is called from.

int lineNumber

Line number of file this method is called from.

string memberName

Name of the member in which this method is called.

In this article
Back to top Generated by DocFX