c# - How to generate XSD from Class with restrictions -


is there way how decorate property of datacontract object, generated xsd contain maxlenght restriction?

e.g. can imagine need this:

[xmlelement(maxlengthattribute = "12")] public string name; 

and should included in output xsd.exe:

<xs:element name="name">   <xs:simpletype>     <xs:restriction base="xs:string">       <xs:maxlength value = "12"/>     </xs:restriction>   </xs:simpletype> </xs:element> 

is there way it? define restrictions in c# class in such way, xsd.exe tool generate restrictions xsd file?


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -