2013-10-21 210 views
1

在Micro Focus管理的Cobol中,我们如何设置方法属性的值? 即在C#中我们做设置Cobol方法属性属性

[OperationContract] 
[WebGet(ResponseFormat = WebMessageFormat.Json)] 
public override string[] Method 

所以用Cobol我们声明的方法

method-id MethodName public 
    attribute OperationContractAttribute 
    attribute WebGetAttribute. 

但是,我们如何设置ResponseFormat = WebMessageFormat.Json?

回答

3

与C#类似(但不完全相同)。最大的区别是必须在属性名称前使用关键字“属性”。

method-id MethodName public 
    attribute OperationContractAttribute 
    attribute WebGetAttribute(property ResponseFormat = type WebMessageFormat::Json).