Compartir a través de


ServiceCollection Clase

The ServiceCollection class represents a collection of Service objects that represent all SQL Server services defined on the parent object.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo.Wmi
Ensamblado:  Microsoft.SqlServer.SqlWmiManagement (en Microsoft.SqlServer.SqlWmiManagement.dll)

Sintaxis

'Declaración
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

Notas

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

Todos los miembros estáticos (compartidos en Microsoft Visual Basic) públicos de este tipo son seguros para operaciones multiproceso. No se garantiza que los miembros de instancia sean seguros para subprocesos.

Ejemplos

Usar colecciones

Jerarquía de herencia

System. . :: . .Object
  Microsoft.SqlServer.Management.Smo.Wmi. . :: . .WmiCollectionBase
    Microsoft.SqlServer.Management.Smo.Wmi..::..ServiceCollection

Seguridad para subprocesos

Todos los miembros públicos static (Shared en Visual Basic) de este tipo son seguros para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.