private IIndexingActivity RegisterActivity(IndexingActivityType type, IndexingActivityRunningState state, int nodeId, int versionId, string path, DateTime?creationDate = null, DateTime?lockTime = null) { IndexingActivityBase activity; if (type == IndexingActivityType.AddTree || type == IndexingActivityType.RemoveTree) { activity = CreateTreeActivity(type, path, nodeId, null); } else { activity = CreateActivity(type, path, nodeId, versionId, 9999, null); } activity.RunningState = state; if (creationDate.HasValue) { activity.CreationDate = creationDate.Value; } if (lockTime.HasValue) { activity.LockTime = lockTime; } DataProvider.Current.RegisterIndexingActivity(activity); return(activity); }
/* ============================================================================================== */ private void RegisterActivity(IndexingActivityType type, IndexingActivityRunningState state, int nodeId, int versionId, string path) { IndexingActivityBase activity; if (type == IndexingActivityType.AddTree || type == IndexingActivityType.RemoveTree) { activity = CreateTreeActivity(type, path, nodeId); } else { activity = CreateActivity(type, path, nodeId, versionId, 9999); } activity.RunningState = state; DataStore.DataProvider.RegisterIndexingActivityAsync(activity, CancellationToken.None).GetAwaiter().GetResult(); }
private void RegisterActivity(IndexingActivityType type, IndexingActivityRunningState state, int nodeId, int versionId, string path) { IndexingActivityBase activity; if (type == IndexingActivityType.AddTree || type == IndexingActivityType.RemoveTree) { activity = CreateTreeActivity(type, path, nodeId); } else { activity = CreateActivity(type, path, nodeId, versionId, 9999); } activity.RunningState = state; DataProvider.Current.RegisterIndexingActivity(activity); }
public abstract void UpdateIndexingActivityRunningState(int indexingActivityId, IndexingActivityRunningState runningState);
public Task UpdateIndexingActivityRunningStateAsync(int indexingActivityId, IndexingActivityRunningState runningState, CancellationToken cancellationToken) { return(DataProvider.UpdateIndexingActivityRunningStateAsync(indexingActivityId, runningState, cancellationToken)); }
private async Task <IIndexingActivity> RegisterActivityAsync(IndexingActivityType type, IndexingActivityRunningState state, DateTime lockTime, int nodeId, int versionId, string path) { IndexingActivityBase activity; if (type == IndexingActivityType.AddTree || type == IndexingActivityType.RemoveTree) { activity = CreateTreeActivity(type, path, nodeId, null); } else { activity = CreateActivity(type, path, nodeId, versionId, 9999, null); } activity.RunningState = state; activity.LockTime = lockTime; await DP.RegisterIndexingActivityAsync(activity, CancellationToken.None); return(activity); }