C# Класс wmib.Core

Наследование: System.MarshalByRefObject
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
DB Database
KernelThread Thread
LastText string
MysqlDB WMIBMySQL
PostgreDB PostgreSQL
WriterThread Thread

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

Метод Описание
BackupData ( string name ) : bool

Create a backup file This is very useful function in case you need to overwrite some file. In that case there is a chance for program to crash during the write and this would left the file corrupted, this function will create a copy of a file using config.tempName() which later needs to be deleted (after you finish your write operation). The file that is to be backed up doesn't need to exist, if it's not present the function just return false

BackupRecovery ( string FileName ) : bool

Recover a file that had a backup and remove it

GetAction ( string message, string Channel, string host, string nick ) : bool

Called on action

GetChannel ( string name ) : Channel

Get a channel object

GetMessage ( string channel, string nick, string host, string message ) : bool

Called when someone post a message to server

GetTempFileName ( string file ) : bool

Copy the selected file to a temporary file name this function is used mostly for restore of corrupted data, so that the corrupted version of file can be stored in /tmp for debugging

HandleException ( Exception ex ) : void

Exception handler

HandleException ( Exception ex, string module ) : void

Exception handler

Kill ( ) : void

This will disable bot and close this process

RecoverFile ( string name, string ch = "unknown object" ) : bool

Recover a file that was previously stored

ShowHelp ( string parameter, Channel channel ) : bool
TrafficLog ( string text ) : void

Store a traffic log to a file

Trim ( string input ) : string
ValidFile ( string name ) : bool

Return true in case the filename is valid

WikiEncode ( string url ) : string
getUptime ( ) : string

Return uptime

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

Метод Описание
Terminate ( ) : void
showInfo ( string name, string info, string channel ) : void

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

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

Create a backup file This is very useful function in case you need to overwrite some file. In that case there is a chance for program to crash during the write and this would left the file corrupted, this function will create a copy of a file using config.tempName() which later needs to be deleted (after you finish your write operation). The file that is to be backed up doesn't need to exist, if it's not present the function just return false
public static BackupData ( string name ) : bool
name string Full path of a file that you want to make a backup of
Результат bool

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

Recover a file that had a backup and remove it
public static BackupRecovery ( string FileName ) : bool
FileName string Name of file
Результат bool

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

Called on action
public static GetAction ( string message, string Channel, string host, string nick ) : bool
message string Message
Channel string Channel
host string Host
nick string Nick
Результат bool

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

Get a channel object
public static GetChannel ( string name ) : Channel
name string Name
Результат Channel

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

Called when someone post a message to server
public static GetMessage ( string channel, string nick, string host, string message ) : bool
channel string Channel
nick string Nick
host string Host
message string Message
Результат bool

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

Copy the selected file to a temporary file name this function is used mostly for restore of corrupted data, so that the corrupted version of file can be stored in /tmp for debugging
public static GetTempFileName ( string file ) : bool
file string /// File ///
Результат bool

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

Exception handler
public static HandleException ( Exception ex ) : void
ex System.Exception Exception pointer
Результат void

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

Exception handler
public static HandleException ( Exception ex, string module ) : void
ex System.Exception Exception pointer
module string Channel name
Результат void

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

This will disable bot and close this process
public static Kill ( ) : void
Результат void

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

Recover a file that was previously stored
public static RecoverFile ( string name, string ch = "unknown object" ) : bool
name string
ch string
Результат bool

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

public static ShowHelp ( string parameter, Channel channel ) : bool
parameter string
channel Channel
Результат bool

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

Store a traffic log to a file
public static TrafficLog ( string text ) : void
text string
Результат void

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

public static Trim ( string input ) : string
input string
Результат string

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

Return true in case the filename is valid
public static ValidFile ( string name ) : bool
name string Name
Результат bool

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

public static WikiEncode ( string url ) : string
url string
Результат string

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

Return uptime
public static getUptime ( ) : string
Результат string

Описание свойств

DB публичное статическое свойство

Database server the bot is connected to multiple DB's this is a pointer to preferred one
public static Database,wmib DB
Результат Database

KernelThread публичное статическое свойство

public static Thread KernelThread
Результат Thread

LastText публичное статическое свойство

Last line of text received on irc
public static string LastText
Результат string

MysqlDB публичное статическое свойство

public static WMIBMySQL,wmib MysqlDB
Результат WMIBMySQL

PostgreDB публичное статическое свойство

The postgre DB
public static PostgreSQL,wmib PostgreDB
Результат PostgreSQL

WriterThread публичное статическое свойство

Thread which is writing the system data to files
public static Thread WriterThread
Результат Thread