WebMethodAttribute.Description プロパティ

定義

XML Web サービス メソッドを説明する説明メッセージ。

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

プロパティ値

XML Web サービス メソッドを説明する説明メッセージ。 既定値は Empty です。

次の例では、文字列 Obtains the Server Computer Name を使用して、XML Web サービスの [サービスの説明とサービス] ヘルプ ページの XML 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

注釈

XML Web サービスの説明ドキュメント (サービスの説明やサービス ヘルプ ページなど) が生成されると、XML Web サービスのコンシューマー候補に説明メッセージが表示されます。

適用対象

こちらもご覧ください