ServiceContractGenerationOptions 枚举

定义

表示使用 ServiceContractGenerator 时可用的协定生成选项。Represents the contract generation options available using the ServiceContractGenerator.

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

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

字段

AsynchronousMethods 1

除了同步版本外,为操作生成异步方法。Generates asynchronous methods for operations in addition to synchronous versions.

ChannelInterface 2

生成可从协定接口和 IClientChannel 派生的接口。Generates an interface that derives from the contract interface and IClientChannel.

ClientClass 8

生成扩展 ClientBase<TChannel> 的 Windows Communication Foundation (WCF) 客户端类。Generates a Windows Communication Foundation (WCF) client class that extends ClientBase<TChannel>.

EventBasedAsynchronousMethods 32

除了同步版本外,还为操作生成基于事件的异步方法。Generates event-based asynchronous methods for operations in addition to synchronous versions.

InternalTypes 4

导致所有类型标记为内部类型标记。Causes all types to be marked internal.

None 0

没有指定选项。No options specified.

TaskBasedAsynchronousMethod 64

除了同步版本外,还为操作生成基于任务的异步方法。Generates task based asynchronous methods for operations in addition to synchronous versions.

TypedMessages 16

生成消息协定。Generate message contracts.

注解

使用具有 ServiceContractGenerationOptions 属性的 ServiceContractGenerator.Options 枚举可以对生成的协定代码进行控制。Use the ServiceContractGenerationOptions enumeration with the ServiceContractGenerator.Options property to control the generated contract code.

适用于