public ClientThread([NotNull] DistLogger logger, [NotNull] Settings mySettings, [NotNull] ThreadId threadId) { _logger = logger; _mySettings = mySettings; _threadId = threadId; logger.Info("initalizing logger", threadId); }
public CalcExecutor([NotNull] ThreadId threadId, [NotNull] DistLogger logger, [NotNull] Settings mySettings) { _threadId = threadId; _mySettings = mySettings; _logger = logger; }
public CalcDirectoryPreparer([NotNull] Settings settings, [NotNull] DistLogger logger, [NotNull] ThreadId threadId) { _settings = settings; _logger = logger; _threadId = threadId; }
public static List <MsgFile> ReadMsgFiles(bool addFullFiles, [NotNull][ItemNotNull] List <FileInfo> filteredFiles, [NotNull] DirectoryInfo baseDir, [NotNull] DistLogger logger, [NotNull] ThreadId threadId) { var lpgFiles = new List <MsgFile>(); long totalSize = 0; foreach (var fi in filteredFiles) { var relativeDirectory = ""; if (fi.DirectoryName?.Length > baseDir.FullName.Length) { relativeDirectory = fi.DirectoryName.Substring(baseDir.FullName.Length).Trim().Trim('\\'); } MsgFile jf = new MsgFile(fi, relativeDirectory); if (addFullFiles) { jf.FileContent = File.ReadAllBytes(fi.FullName); } totalSize += fi.Length; lpgFiles.Add(jf); } string prettySize = AutomationUtili.MakePrettySize(totalSize); logger.Info("Collected files with " + prettySize, threadId); return(lpgFiles); }