C# Класс TwitchLib.Common

A common/utility class for frequently used functions and variables.
Показать файл Открыть проект

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

Метод Описание
DateTimeStringToObject ( string dateTime ) : System.DateTime

Takes date time string received from Twitch API and converts it to DateTime object.

JsonIsNullOrEmpty ( JToken token ) : bool

Function to check if a jtoken is null. Credits: http://stackoverflow.com/questions/24066400/checking-for-empty-null-jtoken-in-a-jobject

Log ( string message, bool includeDate = false, bool includeTime = false, System.Enums type = Enums.LogType.Normal ) : void

Writes message to console output. Maintains foreground color while applying a temporary color. Locks output to ensure color is applied (may be incorrect way to go about it)

ParseQuotesAndNonQuotes ( string message ) : List

Parses out strings that have quotes, ideal for commands that use quotes for parameters

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

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

Takes date time string received from Twitch API and converts it to DateTime object.
public static DateTimeStringToObject ( string dateTime ) : System.DateTime
dateTime string
Результат System.DateTime

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

Function to check if a jtoken is null. Credits: http://stackoverflow.com/questions/24066400/checking-for-empty-null-jtoken-in-a-jobject
public static JsonIsNullOrEmpty ( JToken token ) : bool
token JToken JToken to check if null or not.
Результат bool

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

Writes message to console output. Maintains foreground color while applying a temporary color. Locks output to ensure color is applied (may be incorrect way to go about it)
public static Log ( string message, bool includeDate = false, bool includeTime = false, System.Enums type = Enums.LogType.Normal ) : void
message string
includeDate bool
includeTime bool
type System.Enums
Результат void

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

Parses out strings that have quotes, ideal for commands that use quotes for parameters
public static ParseQuotesAndNonQuotes ( string message ) : List
message string Input string to attempt to parse.
Результат List