Esempio n. 1
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();
        }
Esempio n. 2
0
            private void Populate(IObjectContainer container)
            {
                for (var i = 0; i < 10; i++)
                {
                    container.Store(new Item("delme"));
                }
                var one = new CrashData(null
                                        , "one");
                var two = new CrashData(one
                                        , "two");
                var three = new CrashData
                                (one, "three");

                container.Store(one);
                container.Store(two);
                container.Store(three);
                container.Commit();
                var objectSet = container.Query(typeof(Item));

                while (objectSet.HasNext())
                {
                    container.Delete(objectSet.Next());
                }
            }
Esempio n. 3
0
 /// <summary>
 /// Get an ICrashData object from crashlog-stream
 /// </summary>
 /// <param name="inputStream">stream from crashlog</param>
 /// <returns>deserialized CrashData object</returns>
 public ICrashData Deserialize(Stream inputStream)
 {
     return(CrashData.Deserialize(inputStream));
 }
Esempio n. 4
0
 public CrashData(CrashData next_, string name)
 {
     _next = next_;
     _name = name;
 }
Esempio n. 5
0
 private void Populate(IObjectContainer container)
 {
     for (var i = 0; i < 10; i++)
     {
         container.Store(new Item("delme"));
     }
     var one = new CrashData(null
         , "one");
     var two = new CrashData(one
         , "two");
     var three = new CrashData
         (one, "three");
     container.Store(one);
     container.Store(two);
     container.Store(three);
     container.Commit();
     var objectSet = container.Query(typeof (Item));
     while (objectSet.HasNext())
     {
         container.Delete(objectSet.Next());
     }
 }
Esempio n. 6
0
 public CrashData(CrashData next_, string name)
 {
     _next = next_;
     _name = name;
 }