C# Class TwitchLib.Common

A common/utility class for frequently used functions and variables.
Afficher le fichier Open project: swiftyspiffy/TwitchLib

Méthodes publiques

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

Method Details

DateTimeStringToObject() public static méthode

Takes date time string received from Twitch API and converts it to DateTime object.
public static DateTimeStringToObject ( string dateTime ) : System.DateTime
dateTime string
Résultat System.DateTime

JsonIsNullOrEmpty() public static méthode

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

Log() public static méthode

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

ParseQuotesAndNonQuotes() public static méthode

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.
Résultat List