Share via


WebServiceAttribute.Description Propriété

Définition

Message descriptif pour le service Web XML.

public:
 property System::String ^ Description { System::String ^ get(); void set(System::String ^ value); };
public string Description { get; set; }
member this.Description : string with get, set
Public Property Description As String

Valeur de propriété

String

Texte décrivant la fonctionnalité du service Web XML.

Exemples

L’exemple suivant définit la Description propriété "Common Server Variables"sur .

<%@ WebService Language="C#" Class= "ServerVariables"%>
 
 using System;
 using System.Web.Services;
 
 [ WebService(Description="Common Server Variables",Namespace="http://www.contoso.com/")]
 public class ServerVariables: WebService {
 
 
    [ WebMethod(Description="Obtains the Server Computer Name",EnableSession=false)]
    public string GetMachineName() {
       return Server.MachineName;
    }   
 }
<%@ WebService Language="VB" Class= "ServerVariables"%>
 
Imports System
Imports System.Web.Services

<WebService(Description := "Common Server Variables", _
 Namespace := "http://www.contoso.com/")> _
Public Class ServerVariables
    Inherits WebService 
    
    <WebMethod(Description := "Obtains the Computer Machine Name", _
        EnableSession := False)> _
    Public Function GetMachineName() As String
        
        Return Server.MachineName
    End Function
End Class

Remarques

Le message descriptif s’affiche aux consommateurs potentiels du service Web XML lorsque des documents de description pour le service Web XML sont générés, tels que la description du service et la page d’aide du service.

S’applique à

Voir aussi