BufferModesCollection クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > BufferModesCollection クラスの意味・解説 

BufferModesCollection クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

BufferModeSettings オブジェクトコレクション。このクラス継承できません。

名前空間: System.Web.Configuration
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public NotInheritable Class
 BufferModesCollection
    Inherits ConfigurationElementCollection
Dim instance As BufferModesCollection
public sealed class BufferModesCollection :
 ConfigurationElementCollection
public ref class BufferModesCollection sealed
 : public ConfigurationElementCollection
public final class BufferModesCollection extends
 ConfigurationElementCollection
public final class BufferModesCollection extends
 ConfigurationElementCollection
解説解説

BufferModeSettings オブジェクトは、CriticalNotificationAnalysis、および Logging などのイベント プロバイダロール定義するのに使用されます。ロールバッファ モード イベント設定異なります。たとえば、Critical ロールは MaxBufferSize、MaxFlushSize、および UrgentFlushInterval の各プロパティ小さい値を設定しAnalysis ロール大きい値を設定します

使用例使用例

BufferModesCollection 型を使用する方法次のコード例示します。このコード例は、HealthMonitoringSection クラストピック取り上げているコード例一部分です。

' Add a BufferModeSettings object to the BufferModes collection property.
Dim bufferModeSetting As BufferModeSettings
 = new BufferModeSettings("Error Log",
 _
    1024, 256, 512, new TimeSpan(0, 30, 0), new
 TimeSpan(0, 5, 0), 2)
bufferModeSetting.Name = "Operations Notification"
bufferModeSetting.MaxBufferSize = 128
bufferModeSetting.MaxBufferThreads = 1
bufferModeSetting.MaxFlushSize = 24
bufferModeSetting.RegularFlushInterval = TimeSpan.MaxValue
bufferModeSetting.UrgentFlushInterval = TimeSpan.Parse("00:01:00")
bufferModeSetting.UrgentFlushThreshold = 1
healthMonitoringSection.BufferModes.Add(bufferModeSetting)

' Add a BufferModeSettings object to the BufferModes collection property.
healthMonitoringSection.BufferModes.Add(new BufferModeSettings("Error
 Log", _
    1024, 256, 512, new TimeSpan(0, 30, 0), new
 TimeSpan(0, 5, 0), 2))

' Display contents of the BufferModes collection property
Console.WriteLine("BufferModes Collection contains {0} values:",
  _
    healthMonitoringSection.BufferModes.Count)

' Display all elements.
For i As System.Int32 = 0 To
 healthMonitoringSection.BufferModes.Count - 1
bufferModeSetting = healthMonitoringSection.BufferModes(i)
Dim name As String = bufferModeSetting.Name
Dim maxBufferSize As Integer
 = bufferModeSetting.MaxBufferSize
Dim maxBufferThreads As Integer
 = bufferModeSetting.MaxBufferThreads
Dim maxFlushSize As Integer
 = bufferModeSetting.MaxFlushSize
Dim regularFlushInterval As TimeSpan = bufferModeSetting.RegularFlushInterval
Dim urgentFlushInterval As TimeSpan = bufferModeSetting.UrgentFlushInterval
Dim urgentFlushThreshold As Integer
 = bufferModeSetting.UrgentFlushThreshold
    Dim item As String =
 "Name='" & name & "', MaxBufferSize =  '"
 & maxBufferSize & _
        "', MaxBufferThreads =  '" & maxBufferThreads
 & _
        "', MaxFlushSize =  '" & maxFlushSize & _
        "', RegularFlushInterval =  '" & regularFlushInterval.ToString()
 & _
        "', UrgentFlushInterval =  '" & urgentFlushInterval.ToString()
 & _
        "', UrgentFlushThreshold =  '" & urgentFlushThreshold
 & "'"
    Console.WriteLine("  Item {0}: {1}", i, item)
Next

' Get a named BufferMode
bufferModeSetting = healthMonitoringSection.BufferModes("Error
 Log")

' Remove a BufferModeSettings object from the BufferModes collection
 property.
healthMonitoringSection.BufferModes.Remove("Error Log")

' Clear all BufferModeSettings object from the BufferModes collection
 property.
healthMonitoringSection.BufferModes.Clear()

// Add a BufferModeSettings object to the BufferModes collection property.
BufferModeSettings bufferModeSetting = new BufferModeSettings("Error
 Log", 
    1024, 256, 512, new TimeSpan(0, 30, 0), new
 TimeSpan(0, 5, 0), 2);
bufferModeSetting.Name = "Operations Notification";
bufferModeSetting.MaxBufferSize = 128;
bufferModeSetting.MaxBufferThreads = 1;
bufferModeSetting.MaxFlushSize = 24;
bufferModeSetting.RegularFlushInterval = TimeSpan.MaxValue;
bufferModeSetting.UrgentFlushInterval = TimeSpan.Parse("00:01:00");
bufferModeSetting.UrgentFlushThreshold = 1;
healthMonitoringSection.BufferModes.Add(bufferModeSetting);

// Add a BufferModeSettings object to the BufferModes collection property.
healthMonitoringSection.BufferModes.Add(new BufferModeSettings("Error
 Log", 
    1024, 256, 512, new TimeSpan(0, 30, 0), new
 TimeSpan(0, 5, 0), 2));

// Display contents of the BufferModes collection property
Console.WriteLine("BufferModes Collection contains {0} values:", 
    healthMonitoringSection.BufferModes.Count);

// Display all elements.
for (System.Int32 i = 0; i < healthMonitoringSection.BufferModes.Count;
 i++)
{
bufferModeSetting = healthMonitoringSection.BufferModes[i];
string name = bufferModeSetting.Name;
int maxBufferSize = bufferModeSetting.MaxBufferSize;
int maxBufferThreads = bufferModeSetting.MaxBufferThreads;
int maxFlushSize = bufferModeSetting.MaxFlushSize;
TimeSpan regularFlushInterval = bufferModeSetting.RegularFlushInterval;
TimeSpan urgentFlushInterval = bufferModeSetting.UrgentFlushInterval;
int urgentFlushThreshold = bufferModeSetting.UrgentFlushThreshold;
    string item = "Name='" + name + "', MaxBufferSize
 =  '" + maxBufferSize + 
        "', MaxBufferThreads =  '" + maxBufferThreads +
        "', MaxFlushSize =  '" + maxFlushSize + 
        "', RegularFlushInterval =  '" + regularFlushInterval +
        "', UrgentFlushInterval =  '" + urgentFlushInterval + 
        "', UrgentFlushThreshold =  '" + urgentFlushThreshold + "'";
    Console.WriteLine("  Item {0}: {1}", i, item);
}

// Get a named BufferMode
bufferModeSetting = healthMonitoringSection.BufferModes["Error Log"];

// Remove a BufferModeSettings object from the BufferModes collection
 property.
healthMonitoringSection.BufferModes.Remove("Error Log");

// Clear all BufferModeSettings object from the BufferModes collection
 property.
healthMonitoringSection.BufferModes.Clear();

継承階層継承階層
System.Object
   System.Configuration.ConfigurationElement
     System.Configuration.ConfigurationElementCollection
      System.Web.Configuration.BufferModesCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
BufferModesCollection メンバ
System.Web.Configuration 名前空間
HealthMonitoringSection
BufferModeSettings



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「BufferModesCollection クラス」の関連用語

BufferModesCollection クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



BufferModesCollection クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS