public KeyValuePair <TickTime, string>[] GetNextData(DataType type, TickTime init) { ThreadedDictionary <TickTime, string> data = new ThreadedDictionary <TickTime, string>(); if ((type & DataType.Input) > 0) { data.AddRange(InputData.ToDictionary()); } if ((type & DataType.Error) > 0) { data.AddRange(ErrorData.ToDictionary()); } if ((type & DataType.Output) > 0) { data.AddRange(OutputData.ToDictionary()); } return(data?.Where(x => x.Key > init)?.Select(x => { return new KeyValuePair <TickTime, string>(x.Key.Copy(), x.Value); })?.ToArray() ?? new KeyValuePair <TickTime, string> [0]); }