WebMethodAttribute.Description Vlastnost

Definice

Popisná zpráva popisující metodu webové služby 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

Hodnota vlastnosti

Popisná zpráva popisující metodu webové služby XML. Výchozí hodnota je Empty.

Příklady

V následujícím příkladu se řetězec Obtains the Server Computer Name používá k popisu metody webové služby XML na stránce Popis služby a nápověda služby pro webovou službu 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

Poznámky

Popisná zpráva se zobrazí potenciálním příjemcům webové služby XML při vygenerování dokumentů popisu pro webovou službu XML, jako je popis služby a stránka nápovědy služby.

Platí pro

Viz také