private string ComposeDiagnosticInfo(Exception e)
{
StringBuilder builder = new StringBuilder();
this.AddDiagnosticLine(builder, (object) "ExceptionMessage",
(object) e.Message);
this.AddDiagnosticLine(builder, (object) "StackTrace",
(object) (System.Environment.NewLine + e.StackTrace));
this.AddDiagnosticLine(builder, (object) "OccurrenceDate",
(object) DateTime.Now.ToUniversalTime().ToString("r"));
this.AddDiagnosticLine(builder, (object) "AppInstallDate",
(object) ApplicationUsageHelper.InitialInstallationDate.ToUniversalTime().ToString("r"));
this.AddDiagnosticLine(builder, (object) "AppTotalRuns",
(object) ApplicationUsageHelper.ApplicationRunsCountTotal);
this.AddDiagnosticLine(builder, (object) "AppRunsAfterLastUpdate",
(object) ApplicationUsageHelper.ApplicationRunsCountForCurrentVersion);
if (ApplicationUsageHelper.PreviousRunDate.HasValue)
this.AddDiagnosticLine(builder, (object) "AppPreviousRunDate",
(object) ApplicationUsageHelper.PreviousRunDate.Value.ToUniversalTime().ToString("r"));
this.AddDiagnosticLine(builder, (object) "AppVersion", (object) this.ApplicationVersion);
this.AddDiagnosticLine(builder, (object) "Culture", (object) CultureInfo.CurrentCulture);
if (Application.Current.RootVisual != null)
{
PhoneApplicationFrame rootFrame = Application.Current.RootVisual as PhoneApplicationFrame;
if (rootFrame != null && rootFrame.CurrentSource != (Uri) null)
{
this.AddDiagnosticLine(builder, (object) "CurrentPageSource",
(object) rootFrame.CurrentSource.ToString());
this.AddDiagnosticLine(builder, (object) "NavigationStack",
(object) this.GetNavigationStackInfo(rootFrame));
}
}
this.AddDiagnosticLine(builder, (object) "DeviceManufacturer",
(object) DeviceStatus.DeviceManufacturer);
this.AddDiagnosticLine(builder, (object) "DeviceModel",
(object) DeviceStatus.DeviceName);
this.AddDiagnosticLine(builder, (object) "DeviceHardwareVersion",
(object) DeviceStatus.DeviceHardwareVersion);
this.AddDiagnosticLine(builder, (object) "DeviceFirmwareVersion",
(object) DeviceStatus.DeviceFirmwareVersion);
this.AddDiagnosticLine(builder, (object) "OSVersion",
(object) System.Environment.OSVersion);
this.AddDiagnosticLine(builder, (object) "CLRVersion",
(object) System.Environment.Version);
this.AddDiagnosticLine(builder, (object) "DeviceType",
(object) Microsoft.Devices.Environment.DeviceType);
this.AddDiagnosticLine(builder, (object) "NetworkType",
(object) NetworkInterface.NetworkInterfaceType);
this.AddDiagnosticLine(builder, (object) "DeviceTotalMemory(Mb)",
(object) DeviceExtendedPropertiesHelper.GetTotalMemoryMb());
this.AddDiagnosticLine(builder, (object) "AppPeakMemoryUsage(Mb)",
(object) DeviceExtendedPropertiesHelper.GetPeakMemoryUsageMb());
this.AddDiagnosticLine(builder, (object) "AppCurrentMemoryUsage(Mb)",
(object) DeviceExtendedPropertiesHelper.GetCurrentMemoryUsageMb());
.
.
.
.
.
if (RadDiagnostics.debugInfo.Length > 0)
{
builder.AppendFormat(this.diagnosticLine, new object[2]
{
(object) "**Debug Data**",
(object) ((object) RadDiagnostics.debugInfo).ToString()
});
builder.AppendLine();
}
return ((object) builder).ToString();
}