/// <summary> /// Initializes an instance of MethodFrame. /// </summary> /// <param name="context">The context under which the frame is created</param> public MethodFrame(CallContext context) { this.context = context; blockFrames = new Stack <BlockFrame>(); PushBlock(); rootBlockFrame = blockFrames.Peek(); }
/// <summary> /// Initializes an instance of MethodFrame. /// </summary> /// <param name="context">The context under which the frame is created</param> /// <param name="initialItems">A set of initial frame's items</param> public MethodFrame(CallContext context, Dictionary <string, IFrameItem> initialItems) { this.context = context; blockFrames = new Stack <BlockFrame>(); PushBlock(initialItems); rootBlockFrame = blockFrames.Peek(); }
/// <summary> /// Pushes a new <see cref="BlockFrame"/> on top of the internal block related frames stack. /// </summary> public void PushBlock() { blockFrames.Push(currentBlockFrame = new BlockFrame()); }
/// <summary> /// Pushes a new <see cref="BlockFrame"/> on top of the internal block related frames stack. /// </summary> /// <param name="items">The set of items to be registered to the newly created block</param> public void PushBlock(Dictionary <string, IFrameItem> items) { blockFrames.Push(currentBlockFrame = new BlockFrame(items)); }