Bagikan melalui


ServiceDescriptionImportWarnings Enum

Definisi

Menentukan jenis peringatan yang dihasilkan oleh Import(CodeNamespace, CodeCompileUnit).

Enumerasi ini mendukung kombinasi bitwise dari nilai yang termasuk di dalamnya.

public enum class ServiceDescriptionImportWarnings
public enum ServiceDescriptionImportWarnings
[System.Flags]
public enum ServiceDescriptionImportWarnings
type ServiceDescriptionImportWarnings = 
[<System.Flags>]
type ServiceDescriptionImportWarnings = 
Public Enum ServiceDescriptionImportWarnings
Warisan
ServiceDescriptionImportWarnings
Atribut

Bidang

NoCodeGenerated 1

Menentukan bahwa tidak ada kelas proksi yang dihasilkan oleh Import(CodeNamespace, CodeCompileUnit) metode .

NoMethodsGenerated 32

Menentukan bahwa kelas proksi yang dihasilkan oleh Import(CodeNamespace, CodeCompileUnit) metode tidak menyertakan metode.

OptionalExtensionsIgnored 2

Menentukan bahwa setidaknya satu opsional ServiceDescriptionFormatExtension untuk ServiceDescription diimpor telah diabaikan.

RequiredExtensionsIgnored 4

Menentukan bahwa setidaknya satu yang diperlukan ServiceDescriptionFormatExtension untuk ServiceDescription diimpor telah diabaikan.

SchemaValidation 64

Menentukan bahwa ServiceDescription skema tidak valid.

UnsupportedBindingsIgnored 16

Menentukan bahwa setidaknya satu Binding untuk yang ServiceDescription akan diimpor adalah dari jenis yang tidak didukung dan telah diabaikan.

UnsupportedOperationsIgnored 8

Menentukan bahwa setidaknya satu Operation untuk yang ServiceDescription akan diimpor adalah dari jenis yang tidak didukung dan telah diabaikan.

WsiConformance 128

Menentukan bahwa yang ServiceDescription akan diimpor tidak sesuai dengan Profil Dasar WS-I.

Contoh

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)

Berlaku untuk