コード例 #1
0
ファイル: ItSystemUsage.cs プロジェクト: Strongminds/kitos
        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);
        }