Пример #1
0
        public override int BinSelector(FileInfo fi)
        {
            var ext = fi.Extension;

            if (String.IsNullOrEmpty(ext) || ext.Length > 10)
            {
                return(0);
            }
            ext = ext.ToLower();
            var i = Array.FindIndex(Definition.Bins, b => b.Caption == ext);

            if (i < 0)
            {
                i = Definition.AddBin(new TallyBin(ext));
            }
            return(i);
        }
Пример #2
0
 public ExtensionTally(string caption = null) : base(null, caption ?? "File Extensions")
 {
     Definition.AddBin(new TallyBin("(none)"));
 }