DocumentableItem.Documentation プロパティ
DocumentableItem のインスタンスのテキスト ドキュメントを取得または設定します。
Public Property Documentation As String
[C#]
public string Documentation {get; set;}
[C++]
public: __property String* get_Documentation();public: __property void set_Documentation(String*);
[JScript]
public function get Documentation() : String;public function set Documentation(String);
プロパティ値
DocumentableItem のドキュメントを表す文字列。
解説
派生クラスでは、このプロパティは XML Web サービスの要素に追加されたテキスト コメントを表します。既定の実装は空の文字列 ("") です。
使用例
[Visual Basic, C#, C++] Documentation プロパティの一般的な使用例を次に示します。
Imports System
Imports System.Web.Services.Description
Imports Microsoft.VisualBasic
Class DocumentableItemSample
Public Shared Sub Main()
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read("MathService_vb.wsdl")
Console.WriteLine("Documentation Element for type is ")
PrintDocumentation(myServiceDescription.Types)
Dim myPortType As PortType
For Each myPortType In myServiceDescription.PortTypes
Console.WriteLine("Documentation Element for Port Type {0} is ", myPortType.Name)
PrintDocumentation(myPortType)
Next myPortType
Dim myBinding As Binding
For Each myBinding In myServiceDescription.Bindings
Console.WriteLine("Documentation Element for Port Type {0} is ", myBinding.Name)
PrintDocumentation(myBinding)
Next myBinding
End Sub 'Main
' Prints documentation associated with a wsdl element.
Public Shared Sub PrintDocumentation(myItem As DocumentableItem)
Console.WriteLine(ControlChars.Tab + myItem.Documentation)
End Sub 'PrintDocumentation
End Class 'DocumentableItemSample
[C#]
using System;
using System.Web.Services.Description;
class DocumentableItemSample
{
public static void Main()
{
ServiceDescription myServiceDescription = ServiceDescription.Read("MathService_cs.wsdl");
Console.WriteLine("Documentation Element for type is ");
PrintDocumentation(myServiceDescription.Types);
foreach(PortType myPortType in myServiceDescription.PortTypes)
{
Console.WriteLine("Documentation Element for Port Type {0} is ",myPortType.Name);
PrintDocumentation(myPortType);
}
foreach(Binding myBinding in myServiceDescription.Bindings)
{
Console.WriteLine("Documentation Element for Port Type {0} is ",myBinding.Name);
PrintDocumentation(myBinding);
}
}
// Prints documentation associated with a wsdl element.
public static void PrintDocumentation(DocumentableItem myItem)
{
Console.WriteLine("\t" + myItem.Documentation);
}
}
[C++]
#using <mscorlib.dll>
#using <System.dll>
#using <System.Xml.dll>
#using <System.Web.Services.dll>
using namespace System;
using namespace System::Xml;
using namespace System::Web::Services::Description;
using namespace System::Collections;
// Prints documentation associated with a wsdl element.
void PrintDocumentation(DocumentableItem * myItem)
{
Console::WriteLine(S"\t {0}", myItem -> Documentation);
}
int main()
{
ServiceDescription * myServiceDescription = ServiceDescription::Read(S"MathService_cs.wsdl");
Console::WriteLine(S"Documentation Element for type is ");
PrintDocumentation(myServiceDescription->Types);
IEnumerator* myEnum = myServiceDescription->PortTypes->GetEnumerator();
while (myEnum->MoveNext())
{
PortType* myPortType = __try_cast<PortType*>(myEnum->Current);
Console::WriteLine(S"Documentation Element for Port Type {0} is ", myPortType -> Name);
PrintDocumentation(myPortType);
}
myEnum = myServiceDescription->Bindings->GetEnumerator();
while (myEnum->MoveNext())
{
Binding* myBinding = __try_cast<Binding*>(myEnum->Current);
Console::WriteLine(S"Documentation Element for Port Type {0} is ", myBinding -> Name);
PrintDocumentation(myBinding);
}
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
DocumentableItem クラス | DocumentableItem メンバ | System.Web.Services.Description 名前空間