本文整理汇总了C#中System.Web.Services.Description.ServiceDescriptionImportWarnings枚举的典型用法代码示例。如果您正苦于以下问题:C# ServiceDescriptionImportWarnings枚举的具体用法?C# ServiceDescriptionImportWarnings怎么用?C# ServiceDescriptionImportWarnings使用的例子?那么恭喜您, 这里精选的枚举代码示例或许可以为您提供帮助。
在下文中一共展示了ServiceDescriptionImportWarnings枚举的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ServiceDescriptionImporter
String myDisplay;
// Read wsdl file.
ServiceDescription myServiceDescription = ServiceDescription.Read
(myWSDLFileName);
ServiceDescriptionImporter myServiceDescriptionImporter = new
ServiceDescriptionImporter();
// Add 'myServiceDescription' to 'myServiceDescriptionImporter'.
myServiceDescriptionImporter.AddServiceDescription
(myServiceDescription, "", "");
myServiceDescriptionImporter.ProtocolName = "HttpGet";
CodeNamespace myCodeNamespace = new CodeNamespace();
CodeCompileUnit myCodeCompileUnit = new CodeCompileUnit();
// Invoke 'Import' method.
ServiceDescriptionImportWarnings myWarning =
myServiceDescriptionImporter.Import(myCodeNamespace,
myCodeCompileUnit);
switch(myWarning)
{
case ServiceDescriptionImportWarnings.NoCodeGenerated :
myDisplay="NoCodeGenerated";
break;
case ServiceDescriptionImportWarnings.NoMethodsGenerated :
myDisplay="NoMethodsGenerated";
break;
case ServiceDescriptionImportWarnings.UnsupportedOperationsIgnored :
myDisplay="UnsupportedOperationsIgnored";
break;
case ServiceDescriptionImportWarnings.OptionalExtensionsIgnored :
myDisplay="OptionalExtensionsIgnored";
break;
case ServiceDescriptionImportWarnings.RequiredExtensionsIgnored :
myDisplay="RequiredExtensionsIgnored";
break;
case ServiceDescriptionImportWarnings.UnsupportedBindingsIgnored :
myDisplay="UnsupportedBindingsIgnored";
break;
default :
myDisplay="General Warning";
break;
}
Console.WriteLine ("Warning : " + myDisplay);