public static string GetProperty(string key) { var httpContextBuffer = HttpRequestAppender.GetHttpContextBuffer(true); if (SaveInHttpContext && httpContextBuffer != null) { return(httpContextBuffer[key]); } return((string)LogicalThreadContext.Properties[key]); }
public static void SetProperty(string key, string value) { var httpContextBuffer = HttpRequestAppender.GetHttpContextBuffer(true); if (SaveInHttpContext && httpContextBuffer != null) { httpContextBuffer[key] = value; } else { LogicalThreadContext.Properties[key] = value; } }