scripts
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine
|
||||
{
|
||||
// Token: 0x0200002E RID: 46
|
||||
public sealed class CrashReport
|
||||
{
|
||||
// Token: 0x060003C1 RID: 961 RVA: 0x00006A10 File Offset: 0x00004C10
|
||||
private CrashReport(string id, DateTime time, string text)
|
||||
{
|
||||
this.id = id;
|
||||
this.time = time;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
// Token: 0x060003C2 RID: 962 RVA: 0x00006A30 File Offset: 0x00004C30
|
||||
private static int Compare(CrashReport c1, CrashReport c2)
|
||||
{
|
||||
long ticks = c1.time.Ticks;
|
||||
long ticks2 = c2.time.Ticks;
|
||||
int num;
|
||||
if (ticks > ticks2)
|
||||
{
|
||||
num = 1;
|
||||
}
|
||||
else if (ticks < ticks2)
|
||||
{
|
||||
num = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060003C3 RID: 963 RVA: 0x00006A84 File Offset: 0x00004C84
|
||||
private static void PopulateReports()
|
||||
{
|
||||
object obj = CrashReport.reportsLock;
|
||||
lock (obj)
|
||||
{
|
||||
if (CrashReport.internalReports == null)
|
||||
{
|
||||
string[] reports = CrashReport.GetReports();
|
||||
CrashReport.internalReports = new List<CrashReport>(reports.Length);
|
||||
foreach (string text in reports)
|
||||
{
|
||||
double num;
|
||||
string reportData = CrashReport.GetReportData(text, out num);
|
||||
DateTime dateTime = new DateTime(1970, 1, 1);
|
||||
DateTime dateTime2 = dateTime.AddSeconds(num);
|
||||
CrashReport.internalReports.Add(new CrashReport(text, dateTime2, reportData));
|
||||
}
|
||||
CrashReport.internalReports.Sort(new Comparison<CrashReport>(CrashReport.Compare));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000CD RID: 205
|
||||
// (get) Token: 0x060003C4 RID: 964 RVA: 0x00006B60 File Offset: 0x00004D60
|
||||
public static CrashReport[] reports
|
||||
{
|
||||
get
|
||||
{
|
||||
CrashReport.PopulateReports();
|
||||
object obj = CrashReport.reportsLock;
|
||||
CrashReport[] array;
|
||||
lock (obj)
|
||||
{
|
||||
array = CrashReport.internalReports.ToArray();
|
||||
}
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000CE RID: 206
|
||||
// (get) Token: 0x060003C5 RID: 965 RVA: 0x00006BA8 File Offset: 0x00004DA8
|
||||
public static CrashReport lastReport
|
||||
{
|
||||
get
|
||||
{
|
||||
CrashReport.PopulateReports();
|
||||
object obj = CrashReport.reportsLock;
|
||||
lock (obj)
|
||||
{
|
||||
if (CrashReport.internalReports.Count > 0)
|
||||
{
|
||||
return CrashReport.internalReports[CrashReport.internalReports.Count - 1];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060003C6 RID: 966 RVA: 0x00006C1C File Offset: 0x00004E1C
|
||||
public static void RemoveAll()
|
||||
{
|
||||
foreach (CrashReport crashReport in CrashReport.reports)
|
||||
{
|
||||
crashReport.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060003C7 RID: 967 RVA: 0x00006C50 File Offset: 0x00004E50
|
||||
public void Remove()
|
||||
{
|
||||
if (CrashReport.RemoveReport(this.id))
|
||||
{
|
||||
object obj = CrashReport.reportsLock;
|
||||
lock (obj)
|
||||
{
|
||||
CrashReport.internalReports.Remove(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060003C8 RID: 968
|
||||
[ThreadAndSerializationSafe]
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern string[] GetReports();
|
||||
|
||||
// Token: 0x060003C9 RID: 969
|
||||
[ThreadAndSerializationSafe]
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern string GetReportData(string id, out double secondsSinceUnixEpoch);
|
||||
|
||||
// Token: 0x060003CA RID: 970
|
||||
[ThreadAndSerializationSafe]
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern bool RemoveReport(string id);
|
||||
|
||||
// Token: 0x0400003D RID: 61
|
||||
private static List<CrashReport> internalReports;
|
||||
|
||||
// Token: 0x0400003E RID: 62
|
||||
private static object reportsLock = new object();
|
||||
|
||||
// Token: 0x0400003F RID: 63
|
||||
private readonly string id;
|
||||
|
||||
// Token: 0x04000040 RID: 64
|
||||
public readonly DateTime time;
|
||||
|
||||
// Token: 0x04000041 RID: 65
|
||||
public readonly string text;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user