Volume Control
Application-specific hotkeys for Windows
VolumeControl.Log.LogMessage Class Reference

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

Static Public Member Functions

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

Properties

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

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.Lines.

Referenced by VolumeControl.Core.Input.TemplateProviderManager.TryGetDictionaryProvider().

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.

◆ ToString()

override string VolumeControl.Log.LogMessage.ToString ( )

Gets the contents of the log message as a single string.

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

List<object?> VolumeControl.Log.LogMessage.Lines
getset

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