Click here to Skip to main content
15,884,986 members
Articles / Programming Languages / C#

Human-readable Enumeration Meta-data

Rate me:
Please Sign up or sign in to vote.
5.00/5 (44 votes)
8 Mar 2017CPOL16 min read 102.6K   574   80  
Display names and descriptions for enumeration members: a non-intrusive, reliable, localizeable method.
<?xml version="1.0" encoding="utf-8"?>
<root>
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="ConfigurationFile" xml:space="preserve">
    <value>Configuration file; if this file is specified and exists, all other command line options are ignored</value>
  </data>
  <data name="CreateOutputDirectory" xml:space="preserve">
    <value>If this flag is set and Output Directory does not exist, it is created; no error message is generated</value>
  </data>
  <data name="ForceOutputFormat" xml:space="preserve">
    <value>This option defines format of the output file; used to specify output format other than default</value>
  </data>
  <data name="InputDirectory" xml:space="preserve">
    <value>Directory where input files are found; used to specify directory other than current working directory</value>
  </data>
  <data name="InputFileMask" xml:space="preserve">
    <value>Input file mask (with wildcards) used to filter input files by their names; default: *</value>
  </data>
  <data name="LogFile" xml:space="preserve">
    <value>File used to redirect all test messages</value>
  </data>
  <data name="OutputDirectory" xml:space="preserve">
    <value>Directory used to create output files</value>
  </data>
  <data name="Quite" xml:space="preserve">
    <value>Verbosity option: if specified, no text messages are generated</value>
  </data>
  <data name="Recursive" xml:space="preserve">
    <value>If this option is specified, input files are searched in InputDirectory and all nested directories, recursively</value>
  </data>
</root>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Physics, physical and quantum optics, mathematics, computer science, control systems for manufacturing, diagnostics, testing, and research, theory of music, musical instruments… Contact me: https://www.SAKryukov.org

Comments and Discussions