ServiceDescriptionImportWarnings Enum

Definition

Specifies the type of warnings produced by Import(CodeNamespace, CodeCompileUnit).

This enumeration supports a bitwise combination of its member values.

C#
public enum ServiceDescriptionImportWarnings
C#
[System.Flags]
public enum ServiceDescriptionImportWarnings
Inheritance
ServiceDescriptionImportWarnings
Attributes

Fields

Name Value Description
NoCodeGenerated 1

Specifies that no proxy class was generated by the Import(CodeNamespace, CodeCompileUnit) method.

OptionalExtensionsIgnored 2

Specifies that at least one optional ServiceDescriptionFormatExtension for the ServiceDescription to be imported has been ignored.

RequiredExtensionsIgnored 4

Specifies that at least one required ServiceDescriptionFormatExtension for the ServiceDescription to be imported has been ignored.

UnsupportedOperationsIgnored 8

Specifies that at least one Operation for the ServiceDescription to be imported is of an unsupported type and has been ignored.

UnsupportedBindingsIgnored 16

Specifies that at least one Binding for the ServiceDescription to be imported is of an unsupported type and has been ignored.

NoMethodsGenerated 32

Specifies that the proxy class generated by the Import(CodeNamespace, CodeCompileUnit) method includes no methods.

SchemaValidation 64

Specifies that the ServiceDescription schema is invalid.

WsiConformance 128

Specifies that the ServiceDescription to be imported does not conform to the WS-I Basic Profile.

Examples

C#
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);

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1