Ejemplo n.º 1
0
 public KvpContainer(IVariableContainerSession session, int hashCode, ReadOnlyMemory <byte> key, ReadOnlyMemory <byte> value, bool constant)
 {
     this.session  = session;
     this.hashCode = hashCode.ToString("x");
     this.key      = key;
     this.value    = value;
     this.constant = constant;
 }
 public Variable GetVariable(IVariableContainerSession session, string name)
 {
     return(new Variable()
     {
         Name = name,
         Type = "StorageContext",
         Value = ScriptHash.ToString(),
     });
 }
Ejemplo n.º 3
0
        public static Variable Create(IVariableContainerSession session, Neo.VM.Types.Map map, string?name)
        {
            var container   = new NeoMapContainer(session, map);
            var containerID = session.AddVariableContainer(container);

            return(new Variable()
            {
                Name = name,
                Type = $"Map[{map.Count}]",
                VariablesReference = containerID,
                IndexedVariables = map.Count,
            });
        }
Ejemplo n.º 4
0
        public static Variable Create(IVariableContainerSession session, ReadOnlyMemory <byte> memory, string?name, bool hashed = false)
        {
            var container   = new ByteArrayContainer(session, memory);
            var containerID = session.AddVariableContainer(container);
            var hash        = hashed ? "#" : string.Empty;

            return(new Variable()
            {
                Name = name,
                Type = $"{hash}ByteArray[{memory.Length}]",
                Value = container.Span.ToHexString(),
                VariablesReference = containerID,
                IndexedVariables = memory.Length,
            });
        }
Ejemplo n.º 5
0
        public static Variable Create(IVariableContainerSession session, Neo.VM.Types.Array array, string name)
        {
            var container   = new NeoArrayContainer(session, array, name);
            var containerID = session.AddVariableContainer(container);
            var typeName    = array is Neo.VM.Types.Struct
                ? "Struct" : "Array";

            return(new Variable()
            {
                Name = name,
                Type = $"{typeName}[{array.Count}]",
                VariablesReference = containerID,
                IndexedVariables = array.Count,
            });
        }
 public IVariableContainer GetStorageContainer(IVariableContainerSession session, in UInt160 scriptHash)
 public ExecutionStackContainer(IVariableContainerSession session, RandomAccessStack <StackItem> execStack, string stackName)
 {
     this.session   = session;
     this.execStack = execStack;
     this.stackName = stackName;
 }
Ejemplo n.º 8
0
 public ExecutionContextContainer(IVariableContainerSession session, ExecutionContext context, DebugInfo.Method?method)
 {
     this.session = session;
     this.context = context;
     this.method  = method;
 }
Ejemplo n.º 9
0
 public ExecutionContextContainer(IVariableContainerSession session, ExecutionContext context, Contract contract)
     : this(session, context, contract.GetMethod(context))
 {
 }
Ejemplo n.º 10
0
 public static Variable Create(IVariableContainerSession session, ByteArray byteArray, string?name, bool hashed = false)
 {
     return(Create(session, byteArray.GetByteArray(), name));
 }
 public static IVariableContainer GetStorageContainer(this DebugExecutionEngine @this, IVariableContainerSession session, byte[] scriptHash)
 => @this.GetStorageContainer(session, new UInt160(scriptHash));
 public static EvaluateResponse EvaluateStorageExpression(this DebugExecutionEngine @this, IVariableContainerSession session, byte[] scriptHash, EvaluateArguments args)
 => @this.EvaluateStorageExpression(session, new UInt160(scriptHash), args);
Ejemplo n.º 13
0
 public EmulatedStorageContainer(IVariableContainerSession session, UInt160 scriptHash, EmulatedStorage storage)
 {
     this.session    = session;
     this.scriptHash = scriptHash;
     this.storage    = storage;
 }
Ejemplo n.º 14
0
 public NeoMapContainer(IVariableContainerSession session, Neo.VM.Types.Map map)
 {
     this.session = session;
     this.map     = map;
 }
Ejemplo n.º 15
0
 public KvpContainer(IVariableContainerSession session, StackItem key, StackItem value)
 {
     this.session = session;
     this.key     = key;
     this.value   = value;
 }
Ejemplo n.º 16
0
 public EvaluateResponse EvaluateStorageExpression(IVariableContainerSession session, in UInt160 scriptHash, EvaluateArguments args)
Ejemplo n.º 17
0
 private NeoArrayContainer(IVariableContainerSession session, Neo.VM.Types.Array array, string name)
 {
     this.session = session;
     this.array   = array;
     this.name    = name;
 }
Ejemplo n.º 18
0
 public ByteArrayContainer(IVariableContainerSession session, ReadOnlyMemory <byte> memory)
 {
     this.session = session;
     this.memory  = memory;
 }