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)); }
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)); }
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)); }