CHOICE Value Specification

A CHOICE value specification causes a readonly static instance of the C# class generated for the CHOICE to be generated.

ASN.1 production:

   <name> <ChoiceType> ::= elemname : <elemvalue>

Generated C# constants:

   public static readonly <ChoiceType> <name> =
      new <ChoiceType> (<ElemCode>,
                        new <ElemType> (<elemvalue>));

For example, consider the following declaration:

   ChoiceType ::= CHOICE { oid OBJECT IDENTIFIER, id INTEGER }

   value ChoiceType ::= id: 1

This would result in the following C# constant being generated:

   public static readonly ChoiceType value =
      new ChoiceType (ChoiceType._ID, new Asn1Integer(1));