本文整理匯總了C#中System.Web.Services.Discovery.DiscoveryClientProtocol.AdditionalInformation屬性的典型用法代碼示例。如果您正苦於以下問題:C# DiscoveryClientProtocol.AdditionalInformation屬性的具體用法?C# DiscoveryClientProtocol.AdditionalInformation怎麽用?C# DiscoveryClientProtocol.AdditionalInformation使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。
在下文中一共展示了DiscoveryClientProtocol.AdditionalInformation屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Main
//引入命名空間
using System;
using System.Net;
using System.Security.Permissions;
using System.Xml;
using System.Web.Services.Discovery;
class DiscoverySoapBindingClass
{
static void Main()
{
Run();
}
[PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
static void Run()
{
try
{
// dataservice.disco is a sample discovery document.
string myStringUrl = "http://localhost/dataservice.disco";
// Call the Discover method to populate the Documents property.
DiscoveryClientProtocol myDiscoveryClientProtocol =
new DiscoveryClientProtocol();
myDiscoveryClientProtocol.Credentials =
CredentialCache.DefaultCredentials;
DiscoveryDocument myDiscoveryDocument =
myDiscoveryClientProtocol.Discover(myStringUrl);
SoapBinding mySoapBinding = new SoapBinding();
mySoapBinding.Address = "http://schemas.xmlsoap.org/disco/scl/";
mySoapBinding.Binding = new XmlQualifiedName("string",
"http://www.w3.org/2001/XMLSchema");
myDiscoveryClientProtocol.AdditionalInformation.Add(mySoapBinding);
// Write the information back.
myDiscoveryClientProtocol.WriteAll("MyDirectory",
"results.discomap");
System.Collections.IList myIList =
myDiscoveryClientProtocol.AdditionalInformation;
mySoapBinding = null;
mySoapBinding = (SoapBinding)myIList[0];
Console.WriteLine("The address of the SoapBinding associated "
+ "with AdditionalInformation is: "
+ mySoapBinding.Address);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
開發者ID:.NET開發者,項目名稱:System.Web.Services.Discovery,代碼行數:55,代碼來源:DiscoveryClientProtocol.AdditionalInformation