Beispiel #1
0
        private IDataPolicy _CreateDataPolicy(CommandOutput output)
        {
            IDataPolicy dataPolicy = _dataPolicyFactory.CreateDataPolicy();

            _AddDataPolicy(output, dataPolicy);
            return(dataPolicy);
        }
Beispiel #2
0
 private IDataPolicy _GetDataPolicy(CommandOutput output)
 {
     lock (_outputDataPolicies) {
         IDataPolicy dataPolicy;
         _outputDataPolicies.TryGetValue(output.Id, out dataPolicy);
         return dataPolicy;
     }
 }
Beispiel #3
0
        public void AddOutput(CommandOutput output)
        {
            _outputMediator.AddOutput(output);
            IDataFlowComponent component = _adapterFactory.GetAdapter(output);

            VixenSystem.DataFlow.AddComponent(component);
            VixenSystem.OutputControllers.AddControllerOutputForDataFlowComponent(component, this, output.Index);
        }
Beispiel #4
0
 private IDataPolicy _GetDataPolicy(CommandOutput output)
 {
     lock (_outputDataPolicies) {
         IDataPolicy dataPolicy;
         _outputDataPolicies.TryGetValue(output.Id, out dataPolicy);
         return(dataPolicy);
     }
 }
Beispiel #5
0
 /// <summary>
 /// Append a command to the list of commands for a given output controller.
 /// </summary>
 public void AddCommand(CommandOutput commandOutput)
 {
     if (!_outputStateList.ContainsKey(commandOutput.Id))
     {
         _AddOutput(commandOutput);
     }
     _outputStateList[commandOutput.Id] = commandOutput.Command;
 }
Beispiel #6
0
 private ICommand GenerateOutputCommand(CommandOutput output)
 {
     if (output.State != null)
     {
         return(_dataPolicy.GenerateCommand(output.State));
     }
     return(null);
 }
Beispiel #7
0
        public void RemoveOutput(CommandOutput output)
        {
            _outputMediator.RemoveOutput(output);
            IDataFlowComponent component = _adapterFactory.GetAdapter(output);

            VixenSystem.DataFlow.RemoveComponent(component);
            VixenSystem.OutputControllers.RemoveControllerOutputForDataFlowComponent(component);
        }
Beispiel #8
0
 private ICommand _GenerateOutputCommand(CommandOutput output)
 {
     if (output.State != null)
     {
         IDataPolicy effectiveDataPolicy = _dataPolicyProvider.GetDataPolicyForOutput(output);
         return(effectiveDataPolicy.GenerateCommand(output.State));
     }
     return(null);
 }
 public IDataFlowComponent GetAdapter(CommandOutput output)
 {
     CommandOutputDataFlowAdapter adapter;
     if (!_instances.TryGetValue(output.Id, out adapter)) {
         adapter = new CommandOutputDataFlowAdapter(output);
         _instances[output.Id] = adapter;
     }
     return adapter;
 }
        private ICommand _GenerateOutputCommand(CommandOutput output)
        {
            if (output.State != null)
            {
                var lst = output.State.Value as List <IIntentState>;

                IDataPolicy effectiveDataPolicy = _dataPolicyProvider.GetDataPolicyForOutput(output);
                return(effectiveDataPolicy.GenerateCommand(output.State));
            }
            return(null);
        }
Beispiel #11
0
 private ICommand _GenerateOutputCommand(CommandOutput output)
 {
     if (output.State != null)
     {
         IDataPolicy effectiveDataPolicy = _dataPolicyProvider.GetDataPolicyForOutput(output);
         ICommand    command             = effectiveDataPolicy.GenerateCommand(output.State);
         if (command != null)
         {
             List <ICommand> commands = new List <ICommand>();
             commands.Add(command);
             CommandsDataFlowData data = new CommandsDataFlowData(commands);
             command = effectiveDataPolicy.GenerateCommand(data);
         }
         return(command);
     }
     return(null);
 }
 public void SetOutput(CommandOutput output, int outputIndex)
 {
     _output = output;
     _outputIndex = outputIndex;
     _recalcControlPoints();
 }
 public override void CopyFrom(Shape source)
 {
     base.CopyFrom(source);
     if (source is OutputShape) {
         OutputShape src = (OutputShape) source;
         _controller = src.Controller;
         _output = src.Output;
         _CopyControlPointsFrom(src);
     }
 }
Beispiel #14
0
 private IDataPolicy _CreateDataPolicy(CommandOutput output)
 {
     IDataPolicy dataPolicy = _dataPolicyFactory.CreateDataPolicy();
     _AddDataPolicy(output, dataPolicy);
     return dataPolicy;
 }
Beispiel #15
0
 private void _AddDataPolicy(CommandOutput output, IDataPolicy dataPolicy)
 {
     lock (_outputDataPolicies) {
         _outputDataPolicies[output.Id] = dataPolicy;
     }
 }
Beispiel #16
0
 public IDataPolicy GetDataPolicyForOutput(CommandOutput output)
 {
     return _GetDataPolicy(output) ?? _CreateDataPolicy(output);
 }
 private void _AddOutput(CommandOutput commandOutput)
 {
     _outputStateList.Add(commandOutput.Id,new List<ICommand>());
 }
Beispiel #18
0
 private void _AddDataPolicy(CommandOutput output, IDataPolicy dataPolicy)
 {
     lock (_outputDataPolicies) {
         _outputDataPolicies[output.Id] = dataPolicy;
     }
 }
 public CommandOutputDataFlowAdapter(CommandOutput output)
 {
     _output = output;
     Name = (_output.Index + 1).ToString();
 }
Beispiel #20
0
 public void RemoveOutput(CommandOutput output)
 {
     _outputMediator.RemoveOutput(output);
     VixenSystem.DataFlow.RemoveComponent(_adapterFactory.GetAdapter(output));
 }
Beispiel #21
0
 private void _AddOutput(CommandOutput commandOutput)
 {
     _outputStateList.Add(commandOutput.Id, commandOutput.Command);
 }
 public void SetOutput(CommandOutput output)
 {
     _output = output;
     _recalcControlPoints();
 }
Beispiel #23
0
 public IDataFlowComponent GetDataFlowComponentForOutput(CommandOutput output)
 {
     return(_adapterFactory.GetAdapter(output));
 }
Beispiel #24
0
 public IDataPolicy GetDataPolicyForOutput(CommandOutput output)
 {
     return(_GetDataPolicy(output) ?? _CreateDataPolicy(output));
 }