コード例 #1
0
        public void ApplySettings(OperationLogWriterSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException($"'{nameof(settings)}' can't be null.");
            }

            if (!Directory.Exists(settings.LogFolder))
            {
                Directory.CreateDirectory(settings.LogFolder);
            }

            lock (this.fileWriter)
            {
                this.folder = settings.LogFolder;
            }
        }
コード例 #2
0
        public OperationLogWriter(IFileWriter fileWriter, OperationLogWriterSettings settings)
        {
            this.fileWriter = fileWriter;

            this.ApplySettings(settings);
        }