private static void TableSaveCallBack(TableServiceContext context, IAsyncResult asyncResult) { try { var response = context.EndSaveChanges(asyncResult); } catch (Exception exc) { System.Diagnostics.Debug.WriteLine(exc.ToString()); } }
public static Task <DataServiceResponse> SaveChangesAsync(this TableServiceContext context, SaveChangesOptions options) { var task = new APMTask <DataServiceResponse>( (callback, state) => context.BeginSaveChanges(options, callback, state), (asyncResult) => context.EndSaveChanges(asyncResult)); #if false return(task); #else return(GetUnexpectedInternalClientErrorWrappedTask(Protocol.Constants.TableWorkaroundTimeout, task)); #endif }
private async Task SaveChangesAsync(TableServiceContext context, SaveChangesOptions options) { await this.StorageRetryPolicy.ExecuteAsync(this.CreateTask( async => context.BeginSaveChanges(options, async, null), res => context.EndSaveChanges(res))); }