Show / Hide Table of Contents

Class CVar

Represents a variable.

Inheritance
System.Object
CVar
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: RuriLib.Models
Assembly: RuriLib.dll
Syntax
public class CVar

Constructors

| Improve this Doc View Source

CVar()

Needed for NoSQL deserialization.

Declaration
public CVar()
| Improve this Doc View Source

CVar(String, CVar.VarType, Object, Boolean, Boolean)

Creates a variable of a given type.

Declaration
public CVar(string name, CVar.VarType type, dynamic value, bool isCapture = false, bool hidden = false)
Parameters
Type Name Description
System.String name

The variable name

CVar.VarType type

The variable type

System.Object value

The dynamic variable value

System.Boolean isCapture

Whether the variable is marked as Capture

System.Boolean hidden

Whether the variable is hidden

| Improve this Doc View Source

CVar(String, Dictionary<String, String>, Boolean, Boolean)

Creates a variable of type Dictionary.

Declaration
public CVar(string name, Dictionary<string, string> value, bool isCapture = false, bool hidden = false)
Parameters
Type Name Description
System.String name

The variable name

System.Collections.Generic.Dictionary<System.String, System.String> value

The variable value as a dictionary of strings

System.Boolean isCapture

Whether the variable is marked as Capture

System.Boolean hidden

Whether the variable is hidden

| Improve this Doc View Source

CVar(String, List<String>, Boolean, Boolean)

Creates a variable of type List.

Declaration
public CVar(string name, List<string> value, bool isCapture = false, bool hidden = false)
Parameters
Type Name Description
System.String name

The variable name

System.Collections.Generic.List<System.String> value

The variable value as a list of strings

System.Boolean isCapture

Whether the variable is marked as Capture

System.Boolean hidden

Whether the variable is hidden

| Improve this Doc View Source

CVar(String, String, Boolean, Boolean)

Creates a variable of type Single.

Declaration
public CVar(string name, string value, bool isCapture = false, bool hidden = false)
Parameters
Type Name Description
System.String name

The variable name

System.String value

The variable value as a single string

System.Boolean isCapture

Whether the variable is marked as Capture

System.Boolean hidden

Whether the variable is hidden

Properties

| Improve this Doc View Source

Hidden

Whether the variable is hidden and shouldn't be displayed to the user.

Declaration
public bool Hidden { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsCapture

Whether the variable is used for the final capture.

Declaration
public bool IsCapture { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Name

The variable name.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Type

The variable type (it determines which type of value is expected).

Declaration
public CVar.VarType Type { get; set; }
Property Value
Type Description
CVar.VarType
| Improve this Doc View Source

Value

The dynamic variable value.

Declaration
public dynamic Value { get; set; }
Property Value
Type Description
System.Object

Methods

| Improve this Doc View Source

GetDictKey(String)

Gets an item from a Dictionary Value.

Declaration
public string GetDictKey(string value)
Parameters
Type Name Description
System.String value

The value of the dictionary entry

Returns
Type Description
System.String

The key of the Dictionary variable's entry

| Improve this Doc View Source

GetDictValue(String)

Gets an item from a Dictionary Key.

Declaration
public string GetDictValue(string key)
Parameters
Type Name Description
System.String key

The key of the dictionary entry

Returns
Type Description
System.String

The value of the Dictionary variable's entry

| Improve this Doc View Source

GetListItem(Int32)

Gets an item from a List variable.

Declaration
public string GetListItem(int index)
Parameters
Type Name Description
System.Int32 index

The index of the item

Returns
Type Description
System.String

The item of the List variable's value

| Improve this Doc View Source

ToString()

Outputs a string from a variable.

Declaration
public override string ToString()
Returns
Type Description
System.String

The formatted value of the value as a single string

Overrides
System.Object.ToString()
  • Improve this Doc
  • View Source
Back to top Generated by DocFX