コード例 #1
0
        private static string ScopeToString(CloudDriveScopes scope)
        {
            var result = new List <string>();
            var values = Enum.GetValues(typeof(CloudDriveScopes));

            foreach (CloudDriveScopes value in values)
            {
                if (scope.HasFlag(value))
                {
                    result.Add(ScopeToStringMap[value]);
                }
            }

            return(string.Join(" ", result));
        }
コード例 #2
0
        private static string ScopeToString(CloudDriveScopes scope)
        {
            var result = new List<string>();
            var values = Enum.GetValues(typeof(CloudDriveScopes));
            foreach (CloudDriveScopes value in values)
            {
                if (scope.HasFlag(value))
                {
                    result.Add(ScopeToStringMap[value]);
                }
            }

            return string.Join(" ", result);
        }
コード例 #3
0
 private static string ScopeToString(CloudDriveScopes scope) => string.Join(" ", Enum.GetValues(typeof(CloudDriveScopes)).Cast <CloudDriveScopes>().Where(v => scope.HasFlag(v)).Select(v => ScopeToStringMap[v]));