private void Task_Deleted(CMDataProviderRecordDeletedEventArgs deletedRecordEventArgs) { var cmTaskDto = deletedRecordEventArgs.DtoBefore as CMTaskDto; // Try to figure out what the task type is var cmTaskType = CMDataProvider.DataStore.Value.CMTaskTypes.Value.Get_ForTaskId(cmTaskDto.Id); if (cmTaskType == null) { return; } switch (cmTaskType.Name) { case nameof(BuildInTaskTypes.FeatureDependency): FeatureDependencyExtensions.FeatureDependencyDataProvider.Delete_ForTaskId(cmTaskDto.Id); break; case nameof(BuildInTaskTypes.Note): NoteExtensions.NoteDataProvider.Delete_ForTaskId(cmTaskDto.Id); break; } }
private void Feature_Deleted(CMDataProviderRecordDeletedEventArgs deletedRecordEventArgs) { var beforeDto = deletedRecordEventArgs.DtoBefore as CMFeatureDto; FeatureDependencyExtensions.UpdateTaskStatesForFeatureDependendies(beforeDto, null); }