当前位置: 首页>>代码示例>>C#>>正文


C# DiscoveryClientProtocol.WriteAll方法代码示例

本文整理汇总了C#中System.Web.Services.Discovery.DiscoveryClientProtocol.WriteAll方法的典型用法代码示例。如果您正苦于以下问题:C# DiscoveryClientProtocol.WriteAll方法的具体用法?C# DiscoveryClientProtocol.WriteAll怎么用?C# DiscoveryClientProtocol.WriteAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.Services.Discovery.DiscoveryClientProtocol的用法示例。


在下文中一共展示了DiscoveryClientProtocol.WriteAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReadWriteTest

		public void ReadWriteTest ()
		{
			string directory = Path.Combine (Path.GetTempPath (), Path.GetRandomFileName ());
			Directory.CreateDirectory (directory);
			try {
				string url = "http://www.w3schools.com/WebServices/TempConvert.asmx";
				var p1 = new DiscoveryClientProtocol ();
				p1.DiscoverAny (url);
				p1.ResolveAll ();

				p1.WriteAll (directory, "Reference.map");

				var p2 = new DiscoveryClientProtocol ();
				var results = p2.ReadAll (Path.Combine (directory, "Reference.map"));

				Assert.AreEqual (2, results.Count);
				Assert.AreEqual ("TempConvert.disco", results [0].Filename);
				Assert.AreEqual ("TempConvert.wsdl", results [1].Filename);
			} finally {
				Directory.Delete (directory, true);
			}
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:22,代码来源:DiscoveryClientProtocolTest.cs

示例2: WriteMetadata

		public DiscoveryClientResultCollection WriteMetadata(string mapFullPath)
		{
			Guard.ArgumentNotNullOrEmptyString(mapFullPath, "mapFullPath");

			using (DiscoveryClientProtocol discovery = new DiscoveryClientProtocol())
			{				
				ResolveDiscovery(discovery, address);
				string directory = Path.GetDirectoryName(mapFullPath);
				if (!Directory.Exists(directory))
				{
					Directory.CreateDirectory(directory);
				}
				return discovery.WriteAll(directory, Path.GetFileName(mapFullPath));
			}
		}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:15,代码来源:MetadataDiscovery.cs


注:本文中的System.Web.Services.Discovery.DiscoveryClientProtocol.WriteAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。