Classe ServerInstanceCollection
The ServerInstanceCollection class represents a collection of ServerInstance objects that represent all the instances of SQL Server defined on the parent object.
Hiérarchie d'héritage
System. . :: . .Object
Microsoft.SqlServer.Management.Smo.Wmi. . :: . .WmiCollectionBase
Microsoft.SqlServer.Management.Smo.Wmi..::..ServerInstanceCollection
Espace de noms : Microsoft.SqlServer.Management.Smo.Wmi
Assembly : Microsoft.SqlServer.SqlWmiManagement (en Microsoft.SqlServer.SqlWmiManagement.dll)
Syntaxe
'Déclaration
Public NotInheritable Class ServerInstanceCollection _
Inherits WmiCollectionBase _
Implements ICollection, IEnumerable
'Utilisation
Dim instance As ServerInstanceCollection
public sealed class ServerInstanceCollection : WmiCollectionBase,
ICollection, IEnumerable
public ref class ServerInstanceCollection sealed : public WmiCollectionBase,
ICollection, IEnumerable
[<SealedAttribute>]
type ServerInstanceCollection =
class
inherit WmiCollectionBase
interface ICollection
interface IEnumerable
end
public final class ServerInstanceCollection extends WmiCollectionBase implements ICollection, IEnumerable
Le type ServerInstanceCollection expose les membres suivants.
Propriétés
Nom | Description | |
---|---|---|
![]() |
Count | Gets the number of ServerInstance objects in the referenced collection. |
![]() |
IsSynchronized | Gets the Boolean property value that specifies whether access to the collection is synchronized (thread safe). (hérité de WmiCollectionBase.) |
![]() |
Item[ ( [ ( Int32] ) ] ) | Gets a ServerInstance object in the collection by index number. |
![]() |
Item[ ( [ ( String] ) ] ) | Gets a ServerInstance object in the collection by name. |
![]() |
Parent | Gets the ManagedComputer object that is the parent of the ServerInstanceCollection object. |
![]() |
SyncRoot | Gets an object that can be used to synchronize access to the collection. (hérité de WmiCollectionBase.) |
Haut de la page
Méthodes
Nom | Description | |
---|---|---|
![]() |
Add | Adds the specified object to the referenced collection. (hérité de WmiCollectionBase.) |
![]() |
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 | (hérité de Object.) |
![]() |
Finalize | (hérité de Object.) |
![]() |
GetEnumerator | Returns an IEnumerator interface that allows you to iterate through the objects in the collection. |
![]() |
GetHashCode | (hérité de Object.) |
![]() |
GetType | (hérité de Object.) |
![]() |
MemberwiseClone | (hérité de Object.) |
![]() |
Remove | Removes the specified object from the referenced collection. (hérité de WmiCollectionBase.) |
![]() |
ToString | (hérité de Object.) |
Haut de la page
Champs
Nom | Description | |
---|---|---|
![]() |
initialized | Defines a boolean method that initializes the collection of objects in the Windows Management Instrumentation (WMI) object preference. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de WmiCollectionBase.) |
![]() |
innerColl | Identifié à titre d'information uniquement. Non pris en charge. La compatibilité future n'est pas garantie. (hérité de WmiCollectionBase.) |
Haut de la page
Implémentations d'interfaces explicites
Nom | Description | |
---|---|---|
![]() ![]() |
ICollection. . :: . .CopyTo | Copies the collection objects to a one-dimensional array beginning at the index value specified. |
Haut de la page
Notes
A ServerInstanceCollection object can be used to gain access to a set of instances of SQL Server. You can use the Item property to return a specific ServerInstance object.
Thread Safety
Tout membre statique public (Partagé dans Microsoft Visual Basic) de ce type est sûr dans le cadre des opérations à plusieurs threads. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.
Sécurité des threads
Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.