示例#1
0
        /// <summary>
        /// Logs the feedback.
        /// </summary>
        /// <param name="screenName">Name of the screen.</param>
        /// <param name="ratingType">Type of the rating.</param>
        /// <param name="comment">The comment.</param>
        public void LogFeedback(string screenName, RatingType ratingType, string comment)
        {
            try
            {
                FeedbackItem feedbackItem = new FeedbackItem(this.applicationId, screenName,
                    comment, ratingType, this.sessionId, this.applicationVersion);

                this.iStorageDal.Save(feedbackItem);

                this.setItemsWaitingToBeUploaded();
                if (this.uploadType == UploadType.WhileUsingAsync)
                {
                    this.uploadIntelligent();
                }
            }
            catch (ExceptionDatabaseLayer ex)
            {
                this.logSystemError(ex);
                throw ex;
            }
        }
示例#2
0
        /// <summary>
        /// Feedbacks the specified device id.
        /// </summary>
        /// <param name="deviceId">The device id.</param>
        /// <param name="feedbackItem">The feedback item.</param>
        /// <returns></returns>
        public WebServiceResponseCodeType Feedback(Guid deviceId, FeedbackItem feedbackItem)
        {
            KeyValuePair<string, string>[] keyValuePairs = new KeyValuePair<string, string>[] {
                new KeyValuePair<string, string>(QueryStringKeyType.DEVICE_GUID, deviceId.ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.APPLICATION_GUID, feedbackItem.ApplicationId.ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.DATE_CREATED, feedbackItem.DateCreatedFormatted),
                new KeyValuePair<string, string>(QueryStringKeyType.VERSION, feedbackItem.Version),
                new KeyValuePair<string, string>(QueryStringKeyType.SCREEN_NAME, feedbackItem.ScreenName),
                new KeyValuePair<string, string>(QueryStringKeyType.FEEDBACK, feedbackItem.Message),
                new KeyValuePair<string, string>(QueryStringKeyType.FEEDBACK_RATING_TYPE, ((int)feedbackItem.Rating).ToString()),
                new KeyValuePair<string, string>(QueryStringKeyType.SESSION_ID, feedbackItem.SessionId.ToString())
            };

            return this.webServiceCall(this.baseUrl, WebServiceType.Feedback, keyValuePairs);
        }
示例#3
0
 /// <summary>
 /// Saves the specified feedback item.
 /// </summary>
 /// <param name="feedbackItem">The feedback item.</param>
 public void Save(FeedbackItem feedbackItem)
 {
     try
     {
         threadQueue.WaitOne();
         this.FeedbackItem.InsertOnSubmit(feedbackItem);
         this.SubmitChanges();
     }
     catch (Exception ex)
     {
         throw new ExceptionDatabaseLayer(ex);
     }
     finally
     {
         threadQueue.Set();
     }
 }