Volume Control
Application-specific hotkeys for Windows
Loading...
Searching...
No Matches
VolumeControl.Log.LogMessage Class Referencesealed

Represents a message to be written to the log. More...

Inheritance diagram for VolumeControl.Log.LogMessage:
Collaboration diagram for VolumeControl.Log.LogMessage:

Public Member Functions

 LogMessage (EventType eventType, params object?[] lines)
 Creates a new LogMessage instance with the specified eventType .
 
 LogMessage (EventType eventType)
 Creates a new empty LogMessage instance with the specified eventType .
 
 LogMessage (params object?[] lines)
 Creates a new LogMessage instance with the specified lines and an undefined EventType.
 
override string ToString ()
 Gets the contents of the log message as a single string.
 
LogMessage Add (object? line)
 Appends the specified line to the message.
 
LogMessage SetEventType (EventType eventType)
 Pipeline method that sets the event type of this log message.
 
IEnumerator< object?> GetEnumerator ()
 

Static Public Member Functions

static implicit operator LogMessage (string s)
 Converts a string to a new LogMessage instance.
 

Properties

EventType EventType [get, set]
 Gets or sets the event type of this message.
 
bool HasEventType [get]
 Gets whether this LogMessage instance has an EventType or not.
 
List< object?> Lines [get, set]
 Gets or sets the lines in this message.
 
bool IsEmpty [get]
 Gets whether there are any lines in this message.
 

Detailed Description

Represents a message to be written to the log.

Constructor & Destructor Documentation

◆ LogMessage() [1/3]

VolumeControl.Log.LogMessage.LogMessage ( EventType  eventType,
params object?[]  lines 
)

Creates a new LogMessage instance with the specified eventType .

Parameters
eventTypeThe Log.EventType of this message.
linesThe contents of the message, where each element represents one "line".

References VolumeControl.Log.LogMessage.Lines.

◆ LogMessage() [2/3]

VolumeControl.Log.LogMessage.LogMessage ( EventType  eventType)

Creates a new empty LogMessage instance with the specified eventType .

Parameters
eventTypeThe Log.EventType of this message.

References VolumeControl.Log.LogMessage.Lines.

◆ LogMessage() [3/3]

VolumeControl.Log.LogMessage.LogMessage ( params object?[]  lines)

Creates a new LogMessage instance with the specified lines and an undefined EventType.

Parameters
linesThe contents of the message, where each element represents one "line".

References VolumeControl.Log.LogMessage.Lines.

Member Function Documentation

◆ Add()

LogMessage VolumeControl.Log.LogMessage.Add ( object?  line)

Appends the specified line to the message.

Parameters
lineThe content of the line.
Returns
This instance.

References VolumeControl.Log.LogMessage.Add(), and VolumeControl.Log.LogMessage.Lines.

Referenced by VolumeControl.Log.LogMessage.Add(), and VolumeControl.Core.Input.TemplateProviderManager.TryGetDictionaryProvider().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator LogMessage()

static implicit VolumeControl.Log.LogMessage.operator LogMessage ( string  s)
static

Converts a string to a new LogMessage instance.

Parameters
sThe string to convert.

◆ SetEventType()

LogMessage VolumeControl.Log.LogMessage.SetEventType ( EventType  eventType)

Pipeline method that sets the event type of this log message.

Parameters
eventTypeThe EventType to use for this log message.
Returns
This instance.

Property Documentation

◆ EventType

EventType VolumeControl.Log.LogMessage.EventType
getset

Gets or sets the event type of this message.

Referenced by VolumeControl.Log.AsyncLogWriter.LogMessage().

◆ HasEventType

bool VolumeControl.Log.LogMessage.HasEventType
get

Gets whether this LogMessage instance has an EventType or not.

◆ IsEmpty

bool VolumeControl.Log.LogMessage.IsEmpty
get

Gets whether there are any lines in this message.

◆ Lines


The documentation for this class was generated from the following file: