///<summary> /// Create a new instance of profiling information and provide additional context information ///</summary> public static ProfilingInformation CreateProfilingInformation(Guid?sessionId) { var profilingInformation = new ProfilingInformation(sessionId); OnContextCreated(profilingInformation); return(profilingInformation); }
public ProfilingInformation Filter(ProfilingInformation information) { var profilingInformation = ProfilingInformation.CreateProfilingInformation(information.Id); profilingInformation.At = information.At; profilingInformation.Context = information.Context; profilingInformation.Requests = information.Requests.Select(FilterRequest).ToList(); return profilingInformation; }
/// <summary> /// Initializes a new instance of the <see cref="AsyncServerClient"/> class. /// </summary> /// <param name="url">The URL.</param> /// <param name="convention">The convention.</param> /// <param name="credentials">The credentials.</param> public AsyncServerClient(string url, DocumentConvention convention, ICredentials credentials, HttpJsonRequestFactory jsonRequestFactory, Guid? sessionId) { profilingInformation = ProfilingInformation.CreateProfilingInformation(sessionId); this.url = url; this.jsonRequestFactory = jsonRequestFactory; this.sessionId = sessionId; this.convention = convention; this.credentials = credentials; }
public static ProfilingInformation Format(ProfilingInformation information) { var profilingInformation = ProfilingInformation.CreateProfilingInformation(information.Id); profilingInformation.At = information.At; profilingInformation.Context = information.Context; profilingInformation.DurationMilliseconds = information.DurationMilliseconds; profilingInformation.Requests = information.Requests.Select(FormatRequest).ToList(); return profilingInformation; }
/// <summary> /// Initializes a new instance of the <see cref="AsyncServerClient"/> class. /// </summary> public AsyncServerClient(string url, DocumentConvention convention, ICredentials credentials, HttpJsonRequestFactory jsonRequestFactory, Guid? sessionId) { profilingInformation = ProfilingInformation.CreateProfilingInformation(sessionId); this.url = url; if (this.url.EndsWith("/")) this.url = this.url.Substring(0, this.url.Length-1); this.jsonRequestFactory = jsonRequestFactory; this.sessionId = sessionId; this.convention = convention; this.credentials = credentials; }
private static void ProfilingInformationOnOnContextCreated(ProfilingInformation profilingInformation) { if (RecordCurrentControllerContextFilter.CurrentControllerContext == null) return; var routeData = RecordCurrentControllerContextFilter.CurrentControllerContext.RequestContext.RouteData; if (routeData == null) return; foreach (var value in routeData.Values) { profilingInformation.Context[value.Key] = (value.Value ?? "null").ToString(); } }
///<summary> /// Create a new instance of profiling information and provide additional context information ///</summary> public static ProfilingInformation CreateProfilingInformation(Guid? sessionId) { var profilingInformation = new ProfilingInformation(sessionId); OnContextCreated(profilingInformation); return profilingInformation; }
private static void InformationCreated(ProfilingInformation information, NancyContext context) { //not sure what to do with this }