Export (0) Print
Expand All

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 string Documentation { get; set; }

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft