C# Class PoEWhisperNotifier.LogMonitor

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

Méthodes publiques

Méthode 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

Méthode Description
RunReadLoop ( ) : void
TryParseChat ( string Line, MessageData &Data ) : bool
TryParseDisconnect ( string Line, MessageData &Data ) : bool

Method Details

BeginMonitoring() public méthode

Begins monitoring the log file for changes.
public BeginMonitoring ( ) : void
Résultat void

ChatSymbolForMessageType() public static méthode

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
Résultat string

IsValidLogPath() public static méthode

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

LogMonitor() public méthode

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

MessageTypeForChatSymbol() public static méthode

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

StopMonitoring() public méthode

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

TryGetDefaultLogPath() public static méthode

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
Résultat bool