WebMethodAttribute.Description プロパティ
XML Web サービス メソッドを説明する説明メッセージ。
Public Property Description As String
[C#]
public string Description {get; set;}
[C++]
public: __property String* get_Description();public: __property void set_Description(String*);
[JScript]
public function get Description() : String;public function set Description(String);
プロパティ値
XML Web サービス メソッドを説明する説明メッセージ。既定値は String.Empty です。
解説
この説明メッセージは、サービスの説明やサービス ヘルプ ページなど、XML Web サービスを説明するドキュメントの生成時に、XML Web サービスの対象ユーザーに対して表示されます。
使用例
[Visual Basic, C#] 文字列 Obtains the Server Computer Name
を使用して、XML Web サービスのサービスの説明およびサービス ヘルプ ページで、XML Web サービス メソッドを説明する例を次に示します。
<%@ 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
[C#]
<%@ 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;
}
}
[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET
参照
WebMethodAttribute クラス | WebMethodAttribute メンバ | System.Web.Services 名前空間 | WebMethodAttribute