WebMethodAttribute.Description Propriedade

Definição

Uma mensagem descritiva que descreve o método de serviço 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

Valor da propriedade

Uma mensagem descritiva que descreve o método de serviço Web XML. O valor padrão é Empty.

Exemplos

No exemplo abaixo, a cadeia de caracteres Obtains the Server Computer Name é usada para descrever o método de serviço Web XML na página de ajuda Descrição do Serviço e Serviço do serviço para o serviço Web XML.

<%@ WebService Language="C#" Class="Util" %>
 
 using System;
 using System.Web.Services;
 
 public class Util: WebService {
    [ WebMethod(Description="Obtains the Server Computer Name",
    EnableSession=false)]
    public string GetMachineName() {
       return Server.MachineName;
    }   
 }
<%@ WebService Language="VB" Class="Util" %>

Imports System
Imports System.Web.Services

Public Class Util
    Inherits WebService

    <WebMethod(Description := "Obtains the Server Computer Name", _
        EnableSession := False)> _
    Public Function GetMachineName() As String
        
        Return Server.MachineName
    End Function
End Class

Comentários

A mensagem descritiva é exibida para potenciais consumidores do serviço Web XML quando documentos de descrição para o serviço Web XML são gerados, como a Descrição do Serviço e a página de ajuda do Serviço.

Aplica-se a

Confira também