private void VisitStoreResponseStatistics( ClientSideRequestStatisticsTraceDatum.StoreResponseStatistics storeResponseStatistics) { this.jsonWriter.WriteObjectStart(); this.jsonWriter.WriteFieldName("ResponseTimeUTC"); this.WriteDateTimeStringValue(storeResponseStatistics.RequestResponseTime); this.jsonWriter.WriteFieldName("ResourceType"); this.jsonWriter.WriteStringValue(storeResponseStatistics.RequestResourceType.ToString()); this.jsonWriter.WriteFieldName("OperationType"); this.jsonWriter.WriteStringValue(storeResponseStatistics.RequestOperationType.ToString()); if (!string.IsNullOrEmpty(storeResponseStatistics.RequestSessionToken)) { this.jsonWriter.WriteFieldName("RequestSessionToken"); this.jsonWriter.WriteStringValue(storeResponseStatistics.RequestSessionToken); } this.jsonWriter.WriteFieldName("LocationEndpoint"); this.WriteStringValueOrNull(storeResponseStatistics.LocationEndpoint?.ToString()); if (storeResponseStatistics.StoreResult != null) { this.jsonWriter.WriteFieldName("StoreResult"); this.Visit(storeResponseStatistics.StoreResult); } this.jsonWriter.WriteObjectEnd(); }
private void VisitStoreResponseStatistics( ClientSideRequestStatisticsTraceDatum.StoreResponseStatistics storeResponseStatistics) { this.jsonWriter.WriteObjectStart(); this.jsonWriter.WriteFieldName("ResponseTimeUTC"); this.jsonWriter.WriteStringValue(storeResponseStatistics.RequestResponseTime.ToString("o", CultureInfo.InvariantCulture)); this.jsonWriter.WriteFieldName("ResourceType"); this.jsonWriter.WriteStringValue(storeResponseStatistics.RequestResourceType.ToString()); this.jsonWriter.WriteFieldName("OperationType"); this.jsonWriter.WriteStringValue(storeResponseStatistics.RequestOperationType.ToString()); this.jsonWriter.WriteFieldName("LocationEndpoint"); this.WriteStringValueOrNull(storeResponseStatistics.LocationEndpoint?.ToString()); if (storeResponseStatistics.StoreResult != null) { this.jsonWriter.WriteFieldName("StoreResult"); this.Visit(storeResponseStatistics.StoreResult); } this.jsonWriter.WriteObjectEnd(); }
private static void VisitStoreResponseStatistics( ClientSideRequestStatisticsTraceDatum.StoreResponseStatistics storeResponseStatistics, IJsonWriter jsonWriter) { jsonWriter.WriteObjectStart(); jsonWriter.WriteFieldName("ResponseTimeUTC"); jsonWriter.WriteStringValue(storeResponseStatistics.RequestResponseTime.ToString("o", CultureInfo.InvariantCulture)); jsonWriter.WriteFieldName("ResourceType"); jsonWriter.WriteStringValue(storeResponseStatistics.RequestResourceType.ToString()); jsonWriter.WriteFieldName("OperationType"); jsonWriter.WriteStringValue(storeResponseStatistics.RequestOperationType.ToString()); jsonWriter.WriteFieldName("LocationEndpoint"); if (storeResponseStatistics.LocationEndpoint == null) { jsonWriter.WriteNullValue(); } else { jsonWriter.WriteStringValue(storeResponseStatistics.LocationEndpoint.ToString()); } if (storeResponseStatistics.StoreResult != null) { jsonWriter.WriteFieldName("StoreResult"); jsonWriter.WriteStringValue(storeResponseStatistics.StoreResult.ToString()); } jsonWriter.WriteObjectEnd(); }