Class BlockUtility
A block that performs actions on variables, converts values and operates on files.
Implements
Inherited Members
Namespace: RuriLib
Assembly: RuriLib.dll
Syntax
public class BlockUtility : BlockBase, INotifyPropertyChanged
Constructors
| Improve this Doc View SourceBlockUtility()
Creates a Utility block.
Declaration
public BlockUtility()
Properties
| Improve this Doc View SourceConversionFrom
The encoding to convert from.
Declaration
public Conversion ConversionFrom { get; set; }
Property Value
Type | Description |
---|---|
Conversion |
ConversionTo
The encoding to convert to.
Declaration
public Conversion ConversionTo { get; set; }
Property Value
Type | Description |
---|---|
Conversion |
FileAction
The action to be performed on the file.
Declaration
public FileAction FileAction { get; set; }
Property Value
Type | Description |
---|---|
FileAction |
FilePath
The path to the file to read/write.
Declaration
public string FilePath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Group
The utility group.
Declaration
public UtilityGroup Group { get; set; }
Property Value
Type | Description |
---|---|
UtilityGroup |
InputString
The input to process.
Declaration
public string InputString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsCapture
Whether the output variable should be marked for Capture.
Declaration
public bool IsCapture { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ListAction
The action to be performed on a list variable.
Declaration
public ListAction ListAction { get; set; }
Property Value
Type | Description |
---|---|
ListAction |
ListIndex
The list index where an item can be added/removed. -1 = end, 0 = start.
Declaration
public string ListIndex { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ListItem
The list item to add.
Declaration
public string ListItem { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ListName
The name of the target list variable.
Declaration
public string ListName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SecondListName
The name of the second list variable.
Declaration
public string SecondListName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Separator
The separator for joining a list.
Declaration
public string Separator { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SplitSeparator
The separator to split a string into a list.
Declaration
public string SplitSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String |
VarAction
The action to be performed on a single variable.
Declaration
public VarAction VarAction { get; set; }
Property Value
Type | Description |
---|---|
VarAction |
VariableName
The name of the output variable.
Declaration
public string VariableName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
VarName
The name of the single variable.
Declaration
public string VarName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceConvertFrom(String, Conversion)
Converts an encoded input to a byte array.
Declaration
public byte[] ConvertFrom(string input, Conversion type)
Parameters
Type | Name | Description |
---|---|---|
System.String | input | The encoded input |
Conversion | type | The encoding |
Returns
Type | Description |
---|---|
System.Byte[] | The converted byte array |
ConvertTo(Byte[], Conversion)
Converts a byte array to an encoded string.
Declaration
public string ConvertTo(byte[] input, Conversion type)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The byte array to encode |
Conversion | type | The encoding |
Returns
Type | Description |
---|---|
System.String | The encoded string |
FromLS(String)
Builds a block from a line of LoliScript code.
Declaration
public override BlockBase FromLS(string line)
Parameters
Type | Name | Description |
---|---|---|
System.String | line | The line of LoliScript code |
Returns
Type | Description |
---|---|
BlockBase | The parsed block object |
Overrides
| Improve this Doc View SourceProcess(BotData)
Executes the actual block logic.
Declaration
public override void Process(BotData data)
Parameters
Type | Name | Description |
---|---|---|
BotData | data | The BotData needed for variable replacement |
Overrides
| Improve this Doc View SourceToLS(Boolean)
Converts the block to LoliScript code.
Declaration
public override string ToLS(bool indent = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | indent |
Returns
Type | Description |
---|---|
System.String |