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

Log endpoint that allows writing logs directly to a file on disk, and keeps the file stream open. More...

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

Public Member Functions

 PersistentFileEndpoint (string path, bool enabled)
 Creates a new PersistentFileEndpoint instance. More...
 
override TextWriter GetTextWriter ()
 
override StreamWriter GetStreamWriter ()
 Gets the persistent stream writer instance. More...
 
override void Reset ()
 Clears the endpoint's contents, leaving it blank.
 
void Dispose ()
 
- Public Member Functions inherited from VolumeControl.Log.Endpoints.FileEndpoint
 FileEndpoint (string path, bool enabled)
 
- 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...
 

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...
 
- Properties inherited from VolumeControl.Log.Endpoints.FileEndpoint
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...
 
- 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, and keeps the file stream open.

Constructor & Destructor Documentation

◆ PersistentFileEndpoint()

VolumeControl.Log.Endpoints.PersistentFileEndpoint.PersistentFileEndpoint ( string  path,
bool  enabled 
)

Creates a new PersistentFileEndpoint instance.

Parameters
pathThe path to the output file.
enabledWhether the endpoint starts enabled or not.

Member Function Documentation

◆ GetStreamWriter()

override StreamWriter VolumeControl.Log.Endpoints.PersistentFileEndpoint.GetStreamWriter ( )
virtual

Gets the persistent stream writer instance.

Returns
The persistent StreamWriter instance.

Reimplemented from VolumeControl.Log.Endpoints.FileEndpoint.

◆ GetTextWriter()

override TextWriter VolumeControl.Log.Endpoints.PersistentFileEndpoint.GetTextWriter ( )
virtual

The writer cannot be disposed of externally, even when calling Dispose().

Gets a TextWriter object for writing to this endpoint.

Reimplemented from VolumeControl.Log.Endpoints.FileEndpoint.


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