示例#1
0
 public override void InitializeComponent(ICore core)
 {
     this.Core         = core;
     this.Output       = core.Components.Output as IBassOutput;
     this.Output.Init += this.OnInit;
     this.Output.Free += this.OnFree;
     this.DoorMonitor  = ComponentRegistry.Instance.GetComponent <CdDoorMonitor>();
     this.DoorMonitor.StateChanged += this.OnStateChanged;
     this.Configuration             = core.Components.Configuration;
     this.Configuration.GetElement <SelectionConfigurationElement>(
         BassCdStreamProviderBehaviourConfiguration.SECTION,
         BassCdStreamProviderBehaviourConfiguration.DRIVE_ELEMENT
         ).ConnectValue(value => this.CdDrive = BassCdStreamProviderBehaviourConfiguration.GetDrive(value));
     this.Configuration.GetElement <BooleanConfigurationElement>(
         BassCdStreamProviderBehaviourConfiguration.SECTION,
         BassCdStreamProviderBehaviourConfiguration.LOOKUP_ELEMENT
         ).ConnectValue(value => this.CdLookup = value);
     this.Configuration.GetElement <TextConfigurationElement>(
         BassCdStreamProviderBehaviourConfiguration.SECTION,
         BassCdStreamProviderBehaviourConfiguration.LOOKUP_HOST_ELEMENT
         ).ConnectValue(value => this.CdLookupHost = value);
     base.InitializeComponent(core);
 }
示例#2
0
 public IEnumerable <ConfigurationSection> GetConfigurationSections()
 {
     return(BassCdStreamProviderBehaviourConfiguration.GetConfigurationSections());
 }