public void SendTimeSeriesChanges(TimeSeriesChange change) { if (IsDisposed) { return; } if (_watchAllTimeSeries > 0) { Send(change); return; } if (change.Name != null && _matchingTimeSeries.Contains(change.Name)) { Send(change); return; } if (change.DocumentId != null && _matchingAllDocumentTimeSeries.Contains(change.DocumentId)) { Send(change); return; } if (change.DocumentId != null && change.Name != null && _matchingDocumentTimeSeries.Count > 0) { var parameters = new DocumentIdAndNamePair(change.DocumentId, change.Name); if (_matchingDocumentTimeSeries.Contains(parameters)) { Send(change); return; } } }
public void SendCounterChanges(CounterChange change) { if (IsDisposed) { return; } if (_watchAllCounters > 0) { Send(change); return; } if (change.Name != null && _matchingCounters.Contains(change.Name)) { Send(change); return; } if (change.DocumentId != null && _matchingDocumentCounters.Contains(change.DocumentId)) { Send(change); return; } if (change.DocumentId != null && change.Name != null && _matchingDocumentCounter.Count > 0) { var parameters = new DocumentIdAndNamePair(change.DocumentId, change.Name); if (_matchingDocumentCounter.Contains(parameters)) { Send(change); return; } } }
private bool Equals(DocumentIdAndNamePair other) { return(string.Equals(DocumentId, other.DocumentId, StringComparison.OrdinalIgnoreCase) && string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase)); }