English 中文(简体)
不动产作为不动产
原标题:Domain Property as Element and Hiding Default Value Properties
  • 时间:2009-09-02 13:42:36
  •  标签:

我有两个问题:

  1. How do I achieve the following, I have a domain class called Property - Property has two properties Type and Value it is currently being serialized as the following:
<Property Type="TestType"><Value>TestValue<Value><Property>

我需要这样作。

<Property Type="TestType">TestValue</Property>

但我并不肯定如何? 我已经设定了代表一个要素的价值,这确实解释了为什么它能够让自己tag,但我不想要他们。

  1. I have another class - Parameter - it has a property of IsCollection ( a bool ) , I would like the IsCollection attribute to be serialized only when it is set to true, is this possible?

i.e

<Parameter Name="Foo" IsCollection="true" />

其他

<Parameter Name="Foo" />

1 P-4, 1 P-3, 1 P-2

最佳回答

我不敢肯定,这是否会奏效,但是,在荷兰航天中心探索者中,你会发现哪类航天员,你可以把它当作习俗。 如果你改变并编辑你,就会出现一些错误,表明你需要提供自己的客户序列。 我认为,你可以在那里做这些定制工作,尽管可能比你所期望的工作更多。

问题回答

暂无回答




相关问题
热门标签