Classe DeleteAttribute

Spécifie qu'une méthode DomainService est une méthode de suppression.

Espace de noms: System.ServiceModel.DomainServices.Server
Assembly : System.ServiceModel.DomainServices.Server (dans system.servicemodel.domainservices.server.dll)

Utilisation

'Utilisation
Dim instance As DeleteAttribute

Syntaxe

'Déclaration
<AttributeUsageAttribute(AttributeTargets.Method Or AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple:=False, Inherited:=True)> _
Public NotInheritable Class DeleteAttribute
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple=false, Inherited=true)] 
public sealed class DeleteAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Method|AttributeTargets::Property|AttributeTargets::Field, AllowMultiple=false, Inherited=true)] 
public ref class DeleteAttribute sealed : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple=false, Inherited=true) */ 
public final class DeleteAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple=false, Inherited=true) 
public final class DeleteAttribute extends Attribute

Notes

Vous appliquez l'attribut DeleteAttribute à une méthode pour indiquer que la méthode est une méthode de suppression. Si votre méthode correspond à la signature de méthode attendue pour une méthode de suppression, il est inutile d'appliquer DeleteAttribute. L'infrastructure des Services RIA déduira qu'une méthode ayant la signature de suppression attendue doit être traitée comme une opération de suppression. Vous appliquez IgnoreAttribute à une méthode pour empêcher l'infrastructure des Services RIA de générer une opération de domaine pour cette méthode.

Les éléments suivants affichent la signature attendue pour une méthode de suppression :

Valeur de retour

Aucune

Paramètres

Entity

Préfixe de nom

Delete ou Remove

Attribut

[Delete] (C#)

- ou -

<Delete()> (Visual Basic)

Exemple

public void DeleteProduct(Product product) (C#)

- ou -

Public Sub DeleteProduct(ByVal product As Product) (Visual Basic)

Hiérarchie d'héritage

System.Object
   System.Attribute
    System.ServiceModel.DomainServices.Server.DeleteAttribute

Sécurité des threads

Tous les membres publics statiques (Partagés dans Visual Basic) de ce type sont thread-safe. Il n'est pas garanti que les membres d'instance soient thread-safe.

Plateformes

Plateformes de développement

Windows XP Édition familiale, Windows XP Professionnel, Windows Server 2003 , Windows Server 2008 et Windows 2000

Plateformes cibles

Voir aussi

Référence

Membres DeleteAttribute
Espace de noms System.ServiceModel.DomainServices.Server