Table of Contents

Class UnmarshallerContext

Namespace
Amazon.Runtime.Internal.Transform
Assembly
AWSSDK.Core.dll

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

CoreChecksumAlgorithm

Crc32Result

protected int Crc32Result { get; set; }

Property Value

int

CrcStream

protected CrcCalculatorStream CrcStream { get; set; }

Property Value

CrcCalculatorStream

CurrentDepth

Returns the element depth of the parser's current position in the document being parsed.

public abstract int CurrentDepth { get; }

Property Value

int

CurrentPath

The current path that is being unmarshalled.

public abstract string CurrentPath { get; }

Property Value

string

ExpectedFlexibleChecksumResult

protected string ExpectedFlexibleChecksumResult { get; set; }

Property Value

string

FlexibleChecksumStream

protected HashStream FlexibleChecksumStream { get; set; }

Property Value

HashStream

IsEndElement

True if NodeType is EndElement.

public abstract bool IsEndElement { get; }

Property Value

bool

IsException

protected bool IsException { get; set; }

Property Value

bool

IsStartElement

True if NodeType is Element.

public abstract bool IsStartElement { get; }

Property Value

bool

IsStartOfDocument

True if the context is at the start of the document.

public abstract bool IsStartOfDocument { get; }

Property Value

bool

MaintainResponseBody

protected bool MaintainResponseBody { get; set; }

Property Value

bool

ResponseBody

public string ResponseBody { get; }

Property Value

string

ResponseData

public IWebResponseData ResponseData { get; }

Property Value

IWebResponseData

WebResponseData

protected IWebResponseData WebResponseData { get; set; }

Property Value

IWebResponseData

WrappingStream

protected CachingWrapperStream WrappingStream { get; set; }

Property Value

CachingWrapperStream

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 bool

Whether 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 int

Tokens 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 IWebResponseData
responseStream Stream
contentLength long

SetupFlexibleChecksumStream(IWebResponseData, Stream, long, IRequestContext)

protected void SetupFlexibleChecksumStream(IWebResponseData responseData, Stream responseStream, long contentLength, IRequestContext requestContext)

Parameters

responseData IWebResponseData
responseStream Stream
contentLength long
requestContext IRequestContext

TestExpression(string)

Tests the specified expression against the current position in the XML document

public bool TestExpression(string expression)

Parameters

expression string

The 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 string

The pseudo-XPath expression to test.

startingStackDepth int

The 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.