public void CreateReport( Version version, Exception exception, ApplicationArguments applicationArguments, string directory, string reportName) { if (version == null) { throw new ArgumentNullException(nameof(version)); } if (exception == null) { throw new ArgumentNullException(nameof(exception)); } if (applicationArguments == null) { throw new ArgumentNullException(nameof(applicationArguments)); } if (directory == null) { throw new ArgumentNullException(nameof(directory)); } if (reportName == null) { throw new ArgumentNullException(nameof(reportName)); } _directory = directory; _reportName = reportName; _errorReport.DateTime = _dateTimeWorker.Now; _errorReport.Version = version; _errorReport.Exception = exception; _errorReport.ApplicationArguments = _cloner.DeepClone(applicationArguments); LoadFiles(); RemoveSensitivePersonalInformation(); EnsureDirectoryExists(); SerializeToFile(); }