Inheritance: IXPathNavigable, ICustomTypeDescriptor, INotifyPropertyChanged
        public override object GetValue(object o)
        {
            if (null == o)
            {
                throw new ArgumentNullException("XPathNodeViewPropertyDescriptor.GetValue");
            }
            XPathNodeView xiv = (XPathNodeView)o;

            if (xiv.Collection.RowShape != this.rowShape)
            {
                throw new ArgumentException("XPathNodeViewPropertyDescriptor.GetValue");
            }
            object    val = xiv.Column(this.colIndex);
            XPathNode nd  = val as XPathNode;

            if (null != nd)
            {
                XPathDocumentNavigator nav  = new XPathDocumentNavigator(nd, null);
                XmlSchemaType          xst  = nd.SchemaType;
                XmlSchemaComplexType   xsct = xst as XmlSchemaComplexType;
                if (null == xst || ((null != xsct) && xsct.IsMixed))
                {
                    return(nav.InnerXml);
                }
                else
                {
                    return(nav.TypedValue);
                }
            }
            return(val);
        }
Example #2
0
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.this"]/*' />
 object IList.this[int index] {
     get {
         object val = this.rows[index];
         if (val is XPathNodeView)
         {
             return(val);
         }
         XPathNodeView xiv = FillRow((XPathNode)val, this.rowShape);
         this.rows[index] = xiv;
         return(xiv);
     }
     set {
         throw new NotSupportedException("IList.this[]");
     }
 }
Example #3
0
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.Remove2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of Remove, demanded by Fxcop.</para>
 /// </devdoc>
 public void Remove(XPathNodeView value)
 {
     throw new NotSupportedException("IList.Remove");
 }
Example #4
0
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.IndexOf2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of IndexOf, demanded by Fxcop.</para>
 /// </devdoc>
 public int IndexOf(XPathNodeView value)
 {
     return(this.rows.IndexOf(value));
 }
Example #5
0
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.Insert2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of Insert, demanded by Fxcop.</para>
 /// </devdoc>
 public void Insert(int index, XPathNodeView value)
 {
     throw new NotSupportedException("IList.Insert");
 }
Example #6
0
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.Add2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of Add, demanded by Fxcop.</para>
 /// </devdoc>
 public int Add(XPathNodeView value)
 {
     throw new NotSupportedException("IList.Add");
 }
Example #7
0
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.Contains2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of Contains, demanded by Fxcop.</para>
 /// </devdoc>
 public bool Contains(XPathNodeView value)
 {
     return(this.rows.Contains(value));
 }
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.Remove2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of Remove, demanded by Fxcop.</para>
 /// </devdoc>
 public void Remove(XPathNodeView value) {            
     throw new NotSupportedException("IList.Remove");
 }
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.IndexOf2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of IndexOf, demanded by Fxcop.</para>
 /// </devdoc>
 public int IndexOf(XPathNodeView value)  {
     return this.rows.IndexOf(value);
 }
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.Insert2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of Insert, demanded by Fxcop.</para>
 /// </devdoc>
 public void Insert(int index, XPathNodeView value) {
     throw new NotSupportedException("IList.Insert");
 }
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.Add2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of Add, demanded by Fxcop.</para>
 /// </devdoc>
 public int Add(XPathNodeView value) {
     throw new NotSupportedException("IList.Add");
 }
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.Contains2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of Contains, demanded by Fxcop.</para>
 /// </devdoc>
 public bool Contains(XPathNodeView value) {
     return this.rows.Contains(value);
 }
 /// <include file='doc\XPathDocumentView.uex' path='docs/doc[@for="XPathDocumentView.CopyTo2"]/*' />
 /// <devdoc>
 ///    <para>strongly typed version of CopyTo, demanded by Fxcop.</para>
 /// </devdoc>
 public void CopyTo(XPathNodeView[] array, int index) {
     object o;
     ArrayList rows = this.rows;
     for (int i=0; i < rows.Count; i++)
         o = this[i]; // force creation lazy of row object
     rows.CopyTo(array, index);
 }