XSD ジェネレーターで奇妙な動作が発生しましたが、実際には説明できません。次のような XSD を取得しました。
<xs:complexType name="StageSequenceElement" mixed="false">
<xs:complexContent>
<xs:extension base="CoreObject">
<xs:sequence>
<xs:element name="Description" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Some Doc</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StageRef" type="ObjectReference">
<xs:annotation>
<xs:documentation>...</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MinDuration_100ms" type="xs:int" nillable="true" minOccurs="0">
<xs:annotation>
<xs:documentation>...</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MaxDuration_100ms" type="xs:int" nillable="true">
<xs:annotation>
<xs:documentation>...</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StageOnDemand" type="xs:boolean" nillable="true" minOccurs="0">
<xs:annotation>
<xs:documentation>...</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
CoreObject から派生しています。
<xs:complexType name="CoreObject">
<xs:sequence>
<xs:element name="No" type="xs:int">
<xs:annotation>
<xs:documentation>...</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
これは XSD のほんの一部であり、もっと複雑な型がたくさんあります。
したがって、これに似たクラスを生成すると、さらに 2 つのプロパティを持つ生成されたクラスが得られます (予想される 5 つに加えて)。
public bool MinDuration_100msSpecified
と
public bool StageOnDemandSpecified
そのため、「元の」プロパティに「Specified」が追加され、タイプが bool になりました。なぜそうなのか、誰か説明できますか?