ServiceDescriptionImportWarnings 列舉

定義

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

此列舉具有 FlagsAttribute 個屬性允許以位元方式合併其成員值。

public enum class ServiceDescriptionImportWarnings
public enum ServiceDescriptionImportWarnings
[System.Flags]
public enum ServiceDescriptionImportWarnings
type ServiceDescriptionImportWarnings = 
Public Enum ServiceDescriptionImportWarnings
繼承
ServiceDescriptionImportWarnings
屬性

欄位

NoCodeGenerated 1

指定不會由 Import(CodeNamespace, CodeCompileUnit) 方法產生 Proxy 類別。Specifies that no proxy class was generated by the Import(CodeNamespace, CodeCompileUnit) method.

NoMethodsGenerated 32

指定由 Import(CodeNamespace, CodeCompileUnit) 方法產生的 Proxy 類別不包含方法。Specifies that the proxy class generated by the Import(CodeNamespace, CodeCompileUnit) method includes no methods.

OptionalExtensionsIgnored 2

指定至少一個要由 ServiceDescriptionFormatExtension 匯入的選擇性 (Optional) ServiceDescription 已經被忽略。Specifies that at least one optional ServiceDescriptionFormatExtension for the ServiceDescription to be imported has been ignored.

RequiredExtensionsIgnored 4

指定至少一個要由 ServiceDescriptionFormatExtension 匯入的必要 ServiceDescription 已經被忽略。Specifies that at least one required ServiceDescriptionFormatExtension for the ServiceDescription to be imported has been ignored.

SchemaValidation 64

指定 ServiceDescription 結構描述無效。Specifies that the ServiceDescription schema is invalid.

UnsupportedBindingsIgnored 16

指定至少一個要匯入的 BindingServiceDescription 屬於未支援的型別,並且已經被忽略。Specifies that at least one Binding for the ServiceDescription to be imported is of an unsupported type and has been ignored.

UnsupportedOperationsIgnored 8

指定至少一個要匯入的 OperationServiceDescription 屬於未支援的型別,並且已經被忽略。Specifies that at least one Operation for the ServiceDescription to be imported is of an unsupported type and has been ignored.

WsiConformance 128

指定要匯出的 ServiceDescription 不符合 WS-I Basic Profile。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)

適用於