public override void Handle(IntentsDataFlowData obj) { foreach (var dimmingCurveOutput in _output) { dimmingCurveOutput.ProcessInputData(obj); } }
public override void Handle(IntentsDataFlowData obj) { foreach (ColorBreakdownOutput output in Outputs) { output.ProcessInputData(obj); } }
public override void Handle(IntentsDataFlowData obj) { if (obj != null) { IEnumerable<ICommand> intentStates = EvaluateIntentStates(obj.Value); _commandResult = CombineCommands(intentStates); } }
public void ProcessInputData(IntentsDataFlowData data) { //Because we are combining at the layer above us, we should really only have one //intent that matches this outputs color setting. //Everything else will have a zero intensity and should be thrown away when it does not match our outputs color. double intensity = 0; if (data.Value?.Count > 0) { foreach (var intentState in data.Value) { var i = _filter.GetIntensityForState(intentState); if (i > 0) { intensity = i; } } } if (intensity > 0) { //Get a ref to the state value which is a struct and update it with the new intensity ref IntensityValue intensityValue = ref _state.GetValueRef(); intensityValue.Intensity = intensity; _data.Value = _state; }
public override void Handle(IntentsDataFlowData obj) { if (obj != null) { IEnumerable <ICommand> intentStates = EvaluateIntentStates(obj.Value); _commandResult = CombineCommands(intentStates); } }
public void ProcessInputData(IntentsDataFlowData data) { //Because we are combining at the layer above us, we should really only have one //intent that matches this outputs color setting. //Everything else will have a zero intensity and should be thrown away when it does not match our outputs color. double intensity = 0; if (data.Value?.Count > 0) { foreach (var intentState in data.Value) { var i = _filter.GetIntensityForState(intentState); intensity = Math.Max(i, intensity); } } Data.Value = CommandLookup8BitEvaluator.CommandLookup[(byte)(intensity * Byte.MaxValue)]; }
public override void Handle(IntentsDataFlowData obj) { IntentChangeCollection intentChanges = null; IIntent[] newState = obj.Value.Select(x => x.Intent).ToArray(); if (_OutputHasStateToCompare) { if (_OutputStateDiffersFrom(newState)) { IEnumerable<IIntent> addedIntents = newState.Except(OutputCurrentState); IEnumerable<IIntent> removedIntents = OutputCurrentState.Except(newState); intentChanges = new IntentChangeCollection(addedIntents, removedIntents); } } else { intentChanges = new IntentChangeCollection(newState, null); } OutputCurrentState = newState.ToArray(); Result = intentChanges; }
public override void Handle(IntentsDataFlowData obj) { //IntentChangeCollection intentChanges = null; //IIntent[] newState = obj.Value.Select(x => x.Intent).ToArray(); //if (_OutputHasStateToCompare) { // if (_OutputStateDiffersFrom(newState)) { // IEnumerable<IIntent> addedIntents = newState.Except(OutputCurrentState); // IEnumerable<IIntent> removedIntents = OutputCurrentState.Except(newState); // intentChanges = new IntentChangeCollection(addedIntents, removedIntents); // } //} //else { // intentChanges = new IntentChangeCollection(newState, null); //} //OutputCurrentState = newState.ToArray(); //Result = intentChanges; }
public override void Handle(IntentsDataFlowData obj) { _output.ProcessInputData(obj); }
public override void Handle(IntentsDataFlowData obj) { foreach(ColorOutput output in Outputs) { output.ProcessInputData(obj); } }
virtual public void Handle(IntentsDataFlowData obj) { }
public virtual void Handle(IntentsDataFlowData obj) { }