DocumentSet.TryGetUnparsedText MethodDocumentSet.TryGetUnparsedText MethodDocumentSet::TryGetUnparsedText Method

Gets the unparsed text of the resource with the specified URI from the DocumentSetDocumentSetDocumentSet.

Syntax

Public Function TryGetUnparsedText( _
    uri As AnyUri, _
    encoding As System.Text.Encoding, _
    <Out>resource As ByRef String _
) As Boolean
public bool TryGetUnparsedText(
    AnyUri uri,
    System.Text.Encoding encoding,
    out string resource
)
public:
bool TryGetUnparsedText(
    AnyUri^ uri, 
    System.Text::Encoding^ encoding, 
    [Out] String^% resource
)
 

Parameters

uri

Type: XmlPrime.AnyUriXmlPrime.AnyUriXmlPrime::AnyUri^

The URI of the resource to retrieve.

encoding

Type: System.Text.EncodingSystem.Text.EncodingSystem.Text::Encoding^

The encoding used to retrieve the unparsed text of the resource, or null a null reference (Nothing in Visual Basic) nullptr to use the default.

resource

Type: out System.StringByRef System.StringSystem::String^%

When this method returns, contains the unparsed text of the resource at the specified URI, if it is cached in the DocumentSetDocumentSetDocumentSet; otherwise null a null reference (Nothing in Visual Basic) nullptr. This is also set to null a null reference (Nothing in Visual Basic) nullptr if the URI is marked as unavailable or if the resource cannot be decoded.

Return Value

Type: System.BooleanSystem.BooleanSystem::Boolean

trueTruetrue if the DocumentSetDocumentSetDocumentSet contains the specified resource, or the URI is marked as unavailable; otherwise falseFalsefalse.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionuri is null a null reference (Nothing in Visual Basic) nullptr.
ArgumentExceptionArgumentExceptionArgumentException uri is not an absolute URI, uri contains a fragment identifier, or encoding is not a supported encoding.

Remarks

The encoding parameter is ignored if the unparsed text of the resource has been previously retrieved.