本文整理汇总了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