DesignerVerbCollection Clase

Definición

Representa una colección de objetos DesignerVerb .Represents a collection of DesignerVerb objects.

public ref class DesignerVerbCollection : System::Collections::CollectionBase
[System.Runtime.InteropServices.ComVisible(true)]
public class DesignerVerbCollection : System.Collections.CollectionBase
type DesignerVerbCollection = class
    inherit CollectionBase
Public Class DesignerVerbCollection
Inherits CollectionBase
Herencia
DesignerVerbCollection
Derivado
Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar la clase DesignerVerbCollection.The following code example demonstrates how to use the DesignerVerbCollection class. En el ejemplo se crea una nueva instancia de la clase y se usan varios métodos para agregar instrucciones a la colección, devolver su índice y agregar o quitar atributos en un punto de índice específico.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.

// Creates an empty DesignerVerbCollection.
DesignerVerbCollection^ collection = gcnew DesignerVerbCollection;

// Adds a DesignerVerb to the collection.
collection->Add( gcnew DesignerVerb( "Example designer verb",gcnew EventHandler( this, &Class1::ExampleEvent ) ) );

// Adds an array of DesignerVerb objects to the collection.
array<DesignerVerb^>^ verbs = {
   gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ),
   gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) )};
collection->AddRange( verbs );

// Adds a collection of DesignerVerb objects to the collection.
DesignerVerbCollection^ verbsCollection = gcnew DesignerVerbCollection;
verbsCollection->Add( gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ) );
verbsCollection->Add( gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ) );
collection->AddRange( verbsCollection );

// Tests for the presence of a DesignerVerb in the collection,
// and retrieves its index if it is found.
DesignerVerb^ testVerb = gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) );
int itemIndex = -1;
if ( collection->Contains( testVerb ) )
         itemIndex = collection->IndexOf( testVerb );

// Copies the contents of the collection, beginning at index 0,
// to the specified DesignerVerb array.
// 'verbs' is a DesignerVerb array.
collection->CopyTo( verbs, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;

// Inserts a DesignerVerb at index 0 of the collection.
collection->Insert( 0, gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ) );

// Removes the specified DesignerVerb from the collection.
DesignerVerb^ verb = gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) );
collection->Remove( verb );

// Removes the DesignerVerb at index 0.
collection->RemoveAt( 0 );
// Creates an empty DesignerVerbCollection.
DesignerVerbCollection collection = new DesignerVerbCollection();

// Adds a DesignerVerb to the collection.
collection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );

// Adds an array of DesignerVerb objects to the collection.
DesignerVerb[] verbs = { new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)), new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) };
collection.AddRange( verbs );

// Adds a collection of DesignerVerb objects to the collection.
DesignerVerbCollection verbsCollection = new DesignerVerbCollection();
verbsCollection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );
verbsCollection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );
collection.AddRange( verbsCollection );

// Tests for the presence of a DesignerVerb in the collection, 
// and retrieves its index if it is found.
DesignerVerb testVerb = new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent));
int itemIndex = -1;
if( collection.Contains( testVerb ) )
    itemIndex = collection.IndexOf( testVerb );

// Copies the contents of the collection, beginning at index 0, 
// to the specified DesignerVerb array.
// 'verbs' is a DesignerVerb array.
collection.CopyTo( verbs, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;

// Inserts a DesignerVerb at index 0 of the collection.
collection.Insert( 0, new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );

// Removes the specified DesignerVerb from the collection.
DesignerVerb verb = new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent));
collection.Remove( verb );

// Removes the DesignerVerb at index 0.
collection.RemoveAt(0);
' Creates an empty DesignerVerbCollection.
Dim collection As New DesignerVerbCollection()

' Adds a DesignerVerb to the collection.
collection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))

' Adds an array of DesignerVerb objects to the collection.
Dim verbs As DesignerVerb() = {New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)), New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))}
collection.AddRange(verbs)

' Adds a collection of DesignerVerb objects to the collection.
Dim verbsCollection As New DesignerVerbCollection()
verbsCollection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))
verbsCollection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))
collection.AddRange(verbsCollection)

' Tests for the presence of a DesignerVerb in the collection, 
' and retrieves its index if it is found.
Dim testVerb As New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))
Dim itemIndex As Integer = -1
If collection.Contains(testVerb) Then
    itemIndex = collection.IndexOf(testVerb)
End If

' Copies the contents of the collection, beginning at index 0, 
' to the specified DesignerVerb array.
' 'verbs' is a DesignerVerb array.
collection.CopyTo(verbs, 0)

' Retrieves the count of the items in the collection.
Dim collectionCount As Integer = collection.Count

' Inserts a DesignerVerb at index 0 of the collection.
collection.Insert(0, New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))

' Removes the specified DesignerVerb from the collection.
Dim verb As New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))
collection.Remove(verb)

' Removes the DesignerVerb at index 0.
collection.RemoveAt(0)

Comentarios

Esta clase proporciona una colección que puede contener objetos DesignerVerb.This class provides a collection that can contain DesignerVerb objects.

Constructores

DesignerVerbCollection()

Inicializa una nueva instancia de la clase DesignerVerbCollection.Initializes a new instance of the DesignerVerbCollection class.

DesignerVerbCollection(DesignerVerb[])

Inicializa una nueva instancia de la clase DesignerVerbCollection mediante la matriz especificada de los objetos DesignerVerb.Initializes a new instance of the DesignerVerbCollection class using the specified array of DesignerVerb objects.

Propiedades

Capacity

Obtiene o establece el número de elementos que puede contener CollectionBase.Gets or sets the number of elements that the CollectionBase can contain.

(Heredado de CollectionBase)
Count

Obtiene el número de elementos incluidos en la instancia de CollectionBase.Gets the number of elements contained in the CollectionBase instance. Esta propiedad no se puede invalidar.This property cannot be overridden.

(Heredado de CollectionBase)
InnerList

Obtiene una colección ArrayList que contiene la lista de elementos incluidos en la instancia de CollectionBase.Gets an ArrayList containing the list of elements in the CollectionBase instance.

(Heredado de CollectionBase)
Item[Int32]

Obtiene o establece la clase DesignerVerb en el índice especificado.Gets or sets the DesignerVerb at the specified index.

List

Obtiene una colección IList que contiene la lista de elementos incluidos en la instancia de CollectionBase.Gets an IList containing the list of elements in the CollectionBase instance.

(Heredado de CollectionBase)

Métodos

Add(DesignerVerb)

Agrega el DesignerVerb especificado a la colección.Adds the specified DesignerVerb to the collection.

AddRange(DesignerVerb[])

Agrega el conjunto especificado de verbos del diseñador a la colección.Adds the specified set of designer verbs to the collection.

AddRange(DesignerVerbCollection)

Agrega la colección especificada de verbos del diseñador a la colección.Adds the specified collection of designer verbs to the collection.

Clear()

Elimina todos los objetos de la instancia de CollectionBase.Removes all objects from the CollectionBase instance. Este método no se puede invalidar.This method cannot be overridden.

(Heredado de CollectionBase)
Contains(DesignerVerb)

Obtiene un valor que indica si el DesignerVerb especificado existe en la colección.Gets a value indicating whether the specified DesignerVerb exists in the collection.

CopyTo(DesignerVerb[], Int32)

Copia los miembros de la colección en la matriz DesignerVerb especificada a partir del índice de destino especificado.Copies the collection members to the specified DesignerVerb array beginning at the specified destination index.

Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Heredado de Object)
GetEnumerator()

Devuelve un enumerador que recorre en iteración la instancia de CollectionBase.Returns an enumerator that iterates through the CollectionBase instance.

(Heredado de CollectionBase)
GetHashCode()

Sirve como función hash predeterminada.Serves as the default hash function.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Heredado de Object)
IndexOf(DesignerVerb)

Obtiene el índice del objeto DesignerVerb especificado.Gets the index of the specified DesignerVerb.

Insert(Int32, DesignerVerb)

Inserta el objeto DesignerVerb en el índice especificado.Inserts the specified DesignerVerb at the specified index.

MemberwiseClone()

Crea una copia superficial del Object actual.Creates a shallow copy of the current Object.

(Heredado de Object)
OnClear()

Genera el evento Clear.Raises the Clear event.

OnClearComplete()

Realiza procesos personalizados adicionales después de borrar el contenido de la instancia de CollectionBase.Performs additional custom processes after clearing the contents of the CollectionBase instance.

(Heredado de CollectionBase)
OnInsert(Int32, Object)

Genera el evento Insert.Raises the Insert event.

OnInsertComplete(Int32, Object)

Realiza procesos personalizados adicionales después de insertar un nuevo elemento en la instancia de CollectionBase.Performs additional custom processes after inserting a new element into the CollectionBase instance.

(Heredado de CollectionBase)
OnRemove(Int32, Object)

Genera el evento Remove.Raises the Remove event.

OnRemoveComplete(Int32, Object)

Realiza procesos personalizados adicionales después de quitar un elemento de la instancia de CollectionBase.Performs additional custom processes after removing an element from the CollectionBase instance.

(Heredado de CollectionBase)
OnSet(Int32, Object, Object)

Genera el evento Set.Raises the Set event.

OnSetComplete(Int32, Object, Object)

Realiza procesos personalizados adicionales después de establecer un valor en la instancia de CollectionBase.Performs additional custom processes after setting a value in the CollectionBase instance.

(Heredado de CollectionBase)
OnValidate(Object)

Genera el evento Validate.Raises the Validate event.

Remove(DesignerVerb)

Quita el objeto DesignerVerb especificado de la colección.Removes the specified DesignerVerb from the collection.

RemoveAt(Int32)

Quita el elemento que se encuentra en el índice especificado de la instancia de CollectionBase.Removes the element at the specified index of the CollectionBase instance. Este método no se puede reemplazar.This method is not overridable.

(Heredado de CollectionBase)
ToString()

Devuelve un valor de tipo string que representa el objeto actual.Returns a string that represents the current object.

(Heredado de Object)

Implementaciones de interfaz explícitas

ICollection.CopyTo(Array, Int32)

Copia la totalidad de CollectionBase en una matriz Array unidimensional compatible, comenzando en el índice especificado de la matriz de destino.Copies the entire CollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.

(Heredado de CollectionBase)
ICollection.IsSynchronized

Obtiene un valor que indica si el acceso a la interfaz CollectionBase está sincronizado (es seguro para subprocesos).Gets a value indicating whether access to the CollectionBase is synchronized (thread safe).

(Heredado de CollectionBase)
ICollection.SyncRoot

Obtiene un objeto que se puede usar para sincronizar el acceso a CollectionBase.Gets an object that can be used to synchronize access to the CollectionBase.

(Heredado de CollectionBase)
IList.Add(Object)

Agrega un objeto al final de CollectionBase.Adds an object to the end of the CollectionBase.

(Heredado de CollectionBase)
IList.Contains(Object)

Determina si CollectionBase contiene un elemento específico.Determines whether the CollectionBase contains a specific element.

(Heredado de CollectionBase)
IList.IndexOf(Object)

Busca el objeto Object especificado y devuelve el índice de base cero de la primera aparición en toda la colección CollectionBase.Searches for the specified Object and returns the zero-based index of the first occurrence within the entire CollectionBase.

(Heredado de CollectionBase)
IList.Insert(Int32, Object)

Inserta un elemento en CollectionBase en el índice especificado.Inserts an element into the CollectionBase at the specified index.

(Heredado de CollectionBase)
IList.IsFixedSize

Obtiene un valor que indica si la interfaz CollectionBase tiene un tamaño fijo.Gets a value indicating whether the CollectionBase has a fixed size.

(Heredado de CollectionBase)
IList.IsReadOnly

Obtiene un valor que indica si CollectionBase es de solo lectura.Gets a value indicating whether the CollectionBase is read-only.

(Heredado de CollectionBase)
IList.Item[Int32]

Obtiene o establece el elemento en el índice especificado.Gets or sets the element at the specified index.

(Heredado de CollectionBase)
IList.Remove(Object)

Quita la primera aparición de un objeto específico de la interfaz CollectionBase.Removes the first occurrence of a specific object from the CollectionBase.

(Heredado de CollectionBase)

Métodos de extensión

Cast<TResult>(IEnumerable)

Convierte los elementos de IEnumerable en el tipo especificado.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filtra los elementos de IEnumerable en función de un tipo especificado.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Habilita la paralelización de una consulta.Enables parallelization of a query.

AsQueryable(IEnumerable)

Convierte una interfaz IEnumerable en IQueryable.Converts an IEnumerable to an IQueryable.

Se aplica a