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

Log endpoint that allows writing logs directly to a file on disk. More...

Inheritance diagram for VolumeControl.Log.Endpoints.FileEndpoint:
Collaboration diagram for VolumeControl.Log.Endpoints.FileEndpoint:

Public Member Functions

 FileEndpoint (string path, bool enabled)
 
virtual StreamWriter GetStreamWriter ()
 Gets a new StreamWriter instance for the file. The caller is responsible for disposing of it. More...
 
override TextWriter GetTextWriter ()
 Gets a TextWriter object for writing to this endpoint.
 
override void Reset ()
 Clears the endpoint's contents, leaving it blank.
 
- Public Member Functions inherited from VolumeControl.Log.Endpoints.BaseEndpointWriter
virtual void Write (string @string)
 Writes the specified string to the endpoint.
 
virtual void WriteLine (string @string)
 Writes the specified string to the endpoint, followed by a line break.
 
virtual void WriteLine ()
 Writes a line break to the endpoint. More...
 

Properties

FileInfo FileInfo [get, set]
 Gets or sets the file info object for the log file. More...
 
string Path [get, set]
 Gets or sets the location of the log file. More...
 
bool PathIsEmpty [get]
 Gets whether the Path is a blank string or not. More...
 
- Properties inherited from VolumeControl.Log.Endpoints.BaseEndpointWriter
bool IsWritingEnabled [get, set]
 
- Properties inherited from VolumeControl.Log.Interfaces.IEndpointWriter
bool IsWritingEnabled [get, set]
 Gets or sets whether this endpoint can be written to. More...
 

Additional Inherited Members

- Protected Member Functions inherited from VolumeControl.Log.Endpoints.BaseEndpointWriter
 BaseEndpointWriter (bool isWritingEnabled=true)
 Creates a new BaseEndpointWriter instance. More...
 
void NotifyPropertyChanged ([CallerMemberName] string propertyName="")
 Triggers the PropertyChanged event for the specified propertyName . More...
 
- Events inherited from VolumeControl.Log.Endpoints.BaseEndpointWriter
EventHandler< bool >? EnabledChanging
 
EventHandler< bool >? EnabledChanged
 
PropertyChangedEventHandler? PropertyChanged
 
- Events inherited from VolumeControl.Log.Interfaces.IEndpointWriter
EventHandler< bool >? EnabledChanging
 Occurs when the endpoint is about to be enabled or disabled for any reason. More...
 
EventHandler< bool >? EnabledChanged
 Occurs when the endpoint is enabled or disabled for any reason. More...
 

Detailed Description

Log endpoint that allows writing logs directly to a file on disk.

Constructor & Destructor Documentation

◆ FileEndpoint()

VolumeControl.Log.Endpoints.FileEndpoint.FileEndpoint ( string  path,
bool  enabled 
)
Parameters
pathThe location of the log file.
enabledWhether the endpoint is already enabled when constructed or not.

Member Function Documentation

◆ GetStreamWriter()

virtual StreamWriter VolumeControl.Log.Endpoints.FileEndpoint.GetStreamWriter ( )
virtual

Gets a new StreamWriter instance for the file. The caller is responsible for disposing of it.

Returns
A new StreamWriter instance when this endpoint is enabled; otherwise null.

Reimplemented in VolumeControl.Log.Endpoints.PersistentFileEndpoint.

Property Documentation

◆ FileInfo

FileInfo VolumeControl.Log.Endpoints.FileEndpoint.FileInfo
getset

Gets or sets the file info object for the log file.

◆ Path

string VolumeControl.Log.Endpoints.FileEndpoint.Path
getset

Gets or sets the location of the log file.

Referenced by VolumeControl.Log.Endpoints.FileEndpoint.Reset().

◆ PathIsEmpty

bool VolumeControl.Log.Endpoints.FileEndpoint.PathIsEmpty
get

Gets whether the Path is a blank string or not.

Returns
true when the Path is a blank string; otherwise false.

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