ObjectCache.Host Property
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.
Gets or sets a reference to a managed hosting environment that is available to ObjectCache implementations and that can provide host-specific services to ObjectCache implementations.
public:
static property IServiceProvider ^ Host { IServiceProvider ^ get(); void set(IServiceProvider ^ value); };
public static IServiceProvider Host { get; set; }
public static IServiceProvider Host { [System.Security.SecurityCritical] get; [System.Security.SecurityCritical] set; }
static member Host : IServiceProvider with get, set
[<get: System.Security.SecurityCritical>]
[<set: System.Security.SecurityCritical>]
static member Host : IServiceProvider with get, set
Public Shared Property Host As IServiceProvider
Property Value
A reference to a cache-aware managed hosting environment.
- Attributes
Exceptions
The value being assigned to the property is null
.
An attempt was made to set the property value more than one time.
Remarks
The Host property is intended for use by .NET Framework host environments and by cache implementations that implement behavior that depends on the .NET Framework host environment.
The following table lists the set of host environment services that might be available from a managed hosting environment and that are available to ObjectCache implementations through the Host property:
Service | Description |
---|---|
IApplicationIdentifier | Lets host environments provide application domain identifiers that might be needed by a cache implementation for features such as identifying performance counters. |
IFileChangeNotificationSystem | Lets host environments provide a custom file-change notification system, instead of using the one provided in the .NET Framework. |
IMemoryCacheManager | Lets cache implementations report cache memory consumption to the host environment. This enables host environments to centrally manage memory consumption across multiple cache implementations. |
Note
Callers of this property value require unrestricted code access security permissions.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기