BufferModeSettings 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
配置 ASP.NET 事件緩衝設定以供事件提供者使用。 此類別無法獲得繼承。
public ref class BufferModeSettings sealed : System::Configuration::ConfigurationElement
public sealed class BufferModeSettings : System.Configuration.ConfigurationElement
type BufferModeSettings = class
inherit ConfigurationElement
Public NotInheritable Class BufferModeSettings
Inherits ConfigurationElement
- 繼承
範例
以下設定檔摘錄展示了如何宣告式地指定類別多個屬性 BufferModeSettings 的值。
<healthMonitoring>
<bufferModes>
<add name="Critical Notification"
maxBufferSize="100"
maxFlushSize="20"
urgentFlushThreshold="1"
regularFlushInterval="Infinite"
urgentFlushInterval="00:01:00"
maxBufferThreads="1"
/>
<add name="Notification"
maxBufferSize="300"
maxFlushSize="20"
urgentFlushThreshold="1"
regularFlushInterval="Infinite"
urgentFlushInterval="00:01:00"
maxBufferThreads="1"
/>
<add name="Analysis"
maxBufferSize="1000"
maxFlushSize="100"
urgentFlushThreshold="100"
regularFlushInterval="00:05:00"
urgentFlushInterval="00:01:00"
maxBufferThreads="1"
/>
<add name="Logging"
maxBufferSize="1000"
maxFlushSize="200"
urgentFlushThreshold="800"
regularFlushInterval="00:30:00"
urgentFlushInterval="00:05:00"
maxBufferThreads="1"
/>
</bufferModes>
</healthMonitoring>
備註
此 BufferModeSettings 類別用於定義事件提供者的角色,如關鍵(Critical)、通知(Notification)、分析(Analysis)及日誌(Logging)。 每個角色會根據該角色的不同緩衝事件。 例如,關鍵角色會保持 MaxBufferSize、 MaxFlushSize和 UrgentFlushInterval 屬性較小,而分析角色則會將這些屬性設定為較高的值。
此類別對應 bufferModes 於配置檔元素。
建構函式
| 名稱 | Description |
|---|---|
| BufferModeSettings(String, Int32, Int32, Int32, TimeSpan, TimeSpan, Int32) |
使用指定的設定初始化該類別的新實例 BufferModeSettings 。 |