예제 #1
0
파일: LOC.cs 프로젝트: slieser/sandbox2
 public IEnumerable<LOCInfo> CountLOC(IEnumerable<string> filenames, Action<LOCInfo> onOnFileCounted) {
     var loc = new LOC();
     foreach (var filename in filenames) {
         var locInfo = loc.CountLOC(filename);
         onOnFileCounted(locInfo);
         yield return locInfo;
     }
 }
예제 #2
0
        public void Count(string[] args) {
            var commandLineArguments = new CommandLineArguments();
            var filenameProvider = new FilenameProvider();
            var loc = new LOC();

            var path = commandLineArguments.GetPath(args);
            var filenames = filenameProvider.GetFilenames(path);
            var locInfos = loc.CountLOC(filenames, OnFileCounted);
            var sum = loc.CalculateSum(locInfos);
            OnSum(sum);
        }