Exemple #1
0
        public Result <ItSystemUsageSensitiveDataLevel, OperationError> RemoveSensitiveDataLevel(
            SensitiveDataLevel sensitiveDataLevel)
        {
            if (!SensitiveDataLevelExists(sensitiveDataLevel))
            {
                return(new OperationError("Data sensitivity does not exists on system usage", OperationFailure.NotFound));
            }

            var dataLevelToRemove = SensitiveDataLevels.First(x => x.SensitivityDataLevel == sensitiveDataLevel);

            SensitiveDataLevels.Remove(dataLevelToRemove);

            return(dataLevelToRemove);
        }