blob: 85653c0dcef360b802c598f01f261b53094dbdf9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
//------------------------------------------------------------------------------
// <copyright file="XPathItem.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// <owner current="true" primary="true">Microsoft</owner>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Xml.Schema;
namespace System.Xml.XPath {
/// <summary>
/// Base class for XPathNavigator and XmlAtomicValue.
/// </summary>
public abstract class XPathItem {
/// <summary>
/// True if this item is a node, and not an atomic value.
/// </summary>
public abstract bool IsNode { get; }
/// <summary>
/// Returns Xsd type of atomic value, or of node's content.
/// </summary>
public abstract XmlSchemaType XmlType { get; }
/// <summary>
/// Typed and untyped value accessors.
/// </summary>
public abstract string Value { get; }
public abstract object TypedValue { get; }
public abstract Type ValueType { get; }
public abstract bool ValueAsBoolean { get; }
public abstract DateTime ValueAsDateTime { get; }
public abstract double ValueAsDouble { get; }
public abstract int ValueAsInt { get; }
public abstract long ValueAsLong { get; }
public virtual object ValueAs(Type returnType) { return ValueAs(returnType, null); }
public abstract object ValueAs(Type returnType, IXmlNamespaceResolver nsResolver);
}
}
|