Example #1
0
            public NsContentReaderWriter(NsLeaf nsLeaf)
            {
                if (null == nsLeaf)
                {
                    throw new ArgumentNullException("nsLeaf");
                }

                m_nsLeaf = nsLeaf;
            } // end constructor
Example #2
0
        } // end CreateDbgItem

        public virtual ColorString Summarize(int maxWidth)
        {
            NsLeaf nsLeaf = NsItem as NsLeaf;

            if (null != nsLeaf)
            {
                return(nsLeaf.Summarize(maxWidth));
            }

            return(ColorString.Empty);
        }
Example #3
0
 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()
Example #4
0
            } // end Write()

            public void Dispose()
            {
                m_nsLeaf = null;
            } // end Dispose()