C# Class PoEWhisperNotifier.LogMonitor

Monitors a log file for changes in the form of appended lines.
Mostrar archivo Open project: Kapps/PoEWhisperNotifier Class Usage Examples

Public Methods

Method Description
BeginMonitoring ( ) : void

Begins monitoring the log file for changes.

ChatSymbolForMessageType ( LogMessageType Type ) : string

Returns the chat symbol that corresponds to messages of the given message type, or an empty string if none does.

IsValidLogPath ( string LogPath ) : bool

Indicates whether the given file path points to a valid log file.

LogMonitor ( string LogPath ) : System

Creates a new LogMonitor without immediately starting to monitor changes.

MessageTypeForChatSymbol ( string ChatSymbol ) : LogMessageType

Returns the message type that corresponds to the given chat symbol, or Unknown if none does.

StopMonitoring ( ) : void

Stops monitoring the log file for changes. If any messages are currently being processed, they may still be dispatched.

TryGetDefaultLogPath ( string &LogPath ) : bool

Attempts to location a default client.txt location, using either the standard installation path or the directory PoE is running frmo. Returns whether the client.txt was successfully located.

Private Methods

Method Description
RunReadLoop ( ) : void
TryParseChat ( string Line, MessageData &Data ) : bool
TryParseDisconnect ( string Line, MessageData &Data ) : bool

Method Details

BeginMonitoring() public method

Begins monitoring the log file for changes.
public BeginMonitoring ( ) : void
return void

ChatSymbolForMessageType() public static method

Returns the chat symbol that corresponds to messages of the given message type, or an empty string if none does.
public static ChatSymbolForMessageType ( LogMessageType Type ) : string
Type LogMessageType
return string

IsValidLogPath() public static method

Indicates whether the given file path points to a valid log file.
public static IsValidLogPath ( string LogPath ) : bool
LogPath string
return bool

LogMonitor() public method

Creates a new LogMonitor without immediately starting to monitor changes.
public LogMonitor ( string LogPath ) : System
LogPath string
return System

MessageTypeForChatSymbol() public static method

Returns the message type that corresponds to the given chat symbol, or Unknown if none does.
public static MessageTypeForChatSymbol ( string ChatSymbol ) : LogMessageType
ChatSymbol string
return LogMessageType

StopMonitoring() public method

Stops monitoring the log file for changes. If any messages are currently being processed, they may still be dispatched.
public StopMonitoring ( ) : void
return void

TryGetDefaultLogPath() public static method

Attempts to location a default client.txt location, using either the standard installation path or the directory PoE is running frmo. Returns whether the client.txt was successfully located.
public static TryGetDefaultLogPath ( string &LogPath ) : bool
LogPath string
return bool