public NsContentReaderWriter(NsLeaf nsLeaf) { if (null == nsLeaf) { throw new ArgumentNullException("nsLeaf"); } m_nsLeaf = nsLeaf; } // end constructor
} // end CreateDbgItem public virtual ColorString Summarize(int maxWidth) { NsLeaf nsLeaf = NsItem as NsLeaf; if (null != nsLeaf) { return(nsLeaf.Summarize(maxWidth)); } return(ColorString.Empty); }
private bool _TryGetContentItem(string path, out NsLeaf nsLeaf) { if (!_TryGetItemAs(path, out nsLeaf)) { InvalidOperationException ioe = new InvalidOperationException(Util.Sprintf("The item at '{0}' cannot contain content.", path)); try { throw ioe; } catch (InvalidOperationException) { } // give it a stack WriteError(ioe, "NotAContentItem", ErrorCategory.InvalidType, path); return(false); } return(true); } // end _TryGetContentItem()
} // end Write() public void Dispose() { m_nsLeaf = null; } // end Dispose()