XmlSecureResolver.GetEntity(Uri, String, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Maps a URI to an object that contains the actual resource. This method temporarily sets the PermissionSet created in the constructor by calling PermitOnly() before calling GetEntity
on the underlying XmlResolver to open the resource.
public:
override System::Object ^ GetEntity(Uri ^ absoluteUri, System::String ^ role, Type ^ ofObjectToReturn);
public override object? GetEntity (Uri absoluteUri, string? role, Type? ofObjectToReturn);
public override object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn);
override this.GetEntity : Uri * string * Type -> obj
Public Overrides Function GetEntity (absoluteUri As Uri, role As String, ofObjectToReturn As Type) As Object
Parameters
- absoluteUri
- Uri
The URI that is returned from ResolveUri(Uri, String).
- role
- String
Currently not used.
- ofObjectToReturn
- Type
The type of object to return. The current version only returns Stream objects.
Returns
The stream returned by calling GetEntity
on the underlying XmlResolver. If a type other than Stream is specified, the method returns null
.
Exceptions
The specified URI is not an absolute URI.
absoluteUri
is null
.
There is a run-time error (for example, an interrupted server connection).
Remarks
Important
Your application can mitigate memory denial of service threats to the GetEntity method by implementing an IStream that limits the number of bytes read. This helps guard against situations where malicious code attempts to pass an infinite stream of bytes to the GetEntity method.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기