Compartilhar via


Classe ServerAliasCollection

The ServerAliasCollection class represents a collection of ServerAlias objects that represent all the SQL Server aliases defined on the parent object.

Hierarquia de herança

System.Object
  Microsoft.SqlServer.Management.Smo.Wmi.WmiCollectionBase
    Microsoft.SqlServer.Management.Smo.Wmi.ServerAliasCollection

Namespace:  Microsoft.SqlServer.Management.Smo.Wmi
Assembly:  Microsoft.SqlServer.SqlWmiManagement (em Microsoft.SqlServer.SqlWmiManagement.dll)

Sintaxe

'Declaração
Public NotInheritable Class ServerAliasCollection _
    Inherits WmiCollectionBase _
    Implements ICollection, IEnumerable
'Uso
Dim instance As ServerAliasCollection
public sealed class ServerAliasCollection : WmiCollectionBase, 
    ICollection, IEnumerable
public ref class ServerAliasCollection sealed : public WmiCollectionBase, 
    ICollection, IEnumerable
[<SealedAttribute>]
type ServerAliasCollection =  
    class 
        inherit WmiCollectionBase 
        interface ICollection 
        interface IEnumerable 
    end
public final class ServerAliasCollection extends WmiCollectionBase implements ICollection, IEnumerable

O tipo ServerAliasCollection expõe os membros a seguir.

Propriedades

  Nome Descrição
Propriedade pública Count Gets the number of ServerAlias objects in the referenced collection.
Propriedade pública IsSynchronized Gets the Boolean property value that specifies whether access to the collection is synchronized (thread safe). (Herdado de WmiCollectionBase.)
Propriedade pública Item[Int32] Gets a ServerAlias object in the collection by index number.
Propriedade pública Item[String] Gets a ServerAlias object in the collection by name.
Propriedade pública Parent Gets the ManagedComputer object that is the parent of the ServerAliasCollection object.
Propriedade pública SyncRoot Gets an object that can be used to synchronize access to the collection. (Herdado de WmiCollectionBase.)

Início

Métodos

  Nome Descrição
Método público Contains Checks whether the specified key value exists in the collection.
Método público CopyTo Copies the collection objects to a one-dimensional array beginning at the index value specified.
Método público Equals (Herdado de Object.)
Método público GetEnumerator Returns an IEnumerator interface that allows you to iterate through the objects in the collection.
Método público GetHashCode (Herdado de Object.)
Método público GetType (Herdado de Object.)
Método público ToString (Herdado de Object.)

Início

Campos

  Nome Descrição
Campo protegido initialized Defines a boolean method that initializes the collection of objects in the Windows Management Instrumentation (WMI) object preference. Não referencie esse membro diretamente no código. Ele dá suporte à infraestrutura do SQL Server. (Herdado de WmiCollectionBase.)
Campo protegido innerColl Identificado apenas para fins informativos. Sem suporte. A compatibilidade futura não está garantida. (Herdado de WmiCollectionBase.)

Início

Implementações de interfaces explícitas

  Nome Descrição
Implementações de interfaces explícitasMétodo privado ICollection.CopyTo Copies the collection objects to a one-dimensional array beginning at the index value specified.

Início

Comentários

A ServerAliasCollection object can be used to gain access to a set of SQL Server aliases. You can use the Item property to return a specific ServerAlias object.

Thread Safety

Qualquer membro público estático (Compartilhado no Microsoft Visual Basic) desse tipo é seguro para operações multi-threaded. Não há garantia de que qualquer membro de instância seja seguro para threads.

Exemplos

Usando coleções

Segurança de thread

Qualquer membro público static (Shared no Visual Basic) desse tipo é seguro para threads. Não há garantia de que qualquer membro de instância seja seguro para threads.

Consulte também

Referência

Namespace Microsoft.SqlServer.Management.Smo.Wmi