Class UnmarshallerContext
Base class for the UnmarshallerContext objects that are used to unmarshall a web-service response.
public abstract class UnmarshallerContext : IDisposable
- Inheritance
-
UnmarshallerContext
- Implements
- Derived
- Inherited Members
Constructors
UnmarshallerContext()
protected UnmarshallerContext()
Properties
ChecksumAlgorithm
protected CoreChecksumAlgorithm ChecksumAlgorithm { get; set; }
Property Value
Crc32Result
protected int Crc32Result { get; set; }
Property Value
CrcStream
protected CrcCalculatorStream CrcStream { get; set; }
Property Value
CurrentDepth
Returns the element depth of the parser's current position in the document being parsed.
public abstract int CurrentDepth { get; }
Property Value
CurrentPath
The current path that is being unmarshalled.
public abstract string CurrentPath { get; }
Property Value
ExpectedFlexibleChecksumResult
protected string ExpectedFlexibleChecksumResult { get; set; }
Property Value
FlexibleChecksumStream
protected HashStream FlexibleChecksumStream { get; set; }
Property Value
IsEndElement
True if NodeType
is EndElement
.
public abstract bool IsEndElement { get; }
Property Value
IsException
protected bool IsException { get; set; }
Property Value
IsStartElement
True if NodeType
is Element
.
public abstract bool IsStartElement { get; }
Property Value
IsStartOfDocument
True if the context is at the start of the document.
public abstract bool IsStartOfDocument { get; }
Property Value
MaintainResponseBody
protected bool MaintainResponseBody { get; set; }
Property Value
ResponseBody
public string ResponseBody { get; }
Property Value
ResponseData
public IWebResponseData ResponseData { get; }
Property Value
WebResponseData
protected IWebResponseData WebResponseData { get; set; }
Property Value
WrappingStream
protected CachingWrapperStream WrappingStream { get; set; }
Property Value
Methods
Dispose()
Disposes of all managed and unmanaged resources.
public void Dispose()
Dispose(bool)
Implements the Dispose pattern
protected virtual void Dispose(bool disposing)
Parameters
disposing
boolWhether this object is being disposed via a call to Dispose or garbage collected.
GetResponseBodyBytes()
public byte[] GetResponseBodyBytes()
Returns
- byte[]
Read()
Reads to the next node in the document, and updates the context accordingly.
public abstract bool Read()
Returns
- bool
True if a node was read, false if there are no more elements to read.
ReadAtDepth(int)
Reads the next token at depth greater than or equal to target depth.
public bool ReadAtDepth(int targetDepth)
Parameters
targetDepth
intTokens are read at depth greater than or equal to target depth.
Returns
- bool
True if a token was read and current depth is greater than or equal to target depth.
ReadText()
Returns the text contents of the current element being parsed.
public abstract string ReadText()
Returns
- string
The text contents of the current element being parsed.
SetupCRCStream(IWebResponseData, Stream, long)
protected void SetupCRCStream(IWebResponseData responseData, Stream responseStream, long contentLength)
Parameters
responseData
IWebResponseDataresponseStream
StreamcontentLength
long
SetupFlexibleChecksumStream(IWebResponseData, Stream, long, IRequestContext)
protected void SetupFlexibleChecksumStream(IWebResponseData responseData, Stream responseStream, long contentLength, IRequestContext requestContext)
Parameters
responseData
IWebResponseDataresponseStream
StreamcontentLength
longrequestContext
IRequestContext
TestExpression(string)
Tests the specified expression against the current position in the XML document
public bool TestExpression(string expression)
Parameters
expression
stringThe pseudo-XPath expression to test.
Returns
- bool
True if the expression matches the current position in the document, false otherwise.
TestExpression(string, int)
Tests the specified expression against the current position in the XML document being parsed, and restricts the expression to matching at the specified stack depth.
public bool TestExpression(string expression, int startingStackDepth)
Parameters
expression
stringThe pseudo-XPath expression to test.
startingStackDepth
intThe depth in the stack representing where the expression must start matching in order for this method to return true.
Returns
- bool
True if the specified expression matches the current position in the XML document, starting from the specified depth.