context: 
  //
  // This file was generated by the BinaryNotes compiler.
  // See http://bnotes.sourceforge.net 
  // Any modifications to this file will be lost upon recompilation of the source ASN.1. 
  //
  
  using System;
  using org.bn.attributes;
  using org.bn.attributes.constraints;
  using org.bn.coders;
  using org.bn.types;
  using org.bn;
  
  namespace MMS_ASN1_Model
  {
  
  
      [ASN1PreparedElement]
      [ASN1Choice(Name = "ControlElement")]
      public class ControlElement : IASN1PreparedElement
      {
  
  
          private BeginDomainDefSequenceType beginDomainDef_;
          private bool beginDomainDef_selected = false;
  
  
  
          [ASN1PreparedElement]
          [ASN1Sequence(Name = "beginDomainDef", IsSet = false)]
          public class BeginDomainDefSequenceType : IASN1PreparedElement
          {
  
              private Identifier domainName_;
  
              [ASN1Element(Name = "domainName", IsOptional = false, HasTag = true, Tag = 1, HasDefaultValue = false)]
  
              public Identifier DomainName
              {
                  get { return domainName_; }
                  set { domainName_ = value; }
              }
  
  
  
              private System.Collections.Generic.ICollection<MMSString> capabilities_;
  
              [ASN1SequenceOf(Name = "capabilities", IsSetOf = false)]
  
  
              [ASN1Element(Name = "capabilities", IsOptional = false, HasTag = true, Tag = 2, HasDefaultValue = false)]
  
              public System.Collections.Generic.ICollection<MMSString> Capabilities
              {
                  get { return capabilities_; }
                  set { capabilities_ = value; }
              }
  
  
  
              private bool sharable_;
              [ASN1Boolean(Name = "")]
  
              [ASN1Element(Name = "sharable", IsOptional = false, HasTag = true, Tag = 3, HasDefaultValue = false)]
  
              public bool Sharable
              {
                  get { return sharable_; }
                  set { sharable_ = value; }
              }
  
  
  
              private LoadData loadData_;
  
              private bool loadData_present = false;
  
              [ASN1Element(Name = "loadData", IsOptional = true, HasTag = true, Tag = 4, HasDefaultValue = false)]
  
              public LoadData LoadData
              {
                  get { return loadData_; }
                  set { loadData_ = value; loadData_present = true; }
              }
  
  
  
              public bool isLoadDataPresent()
              {
                  return this.loadData_present == true;
              }
  
  
              public void initWithDefaults()
              {
  
              }
  
              private static IASN1PreparedElementData preparedData = CoderFactory.getInstance().newPreparedElementData(typeof(BeginDomainDefSequenceType));
              public IASN1PreparedElementData PreparedData
              {
                  get { return preparedData; }
              }
  
  
          }
  
          [ASN1Element(Name = "beginDomainDef", IsOptional = false, HasTag = true, Tag = 0, HasDefaultValue = false)]
  
          public BeginDomainDefSequenceType BeginDomainDef
          {
              get { return beginDomainDef_; }
              set { selectBeginDomainDef(value); }
          }
  
  
  
  
          private ContinueDomainDefSequenceType continueDomainDef_;
          private bool continueDomainDef_selected = false;
  
  
  
          [ASN1PreparedElement]
          [ASN1Sequence(Name = "continueDomainDef", IsSet = false)]
          public class ContinueDomainDefSequenceType : IASN1PreparedElement
          {
  
              private Identifier domainName_;
  
              [ASN1Element(Name = "domainName", IsOptional = false, HasTag = true, Tag = 1, HasDefaultValue = false)]
  
              public Identifier DomainName
              {
                  get { return domainName_; }
                  set { domainName_ = value; }
              }
  
  
  
              private LoadData loadData_;
  
              [ASN1Element(Name = "loadData", IsOptional = false, HasTag = true, Tag = 3, HasDefaultValue = false)]
  
              public LoadData LoadData
              {
                  get { return loadData_; }
                  set { loadData_ = value; }
              }
  
  
  
  
              public void initWithDefaults()
              {
  
              }
  
              private static IASN1PreparedElementData preparedData = CoderFactory.getInstance().newPreparedElementData(typeof(ContinueDomainDefSequenceType));
              public IASN1PreparedElementData PreparedData
              {
                  get { return preparedData; }
              }
  
  
          }
  
          [ASN1Element(Name = "continueDomainDef", IsOptional = false, HasTag = true, Tag = 1, HasDefaultValue = false)]
  
          public ContinueDomainDefSequenceType ContinueDomainDef
          {
              get { return continueDomainDef_; }
              set { selectContinueDomainDef(value); }
          }
  
  
  
  
          private Identifier endDomainDef_;
          private bool endDomainDef_selected = false;
  
  
  
          [ASN1Element(Name = "endDomainDef", IsOptional = false, HasTag = true, Tag = 2, HasDefaultValue = false)]
  
          public Identifier EndDomainDef
          {
              get { return endDomainDef_; }
              set { selectEndDomainDef(value); }
          }
  
  
  
  
          private PiDefinitionSequenceType piDefinition_;
          private bool piDefinition_selected = false;
  
  
  
          [ASN1PreparedElement]
          [ASN1Sequence(Name = "piDefinition", IsSet = false)]
          public class PiDefinitionSequenceType : IASN1PreparedElement
          {
  
              private Identifier piName_;
  
              [ASN1Element(Name = "piName", IsOptional = false, HasTag = true, Tag = 0, HasDefaultValue = false)]
  
              public Identifier PiName
              {
                  get { return piName_; }
                  set { piName_ = value; }
              }
  
  
  
              private System.Collections.Generic.ICollection<Identifier> listOfDomains_;
  
              [ASN1SequenceOf(Name = "listOfDomains", IsSetOf = false)]
  
  
              [ASN1Element(Name = "listOfDomains", IsOptional = false, HasTag = true, Tag = 1, HasDefaultValue = false)]
  
              public System.Collections.Generic.ICollection<Identifier> ListOfDomains
              {
                  get { return listOfDomains_; }
                  set { listOfDomains_ = value; }
              }
  
  
  
              private bool reusable_;
              [ASN1Boolean(Name = "")]
  
              [ASN1Element(Name = "reusable", IsOptional = false, HasTag = true, Tag = 2, HasDefaultValue = true)]
  
              public bool Reusable
              {
                  get { return reusable_; }
                  set { reusable_ = value; }
              }
  
  
  
              private bool monitorType_;
  
              private bool monitorType_present = false;
              [ASN1Boolean(Name = "")]
  
              [ASN1Element(Name = "monitorType", IsOptional = true, HasTag = true, Tag = 3, HasDefaultValue = false)]
  
              public bool MonitorType
              {
                  get { return monitorType_; }
                  set { monitorType_ = value; monitorType_present = true; }
              }
  
  
  
              private ProgramInvocationState pIState_;
  
              private bool pIState_present = false;
  
              [ASN1Element(Name = "pIState", IsOptional = true, HasTag = true, Tag = 4, HasDefaultValue = false)]
  
              public ProgramInvocationState PIState
              {
                  get { return pIState_; }
                  set { pIState_ = value; pIState_present = true; }
              }
  
  
  
              public bool isMonitorTypePresent()
              {
                  return this.monitorType_present == true;
              }
  
              public bool isPIStatePresent()
              {
                  return this.pIState_present == true;
              }
  
  
              public void initWithDefaults()
              {
                  bool param_Reusable =
          false;
                  Reusable = param_Reusable;
  
              }
  
              private static IASN1PreparedElementData preparedData = CoderFactory.getInstance().newPreparedElementData(typeof(PiDefinitionSequenceType));
              public IASN1PreparedElementData PreparedData
              {
  
gt:                 get { return preparedData; }