Partager via


Classe PolicyCollection

The PolicyCollection class represents a collection of Policy objects that represent all policies in the policy store.

Hiérarchie d'héritage

System. . :: . .Object
  Microsoft.SqlServer.Management.Sdk.Sfc. . :: . .SfcCollection< (Of < ( <'Policy, Policy. . :: . .Key, PolicyStore> ) > ) >
    Microsoft.SqlServer.Management.Sdk.Sfc. . :: . .SfcCollatedDictionaryCollection< (Of < ( <'Policy, Policy. . :: . .Key, PolicyStore> ) > ) >
      Microsoft.SqlServer.Management.Dmf..::..PolicyCollection

Espace de noms :  Microsoft.SqlServer.Management.Dmf
Assembly :  Microsoft.SqlServer.Dmf (en Microsoft.SqlServer.Dmf.dll)

Syntaxe

'Déclaration
<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey := "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")> _
Public NotInheritable Class PolicyCollection _
    Inherits SfcCollatedDictionaryCollection(Of Policy, Policy..::..Key, PolicyStore)
'Utilisation
Dim instance As PolicyCollection
[StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public sealed class PolicyCollection : SfcCollatedDictionaryCollection<Policy, Policy..::..Key, PolicyStore>
[StrongNameIdentityPermissionAttribute(SecurityAction::LinkDemand, PublicKey = L"0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public ref class PolicyCollection sealed : public SfcCollatedDictionaryCollection<Policy^, Policy..::..Key^, PolicyStore^>
[<SealedAttribute>]
[<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")>]
type PolicyCollection =  
    class
        inherit SfcCollatedDictionaryCollection<Policy, Policy..::..Key, PolicyStore>
    end
public final class PolicyCollection extends SfcCollatedDictionaryCollection<Policy, Policy..::..Key, PolicyStore>

Le type PolicyCollection expose les membres suivants.

Constructeurs

  Nom Description
Méthode publique PolicyCollection(PolicyStore) Initializes a new instance of the PolicyCollection class.
Méthode publique PolicyCollection(PolicyStore, IComparer< (Of < <' (String> ) > > )) Initializes a new instance of the PolicyCollection class.

Haut de la page

Propriétés

  Nom Description
Propriété publique Ascending Gets or sets a value indicating whether to sort in ascending order. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété publique Count Gets the number of elements contained in the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété protégée CultureInfo Gets or sets the CultureInfo object that is used by the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété protégée IgnoreCase Gets or sets a value indicating whether the collection is case-sensitive. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété protégée Initialized Gets a value indicating whether the collection has been initialized. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété publique IsReadOnly Gets a value indicating whether the collection is read-only. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété publique IsSynchronized Gets or sets a value indicating whether access to the collection is synchronized (thread safe). Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété publique Item[ ( [ ( String] ) ] ) Gets a Policy object in the collection by name.
Propriété publique Item[ ( [ ( K] ) ] ) Gets the item specified by the key. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété protégée Parent Gets or sets the type of the parent object. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Propriété publique SyncRoot Gets or sets an object that can be used to synchronize access to the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)

Haut de la page

Méthodes

  Nom Description
Méthode publique Add Adds an item to the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée AddShadow Adds the specified object to the shadow collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique Clear Removes all items from the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique Contains(String) Verifies whether the specified string exists in the collection.
Méthode publique Contains(T) Determines whether the collection contains the specified object. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique CopyTo(array<T> [] () [] [], Int32) Copies the elements from the collection to the specified array, starting at the specified array index. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique CopyTo(Array, Int32) Copies the elements from the collection to the specified array, starting at the specified array index. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée CreateAndInitializeChildObject Creates a child object and adds it to the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée EnsureCollectionInitialized Initialize the collection from the server. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique Equals (hérité de Object.)
Méthode protégée Finalize (hérité de Object.)
Méthode protégée FinishMerge Swaps the new collection for the old collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée GetCollectionElementNameImpl Gets the Uniform Resource Name (URN) suffix for elements in the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée GetElementFactoryImpl Returns the factory that is used to instantiate objects for the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique GetEnumerator Returns an enumerator that can iterate through the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée GetExistingObjectByKey Uses the specified key to retrieve an existing object from the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique GetHashCode (hérité de Object.)
Méthode protégée GetObjectByKey Uses the specified key to retrieve an object from the collection. If a matching object is not found, the object is created, and added to the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique GetType (hérité de Object.)
Méthode protégée ImplAddExisting Adds an item to the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée ImplRemoveExisting Removes the specified object from the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée InitInnerCollection Creates an empty internal collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée MemberwiseClone (hérité de Object.)
Méthode protégée PrepareMerge Prepares to merge fresh query results into the existing collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique Refresh() () () () Refreshes the collection by creating new and merging existing objects and properties in the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique Refresh(Boolean) Refreshes the collection by creating new and merging existing objects and properties in the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique Remove Removes the specified object from the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée RemoveInternal Marks the specified object for removal. The state of the object is set to ToBeDropped. The object will be removed when the parent is altered or dropped. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée Rename Renames the specified object. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode protégée ResetInnerCollection Resets the CultureInfo, IgnoreCase, and Ascending properties on the inner collection to honor the new settings. Call this method after any of the properties have changed. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Méthode publique ToString (hérité de Object.)

Haut de la page

Implémentations d'interfaces explicites

  Nom Description
Implémentation d'interface expliciteMéthode privée IComparer< (Of < <' (K> ) > > ). . :: . .Compare Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. Compares two keys. (hérité de SfcCollatedDictionaryCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface explicitePropriété privée IListSource. . :: . .ContainsListCollection Gets a value indicating whether the collection is a collection of IList objects. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée IEnumerable. . :: . .GetEnumerator Gets an enumerator that can iterate the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée IListSource. . :: . .GetList Returns an IList object that can be bound to a data source from an object that does not implement the IList interface. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .Add Adds the specified object to the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .AddShadow Adds the specified object to the shadow collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface explicitePropriété privée ISfcCollection. . :: . .Count Gets the number of items contained in the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .EnsureInitialized Initializes the collection from the server. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .FinishMerge Swaps the new collection for the old collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .GetCollectionElementNameImpl Gets the URN suffix for elements in the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .GetElementFactory Gets the factory that is used to instantiate objects for the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .GetExisting Uses the specified key to retrieve an existing item from the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .GetObjectByKey Uses the specified key to retrieve an object from the collection. If a matching object is not found, the object is created, and added to the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface explicitePropriété privée ISfcCollection. . :: . .Initialized Gets or sets a value indicating whether the collection has been initialized. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface explicitePropriété privée ISfcCollection. . :: . .Parent Gets the parent object. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .PrepareMerge Prepares to merge fresh query results into the existing collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .Remove Removes the specified object from the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .RemoveElement Removes the specified element from the collection. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)
Implémentation d'interface expliciteMéthode privée ISfcCollection. . :: . .Rename Renames the specified object. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SfcCollection< (Of < ( <'T, K, ParentT> ) > ) >.)

Haut de la page

Notes

A PolicyCollection object can be used to gain access to a set of policies. You can use the Item property to return a specific Policy object.

Cet espace de noms, cette classe ou ce membre est pris en charge uniquement par la version 2.0 de Microsoft .NET Framework.

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.