Freigeben über


MessageQueuePermissionEntryCollection Klasse

Definition

Enthält eine stark typisierte Auflistung von MessageQueuePermissionEntry-Objekten.

public ref class MessageQueuePermissionEntryCollection : System::Collections::CollectionBase
[System.Serializable]
public class MessageQueuePermissionEntryCollection : System.Collections.CollectionBase
[<System.Serializable>]
type MessageQueuePermissionEntryCollection = class
    inherit CollectionBase
Public Class MessageQueuePermissionEntryCollection
Inherits CollectionBase
Vererbung
MessageQueuePermissionEntryCollection
Attribute

Beispiele

Das folgende Codebeispiel veranschaulicht die Verwendung von MessageQueuePermissionEntryCollection.


#using <System.Messaging.dll>
#using <System.dll>
using namespace System;
using namespace System::Messaging;

public ref class MessageQueuePermissionEntryCollectionExample
{
    // Demonstrates:
    // public Int32 Add (MessageQueuePermissionEntry value)
public:
    void AddExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection^ collection =
            permission->PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, queue->Category.ToString());

        // Add the entry to the collection.
        collection->Add(entry);

        queue->Close();
    }

    // Demonstrates:
    // public Void AddRange (MessageQueuePermissionEntry[] value)
public:
    void AddRangeExample1()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection^ collection =
            permission->PermissionEntries;

        // Create an array of type MessageQueuePermissionEntry.
        array<MessageQueuePermissionEntry^>^ entries = 
            gcnew array<MessageQueuePermissionEntry^>(1);

        // Create a new instance of MessageQueuePermissionEntry and place the
        // instance in the array.
        entries[0] = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Add the array to the collection.
        collection->AddRange(entries);

        queue->Close();
    }

    // Demonstrates:
    // public Void AddRange (MessageQueuePermissionEntryCollection value)
public:
    void AddRangeExample2()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, queue->Category.ToString());

        // Add the entry to the permission's collection.
        permission->PermissionEntries->Add(entry);

        // Create another new instance of MessageQueuePermission.
        MessageQueuePermission^ newPermission = gcnew MessageQueuePermission();

        // Use AddRange() to append the original permission's collection to the
        // new permission's collection.
        newPermission->PermissionEntries->AddRange(
            permission->PermissionEntries);

        // To show that AddRange() copies collections by value and not by
        // reference, we'll clear the original permission's collection, then
        // display a count of how many entries are in the original permission's
        // collection and how many entries are in the new permission's
        // collection.

        // Clear the original permission's collection.
        permission->PermissionEntries->Clear();

        // The original permission now contains 0 entries, but the new
        // permission still contains 1 entry.
        Console::WriteLine("Original permission contains {0} entries.",
            permission->PermissionEntries->Count);
        Console::WriteLine("New permission contains {0} entries.",
            newPermission->PermissionEntries->Count);

        queue->Close();
    }

    // Demonstrates:
    // public Boolean Contains (MessageQueuePermissionEntry value)
public:
    void ContainsExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection^ collection =
            permission->PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Add the entry to the collection.
        collection->Add(entry);

        // Show that the collection contains the entry.
        Console::WriteLine("Collection contains first entry (true/false): {0}",
            collection->Contains(entry));

        // Create another new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ newEntry = 
            gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Send, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Show that the collection does not contain the new entry.
        Console::WriteLine(
            "Collection contains second entry (true/false): {0}",
            collection->Contains(newEntry));

        queue->Close();
    }

    // Demonstrates:
    // public Void CopyTo (MessageQueuePermissionEntry[] array, Int32 index)
public:
    void CopyToExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection^ collection =
            permission->PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Add the entry to the collection.
        collection->Add(entry);

        // Create an array of type MessageQueuePermissionEntry.
        array<MessageQueuePermissionEntry^>^ entries = 
            gcnew array<MessageQueuePermissionEntry^>(1);

        // Copy the collection to index 0 of the array.
        collection->CopyTo(entries, 0);

        // Show that the array now contains the entry.
        Console::WriteLine("entries[0].PermissionAccess: {0}",
            entries[0]->PermissionAccess);
        Console::WriteLine("entries[0].MachineName: {0}",
            entries[0]->MachineName);
        Console::WriteLine("entries[0].Label: {0}", entries[0]->Label);
        Console::WriteLine("entries[0].Category: {0}",
            entries[0]->Category);

        queue->Close();
    }

    // Demonstrates:
    // public Int32 IndexOf (MessageQueuePermissionEntry value)
public:
    void IndexOfExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection^ collection =
            permission->PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Add the entry to the collection.
        collection->Add(entry);

        // Display the index of the entry in the collection.
        Console::WriteLine("Collection contains entry at index: {0}",
            collection->IndexOf(entry));

        queue->Close();
    }

    // Demonstrates:
    // public Void Insert (Int32 index, MessageQueuePermissionEntry value)
public:
    void InsertExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection^ collection =
            permission->PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Add the entry to the collection.
        collection->Add(entry);

        // Create another new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ newEntry = 
            gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Send, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Insert the new entry into the collection before the original entry.
        collection->Insert(0, newEntry);

        queue->Close();
    }

    // Demonstrates:
    // public MessageQueuePermissionEntry Item [Int32 index] { get; set; }
public:
    void ItemExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection^ collection =
            permission->PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Add the entry to the collection.
        collection->Add(entry);

        // Display the entry's properties, using the collection's Item
        // accessor.
        Console::WriteLine("collection[0].PermissionAccess: {0}",
            collection[0]->PermissionAccess);
        Console::WriteLine("collection[0].MachineName: {0}",
            collection[0]->MachineName);
        Console::WriteLine("collection[0].Label: {0}", collection[0]->Label);
        Console::WriteLine("collection[0].Category: {0}",
            collection[0]->Category);

        queue->Close();
    }

    // Demonstrates:
    // public Void Remove (MessageQueuePermissionEntry value)
public:
    void RemoveExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission^ permission = gcnew MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection^ collection =
            permission->PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
            MessageQueuePermissionAccess::Receive, 
            queue->MachineName, 
            queue->Label, 
            queue->Category.ToString());

        // Add the entry to the collection.
        collection->Add(entry);

        // Remove the entry from the collection.
        collection->Remove(entry);

        queue->Close();
    }
};

// Creates a new queue.
void CreateQueue(String^ queuePath, bool transactional)
{
    if (!MessageQueue::Exists(queuePath))
    {
        MessageQueue^ queue = MessageQueue::Create(queuePath, transactional);
        queue->Close();      
    }
    else
    {
        Console::WriteLine("{0} already exists.", queuePath);
    }
}

int main()
{
    // Create a new instance of the class.
    MessageQueuePermissionEntryCollectionExample^ example =
        gcnew MessageQueuePermissionEntryCollectionExample();

    // Create a non-transactional queue on the local computer.
    CreateQueue(".\\exampleQueue", false);

    // Demonstrate MessageQueuePermissionEntryCollection's members.
    example->AddExample();
    example->AddRangeExample1();
    example->AddRangeExample2();
    example->ContainsExample();
    example->CopyToExample();
    example->IndexOfExample();
    example->InsertExample();
    example->ItemExample();
    example->RemoveExample();
}

using System;
using System.Messaging;

public class MessageQueuePermissionEntryCollectionExample
{
    public static void Main()
    {
        // Create a new instance of the class.
        MessageQueuePermissionEntryCollectionExample example =
            new MessageQueuePermissionEntryCollectionExample();

        // Create a non-transactional queue on the local computer.
        CreateQueue(".\\exampleQueue", false);

        // Demonstrate MessageQueuePermissionEntryCollection's members.
        example.AddExample();
        example.AddRangeExample1();
        example.AddRangeExample2();
        example.ContainsExample();
        example.CopyToExample();
        example.IndexOfExample();
        example.InsertExample();
        example.ItemExample();
        example.RemoveExample();
    }

    // Creates a new queue.
    public static void CreateQueue(string queuePath, bool transactional)
    {
        if(!MessageQueue.Exists(queuePath))
        {
            MessageQueue.Create(queuePath, transactional);
        }
        else
        {
            Console.WriteLine(queuePath + " already exists.");
        }
    }

    // Demonstrates:
    // public Int32 Add (MessageQueuePermissionEntry value)
    public void AddExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection collection =
            permission.PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the entry to the collection.
        collection.Add(entry);
    }

    // Demonstrates:
    // public Void AddRange (MessageQueuePermissionEntry[] value)
    public void AddRangeExample1()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection collection =
            permission.PermissionEntries;

        // Create an array of type MessageQueuePermissionEntry.
        MessageQueuePermissionEntry[] entries =
            new MessageQueuePermissionEntry[1];

        // Create a new instance of MessageQueuePermissionEntry and place the
        // instance in the array.
        entries[0] = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the array to the collection.
        collection.AddRange(entries);
    }

    // Demonstrates:
    // public Void AddRange (MessageQueuePermissionEntryCollection value)
    public void AddRangeExample2()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the entry to the permission's collection.
        permission.PermissionEntries.Add(entry);

        // Create another new instance of MessageQueuePermission.
        MessageQueuePermission newPermission = new MessageQueuePermission();

        // Use AddRange() to append the original permission's collection to the
        // new permission's collection.
        newPermission.PermissionEntries.AddRange(permission.PermissionEntries);

        // To show that AddRange() copies collections by value and not by
        // reference, we'll clear the original permission's collection, then
        // display a count of how many entries are in the original permission's
        // collection and how many entries are in the new permission's
        // collection.

        // Clear the original permission's collection.
        permission.PermissionEntries.Clear();

        // The original permission now contains 0 entries, but the new
        // permission still contains 1 entry.
        Console.WriteLine("Original permission contains {0} entries.",
            permission.PermissionEntries.Count);
        Console.WriteLine("New permission contains {0} entries.",
            newPermission.PermissionEntries.Count);
    }

    // Demonstrates:
    // public Boolean Contains (MessageQueuePermissionEntry value)
    public void ContainsExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection collection =
            permission.PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the entry to the collection.
        collection.Add(entry);

        // Show that the collection contains the entry.
        Console.WriteLine("Collection contains first entry (true/false): {0}",
            collection.Contains(entry));

        // Create another new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry newEntry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Send,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Show that the collection does not contain the new entry.
        Console.WriteLine("Collection contains second entry (true/false): {0}",
            collection.Contains(newEntry));
    }

    // Demonstrates:
    // public Void CopyTo (MessageQueuePermissionEntry[] array, Int32 index)
    public void CopyToExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection collection =
            permission.PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the entry to the collection.
        collection.Add(entry);

        // Create an array of type MessageQueuePermissionEntry.
        MessageQueuePermissionEntry[] entries =
            new MessageQueuePermissionEntry[1];

        // Copy the collection to index 0 of the array.
        collection.CopyTo(entries, 0);

        // Show that the array now contains the entry.
        Console.WriteLine("entries[0].PermissionAccess: {0}",
            entries[0].PermissionAccess);
        Console.WriteLine("entries[0].MachineName: {0}",
            entries[0].MachineName);
        Console.WriteLine("entries[0].Label: {0}", entries[0].Label);
        Console.WriteLine("entries[0].Category: {0}",
            entries[0].Category.ToString());
    }

    // Demonstrates:
    // public Int32 IndexOf (MessageQueuePermissionEntry value)
    public void IndexOfExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection collection =
            permission.PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the entry to the collection.
        collection.Add(entry);

        // Display the index of the entry in the collection.
        Console.WriteLine("Collection contains entry at index: {0}",
            collection.IndexOf(entry));

    }

    // Demonstrates:
    // public Void Insert (Int32 index, MessageQueuePermissionEntry value)
    public void InsertExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection collection =
            permission.PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the entry to the collection.
        collection.Add(entry);

        // Create another new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry newEntry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Send,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Insert the new entry into the collection before the original entry.
        collection.Insert(0, newEntry);
    }

    // Demonstrates:
    // public MessageQueuePermissionEntry Item [Int32 index] { get; set; }
    public void ItemExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection collection =
            permission.PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the entry to the collection.
        collection.Add(entry);

        // Display the entry's properties, using the collection's Item
        // accessor.
        Console.WriteLine("collection[0].PermissionAccess: {0}",
            collection[0].PermissionAccess);
        Console.WriteLine("collection[0].MachineName: {0}",
            collection[0].MachineName);
        Console.WriteLine("collection[0].Label: {0}", collection[0].Label);
        Console.WriteLine("collection[0].Category: {0}",
            collection[0].Category.ToString());

    }

    // Demonstrates:
    // public Void Remove (MessageQueuePermissionEntry value)
    public void RemoveExample()
    {
        // Connect to a queue on the local computer.
        MessageQueue queue = new MessageQueue(".\\exampleQueue");

        // Create a new instance of MessageQueuePermission.
        MessageQueuePermission permission = new MessageQueuePermission();

        // Get an instance of MessageQueuePermissionEntryCollection from the
        // permission's PermissionEntries property.
        MessageQueuePermissionEntryCollection collection =
            permission.PermissionEntries;

        // Create a new instance of MessageQueuePermissionEntry.
        MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
            MessageQueuePermissionAccess.Receive,
            queue.MachineName,
            queue.Label,
            queue.Category.ToString());

        // Add the entry to the collection.
        collection.Add(entry);

        // Remove the entry from the collection.
        collection.Remove(entry);
    }
}

Eigenschaften

Capacity

Ruft die Anzahl der Elemente ab, die die CollectionBase enthalten kann, oder legt diese fest.

(Geerbt von CollectionBase)
Count

Ruft die Anzahl der in der CollectionBase-Instanz enthaltenen Elemente ab. Diese Eigenschaft kann nicht überschrieben werden.

(Geerbt von CollectionBase)
InnerList

Ruft eine ArrayList mit der Liste der Elemente in der CollectionBase-Instanz ab.

(Geerbt von CollectionBase)
Item[Int32]

Ruft das Objekt an einem angegebenen Index ab oder legt dieses fest.

List

Ruft eine IList mit der Liste der Elemente in der CollectionBase-Instanz ab.

(Geerbt von CollectionBase)

Methoden

Add(MessageQueuePermissionEntry)

Fügt dieser Auflistung einen angegebenen MessageQueuePermissionEntry hinzu.

AddRange(MessageQueuePermissionEntry[])

Fügt dieser Auflistung eine Gruppe von angegebenen Berechtigungseinträgen an.

AddRange(MessageQueuePermissionEntryCollection)

Fügt dieser Auflistung eine Gruppe von angegebenen Berechtigungseinträgen an.

Clear()

Entfernt alle Objekte aus der CollectionBase-Instanz. Diese Methode kann nicht überschrieben werden.

(Geerbt von CollectionBase)
Contains(MessageQueuePermissionEntry)

Bestimmt, ob diese Auflistung einen angegebenen MessageQueuePermissionEntry enthält.

CopyTo(MessageQueuePermissionEntry[], Int32)

Kopiert die Berechtigungseinträge aus dieser Auflistung in ein Array, beginnend an einem bestimmten Index im Array.

Equals(Object)

Bestimmt, ob das angegebene Objekt gleich dem aktuellen Objekt ist.

(Geerbt von Object)
GetEnumerator()

Gibt einen Enumerator zurück, der die CollectionBase durchläuft.

(Geerbt von CollectionBase)
GetHashCode()

Fungiert als Standardhashfunktion.

(Geerbt von Object)
GetType()

Ruft den Type der aktuellen Instanz ab.

(Geerbt von Object)
IndexOf(MessageQueuePermissionEntry)

Bestimmt den Index eines angegebenen Berechtigungseintrags in dieser Auflistung.

Insert(Int32, MessageQueuePermissionEntry)

Fügt einen Berechtigungseintrag an einem angegebenen Index in diese Auflistung ein.

MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.

(Geerbt von Object)
OnClear()

Führt nach dem Löschen des Inhalts der Auflistung zusätzliche benutzerdefinierte Prozesse aus.

OnClearComplete()

Führt nach dem Löschen des Inhalts der CollectionBase-Instanz zusätzliche benutzerdefinierte Prozesse aus.

(Geerbt von CollectionBase)
OnInsert(Int32, Object)

Führt vor dem Einfügen eines neuen Berechtigungseintrags in die Auflistung zusätzliche benutzerdefinierte Prozesse aus.

OnInsertComplete(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Einfügen eines neuen Elements in die CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnRemove(Int32, Object)

Führt beim Entfernen eines neuen Berechtigungseintrags aus der Auflistung zusätzliche benutzerdefinierte Prozesse aus.

OnRemoveComplete(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Entfernen eines Elements aus der CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnSet(Int32, Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse vor dem Festlegen eines Werts in der Auflistung aus.

OnSetComplete(Int32, Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Festlegen eines Werts in der CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnValidate(Object)

Führt zusätzliche benutzerdefinierte Prozesse beim Validieren eines Werts aus.

(Geerbt von CollectionBase)
Remove(MessageQueuePermissionEntry)

Entfernt einen angegebenen Berechtigungseintrag aus dieser Auflistung.

RemoveAt(Int32)

Entfernt das Element am angegebenen Index aus der CollectionBase-Instanz. Diese Methode kann nicht überschrieben werden.

(Geerbt von CollectionBase)
ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt.

(Geerbt von Object)

Explizite Schnittstellenimplementierungen

ICollection.CopyTo(Array, Int32)

Kopiert die gesamte CollectionBase-Instanz in ein kompatibles eindimensionales Array, beginnend am angegebenen Index des Zielarrays.

(Geerbt von CollectionBase)
ICollection.IsSynchronized

Ruft einen Wert ab, der angibt, ob der Zugriff auf die CollectionBase synchronisiert (threadsicher) ist.

(Geerbt von CollectionBase)
ICollection.SyncRoot

Ruft ein Objekt ab, mit dem der Zugriff auf CollectionBase synchronisiert werden kann.

(Geerbt von CollectionBase)
IList.Add(Object)

Fügt am Ende der CollectionBase ein Objekt hinzu.

(Geerbt von CollectionBase)
IList.Contains(Object)

Ermittelt, ob CollectionBase ein bestimmtes Element enthält.

(Geerbt von CollectionBase)
IList.IndexOf(Object)

Sucht nach dem angegebenen Object und gibt den nullbasierten Index des ersten Vorkommens innerhalb der gesamten CollectionBase zurück.

(Geerbt von CollectionBase)
IList.Insert(Int32, Object)

Fügt am angegebenen Index ein Element in die CollectionBase ein.

(Geerbt von CollectionBase)
IList.IsFixedSize

Ruft einen Wert ab, der angibt, ob das CollectionBase eine feste Größe aufweist.

(Geerbt von CollectionBase)
IList.IsReadOnly

Ruft einen Wert ab, der angibt, ob das CollectionBase schreibgeschützt ist.

(Geerbt von CollectionBase)
IList.Item[Int32]

Ruft das Element am angegebenen Index ab oder legt dieses fest.

(Geerbt von CollectionBase)
IList.Remove(Object)

Entfernt das erste Vorkommen eines angegebenen Objekts aus der CollectionBase.

(Geerbt von CollectionBase)

Erweiterungsmethoden

Cast<TResult>(IEnumerable)

Wandelt die Elemente eines IEnumerable in den angegebenen Typ um

OfType<TResult>(IEnumerable)

Filtert die Elemente eines IEnumerable anhand eines angegebenen Typs

AsParallel(IEnumerable)

Ermöglicht die Parallelisierung einer Abfrage.

AsQueryable(IEnumerable)

Konvertiert einen IEnumerable in einen IQueryable.

Gilt für:

Weitere Informationen