उत्पन्न करते समय कुछ गुणों/फ़ील्ड में "निर्दिष्ट" संलग्न करता है मुझे एक्सएसडी जनरेटर के साथ एक अजीब व्यवहार मिला है जिसे मैं वास्तव में समझा नहीं सकता।एक्सएसडी उपकरण सी # कोड
<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 से प्राप्त होता है: मैं इस तरह एक XSD मिला
<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 का एक छोटा सा हिस्सा है, वहाँ एक बहुत अधिक जटिल प्रकार हैं।
public bool MinDuration_100msSpecified
और
public bool StageOnDemandSpecified
:
तो जब मैं this के समान वर्गों उत्पन्न, मैं एक उत्पन्न वर्ग जो दो और गुण (5 के अलावा जो मैं उम्मीद करेंगे में) है मिल
तो "मूल" संपत्ति "निर्दिष्ट" में जोड़ा गया था और अब प्रकार बूल है। क्या कोई यह समझा सकता है कि ऐसा क्यों है?
धन्यवाद, क्या उस संपत्ति के निर्माण को रोकने के लिए कोई तरीका है? – derape
आप xsd2code टूल्स का प्रयास कर सकते हैं, जो अधिक कार्यों को प्रदान करते हैं। http://xsd2code.codeplex.com/ –
वैसे हम अपने आप से एक कोडेजन के साथ समाप्त हुए जो हमारी जरूरतों को फिट करता है, लेकिन वैसे भी धन्यवाद :-) – derape