Class Bytecode
A language agnostic representation of ITraversal mutations.
Inheritance
Inherited Members
Namespace: Gremlin.Net.Process.Traversal
Assembly: cs.temp.dll.dll
Syntax
public class Bytecode
Remarks
Bytecode is simply a list of ordered instructions. Bytecode can be serialized between environments and machines by way of a GraphSON representation. Thus, Gremlin.Net can create bytecode in C# and ship it to Gremlin-Java for evaluation in Java.
Constructors
Bytecode()
Initializes a new instance of the Bytecode class.
Declaration
public Bytecode()
Bytecode(Bytecode)
Initializes a new instance of the Bytecode class.
Declaration
public Bytecode(Bytecode byteCode)
Parameters
Type | Name | Description |
---|---|---|
Bytecode | byteCode | Already existing Bytecode that should be cloned. |
Properties
SourceInstructions
Gets the traversal source instructions.
Declaration
public List<Instruction> SourceInstructions { get; }
Property Value
Type | Description |
---|---|
List<Instruction> |
StepInstructions
Gets the ITraversal instructions.
Declaration
public List<Instruction> StepInstructions { get; }
Property Value
Type | Description |
---|---|
List<Instruction> |
Methods
AddSource(String, Object[])
Add a traversal source instruction to the bytecode.
Declaration
public void AddSource(string sourceName, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceName | The traversal source method name (e.g. withSack()). |
System.Object[] | args | The traversal source method arguments. |
AddStep(String, Object[])
Adds a ITraversal instruction to the bytecode.
Declaration
public void AddStep(string stepName, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | stepName | The traversal method name (e.g. out()). |
System.Object[] | args | The traversal method arguments. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |