WebMethodAttribute.Description Właściwość

Definicja

Opisowy komunikat opisowy opisujący metodę usługi sieci 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

Wartość właściwości

Opisowy komunikat opisowy opisujący metodę usługi sieci Web XML. Wartość domyślna to Empty.

Przykłady

W poniższym przykładzie ciąg Obtains the Server Computer Name służy do opisywania metody usługi sieci Web XML na stronie pomocy Opis usługi i usługa XML dla usługi sieci Web.

<%@ 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

Uwagi

Opisowy komunikat jest wyświetlany potencjalnym konsumentom usługi sieci Web XML podczas generowania dokumentów opisu usługi sieci Web XML, takich jak opis usługi i strona pomocy usługi.

Dotyczy

Zobacz też