示例#1
0
            public override string ToString()
            {
                string restr = Restriction == null ? "" : $" ({Restriction} only)";

                if (AllFiles.Count > 0)
                {
                    if (AllFiles.Count == Files.Count)
                    {
                        return("all" + restr);
                    }
                    if (AllFiles.Count - Files.Count <= 2)
                    {
                        return("all but " + string.Join(" and ", AllFiles.Except(Files)) + restr);
                    }
                }
                return(string.Join(", ", Files) + restr);
            }