public void SetSessionData(Request request, Response response, TimeSpan sessionTime, Int64 requestSize, Int64 responseSize) { ApplicationName = request.ApplicationName; ClientLibraryVersion = request.LibraryVersion; CorrelationId = response.TraceCorrelationId; ServerLibraryVersion = new Version(response.LibraryVersion); ClientTag = request.ClientTag; _requestSize = requestSize; _sessionTime = sessionTime; _responseSize = responseSize; RaiseAllPropertiesChanged(); }
public static Request FromXml(XElement element, String clientTag) { if (element == null) { throw new ArgumentNullException(nameof(element)); } var name = element.Name; if (element.Name.LocalName != _elementName || element.Name.NamespaceName != _elementNamespace) { throw new ArgumentException("Specified element does not match CSOM request name or namespace.", nameof(element)); } var applicationName = element.Attribute(XName.Get("ApplicationName")); var libraryVersion = element.Attribute(XName.Get("LibraryVersion")); var request = new Request(applicationName?.Value, libraryVersion?.Value, clientTag); return request; }