internal void Reset() { HttpProperties httpProperties = DataContainer.HttpProperties; DataContainer.Dispose(); DataContainer = new LoggerDataContainer(this); if (httpProperties != null) { DataContainer.SetHttpProperties(httpProperties); } }
public Logger(string categoryName = null, string url = null) { Id = Guid.NewGuid(); CategoryName = string.IsNullOrWhiteSpace(categoryName) ? Constants.DefaultLoggerCategoryName : categoryName; DataContainer = new LoggerDataContainer(this); HttpProperties httpProperties = string.IsNullOrWhiteSpace(url) ? null : HttpPropertiesFactory.Create(url); if (httpProperties != null) { DataContainer.SetHttpProperties(httpProperties); InternalHelpers.WrapInTryCatch(() => { NotifyBeginRequest.Notify(httpProperties.Request); }); } }
public void SetHttpPropertiesThrowsExceptionForNullArgument() { LoggerDataContainer loggerDataContainer = new LoggerDataContainer(new Logger()); loggerDataContainer.SetHttpProperties(null); }