private async Task ManageProfileUpdate(Models.QueuedRemoteOperation operation) { var orchestrator = GetOrchestrator(); var profileForUpdate = Newtonsoft.Json.JsonConvert.DeserializeObject <DocsMarshal.Entities.ProfileForUpdate>(operation.SerializedPayload); var updated = await orchestrator.Profile.Archive.Update(profileForUpdate); if (updated.HasError) { throw new Exception(updated.Error); } }
private async Task QueueOperation(Models.QueuedRemoteOperation.ERemoteOperationType type, object payload) { var item = new Models.QueuedRemoteOperation { Type = (int)type, SerializedPayload = Newtonsoft.Json.JsonConvert.SerializeObject(payload) }; var connection = GetConnection(); var rowsAdded = await connection.InsertAsync(item); if (rowsAdded != 1) { throw new Exception($"Could not queue operation: {rowsAdded}"); } if (!IsRunning) { _ = Run(); } }
private async Task ManageTaskClose(Models.QueuedRemoteOperation operation) { throw new NotImplementedException(); }
private async Task ManageTaskVariableSetValue(Models.QueuedRemoteOperation operation) { throw new NotImplementedException(); }
private async Task ManageProfileDelete(Models.QueuedRemoteOperation operation) { throw new NotImplementedException(); }