문제

In Micro Focus managed Cobol, how can we set value of a method attribute? Viz. In C# we do

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

So in Cobol we declare the method as

method-id MethodName public 
     attribute OperationContractAttribute
     attribute WebGetAttribute.

But how do we set ResponseFormat = WebMessageFormat.Json ?

도움이 되었습니까?

해결책

Similar (but not identical) to C#. The biggest difference is that the keyword 'property' has to be used before the property name.

method-id MethodName public 
    attribute OperationContractAttribute
    attribute WebGetAttribute(property ResponseFormat = type WebMessageFormat::Json).
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top