Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

52 lines
1.5 KiB
C#

//-----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.Activities.Debugger
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime;
// A virtual callstack frame for the interpretter.
// This is created by calls to EnterState and LeaveState.
// This is explictly not named "StackFrame" so that it's not confused with
// System.Diagnostics.StackFrame.
[DebuggerNonUserCode]
[Fx.Tag.XamlVisible(false)]
public class VirtualStackFrame
{
State state;
IDictionary<string, object> locals;
public VirtualStackFrame(State state, IDictionary<string, object> locals)
{
this.state = state;
this.locals = locals;
}
public VirtualStackFrame(State state)
: this(state, null)
{
Fx.Assert(state.NumberOfEarlyLocals == 0, "should start with empty locals");
}
public State State
{
get { return this.state; }
}
// All locals (both early-bound and late-bound) for this frame.
public IDictionary<string, object> Locals
{
get { return this.locals; }
}
public override string ToString()
{
return this.state.ToString();
}
}
}