public override Maybe <string> Validate() { var result = base.Validate(); if (result) { if (Streams.Any(s => !s.SampleRate.Equals(SampleRate))) { return(Maybe <string> .No("All streams must have the same sample rate as controller.")); } if (SampleRate == null) { return(Maybe <string> .No("Sample rate required.")); } if (SampleRate.BaseUnit.ToLower() != "hz") { return(Maybe <string> .No("Sample rate must be in Hz.")); } if (SampleRate.QuantityInBaseUnit <= 0) { return(Maybe <string> .No("Sample rate must be greater than 0")); } } return(result); }
public bool HasOutstandingWork() { return(_operations.Any() || Streams.Any() || _eventOperations.Any()); }