设置Cobol方法属性属性

时间:2013-10-21 16:10:59

标签: attributes cobol microfocus

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

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

所以在Cobol中我们将方法声明为

method-id MethodName public 
     attribute OperationContractAttribute
     attribute WebGetAttribute.

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

1 个答案:

答案 0 :(得分:3)

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

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