Exemplo n.º 1
0
 public IOutputDevice CreateDevice(Guid deviceId, Guid moduleId, Guid moduleInstanceId, string name)
 {
     IHasOutputs<IntentOutput> outputs = new OutputCollection<IntentOutput>();
     IModuleDataRetriever dataRetriever = new ModuleInstanceDataRetriever(VixenSystem.ModuleStore.InstanceData);
     IOutputModuleConsumer<ISmartControllerModuleInstance> outputModuleConsumer =
         new OutputModuleConsumer<ISmartControllerModuleInstance>(moduleId, moduleInstanceId, dataRetriever);
     IOutputMediator<IntentOutput> outputMediator = new OutputMediator<IntentOutput>(outputs, outputModuleConsumer.Module);
     IHardware executionControl = new BasicOutputModuleExecutionControl(outputModuleConsumer.Module);
     return new SmartOutputController(deviceId, name, outputMediator, executionControl, outputModuleConsumer);
 }
Exemplo n.º 2
0
 public IOutputDevice CreateDevice(Guid moduleId, Guid moduleInstanceId, string name)
 {
     IModuleDataRetriever dataRetriever = new ModuleInstanceDataRetriever(VixenSystem.ModuleStore.InstanceData);
     IOutputModuleConsumer<IPreviewModuleInstance> outputModuleConsumer =
         new OutputModuleConsumer<IPreviewModuleInstance>(moduleId, moduleInstanceId, dataRetriever);
     IHardware executionControl = new BasicOutputModuleExecutionControl(outputModuleConsumer.Module);
     // Yes, we are intentionally using the module instance id as the device id.
     // Previews are not referenced by id at runtime in the way that controllers are referenced for linking.
     // We foresee no conflicts in doing this.
     return new OutputPreview(moduleInstanceId, name, executionControl, outputModuleConsumer);
 }