private void PopGroup()
        {
            GroupEndData o = this.viewManager.ViewGenerator.GenerateGroupEndData();

            this.WriteObject(o);
            base.contextManager.Pop();
        }
        /// <summary>
        /// inject the end group information
        /// and pop group context out of stack
        /// </summary>
        private void PopGroup()
        {
            GroupEndData endGroup = _viewManager.ViewGenerator.GenerateGroupEndData();

            this.WriteObject(endGroup);
            contextManager.Pop();
        }
Esempio n. 3
0
        /// <summary>
        /// callback for Ge processing
        /// </summary>
        /// <param name="ge">Ge notification message</param>
        /// <param name="c">current context, with Gs in it</param>
        private void ProcessGroupEnd(GroupEndData ge, FormatMessagesContextManager.OutputContext c)
        {
            //Console.WriteLine("ProcessGroupEnd");
            GroupOutputContext goc = (GroupOutputContext)c;

            goc.GroupEnd();
        }
        internal void Process(object o)
        {
            PacketInfoData  formatData      = o as PacketInfoData;
            FormatEntryData formatEntryData = formatData as FormatEntryData;

            if (formatEntryData != null)
            {
                OutputContext c = null;
                if (!formatEntryData.outOfBand)
                {
                    c = (OutputContext)this.stack.Peek();
                }
                this.payload(formatEntryData, c);
            }
            else
            {
                bool flag  = formatData is FormatStartData;
                bool flag2 = formatData is GroupStartData;
                if (flag || flag2)
                {
                    OutputContext context2 = this.contextCreation(this.ActiveOutputContext, formatData);
                    this.stack.Push(context2);
                    if (flag)
                    {
                        this.fs(context2);
                    }
                    else if (flag2)
                    {
                        this.gs(context2);
                    }
                }
                else
                {
                    GroupEndData  fe    = formatData as GroupEndData;
                    FormatEndData data4 = formatData as FormatEndData;
                    if ((fe != null) || (data4 != null))
                    {
                        OutputContext context3 = (OutputContext)this.stack.Peek();
                        if (data4 != null)
                        {
                            this.fe(data4, context3);
                        }
                        else if (fe != null)
                        {
                            this.ge(fe, context3);
                        }
                        this.stack.Pop();
                    }
                }
            }
        }
Esempio n. 5
0
        /// <summary>
        /// callback for Ge processing
        /// </summary>
        /// <param name="ge">Ge notification message</param>
        /// <param name="c">current context, with Gs in it</param>
        private void ProcessGroupEnd(GroupEndData ge, FormatMessagesContextManager.OutputContext c)
        {
            //Console.WriteLine("ProcessGroupEnd");
            GroupOutputContext goc = (GroupOutputContext)c;

            goc.GroupEnd();
            this.LineOutput.WriteLine("");
        }
        /// <summary>
        /// process an object from an input stream. It manages the context stack and
        /// calls back on the specified event delegates
        /// </summary>
        /// <param name="o">object to process</param>
        internal void Process(object o)
        {
            PacketInfoData  formatData = o as PacketInfoData;
            FormatEntryData fed        = formatData as FormatEntryData;

            if (fed != null)
            {
                OutputContext ctx = null;

                if (!fed.outOfBand)
                {
                    ctx = _stack.Peek();
                }
                //  notify for Payload
                this.payload(fed, ctx);
            }
            else
            {
                bool formatDataIsFormatStartData = formatData is FormatStartData;
                bool formatDataIsGroupStartData  = formatData is GroupStartData;
                // it's one of our formatting messages
                // we assume for the moment that they are in the correct sequence
                if (formatDataIsFormatStartData || formatDataIsGroupStartData)
                {
                    OutputContext oc = this.contextCreation(this.ActiveOutputContext, formatData);
                    _stack.Push(oc);

                    // now we have the context properly set: need to notify the
                    // underlying algorithm to do the start document or group stuff
                    if (formatDataIsFormatStartData)
                    {
                        // notify for Fs
                        this.fs(oc);
                    }
                    else if (formatDataIsGroupStartData)
                    {
                        //GroupStartData gsd = (GroupStartData) formatData;
                        // notify for Gs
                        this.gs(oc);
                    }
                }
                else
                {
                    GroupEndData  ged   = formatData as GroupEndData;
                    FormatEndData fEndd = formatData as FormatEndData;
                    if (ged != null || fEndd != null)
                    {
                        OutputContext oc = _stack.Peek();
                        if (fEndd != null)
                        {
                            // notify for Fe, passing the Fe info, before a Pop()
                            this.fe(fEndd, oc);
                        }
                        else if (ged != null)
                        {
                            // notify for Fe, passing the Fe info, before a Pop()
                            this.ge(ged, oc);
                        }
                        _stack.Pop();
                    }
                }
            }
        }
Esempio n. 7
0
 private void ProcessGroupEnd(GroupEndData ge, FormatMessagesContextManager.OutputContext c)
 {
     ((GroupOutputContext) c).GroupEnd();
     this.LineOutput.WriteLine("");
 }
Esempio n. 8
0
 private void ProcessGroupEnd(GroupEndData ge, FormatMessagesContextManager.OutputContext c)
 {
     ((GroupOutputContext)c).GroupEnd();
     this.LineOutput.WriteLine("");
 }