// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using System; namespace Microsoft.AppCenter.Unity.Crashes { public class ErrorReport { public ErrorReport(string id, DateTimeOffset appStartTime, DateTimeOffset appErrorTime, Models.Exception exception, Device device, string threadName) { Id = id; AppStartTime = appStartTime; AppErrorTime = appErrorTime; Exception = exception; Device = device; ThreadName = threadName; IsCrash = true; } public ErrorReport(string id, DateTimeOffset appStartTime, DateTimeOffset appErrorTime, Models.Exception exception, int processId, string reporterKey, string reporterSignal, bool isAppKill, Device device) { Id = id; AppStartTime = appStartTime; AppErrorTime = appErrorTime; Exception = exception; ProcessId = processId; ReporterKey = reporterKey; ReporterSignal = reporterSignal; IsAppKill = isAppKill; Device = device; IsCrash = true; } /// /// Gets the report identifier. /// /// UUID for the report. public string Id { get; private set; } /// /// Gets the app start time. /// /// Date and time the app started public DateTimeOffset AppStartTime { get; private set; } /// /// Gets the app error time. /// /// Date and time the error occured public DateTimeOffset AppErrorTime { get; private set; } /// /// Gets the device that the crashed app was being run on. /// /// Device information at the crash time. public Device Device { get; private set; } /// /// Gets the model exception associated with the error. /// /// The exception. public Models.Exception Exception { get; private set; } /// /// Gets the thread name. /// /// The thread name. public string ThreadName { get; private set; } /// /// Gets the process identifier. /// /// Process Id. public int ProcessId { get; private set; } /// /// Gets the reporter key. /// /// Reporter Key. public string ReporterKey { get; private set; } /// /// Gets the reporter signal. /// /// Reporter Signal. public string ReporterSignal { get; private set; } /// /// True if the details represent an app kill instead of a crash. /// /// True if the details represent an app kill instead of a crash. public bool IsAppKill { get; private set; } /// /// Indicates whether this error report reprents a true app crash. /// /// True if the unhandled error actually resulted in app termination. public bool IsCrash { get; internal set; } } }