private void ProcessOutOfBandPayload(FormatEntryData fed) { // try if it is raw text RawTextFormatEntry rte = fed.formatEntryInfo as RawTextFormatEntry; if (rte != null) { if (fed.isHelpObject) { ComplexWriter complexWriter = new ComplexWriter(); complexWriter.Initialize(_lo, _lo.ColumnNumber); complexWriter.WriteString(rte.text); } else { _lo.WriteLine(rte.text); } return; } // try if it is a complex entry ComplexViewEntry cve = fed.formatEntryInfo as ComplexViewEntry; if (cve != null && cve.formatValueList != null) { ComplexWriter complexWriter = new ComplexWriter(); complexWriter.Initialize(_lo, int.MaxValue); complexWriter.WriteObject(cve.formatValueList); return; } // try if it is a list view ListViewEntry lve = fed.formatEntryInfo as ListViewEntry; if (lve != null && lve.listViewFieldList != null) { ListWriter listWriter = new ListWriter(); _lo.WriteLine(""); string[] properties = ListOutputContext.GetProperties(lve); listWriter.Initialize(properties, _lo.ColumnNumber, _lo.DisplayCells); string[] values = ListOutputContext.GetValues(lve); listWriter.WriteProperties(values, _lo); _lo.WriteLine(""); return; } }
private void ProcessGroupStart(FormatMessagesContextManager.OutputContext c) { GroupOutputContext context = (GroupOutputContext)c; if (context.Data.groupingEntry != null) { this.lo.WriteLine(""); ComplexWriter writer = new ComplexWriter(); writer.Initialize(this.lo, this.lo.ColumnNumber); writer.WriteObject(context.Data.groupingEntry.formatValueList); this.LineOutput.WriteLine(""); } context.GroupStart(); }
/// <summary> /// callback for Gs processing /// </summary> /// <param name="c">the context containing the Gs entry</param> private void ProcessGroupStart(FormatMessagesContextManager.OutputContext c) { //Console.WriteLine("ProcessGroupStart"); GroupOutputContext goc = (GroupOutputContext)c; if (goc.Data.groupingEntry != null) { _lo.WriteLine(string.Empty); ComplexWriter writer = new ComplexWriter(); writer.Initialize(_lo, _lo.ColumnNumber); writer.WriteObject(goc.Data.groupingEntry.formatValueList); } goc.GroupStart(); }
private void ProcessOutOfBandPayload(FormatEntryData fed) { RawTextFormatEntry formatEntryInfo = fed.formatEntryInfo as RawTextFormatEntry; if (formatEntryInfo != null) { if (fed.isHelpObject) { ComplexWriter writer = new ComplexWriter(); writer.Initialize(this.lo, this.lo.ColumnNumber); writer.WriteString(formatEntryInfo.text); } else { this.lo.WriteLine(formatEntryInfo.text); } } else { ComplexViewEntry entry2 = fed.formatEntryInfo as ComplexViewEntry; if ((entry2 != null) && (entry2.formatValueList != null)) { ComplexWriter writer2 = new ComplexWriter(); writer2.Initialize(this.lo, this.lo.ColumnNumber); writer2.WriteObject(entry2.formatValueList); } else { ListViewEntry lve = fed.formatEntryInfo as ListViewEntry; if ((lve != null) && (lve.listViewFieldList != null)) { ListWriter writer3 = new ListWriter(); this.lo.WriteLine(""); string[] properties = ListOutputContext.GetProperties(lve); writer3.Initialize(properties, this.lo.ColumnNumber, this.lo.DisplayCells); string[] values = ListOutputContext.GetValues(lve); writer3.WriteProperties(values, this.lo); this.lo.WriteLine(""); } } } }
private void ProcessOutOfBandPayload(FormatEntryData fed) { // try if it is raw text RawTextFormatEntry rte = fed.formatEntryInfo as RawTextFormatEntry; if (rte != null) { if (fed.isHelpObject) { ComplexWriter complexWriter = new ComplexWriter(); complexWriter.Initialize(_lo, _lo.ColumnNumber); complexWriter.WriteString(rte.text); } else { _lo.WriteLine(rte.text); } return; } // try if it is a complex entry ComplexViewEntry cve = fed.formatEntryInfo as ComplexViewEntry; if (cve != null && cve.formatValueList != null) { ComplexWriter complexWriter = new ComplexWriter(); complexWriter.Initialize(_lo, _lo.ColumnNumber); complexWriter.WriteObject(cve.formatValueList); return; } // try if it is a list view ListViewEntry lve = fed.formatEntryInfo as ListViewEntry; if (lve != null && lve.listViewFieldList != null) { ListWriter listWriter = new ListWriter(); _lo.WriteLine(""); string[] properties = ListOutputContext.GetProperties(lve); listWriter.Initialize(properties, _lo.ColumnNumber, _lo.DisplayCells); string[] values = ListOutputContext.GetValues(lve); listWriter.WriteProperties(values, _lo); _lo.WriteLine(""); return; } }
/// <summary> /// callback for Gs processing /// </summary> /// <param name="c">the context containing the Gs entry</param> private void ProcessGroupStart(FormatMessagesContextManager.OutputContext c) { //Console.WriteLine("ProcessGroupStart"); GroupOutputContext goc = (GroupOutputContext)c; if (goc.Data.groupingEntry != null) { _lo.WriteLine(""); ComplexWriter writer = new ComplexWriter(); writer.Initialize(_lo, _lo.ColumnNumber); writer.WriteObject(goc.Data.groupingEntry.formatValueList); this.LineOutput.WriteLine(""); } goc.GroupStart(); }
internal ComplexOutputContext(OutCommandInner cmd, FormatMessagesContextManager.OutputContext parentContext, GroupStartData formatData) : base(cmd, parentContext, formatData) { this.writer = new ComplexWriter(); }
private void ProcessGroupStart(FormatMessagesContextManager.OutputContext c) { GroupOutputContext context = (GroupOutputContext) c; if (context.Data.groupingEntry != null) { this.lo.WriteLine(""); ComplexWriter writer = new ComplexWriter(); writer.Initialize(this.lo, this.lo.ColumnNumber); writer.WriteObject(context.Data.groupingEntry.formatValueList); this.LineOutput.WriteLine(""); } context.GroupStart(); }