Exemplo n.º 1
0
        private IDataPolicy _CreateDataPolicy(CommandOutput output)
        {
            IDataPolicy dataPolicy = _dataPolicyFactory.CreateDataPolicy();

            _AddDataPolicy(output, dataPolicy);
            return(dataPolicy);
        }
Exemplo n.º 2
0
 private IDataPolicy _GetDataPolicy(CommandOutput output)
 {
     lock (_outputDataPolicies) {
         IDataPolicy dataPolicy;
         _outputDataPolicies.TryGetValue(output.Id, out dataPolicy);
         return dataPolicy;
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 private IDataPolicy _GetDataPolicy(CommandOutput output)
 {
     lock (_outputDataPolicies) {
         IDataPolicy dataPolicy;
         _outputDataPolicies.TryGetValue(output.Id, out dataPolicy);
         return(dataPolicy);
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 6
0
 private ICommand GenerateOutputCommand(CommandOutput output)
 {
     if (output.State != null)
     {
         return(_dataPolicy.GenerateCommand(output.State));
     }
     return(null);
 }
Exemplo n.º 7
0
        public void RemoveOutput(CommandOutput output)
        {
            _outputMediator.RemoveOutput(output);
            IDataFlowComponent component = _adapterFactory.GetAdapter(output);

            VixenSystem.DataFlow.RemoveComponent(component);
            VixenSystem.OutputControllers.RemoveControllerOutputForDataFlowComponent(component);
        }
Exemplo n.º 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;
 }
Exemplo n.º 10
0
        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);
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 14
0
 private IDataPolicy _CreateDataPolicy(CommandOutput output)
 {
     IDataPolicy dataPolicy = _dataPolicyFactory.CreateDataPolicy();
     _AddDataPolicy(output, dataPolicy);
     return dataPolicy;
 }
Exemplo n.º 15
0
 private void _AddDataPolicy(CommandOutput output, IDataPolicy dataPolicy)
 {
     lock (_outputDataPolicies) {
         _outputDataPolicies[output.Id] = dataPolicy;
     }
 }
Exemplo n.º 16
0
 public IDataPolicy GetDataPolicyForOutput(CommandOutput output)
 {
     return _GetDataPolicy(output) ?? _CreateDataPolicy(output);
 }
Exemplo n.º 17
0
 private void _AddOutput(CommandOutput commandOutput)
 {
     _outputStateList.Add(commandOutput.Id,new List<ICommand>());
 }
Exemplo n.º 18
0
 private void _AddDataPolicy(CommandOutput output, IDataPolicy dataPolicy)
 {
     lock (_outputDataPolicies) {
         _outputDataPolicies[output.Id] = dataPolicy;
     }
 }
Exemplo n.º 19
0
 public CommandOutputDataFlowAdapter(CommandOutput output)
 {
     _output = output;
     Name = (_output.Index + 1).ToString();
 }
Exemplo n.º 20
0
 public void RemoveOutput(CommandOutput output)
 {
     _outputMediator.RemoveOutput(output);
     VixenSystem.DataFlow.RemoveComponent(_adapterFactory.GetAdapter(output));
 }
Exemplo n.º 21
0
 private void _AddOutput(CommandOutput commandOutput)
 {
     _outputStateList.Add(commandOutput.Id, commandOutput.Command);
 }
 public void SetOutput(CommandOutput output)
 {
     _output = output;
     _recalcControlPoints();
 }
Exemplo n.º 23
0
 public IDataFlowComponent GetDataFlowComponentForOutput(CommandOutput output)
 {
     return(_adapterFactory.GetAdapter(output));
 }
Exemplo n.º 24
0
 public IDataPolicy GetDataPolicyForOutput(CommandOutput output)
 {
     return(_GetDataPolicy(output) ?? _CreateDataPolicy(output));
 }