This documentation is archived and is not being maintained.

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

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: