Classe ServiceCollection
The ServiceCollection class represents a collection of Service objects that represent all SQL Server services defined on the parent object.
Hierarquia de herança
System.Object
Microsoft.SqlServer.Management.Smo.Wmi.WmiCollectionBase
Microsoft.SqlServer.Management.Smo.Wmi.ServiceCollection
Namespace: Microsoft.SqlServer.Management.Smo.Wmi
Assembly: Microsoft.SqlServer.SqlWmiManagement (em Microsoft.SqlServer.SqlWmiManagement.dll)
Sintaxe
'Declaração
Public NotInheritable Class ServiceCollection _
Inherits WmiCollectionBase _
Implements ICollection, IEnumerable
'Uso
Dim instance As ServiceCollection
public sealed class ServiceCollection : WmiCollectionBase,
ICollection, IEnumerable
public ref class ServiceCollection sealed : public WmiCollectionBase,
ICollection, IEnumerable
[<SealedAttribute>]
type ServiceCollection =
class
inherit WmiCollectionBase
interface ICollection
interface IEnumerable
end
public final class ServiceCollection extends WmiCollectionBase implements ICollection, IEnumerable
O tipo ServiceCollection expõe os membros a seguir.
Propriedades
Nome | Descrição | |
---|---|---|
![]() |
Count | Gets the number of Service objects in the referenced collection. |
![]() |
IsSynchronized | Gets the Boolean property value that specifies whether access to the collection is synchronized (thread safe). (Herdado de WmiCollectionBase.) |
![]() |
Item[Int32] | Gets a Service object in the collection by index number. |
![]() |
Item[String] | Gets a Service object in the collection by name. |
![]() |
Parent | Gets the ManagedComputer object that is the parent of the ServiceCollection object. |
![]() |
SyncRoot | Gets an object that can be used to synchronize access to the collection. (Herdado de WmiCollectionBase.) |
Início
Métodos
Nome | Descrição | |
---|---|---|
![]() |
Contains | Checks whether the specified key value exists in the collection. |
![]() |
CopyTo | Copies the collection objects to a one-dimensional array beginning at the index value specified. |
![]() |
Equals | (Herdado de Object.) |
![]() |
GetEnumerator | Returns an IEnumerator interface that allows you to iterate through the objects in the collection. |
![]() |
GetHashCode | (Herdado de Object.) |
![]() |
GetType | (Herdado de Object.) |
![]() |
ToString | (Herdado de Object.) |
Início
Campos
Nome | Descrição | |
---|---|---|
![]() |
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.) |
![]() |
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 | |
---|---|---|
![]() ![]() |
ICollection.CopyTo | Copies the collection objects to a one-dimensional array beginning at the index value specified. |
Início
Comentários
A ServiceCollection object can be used to gain access to a set of SQL Server services. You can use the Item property to return a specific Service 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
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.