WebReference.Documents 属性

定义

获取与 Web 引用关联的说明文档的集合。Gets the collection of description documents associated with the Web reference.

public:
 property System::Web::Services::Discovery::DiscoveryClientDocumentCollection ^ Documents { System::Web::Services::Discovery::DiscoveryClientDocumentCollection ^ get(); };
public System.Web.Services.Discovery.DiscoveryClientDocumentCollection Documents { get; }
member this.Documents : System.Web.Services.Discovery.DiscoveryClientDocumentCollection
Public ReadOnly Property Documents As DiscoveryClientDocumentCollection

属性值

DiscoveryClientDocumentCollection

用于初始化 DiscoveryClientDocumentCollection 实例的 WebReferenceThe DiscoveryClientDocumentCollection used to initialize the WebReference instance.

示例

下面的代码示例演示如何使用此属性。The following code example illustrates the use of this property. 此代码示例是为类提供的更大示例的一部分 WebReferenceThis code example is part of a larger example provided for the WebReference class.

// Print some information about the web reference.
Console.WriteLine("Base Url = {0}", reference.AppSettingBaseUrl);
Console.WriteLine("Url Key = {0}", reference.AppSettingUrlKey);
Console.WriteLine("Documents = {0}", reference.Documents.Count);

注解

与 Web 引用关联的说明文档集合应该只包含 ServiceDescriptionXmlSchema 对象; GenerateWebReferences 方法无法解释 DiscoveryDocument 对象。The description document collection associated with a Web reference should contain only ServiceDescription and XmlSchema objects; the GenerateWebReferences method is unable to interpret DiscoveryDocument objects.

适用于