Пример #1
0
        /// <summary>
        /// Systems the error.
        /// </summary>
        /// <param name="deviceId">The device id.</param>
        /// <param name="systemError">The system error.</param>
        /// <returns></returns>
        public WebServiceResponseCodeType SystemError(Guid deviceId, SystemError systemError)
        {
            KeyValuePair<string, string>[] keyValuePairs = new KeyValuePair<string, string>[] {
                new KeyValuePair<string, string>(QueryStringKeyType.DEVICE_GUID, deviceId.ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.APPLICATION_GUID, systemError.ApplicationId.ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.DATE_CREATED, systemError.DateCreatedFormatted),
                new KeyValuePair<string, string>(QueryStringKeyType.VERSION, systemError.Version),
                new KeyValuePair<string, string>(QueryStringKeyType.ERROR_MESSAGE, systemError.ExceptionMessage),
                new KeyValuePair<string, string>(QueryStringKeyType.PLATFORM_TYPE, ((int)systemError.DeviceType).ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.SYSTEM_VERSION, systemError.Version)
            };

            return this.webServiceCall(this.baseUrl, WebServiceType.SystemError, keyValuePairs);
        }
Пример #2
0
        /// <summary>
        /// Saves the specified system error.
        /// </summary>
        /// <param name="systemError">The system error.</param>
        public void Save(SystemError systemError)
        {
            try
            {
                threadQueue.WaitOne();

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