/// <summary> /// Intercept the provider action when a scope is saved /// </summary> public static void OnScopeSaved(this BaseOrchestrator orchestrator, Func <ScopeSavedArgs, Task> action) => orchestrator.SetInterceptor(action);
/// <summary> /// Intercept the provider action when a scope is saving /// </summary> public static void OnScopeSaving(this BaseOrchestrator orchestrator, Action <ScopeSavingArgs> action) => orchestrator.SetInterceptor(action);
/// <summary> /// Intercept the provider action when a scope table is dropped /// </summary> public static void OnScopeTableDropped(this BaseOrchestrator orchestrator, Action <ScopeTableDroppedArgs> action) => orchestrator.SetInterceptor(action);
/// <summary> /// Intercept the provider action when a scope table is dropping /// </summary> public static void OnScopeTableDropping(this BaseOrchestrator orchestrator, Func <ScopeTableDroppingArgs, Task> action) => orchestrator.SetInterceptor(action);
/// <summary> /// Add changes to batch info. /// </summary> public async Task AddChangesAsync(SyncSet changes, int batchIndex = 0, bool isLastBatch = true, BaseOrchestrator orchestrator = null) { if (this.InMemory) { this.InMemoryData = changes; } else { var bpId = this.GenerateNewFileName(batchIndex.ToString()); //var fileName = Path.Combine(this.GetDirectoryFullPath(), bpId); var bpi = await BatchPartInfo.CreateBatchPartInfoAsync(batchIndex, changes, bpId, GetDirectoryFullPath(), isLastBatch, orchestrator).ConfigureAwait(false); // add the batchpartinfo tp the current batchinfo this.BatchPartsInfo.Add(bpi); } }
public HttpRequestHandler(BaseOrchestrator orchestrator) => this.orchestrator = orchestrator;