Created
November 29, 2016 12:49
-
-
Save ElemarJR/f31c55c0b77bf9c757ae2807b0e27261 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_subscription = DocumentStoreHolder.Store | |
.Changes() | |
.ForDocument(CategoryIdTextbox.Text) | |
.Where(change => | |
{ | |
if (!_justSaved) return true; | |
_justSaved = false; | |
var localEtag = _session.Advanced.GetEtagFor(_category); | |
var numberOfServerChanges = change.Etag.Changes - localEtag.Changes; | |
return numberOfServerChanges > 1; | |
}) | |
.Subscribe(DocumentChangedOnServer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment