ServiceDescriptionImportWarnings ServiceDescriptionImportWarnings ServiceDescriptionImportWarnings ServiceDescriptionImportWarnings Enum

定义

指定由 Import(CodeNamespace, CodeCompileUnit) 产生的警告的类型。Specifies the type of warnings produced by Import(CodeNamespace, CodeCompileUnit).

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class ServiceDescriptionImportWarnings
[System.Flags]
public enum ServiceDescriptionImportWarnings
type ServiceDescriptionImportWarnings = 
Public Enum ServiceDescriptionImportWarnings
继承
ServiceDescriptionImportWarningsServiceDescriptionImportWarningsServiceDescriptionImportWarningsServiceDescriptionImportWarnings
属性

字段

NoCodeGenerated NoCodeGenerated NoCodeGenerated NoCodeGenerated 1

指定 Import(CodeNamespace, CodeCompileUnit) 方法未生成任何代理类。Specifies that no proxy class was generated by the Import(CodeNamespace, CodeCompileUnit) method.

NoMethodsGenerated NoMethodsGenerated NoMethodsGenerated NoMethodsGenerated 32

指定 Import(CodeNamespace, CodeCompileUnit) 方法生成的代理类不包含任何方法。Specifies that the proxy class generated by the Import(CodeNamespace, CodeCompileUnit) method includes no methods.

OptionalExtensionsIgnored OptionalExtensionsIgnored OptionalExtensionsIgnored OptionalExtensionsIgnored 2

指定将导入的 ServiceDescriptionFormatExtension 至少忽略了一个可选的 ServiceDescriptionSpecifies that at least one optional ServiceDescriptionFormatExtension for the ServiceDescription to be imported has been ignored.

RequiredExtensionsIgnored RequiredExtensionsIgnored RequiredExtensionsIgnored RequiredExtensionsIgnored 4

指定已忽略要导入的 ServiceDescriptionFormatExtension 的至少一个必需的 ServiceDescriptionSpecifies that at least one required ServiceDescriptionFormatExtension for the ServiceDescription to be imported has been ignored.

SchemaValidation SchemaValidation SchemaValidation SchemaValidation 64

指定 ServiceDescription 架构是无效的。Specifies that the ServiceDescription schema is invalid.

UnsupportedBindingsIgnored UnsupportedBindingsIgnored UnsupportedBindingsIgnored UnsupportedBindingsIgnored 16

指定将要导入的 Binding 的至少一个 ServiceDescription 属于不受支持的类型,因而已经被忽略。Specifies that at least one Binding for the ServiceDescription to be imported is of an unsupported type and has been ignored.

UnsupportedOperationsIgnored UnsupportedOperationsIgnored UnsupportedOperationsIgnored UnsupportedOperationsIgnored 8

指定将要导入的 Operation 的至少一个 ServiceDescription 属于不受支持的类型,因而已经被忽略。Specifies that at least one Operation for the ServiceDescription to be imported is of an unsupported type and has been ignored.

WsiConformance WsiConformance WsiConformance WsiConformance 128

指定要导入的 ServiceDescription 不符合 WS-I 基本概要。Specifies that the ServiceDescription to be imported does not conform to the WS-I Basic Profile.

示例

String^ myDisplay;
// Read wsdl file.
ServiceDescription^ myServiceDescription = ServiceDescription::Read
   ( myWSDLFileName );

ServiceDescriptionImporter^ myServiceDescriptionImporter =
   gcnew ServiceDescriptionImporter;

// Add 'myServiceDescription' to 'myServiceDescriptionImporter'.
myServiceDescriptionImporter->AddServiceDescription
   ( myServiceDescription, "", "" );

myServiceDescriptionImporter->ProtocolName = "HttpGet";
CodeNamespace^ myCodeNamespace = gcnew CodeNamespace;
CodeCompileUnit^ myCodeCompileUnit = gcnew 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 );
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);
Dim myDisplay As [String]
' Read wsdl file.
Dim myServiceDescription As ServiceDescription = ServiceDescription.Read(myWSDLFileName)

Dim myServiceDescriptionImporter As New ServiceDescriptionImporter()

' Add 'myServiceDescription' to 'myServiceDescriptionImporter'.
myServiceDescriptionImporter.AddServiceDescription(myServiceDescription, "", "")

myServiceDescriptionImporter.ProtocolName = "HttpGet"
Dim myCodeNamespace As New CodeNamespace()
Dim myCodeCompileUnit As New CodeCompileUnit()

' Invoke 'Import' method.
Dim myWarning As ServiceDescriptionImportWarnings = myServiceDescriptionImporter.Import(myCodeNamespace, myCodeCompileUnit)

Select Case myWarning
   Case ServiceDescriptionImportWarnings.NoCodeGenerated
      myDisplay = "NoCodeGenerated"
   Case ServiceDescriptionImportWarnings.NoMethodsGenerated
      myDisplay = "NoMethodsGenerated"
   Case ServiceDescriptionImportWarnings.UnsupportedOperationsIgnored
      myDisplay = "UnsupportedOperationsIgnored"
   Case ServiceDescriptionImportWarnings.OptionalExtensionsIgnored
      myDisplay = "OptionalExtensionsIgnored"
   Case ServiceDescriptionImportWarnings.RequiredExtensionsIgnored
      myDisplay = "RequiredExtensionsIgnored"
   Case ServiceDescriptionImportWarnings.UnsupportedBindingsIgnored
      myDisplay = "UnsupportedBindingsIgnored"
   Case Else
      myDisplay = "General Warning"
End Select
Console.WriteLine("Warning : " + myDisplay)

适用于