DocumentableItem::Documentation Property

 

Gets or sets the text documentation for the instance of the DocumentableItem.

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
property String^ Documentation {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

A string that represents the documentation for the DocumentableItem.

In a derived class, this property represents the text comments added to an element of the XML Web service. The default implementation is an empty string ("").

The following code example demonstrates a typical usage of the Documentation property.

#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 );
   }
}

.NET Framework
Available since 1.1
Return to top
Show: