다음을 통해 공유


DocumentableItem.Documentation 속성

정의

DocumentableItem 인스턴스에 대한 텍스트 설명서를 가져오거나 설정합니다.

public:
 property System::String ^ Documentation { System::String ^ get(); void set(System::String ^ value); };
public string Documentation { get; set; }
member this.Documentation : string with get, set
Public Property Documentation As String

속성 값

DocumentableItem에 대한 설명서를 나타내는 문자열입니다.

예제

다음 코드 예제에서는의 일반적인 사용은 Documentation 속성입니다.

#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( "\t {0}", myItem->Documentation );
}

int main()
{
   ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MathService_cpp.wsdl" );
   Console::WriteLine( "Documentation Element for type is " );
   PrintDocumentation( myServiceDescription->Types );
   IEnumerator^ myEnum = myServiceDescription->PortTypes->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      PortType^ myPortType = safe_cast<PortType^>(myEnum->Current);
      Console::WriteLine( "Documentation Element for Port Type {0} is ", myPortType->Name );
      PrintDocumentation( myPortType );
   }

   myEnum = myServiceDescription->Bindings->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      Binding^ myBinding = safe_cast<Binding^>(myEnum->Current);
      Console::WriteLine( "Documentation Element for Port Type {0} is ", myBinding->Name );
      PrintDocumentation( myBinding );
   }
}
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);
   }
}
Imports System.Web.Services.Description

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

   ' Prints documentation associated with a wsdl element.
   Public Shared Sub PrintDocumentation(myItem As DocumentableItem)
      Console.WriteLine(ControlChars.Tab + myItem.Documentation)
   End Sub
End Class

설명

파생된 클래스에서이 속성은 XML 웹 서비스의 요소에 추가 된 텍스트 설명을 나타냅니다. 기본 구현은 빈 문자열 ("").

적용 대상