Example #1
0
        /// <summary>
        /// Crashes the specified device id.
        /// </summary>
        /// <param name="deviceId">The device id.</param>
        /// <param name="crash">The crash.</param>
        /// <returns></returns>
        public WebServiceResponseCodeType Crash(Guid deviceId, Crash crash)
        {
            KeyValuePair<string, string>[] keyValuePairs = new KeyValuePair<string, string>[] {
                new KeyValuePair<string, string>(QueryStringKeyType.DEVICE_GUID, deviceId.ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.APPLICATION_GUID, crash.ApplicationId.ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.DATE_CREATED, crash.DateCreatedFormatted),
                new KeyValuePair<string, string>(QueryStringKeyType.SESSION_ID, crash.SessionId.ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.VERSION, crash.Version)
            };

            return this.webServiceCall(this.baseUrl, WebServiceType.Crash, keyValuePairs);
        }
Example #2
0
        /// <summary>
        /// Saves the specified crash.
        /// </summary>
        /// <param name="crash">The crash.</param>
        public void Save(Crash crash)
        {
            try
            {
                threadQueue.WaitOne();

                this.Crash.InsertOnSubmit(crash);
                this.SubmitChanges();
            }
            catch (Exception ex)
            {
                throw new ExceptionDatabaseLayer(ex);
            }
            finally
            {
                threadQueue.Set();
            }
        }