public DeleteEvent(long userId, long statusId, DateTime deleteAt, long?targetUserId, DeleteEventType eventType) { UserId = userId; StatusId = statusId; DeleteAt = deleteAt; TargetUserId = targetUserId; EventType = eventType; }
private async void DeleteDeploymentAsync() { string deploymentId = DeploymentNameValueBox.Text; if (deploymentId == DMConstants.AllDevicesConfigName) { MessageBox.Show("Cannot delete the *All* configuration."); return; } RegistryManager registryManager = RegistryManager.CreateFromConnectionString(_connectionString); await registryManager.RemoveConfigurationAsync(deploymentId); DeleteEventType deleteEvent = DeleteEvent; if (deleteEvent != null) { deleteEvent(); } MessageBox.Show("'" + DeploymentName + "' has been deleted successfully."); }