我已经注意到,WCF代理生成器不产生指定的属性标志字符串字段
I've noticed that the WCF proxy generator is not generating the "specified" property flags for string fields
例如,当我对在WSDL中指定的复杂类型两个字段:
EG When I have two fields on a complexType specified in the WSDL:
<xs:element name="testStringField" type="xs:string" minOccurs="0" />
<xs:element name="testDecimalField" type="xs:decimal" minOccurs="0" />
代理生成器将在类的复杂类型创建这些属性:
the proxy generator will create these properties on the class for the complexType:
testStringField
testDecimalField
testDecimalFieldSpecified
为什么不*字符串指定属性?我怎样才能得到SvcUtil工具来生成这个?
Why no *Specified property for strings? How can I get svcutil to generate this?
好吧,我是哑巴。这显然是因为串是引用类型,所以没有必要指定是否被包括,因为testStringField可以设置为空,而testDecimalField不能,因此需要一个testDecimalFieldSpecified标志
Ok, I'm being dumb. This is obviously because string is a reference type so there is no need to specify whether is included because the testStringField can be set to null, whereas testDecimalField cannot, hence the need for a testDecimalFieldSpecified flag.
上一篇:数据源名称未找到和指定默认驱动程序数据源、驱动程序、未找到、名称
下一篇:如何获得ListBoxItem中关于&QUOT在ListBox中的项目;结合时间和QUOT;如何获得、时间、项目、QUOT