CounterCreationDataCollection Klasa

Definicja

Zapewnia silnie wpisaną kolekcję CounterCreationData obiektów.Provides a strongly typed collection of CounterCreationData objects.

public ref class CounterCreationDataCollection : System::Collections::CollectionBase
public class CounterCreationDataCollection : System.Collections.CollectionBase
[System.Serializable]
public class CounterCreationDataCollection : System.Collections.CollectionBase
type CounterCreationDataCollection = class
    inherit CollectionBase
[<System.Serializable>]
type CounterCreationDataCollection = class
    inherit CollectionBase
Public Class CounterCreationDataCollection
Inherits CollectionBase
Dziedziczenie
CounterCreationDataCollection
Atrybuty

Przykłady

Poniższy przykład ilustruje sposób użycia CounterCreationDataCollection klasy.The following example demonstrates how to use the CounterCreationDataCollection class. Przykład tworzy nowe wystąpienie klasy i używa kilku metod, aby dodać instrukcje do kolekcji, zwrócić indeks oraz dodać lub usunąć atrybuty w określonym punkcie indeksu.The example creates a new instance of the class and uses several methods to add statements to the collection, return their index, and add or remove attributes at a specific index point.

#using <System.dll>

using namespace System;
using namespace System::Collections;
using namespace System::Collections::Specialized;
using namespace System::Diagnostics;

// Output information about the counter sample.
void OutputSample( CounterSample s )
{
   Console::WriteLine( "\r\n+++++++++++" );
   Console::WriteLine( "Sample values - \r\n" );
   Console::WriteLine( "   BaseValue        = {0}", s.BaseValue );
   Console::WriteLine( "   CounterFrequency = {0}", s.CounterFrequency );
   Console::WriteLine( "   CounterTimeStamp = {0}", s.CounterTimeStamp );
   Console::WriteLine( "   CounterType      = {0}", s.CounterType );
   Console::WriteLine( "   RawValue         = {0}", s.RawValue );
   Console::WriteLine( "   SystemFrequency  = {0}", s.SystemFrequency );
   Console::WriteLine( "   TimeStamp        = {0}", s.TimeStamp );
   Console::WriteLine( "   TimeStamp100nSec = {0}", s.TimeStamp100nSec );
   Console::WriteLine( "++++++++++++++++++++++" );
}

//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++
//    Description - This counter type shows how many items are processed, on average,
//        during an operation. Counters of this type display a ratio of the items 
//        processed (such as bytes sent) to the number of operations completed. The  
//        ratio is calculated by comparing the number of items processed during the 
//        last interval to the number of operations completed during the last interval. 
// Generic type - Average
//      Formula - (N1 - N0) / (D1 - D0), where the numerator (N) represents the number 
//        of items processed during the last sample interval and the denominator (D) 
//        represents the number of operations completed during the last two sample 
//        intervals. 
//    Average (Nx - N0) / (Dx - D0)  
//    Example PhysicalDisk\ Avg. Disk Bytes/Transfer 
//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++
float MyComputeCounterValue( CounterSample s0, CounterSample s1 )
{
   float numerator = (float)s1.RawValue - (float)s0.RawValue;
   float denomenator = (float)s1.BaseValue - (float)s0.BaseValue;
   float counterValue = numerator / denomenator;
   return counterValue;
}

bool SetupCategory()
{
   if (  !PerformanceCounterCategory::Exists( "AverageCounter64SampleCategory" ) )
   {
      CounterCreationDataCollection^ CCDC = gcnew CounterCreationDataCollection;
      
      // Add the counter.
      CounterCreationData^ averageCount64 = gcnew CounterCreationData;
      averageCount64->CounterType = PerformanceCounterType::AverageCount64;
      averageCount64->CounterName = "AverageCounter64Sample";
      CCDC->Add( averageCount64 );
      
      // Add the base counter.
      CounterCreationData^ averageCount64Base = gcnew CounterCreationData;
      averageCount64Base->CounterType = PerformanceCounterType::AverageBase;
      averageCount64Base->CounterName = "AverageCounter64SampleBase";
      CCDC->Add( averageCount64Base );
      
      // Create the category.
      PerformanceCounterCategory::Create( "AverageCounter64SampleCategory", "Demonstrates usage of the AverageCounter64 performance counter type.", CCDC );
      return (true);
   }
   else
   {
      Console::WriteLine( "Category exists - AverageCounter64SampleCategory" );
      return (false);
   }
}

void CreateCounters( PerformanceCounter^% PC, PerformanceCounter^% BPC )
{
   
   // Create the counters.
   PC = gcnew PerformanceCounter( "AverageCounter64SampleCategory","AverageCounter64Sample",false );

   BPC = gcnew PerformanceCounter( "AverageCounter64SampleCategory","AverageCounter64SampleBase",false );
   PC->RawValue = 0;
   BPC->RawValue = 0;
}
void CollectSamples( ArrayList^ samplesList, PerformanceCounter^ PC, PerformanceCounter^ BPC )
{
   Random^ r = gcnew Random( DateTime::Now.Millisecond );

   // Loop for the samples.
   for ( int j = 0; j < 100; j++ )
   {
      int value = r->Next( 1, 10 );
      Console::Write( "{0} = {1}", j, value );
      PC->IncrementBy( value );
      BPC->Increment();
      if ( (j % 10) == 9 )
      {
         OutputSample( PC->NextSample() );
         samplesList->Add( PC->NextSample() );
      }
      else
            Console::WriteLine();
      System::Threading::Thread::Sleep( 50 );
   }
}

void CalculateResults( ArrayList^ samplesList )
{
   for ( int i = 0; i < (samplesList->Count - 1); i++ )
   {
      // Output the sample.
      OutputSample(  *safe_cast<CounterSample^>(samplesList[ i ]) );
      OutputSample(  *safe_cast<CounterSample^>(samplesList[ i + 1 ]) );
      
      // Use .NET to calculate the counter value.
      Console::WriteLine( ".NET computed counter value = {0}", CounterSampleCalculator::ComputeCounterValue(  *safe_cast<CounterSample^>(samplesList[ i ]),  *safe_cast<CounterSample^>(samplesList[ i + 1 ]) ) );
      
      // Calculate the counter value manually.
      Console::WriteLine( "My computed counter value = {0}", MyComputeCounterValue(  *safe_cast<CounterSample^>(samplesList[ i ]),  *safe_cast<CounterSample^>(samplesList[ i + 1 ]) ) );
   }
}

int main()
{
   ArrayList^ samplesList = gcnew ArrayList;
   PerformanceCounter^ PC;
   PerformanceCounter^ BPC;
   SetupCategory();
   CreateCounters( PC, BPC );
   CollectSamples( samplesList, PC, BPC );
   CalculateResults( samplesList );
}

using System;
using System.Collections;
using System.Collections.Specialized;
using System.Diagnostics;

public class App {

    private static PerformanceCounter avgCounter64Sample;
    private static PerformanceCounter avgCounter64SampleBase;

    public static void Main()
    {

        ArrayList samplesList = new ArrayList();

        // If the category does not exist, create the category and exit.
        // Performance counters should not be created and immediately used.
        // There is a latency time to enable the counters, they should be created
        // prior to executing the application that uses the counters.
        // Execute this sample a second time to use the category.
        if (SetupCategory())
            return;
        CreateCounters();
        CollectSamples(samplesList);
        CalculateResults(samplesList);
    }

    private static bool SetupCategory()
    {
        if ( !PerformanceCounterCategory.Exists("AverageCounter64SampleCategory") )
        {

            CounterCreationDataCollection counterDataCollection = new CounterCreationDataCollection();

            // Add the counter.
            CounterCreationData averageCount64 = new CounterCreationData();
            averageCount64.CounterType = PerformanceCounterType.AverageCount64;
            averageCount64.CounterName = "AverageCounter64Sample";
            counterDataCollection.Add(averageCount64);

            // Add the base counter.
            CounterCreationData averageCount64Base = new CounterCreationData();
            averageCount64Base.CounterType = PerformanceCounterType.AverageBase;
            averageCount64Base.CounterName = "AverageCounter64SampleBase";
            counterDataCollection.Add(averageCount64Base);

            // Create the category.
            PerformanceCounterCategory.Create("AverageCounter64SampleCategory",
                "Demonstrates usage of the AverageCounter64 performance counter type.",
                PerformanceCounterCategoryType.SingleInstance, counterDataCollection);

            return(true);
        }
        else
        {
            Console.WriteLine("Category exists - AverageCounter64SampleCategory");
            return(false);
        }
    }

    private static void CreateCounters()
    {
        // Create the counters.

        avgCounter64Sample = new PerformanceCounter("AverageCounter64SampleCategory",
            "AverageCounter64Sample",
            false);


        avgCounter64SampleBase = new PerformanceCounter("AverageCounter64SampleCategory",
            "AverageCounter64SampleBase",
            false);

        avgCounter64Sample.RawValue=0;
        avgCounter64SampleBase.RawValue=0;
    }
    private static void CollectSamples(ArrayList samplesList)
    {

        Random r = new Random( DateTime.Now.Millisecond );

        // Loop for the samples.
        for (int j = 0; j < 100; j++)
        {

            int value = r.Next(1, 10);
            Console.Write(j + " = " + value);

            avgCounter64Sample.IncrementBy(value);

            avgCounter64SampleBase.Increment();

            if ((j % 10) == 9)
            {
                OutputSample(avgCounter64Sample.NextSample());
                samplesList.Add( avgCounter64Sample.NextSample() );
            }
            else
            {
                Console.WriteLine();
            }

            System.Threading.Thread.Sleep(50);
        }
    }

    private static void CalculateResults(ArrayList samplesList)
    {
        for(int i = 0; i < (samplesList.Count - 1); i++)
        {
            // Output the sample.
            OutputSample( (CounterSample)samplesList[i] );
            OutputSample( (CounterSample)samplesList[i+1] );

            // Use .NET to calculate the counter value.
            Console.WriteLine(".NET computed counter value = " +
                CounterSampleCalculator.ComputeCounterValue((CounterSample)samplesList[i],
                (CounterSample)samplesList[i+1]) );

            // Calculate the counter value manually.
            Console.WriteLine("My computed counter value = " +
                MyComputeCounterValue((CounterSample)samplesList[i],
                (CounterSample)samplesList[i+1]) );
        }
    }

    //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++
    //    Description - This counter type shows how many items are processed, on average,
    //        during an operation. Counters of this type display a ratio of the items
    //        processed (such as bytes sent) to the number of operations completed. The
    //        ratio is calculated by comparing the number of items processed during the
    //        last interval to the number of operations completed during the last interval.
    // Generic type - Average
    //      Formula - (N1 - N0) / (D1 - D0), where the numerator (N) represents the number
    //        of items processed during the last sample interval and the denominator (D)
    //        represents the number of operations completed during the last two sample
    //        intervals.
    //    Average (Nx - N0) / (Dx - D0)
    //    Example PhysicalDisk\ Avg. Disk Bytes/Transfer
    //++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++
    private static Single MyComputeCounterValue(CounterSample s0, CounterSample s1)
    {
        Single numerator = (Single)s1.RawValue - (Single)s0.RawValue;
        Single denomenator = (Single)s1.BaseValue - (Single)s0.BaseValue;
        Single counterValue = numerator / denomenator;
        return(counterValue);
    }

    // Output information about the counter sample.
    private static void OutputSample(CounterSample s)
    {
        Console.WriteLine("\r\n+++++++++++");
        Console.WriteLine("Sample values - \r\n");
        Console.WriteLine("   BaseValue        = " + s.BaseValue);
        Console.WriteLine("   CounterFrequency = " + s.CounterFrequency);
        Console.WriteLine("   CounterTimeStamp = " + s.CounterTimeStamp);
        Console.WriteLine("   CounterType      = " + s.CounterType);
        Console.WriteLine("   RawValue         = " + s.RawValue);
        Console.WriteLine("   SystemFrequency  = " + s.SystemFrequency);
        Console.WriteLine("   TimeStamp        = " + s.TimeStamp);
        Console.WriteLine("   TimeStamp100nSec = " + s.TimeStamp100nSec);
        Console.WriteLine("++++++++++++++++++++++");
    }
}
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Diagnostics

 _

Public Class App

    Private Shared avgCounter64Sample As PerformanceCounter
    Private Shared avgCounter64SampleBase As PerformanceCounter


    Public Shared Sub Main()

        Dim samplesList As New ArrayList()
        'If the category does not exist, create the category and exit.
        'Performance counters should not be created and immediately used.
        'There is a latency time to enable the counters, they should be created
        'prior to executing the application that uses the counters.
        'Execute this sample a second time to use the counters.
        If Not (SetupCategory()) Then
            CreateCounters()
            CollectSamples(samplesList)
            CalculateResults(samplesList)
        End If

    End Sub

    Private Shared Function SetupCategory() As Boolean
        If Not PerformanceCounterCategory.Exists("AverageCounter64SampleCategory") Then

            Dim counterDataCollection As New CounterCreationDataCollection()

            ' Add the counter.
            Dim averageCount64 As New CounterCreationData()
            averageCount64.CounterType = PerformanceCounterType.AverageCount64
            averageCount64.CounterName = "AverageCounter64Sample"
            counterDataCollection.Add(averageCount64)

            ' Add the base counter.
            Dim averageCount64Base As New CounterCreationData()
            averageCount64Base.CounterType = PerformanceCounterType.AverageBase
            averageCount64Base.CounterName = "AverageCounter64SampleBase"
            counterDataCollection.Add(averageCount64Base)

            ' Create the category.
            PerformanceCounterCategory.Create("AverageCounter64SampleCategory", _
               "Demonstrates usage of the AverageCounter64 performance counter type.", _
                      PerformanceCounterCategoryType.SingleInstance, counterDataCollection)

            Return True
        Else
            Console.WriteLine("Category exists - AverageCounter64SampleCategory")
            Return False
        End If
    End Function 'SetupCategory

    Private Shared Sub CreateCounters()
        ' Create the counters.

        avgCounter64Sample = New PerformanceCounter("AverageCounter64SampleCategory", "AverageCounter64Sample", False)

        avgCounter64SampleBase = New PerformanceCounter("AverageCounter64SampleCategory", "AverageCounter64SampleBase", False)

        avgCounter64Sample.RawValue = 0
        avgCounter64SampleBase.RawValue = 0
    End Sub

    Private Shared Sub CollectSamples(ByVal samplesList As ArrayList)

        Dim r As New Random(DateTime.Now.Millisecond)

        ' Loop for the samples.
        Dim j As Integer
        For j = 0 To 99

            Dim value As Integer = r.Next(1, 10)
            Console.Write(j.ToString() + " = " + value.ToString())

            avgCounter64Sample.IncrementBy(value)

            avgCounter64SampleBase.Increment()

            If j Mod 10 = 9 Then
                OutputSample(avgCounter64Sample.NextSample())
                samplesList.Add(avgCounter64Sample.NextSample())
            Else
                Console.WriteLine()
            End If
            System.Threading.Thread.Sleep(50)
        Next j
    End Sub

    Private Shared Sub CalculateResults(ByVal samplesList As ArrayList)
        Dim i As Integer
        For i = 0 To (samplesList.Count - 1) - 1
            ' Output the sample.
            OutputSample(CType(samplesList(i), CounterSample))
            OutputSample(CType(samplesList((i + 1)), CounterSample))

            ' Use .NET to calculate the counter value.
            Console.WriteLine(".NET computed counter value = " + CounterSampleCalculator.ComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString())

            ' Calculate the counter value manually.
            Console.WriteLine("My computed counter value = " + MyComputeCounterValue(CType(samplesList(i), CounterSample), CType(samplesList((i + 1)), CounterSample)).ToString())
        Next i
    End Sub

    '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++
    '	Description - This counter type shows how many items are processed, on average,
    '		during an operation. Counters of this type display a ratio of the items 
    '		processed (such as bytes sent) to the number of operations completed. The  
    '		ratio is calculated by comparing the number of items processed during the 
    '		last interval to the number of operations completed during the last interval. 
    ' Generic type - Average
    '  	Formula - (N1 - N0) / (D1 - D0), where the numerator (N) represents the number 
    '		of items processed during the last sample interval and the denominator (D) 
    '		represents the number of operations completed during the last two sample 
    '		intervals. 
    '	Average (Nx - N0) / (Dx - D0)  
    '	Example PhysicalDisk\ Avg. Disk Bytes/Transfer 
    '++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++//++++++++
    Private Shared Function MyComputeCounterValue(ByVal s0 As CounterSample, ByVal s1 As CounterSample) As [Single]
        Dim numerator As [Single] = CType(s1.RawValue, [Single]) - CType(s0.RawValue, [Single])
        Dim denomenator As [Single] = CType(s1.BaseValue, [Single]) - CType(s0.BaseValue, [Single])
        Dim counterValue As [Single] = numerator / denomenator
        Return counterValue
    End Function 'MyComputeCounterValue

    ' Output information about the counter sample.
    Private Shared Sub OutputSample(ByVal s As CounterSample)
        Console.WriteLine(ControlChars.Lf + ControlChars.Cr + "+++++++++++")
        Console.WriteLine("Sample values - " + ControlChars.Lf + ControlChars.Cr)
        Console.WriteLine(("   BaseValue        = " + s.BaseValue.ToString()))
        Console.WriteLine(("   CounterFrequency = " + s.CounterFrequency.ToString()))
        Console.WriteLine(("   CounterTimeStamp = " + s.CounterTimeStamp.ToString()))
        Console.WriteLine(("   CounterType      = " + s.CounterType.ToString()))
        Console.WriteLine(("   RawValue         = " + s.RawValue.ToString()))
        Console.WriteLine(("   SystemFrequency  = " + s.SystemFrequency.ToString()))
        Console.WriteLine(("   TimeStamp        = " + s.TimeStamp.ToString()))
        Console.WriteLine(("   TimeStamp100nSec = " + s.TimeStamp100nSec.ToString()))
        Console.WriteLine("++++++++++++++++++++++")
    End Sub
End Class

Konstruktory

CounterCreationDataCollection()

Inicjuje nowe wystąpienie CounterCreationDataCollection klasy bez żadnych skojarzonych CounterCreationData wystąpień.Initializes a new instance of the CounterCreationDataCollection class, with no associated CounterCreationData instances.

CounterCreationDataCollection(CounterCreationData[])

Inicjuje nowe wystąpienie CounterCreationDataCollection klasy przy użyciu określonej tablicy CounterCreationData wystąpień.Initializes a new instance of the CounterCreationDataCollection class by using the specified array of CounterCreationData instances.

CounterCreationDataCollection(CounterCreationDataCollection)

Inicjuje nowe wystąpienie CounterCreationDataCollection klasy przy użyciu określonej kolekcji CounterCreationData wystąpień.Initializes a new instance of the CounterCreationDataCollection class by using the specified collection of CounterCreationData instances.

Właściwości

Capacity

Pobiera lub ustawia liczbę elementów, które CollectionBase może zawierać.Gets or sets the number of elements that the CollectionBase can contain.

(Odziedziczone po CollectionBase)
Count

Pobiera liczbę elementów zawartych w CollectionBase wystąpieniu.Gets the number of elements contained in the CollectionBase instance. Ta właściwość nie może zostać zastąpiona.This property cannot be overridden.

(Odziedziczone po CollectionBase)
InnerList

Pobiera ArrayList zawierający listę elementów w CollectionBase wystąpieniu.Gets an ArrayList containing the list of elements in the CollectionBase instance.

(Odziedziczone po CollectionBase)
Item[Int32]

Indeksuje CounterCreationData kolekcję.Indexes the CounterCreationData collection.

List

Pobiera IList zawierający listę elementów w CollectionBase wystąpieniu.Gets an IList containing the list of elements in the CollectionBase instance.

(Odziedziczone po CollectionBase)

Metody

Add(CounterCreationData)

Dodaje wystąpienie CounterCreationData klasy do kolekcji.Adds an instance of the CounterCreationData class to the collection.

AddRange(CounterCreationData[])

Dodaje określoną tablicę CounterCreationData wystąpień do kolekcji.Adds the specified array of CounterCreationData instances to the collection.

AddRange(CounterCreationDataCollection)

Dodaje określoną kolekcję CounterCreationData wystąpień do kolekcji.Adds the specified collection of CounterCreationData instances to the collection.

Clear()

Usuwa wszystkie obiekty z CollectionBase wystąpienia.Removes all objects from the CollectionBase instance. Nie można zastąpić tej metody.This method cannot be overridden.

(Odziedziczone po CollectionBase)
Contains(CounterCreationData)

Określa, czy CounterCreationData wystąpienie istnieje w kolekcji.Determines whether a CounterCreationData instance exists in the collection.

CopyTo(CounterCreationData[], Int32)

Kopiuje elementy CounterCreationData do tablicy, rozpoczynając od określonego indeksu tablicy.Copies the elements of the CounterCreationData to an array, starting at the specified index of the array.

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.Determines whether the specified object is equal to the current object.

(Odziedziczone po Object)
GetEnumerator()

Zwraca moduł wyliczający, który wykonuje iterację w CollectionBase wystąpieniu.Returns an enumerator that iterates through the CollectionBase instance.

(Odziedziczone po CollectionBase)
GetHashCode()

Służy jako domyślna funkcja skrótu.Serves as the default hash function.

(Odziedziczone po Object)
GetType()

Pobiera Type bieżące wystąpienie.Gets the Type of the current instance.

(Odziedziczone po Object)
IndexOf(CounterCreationData)

Zwraca indeks CounterCreationData obiektu w kolekcji.Returns the index of a CounterCreationData object in the collection.

Insert(Int32, CounterCreationData)

Wstawia CounterCreationData obiekt do kolekcji o określonym indeksie.Inserts a CounterCreationData object into the collection, at the specified index.

MemberwiseClone()

Tworzy skróconą kopię bieżącego elementu Object .Creates a shallow copy of the current Object.

(Odziedziczone po Object)
OnClear()

Wykonuje dodatkowe procesy niestandardowe podczas czyszczenia zawartości CollectionBase wystąpienia.Performs additional custom processes when clearing the contents of the CollectionBase instance.

(Odziedziczone po CollectionBase)
OnClearComplete()

Wykonuje dodatkowe procesy niestandardowe po wyczyszczeniu zawartości CollectionBase wystąpienia.Performs additional custom processes after clearing the contents of the CollectionBase instance.

(Odziedziczone po CollectionBase)
OnInsert(Int32, Object)

Ten interfejs API obsługuje infrastrukturę produktu i nie jest przeznaczony do użycia bezpośrednio z poziomu kodu.

Wykonuje dodatkowe procesy niestandardowe zanim nowy wpis danych zostanie wstawiony do kolekcji.Performs additional custom processes before a new data entry is inserted into the collection.

OnInsert(Int32, Object)

Wykonuje dodatkowe procesy niestandardowe przed wstawieniem nowego elementu do CollectionBase wystąpienia.Performs additional custom processes before inserting a new element into the CollectionBase instance.

(Odziedziczone po CollectionBase)
OnInsertComplete(Int32, Object)

Wykonuje dodatkowe procesy niestandardowe po wstawieniu nowego elementu do CollectionBase wystąpienia.Performs additional custom processes after inserting a new element into the CollectionBase instance.

(Odziedziczone po CollectionBase)
OnRemove(Int32, Object)

Wykonuje dodatkowe procesy niestandardowe podczas usuwania elementu z CollectionBase wystąpienia.Performs additional custom processes when removing an element from the CollectionBase instance.

(Odziedziczone po CollectionBase)
OnRemoveComplete(Int32, Object)

Wykonuje dodatkowe procesy niestandardowe po usunięciu elementu z CollectionBase wystąpienia.Performs additional custom processes after removing an element from the CollectionBase instance.

(Odziedziczone po CollectionBase)
OnSet(Int32, Object, Object)

Wykonuje dodatkowe procesy niestandardowe przed ustawieniem wartości w CollectionBase wystąpieniu.Performs additional custom processes before setting a value in the CollectionBase instance.

(Odziedziczone po CollectionBase)
OnSetComplete(Int32, Object, Object)

Wykonuje dodatkowe procesy niestandardowe po ustawieniu wartości w CollectionBase wystąpieniu.Performs additional custom processes after setting a value in the CollectionBase instance.

(Odziedziczone po CollectionBase)
OnValidate(Object)

Sprawdza określony obiekt, aby określić, czy jest to prawidłowy CounterCreationData Typ.Checks the specified object to determine whether it is a valid CounterCreationData type.

OnValidate(Object)

Wykonuje dodatkowe procesy niestandardowe podczas walidacji wartości.Performs additional custom processes when validating a value.

(Odziedziczone po CollectionBase)
Remove(CounterCreationData)

Usuwa CounterCreationData obiekt z kolekcji.Removes a CounterCreationData object from the collection.

RemoveAt(Int32)

Usuwa element w określonym indeksie CollectionBase wystąpienia.Removes the element at the specified index of the CollectionBase instance. Ta metoda nie jest możliwy do zastąpienia.This method is not overridable.

(Odziedziczone po CollectionBase)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.Returns a string that represents the current object.

(Odziedziczone po Object)

Jawne implementacje interfejsu

ICollection.CopyTo(Array, Int32)

Kopiuje cały CollectionBase do zgodnego jednowymiarowego Array , rozpoczynając od określonego indeksu tablicy docelowej.Copies the entire CollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.

(Odziedziczone po CollectionBase)
ICollection.IsSynchronized

Pobiera wartość wskazującą, czy dostęp do elementu CollectionBase jest synchronizowany (bezpieczny wątkowo).Gets a value indicating whether access to the CollectionBase is synchronized (thread safe).

(Odziedziczone po CollectionBase)
ICollection.SyncRoot

Pobiera obiekt, który może służyć do synchronizowania dostępu do CollectionBase .Gets an object that can be used to synchronize access to the CollectionBase.

(Odziedziczone po CollectionBase)
IList.Add(Object)

Dodaje obiekt na końcu CollectionBase .Adds an object to the end of the CollectionBase.

(Odziedziczone po CollectionBase)
IList.Contains(Object)

Określa, czy CollectionBase zawiera określony element.Determines whether the CollectionBase contains a specific element.

(Odziedziczone po CollectionBase)
IList.IndexOf(Object)

Wyszukuje określony Object i zwraca indeks (liczony od zera) pierwszego wystąpienia w całości CollectionBase .Searches for the specified Object and returns the zero-based index of the first occurrence within the entire CollectionBase.

(Odziedziczone po CollectionBase)
IList.Insert(Int32, Object)

Wstawia element do obiektu CollectionBase o określonym indeksie.Inserts an element into the CollectionBase at the specified index.

(Odziedziczone po CollectionBase)
IList.IsFixedSize

Pobiera wartość wskazującą, czy CollectionBase ma stały rozmiar.Gets a value indicating whether the CollectionBase has a fixed size.

(Odziedziczone po CollectionBase)
IList.IsReadOnly

Pobiera wartość wskazującą, czy kolekcja CollectionBase jest przeznaczona tylko do odczytu.Gets a value indicating whether the CollectionBase is read-only.

(Odziedziczone po CollectionBase)
IList.Item[Int32]

Pobiera lub ustawia element pod określonym indeksem.Gets or sets the element at the specified index.

(Odziedziczone po CollectionBase)
IList.Remove(Object)

Usuwa pierwsze wystąpienie określonego obiektu z CollectionBase .Removes the first occurrence of a specific object from the CollectionBase.

(Odziedziczone po CollectionBase)

Metody rozszerzania

Cast<TResult>(IEnumerable)

Rzutuje elementy elementu IEnumerable do określonego typu.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filtruje elementy IEnumerable w oparciu o określony typ.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Włącza przetwarzanie równoległe zapytania.Enables parallelization of a query.

AsQueryable(IEnumerable)

Konwertuje IEnumerable do IQueryable .Converts an IEnumerable to an IQueryable.

Dotyczy