Disco.Services.JobFlagExtensions.ValidFlagsGrouped C# (CSharp) Method

ValidFlagsGrouped() public static method

public static ValidFlagsGrouped ( this j ) : Dictionary>>
j this
return Dictionary>>
        public static Dictionary<string, List<Tuple<long, string, bool>>> ValidFlagsGrouped(this Job j)
        {
            Dictionary<string, List<Tuple<long, string, bool>>> validFlags = new Dictionary<string, List<Tuple<long, string, bool>>>();

            CacheAllFlags();

            var currentFlags = (long)(j.Flags ?? 0);

            foreach (var jt in j.JobSubTypes)
            {
                Dictionary<long, string> g;
                if (allFlags.TryGetValue(jt.Id, out g))
                {
                    validFlags[jt.Id] = g.Select(f => new Tuple<long, string, bool>(f.Key, f.Value, ((currentFlags & f.Key) == f.Key))).ToList();
                }
                else
                {
                    validFlags[jt.Id] = null;
                }
            }
            return validFlags;
        }
        public static Dictionary<long, Tuple<string, bool>> ValidFlags(this Job j)