The type used to specify header properties of a crash.
        /// <summary>
        /// Initializes a new instance of the <see cref="CrashTelemetry" /> class.
        /// </summary>
        /// <param name="crash">The crash.</param>
        internal CrashTelemetry(CrashData crash)
        {
            this.Data = crash ?? new CrashData();
            if (this.Data.headers == null)
            {
                this.Data.headers = new CrashDataHeaders();
            }

            this.headers = new CrashTelemetryHeaders(this.Data.headers);
            this.adapterThreads = new AdapterList<CrashTelemetryThread, CrashDataThread>(
                                                                new List<CrashTelemetryThread>(),
                                                                this.Data.threads,
                                                                threadPublic => threadPublic == null ? null : threadPublic.Data,
                                                                threadPrivate => threadPrivate == null ? null : new CrashTelemetryThread(threadPrivate));
            this.adapterThreads.SyncPrivateToPublic();

            this.adapterBinaries = new AdapterList<CrashTelemetryBinary, CrashDataBinary>(
                                                                new List<CrashTelemetryBinary>(),
                                                                this.Data.binaries,
                                                                binaryPublic => binaryPublic == null ? null : binaryPublic.Data,
                                                                binaryPrivate => binaryPrivate == null ? null : new CrashTelemetryBinary(binaryPrivate));
            this.adapterBinaries.SyncPrivateToPublic();

            this.context = new TelemetryContext(new Dictionary<string, string>(), new Dictionary<string, string>());
            this.Attachments = new Attachments();
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CrashTelemetry" /> class.
        /// </summary>
        /// <param name="crash">The crash.</param>
        internal CrashTelemetry(CrashData crash)
        {
            this.Data = crash ?? new CrashData();
            if (this.Data.headers == null)
            {
                this.Data.headers = new CrashDataHeaders();
            }

            this.headers        = new CrashTelemetryHeaders(this.Data.headers);
            this.adapterThreads = new AdapterList <CrashTelemetryThread, CrashDataThread>(
                new List <CrashTelemetryThread>(),
                this.Data.threads,
                threadPublic => threadPublic == null ? null : threadPublic.Data,
                threadPrivate => threadPrivate == null ? null : new CrashTelemetryThread(threadPrivate));
            this.adapterThreads.SyncPrivateToPublic();

            this.adapterBinaries = new AdapterList <CrashTelemetryBinary, CrashDataBinary>(
                new List <CrashTelemetryBinary>(),
                this.Data.binaries,
                binaryPublic => binaryPublic == null ? null : binaryPublic.Data,
                binaryPrivate => binaryPrivate == null ? null : new CrashTelemetryBinary(binaryPrivate));
            this.adapterBinaries.SyncPrivateToPublic();

            this.context     = new TelemetryContext(new Dictionary <string, string>(), new Dictionary <string, string>());
            this.Attachments = new Attachments();
        }