XmlReader.ReadElementContentAsAsync(Type, IXmlNamespaceResolver) Method

Definition

요소 콘텐츠를 요청된 형식으로 비동기적으로 읽습니다.Asynchronously reads the element content as the requested type.

public:
 virtual System::Threading::Tasks::Task<System::Object ^> ^ ReadElementContentAsAsync(Type ^ returnType, System::Xml::IXmlNamespaceResolver ^ namespaceResolver);
public virtual System.Threading.Tasks.Task<object> ReadElementContentAsAsync (Type returnType, System.Xml.IXmlNamespaceResolver namespaceResolver);
abstract member ReadElementContentAsAsync : Type * System.Xml.IXmlNamespaceResolver -> System.Threading.Tasks.Task<obj>
override this.ReadElementContentAsAsync : Type * System.Xml.IXmlNamespaceResolver -> System.Threading.Tasks.Task<obj>
Public Overridable Function ReadElementContentAsAsync (returnType As Type, namespaceResolver As IXmlNamespaceResolver) As Task(Of Object)

Parameters

returnType
Type

반환될 값의 형식입니다.The type of the value to be returned.

namespaceResolver
IXmlNamespaceResolver

형식 변환과 관련된 모든 네임스페이스 접두사를 확인하는 IXmlNamespaceResolver 개체입니다.An IXmlNamespaceResolver object that is used to resolve any namespace prefixes related to type conversion.

Returns

Task<Object>

요청된 형식의 개체로 변환된 요소 콘텐츠입니다.The element content converted to the requested typed object.

Exceptions

이전 비동기 작업이 완료되기 전에 XmlReader 메서드가 호출되었습니다.An XmlReader method was called before a previous asynchronous operation finished. 이 경우 “비동기 작업이 이미 진행 중입니다.” 메시지를 나타내며 InvalidOperationException이 throw됩니다.In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress." -또는--or-

Async 플래그를 true로 설정하지 않고 XmlReader 비동기 메서드가 호출되었습니다.An XmlReader asynchronous method was called without setting the Async flag to true. 이 경우 “비동기 메서드를 사용하려면 XmlReaderSettings.Async를 true로 설정하세요.” 메시지를 나타내며 InvalidOperationException이 throw됩니다.In this case, InvalidOperationException is thrown with the message "Set XmlReaderSettings.Async to true if you want to use Async Methods."

Remarks

동일한 기능을 사용 하는 ReadElementContentAs의 비동기 버전입니다.This is the asynchronous version of ReadElementContentAs, with the same functionality. 이 메서드를 사용 하려면 Async 플래그를 true으로 설정 해야 합니다.To use this method, you must set the Async flag to true.

Applies to

See also