DocumentableItem.Documentation Özellik

Tanım

örneğinin DocumentableItemmetin belgelerini alır veya ayarlar.

C#
public string Documentation { get; set; }

Özellik Değeri

String

için DocumentableItembelgeleri temsil eden bir dize.

Örnekler

Aşağıdaki kod örneği, özelliğin Documentation tipik bir kullanımını gösterir.

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

Açıklamalar

Türetilmiş bir sınıfta, bu özellik XML Web hizmetinin bir öğesine eklenen metin açıklamalarını temsil eder. Varsayılan uygulama boş bir dizedir ("").

Şunlara uygulanır

Ürün Sürümler
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8