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

A log endpoint that implements IEndpointWriter and uses a MemoryStream as an endpoint. More...

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

Public Member Functions

 MemoryEndpoint (bool enabled=true, int kilobytes=10)
 
TextReader GetTextReader ()
 Gets a new TextReader instance for this memory endpoint. More...
 
TextWriter GetTextWriter ()
 Gets a TextWriter object for writing to this endpoint.
 
int? ReadRaw ()
 
string? ReadRawLine ()
 
void Reset ()
 Clears the endpoint's contents, leaving it blank.
 
void Write (string? str)
 
void WriteLine (string? str=null)
 
void Dispose ()
 
override string ToString ()
 Returns the contents of the stream as a UTF8 string. More...
 
- Public Member Functions inherited from VolumeControl.Log.Interfaces.IEndpointWriter
void Write (string @string)
 Writes the specified string to the endpoint. More...
 
void WriteLine (string @string)
 Writes the specified string to the endpoint, followed by a line break. More...
 

Properties

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

EventHandler< bool >? EnabledChanging
 
EventHandler< bool >? EnabledChanged
 
- 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

A log endpoint that implements IEndpointWriter and uses a MemoryStream as an endpoint.

Constructor & Destructor Documentation

◆ MemoryEndpoint()

VolumeControl.Log.Endpoints.MemoryEndpoint.MemoryEndpoint ( bool  enabled = true,
int  kilobytes = 10 
)
Parameters
enabledWhen true, the endpoint starts enabled.
kilobytesThe size of the endpoint's buffer in kilobytes.

References VolumeControl.Log.Endpoints.MemoryEndpoint.IsWritingEnabled.

Member Function Documentation

◆ GetTextReader()

TextReader VolumeControl.Log.Endpoints.MemoryEndpoint.GetTextReader ( )

Gets a new TextReader instance for this memory endpoint.

The caller is responsible for disposing of the returned reader object.

Returns
New TextReader instance.

Referenced by VolumeControl.Log.Endpoints.MemoryEndpoint.ReadRaw(), and VolumeControl.Log.Endpoints.MemoryEndpoint.ReadRawLine().

Here is the caller graph for this function:

◆ ToString()

override string VolumeControl.Log.Endpoints.MemoryEndpoint.ToString ( )

Returns the contents of the stream as a UTF8 string.

Returns
string with the entire contents of the memory stream.

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