Web引用代理是字段指定的(Web reference proxy is field specified)

编程入门 行业动态 更新时间:2024-10-28 00:29:51
Web引用代理是字段指定的(Web reference proxy is field specified)

我有一个WCF服务。 在我的移动应用程序中,我生成了一个Web引用。

我注意到,对于某些字段,它还会生成myFieldSpecified bool。 例如,我有一个包含int数量的类Quantity。 在移动端,它还生成一个bool quantitySpecified

这个指定领域的目的是什么?

I have a WCF service. And in my mobile application I generated a Web References.

I notice that for some fields it also generates a myFieldSpecified bool. For example, i have a class Quantity that contains an int quantity. on the mobile side it also generates a bool quantitySpecified.

What is the purpose of this specified field?

最满意答案

如果数量字段未在服务上标记为必需,则会发生这种情况。 服务描述比使用该字段为可空和web引用将可空类型划分为非可空和bool,即如果指定了字段则说明。

This happens if quantity field is not marked as required on the service. Service description than uses this field as nullable and web reference divide the nullable type into non nullable and bool which is saying if field was specified.

更多推荐

本文发布于:2023-07-05 15:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1039171.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段   Web   reference   field   proxy

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!