开发者

Does anybody actually use FaultReasonText to localize faults from WCF services?

开发者 https://www.devze.com 2022-12-23 21:33 出处:网络
There is a localization mechanism in WCF that enables one to localize faults returned to client, via a FaultReasonText object that\'s a part of the fault.

There is a localization mechanism in WCF that enables one to localize faults returned to client, via a FaultReasonText object that's a part of the fault.

The way this is done is that you pass all possible translations of the fault's message inside a collection in the FaultReasonText. This, I understand, is based on SOAP v1.2.

Does anyone actually use this mechanism? Isn't this wasteful in terms of bandwidth? Why would you send all possible translations to a clien开发者_Go百科t that is (probably) only interested in a specific language?


FaultReason Class allows to store multiple translations if it's needed, e.g to cache possible fault descriptions in different languages.

However normally constructor FaultReason(FaultReasonText) will be used to Initialize a new instance of the FaultReason class using the specified text element that describes the fault in a specific language.

0

精彩评论

暂无评论...
验证码 换一张
取 消