private void VerifyChangeOnServer(ChangeData change, IAsyncContinuation continuation) { //// For now use different data service context to re-query and verify entities and links. //// In the future consider using an 'Oracle' component to re-query the changes if/when it comes online. using (IWrapperScope scope = new NullWrapperScope()) { WrappedDataServiceContext otherContext = this.DataServiceContextCreator.CreateContext(scope, this.currentContextData.ContextType, this.currentContextData.BaseUri); otherContext.ResolveName = this.currentContextData.ResolveName; otherContext.ResolveType = this.currentContextData.ResolveType; otherContext.IgnoreResourceNotFoundException = true; var uri = change.GetUriForRequery(); otherContext.Execute <WrappedObject>( continuation, this.Asynchronous, change.ClrTypeForRequery, uri, results => { var result = results.ToList(); VerifyChangeOnServer(change, otherContext, result); continuation.Continue(); }); } }
private void VerifyChangeOnServer(ChangeData change, IAsyncContinuation continuation) { //// For now use different data service context to re-query and verify entities and links. //// In the future consider using an 'Oracle' component to re-query the changes if/when it comes online. using (IWrapperScope scope = new NullWrapperScope()) { WrappedDataServiceContext otherContext = this.DataServiceContextCreator.CreateContext(scope, this.currentContextData.ContextType, this.currentContextData.BaseUri); otherContext.ResolveName = this.currentContextData.ResolveName; otherContext.ResolveType = this.currentContextData.ResolveType; otherContext.IgnoreResourceNotFoundException = true; var uri = change.GetUriForRequery(); otherContext.Execute<WrappedObject>( continuation, this.Asynchronous, change.ClrTypeForRequery, uri, results => { var result = results.ToList(); VerifyChangeOnServer(change, otherContext, result); continuation.Continue(); }); } }