Ejemplo n.º 1
0
        public override string Store(Value value)
        {
            var structMirror = containingLocation.Load() as StructMirror;

            Debug.Assert(structMirror?.Type == structType);
            if (structMirror?.Type != structType)
            {
                throw new InvalidOperationException();
            }
            structMirror.Fields[valueIndex] = value;
            return(containingLocation.Store(structMirror));
        }
Ejemplo n.º 2
0
        string StoreIndirect_MonoDebug(DbgEvaluationInfo evalInfo, object value)
        {
            engine.VerifyMonoDebugThread();
            evalInfo.CancellationToken.ThrowIfCancellationRequested();
            if (!Type.IsByRef)
            {
                return(PredefinedEvaluationErrorMessages.InternalDebuggerError);
            }
            var res = engine.CreateMonoValue_MonoDebug(evalInfo, value, Type.GetElementType());

            if (res.ErrorMessage != null)
            {
                return(res.ErrorMessage);
            }
            return(valueLocation.Store(res.Value));
        }
Ejemplo n.º 3
0
        string StoreIndirect_MonoDebug(DbgEvaluationContext context, DbgStackFrame frame, object value, CancellationToken cancellationToken)
        {
            engine.VerifyMonoDebugThread();
            cancellationToken.ThrowIfCancellationRequested();
            if (!Type.IsByRef)
            {
                return(PredefinedEvaluationErrorMessages.InternalDebuggerError);
            }
            var res = engine.CreateMonoValue_MonoDebug(context, frame, value, Type.GetElementType(), cancellationToken);

            if (res.ErrorMessage != null)
            {
                return(res.ErrorMessage);
            }
            return(valueLocation.Store(res.Value));
        }