DocumentSet.TryGetUnparsedText MethodDocumentSet.TryGetUnparsedText MethodDocumentSet::TryGetUnparsedText Method
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
nulla null reference (Nothingin Visual Basic)nullptrto 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
nulla null reference (Nothingin Visual Basic)nullptr. This is also set tonulla null reference (Nothingin Visual Basic)nullptrif 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
| Exception | Condition |
| ArgumentNullExceptionArgumentNullExceptionArgumentNullException | uri 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. |
