C# Класс PoEWhisperNotifier.LogMonitor

Monitors a log file for changes in the form of appended lines.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
RunReadLoop ( ) : void
TryParseChat ( string Line, MessageData &Data ) : bool
TryParseDisconnect ( string Line, MessageData &Data ) : bool

Описание методов

BeginMonitoring() публичный Метод

Begins monitoring the log file for changes.
public BeginMonitoring ( ) : void
Результат void

ChatSymbolForMessageType() публичный статический Метод

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
Результат string

IsValidLogPath() публичный статический Метод

Indicates whether the given file path points to a valid log file.
public static IsValidLogPath ( string LogPath ) : bool
LogPath string
Результат bool

LogMonitor() публичный Метод

Creates a new LogMonitor without immediately starting to monitor changes.
public LogMonitor ( string LogPath ) : System
LogPath string
Результат System

MessageTypeForChatSymbol() публичный статический Метод

Returns the message type that corresponds to the given chat symbol, or Unknown if none does.
public static MessageTypeForChatSymbol ( string ChatSymbol ) : LogMessageType
ChatSymbol string
Результат LogMessageType

StopMonitoring() публичный Метод

Stops monitoring the log file for changes. If any messages are currently being processed, they may still be dispatched.
public StopMonitoring ( ) : void
Результат void

TryGetDefaultLogPath() публичный статический Метод

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
Результат bool