/// <summary> /// Starts this EnityPoller. /// </summary> /// <exception cref="System.InvalidOperationException">Already polling</exception> public void Start() { var worker = new AsyncWorker(Poll); var completed = new AsyncCallback(PollComplete); var onCompleted = new AsyncComplete(OnEntity); lock (_sync) { if (_polling) { throw new InvalidOperationException("Already polling"); } var operation = AsyncOperationManager.CreateOperation(onCompleted); worker.BeginInvoke(completed, operation); _polling = true; } }