GVars
static class · namespace z3n7 · source Essentials/Vars.cs
public static class GVars
Global ZennoPoster variables, kept in a namespace named after the current Windows user.
Methods
GClean
public static List<int> GClean(this IZennoPosterProjectModel project, bool log = false)
Extension method for IZennoPosterProjectModel. source
Clears the global variables acc1 … acc{rangeEnd}.
Returns: Numbers of the variables that were cleared.
GGetBusyList
public static List<string> GGetBusyList(this IZennoPosterProjectModel project, bool log = false)
Extension method for IZennoPosterProjectModel. source
Lists accounts taken by running threads: every non-empty global variable acc1 … acc{rangeEnd}.
| Parameter | Description |
|---|---|
log |
Write the list to the log. |
Returns: Entries in the form number:value.
GSetAcc
public static bool GSetAcc(this IZennoPosterProjectModel project, string input = null, bool force = false, bool log = false)
Extension method for IZennoPosterProjectModel. source
Marks the current account (acc0) as taken by writing input to the global variable acc{acc0}.
| Parameter | Description |
|---|---|
input |
Value to store; default is the projectName variable. |
force |
Overwrite even if the account is already taken. |
log |
Write the outcome to the log. |
Returns: false when the account is already taken and force is false.
GVar
public static string GVar(this IZennoPosterProjectModel project, string var)
Extension method for IZennoPosterProjectModel. source
Returns a global variable, or an empty string when it does not exist.
public static string GVar(this IZennoPosterProjectModel project, string var, object value)
Extension method for IZennoPosterProjectModel. source
Sets a global variable, creating it when it does not exist. Errors are swallowed.
Returns: Always an empty string.