private void OnPositionChanged(PositionEventArgs e) { var changed = this.PositionChanged; if (changed != null) { changed(this, e); } }
private void OnPositionChanged(PositionEventArgs e) { var handler = this.PositionChanged; if (handler != null) { handler(this, e); } }
private void OnListenerPositionChanged(object sender, PositionEventArgs e) { if (!this.IsListening) // ignore anything that might come in afterwards { return; } lock (this.positionSync) { this.lastPosition = e.Position; this.RaisePositionChangedEvent(e.Position); } }