private void CreateUserReportCallback(UserReport bugReport) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrEmpty(bugReport.get_ProjectIdentifier())) { Log.Warning("The user report's project identifier is not set. Please setup cloud services using the Services tab or manually specify a project identifier when calling UnityUserReporting.Configure().", 171, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\OptionLayer\\BugReportState.cs"); } string str = "Unknown"; string str2 = "0.0"; foreach (UserReportNamedValue deviceMetadatum in bugReport.get_DeviceMetadata()) { UserReportNamedValue current = deviceMetadatum; string name = current.get_Name(); if (!(name == "Platform")) { if (name == "Version") { str2 = current.get_Value(); } } else { str = current.get_Value(); } } bugReport.get_Dimensions().Add(new UserReportNamedValue("Platform.Version", str + "." + str2)); m_currentBugReport = bugReport; m_isCreatingUserReport = false; }
private void OnSubmitClick(string summary, string description) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if (m_currentBugReport != null && !m_isSubmittingUserReport) { m_isSubmittingUserReport = true; m_currentBugReport.set_Summary(summary); UserReportNamedValue val = default(UserReportNamedValue); val.set_Name("Description"); val.set_Value(description); UserReportNamedValue item = val; m_currentBugReport.get_Fields().Add(item); PlayerData instance = PlayerData.instance; if (instance != null) { val = default(UserReportNamedValue); val.set_Name("User Nickname"); val.set_Value(instance.nickName); UserReportNamedValue item2 = val; m_currentBugReport.get_Fields().Add(item2); } UnityUserReporting.get_CurrentClient().SendUserReport(m_currentBugReport, (Action <float, float>)UserReportSubmissionProgress, (Action <bool, UserReport>)UserReportSubmissionCallback); } }
/// <summary> /// Adds device metadata. /// </summary> /// <param name="name">The name.</param> /// <param name="value">The value.</param> public void AddDeviceMetadata(string name, string value) { lock (this.deviceMetadata) { UserReportNamedValue userReportNamedValue = new UserReportNamedValue(); userReportNamedValue.Name = name; userReportNamedValue.Value = value; this.deviceMetadata.Add(userReportNamedValue); } }
public void SubmitUserReport() { if (!isSubmitting && CurrentUserReport != null) { isSubmitting = true; if (SummaryInput != null) { CurrentUserReport.Summary = SummaryInput.text; } if (CategoryDropdown != null) { Dropdown.OptionData optionData = CategoryDropdown.options[CategoryDropdown.value]; string text = optionData.text; CurrentUserReport.Dimensions.Add(new UserReportNamedValue("Category", text)); CurrentUserReport.Fields.Add(new UserReportNamedValue("Category", text)); } if (DescriptionInput != null) { UserReportNamedValue item = default(UserReportNamedValue); item.Name = "Description"; item.Value = DescriptionInput.text; CurrentUserReport.Fields.Add(item); } ClearForm(); RaiseUserReportSubmitting(); UnityUserReporting.CurrentClient.SendUserReport(CurrentUserReport, delegate(float uploadProgress, float downloadProgress) { if (ProgressText != null) { string text2 = $"{uploadProgress:P}"; ProgressText.text = text2; } }, delegate(bool success, UserReport br2) { if (!success) { isShowingError = true; StartCoroutine(ClearError()); } CurrentUserReport = null; isSubmitting = false; }); } }
/// <summary> /// Submits the user report. /// </summary> public void SubmitUserReport() { // Preconditions if (this.isSubmitting || this.CurrentUserReport == null) { return; } // Set Submitting Flag this.isSubmitting = true; Time.timeScale = 1; SummaryInput.interactable = false; // Set Summary if (this.SummaryInput != null) { this.CurrentUserReport.Summary = this.SummaryInput.text; } // Set Category if (this.CategoryDropdown != null) { Dropdown.OptionData optionData = this.CategoryDropdown.options[this.CategoryDropdown.value]; string category = optionData.text; this.CurrentUserReport.Dimensions.Add(new UserReportNamedValue("Category", category)); this.CurrentUserReport.Fields.Add(new UserReportNamedValue("Category", category)); } // Set Description // This is how you would add additional fields. if (this.DescriptionInput != null) { UserReportNamedValue userReportField = new UserReportNamedValue(); userReportField.Name = "Description"; userReportField.Value = this.DescriptionInput.text; this.CurrentUserReport.Fields.Add(userReportField); } // Clear Form this.ClearForm(); // Raise Event this.RaiseUserReportSubmitting(); // Send Report UnityUserReporting.CurrentClient.SendUserReport(this.CurrentUserReport, (uploadProgress, downloadProgress) => { if (this.ProgressText != null) { string progressText = string.Format("{0:P}", uploadProgress); this.ProgressText.text = progressText; } }, (success, br2) => { if (!success) { this.isShowingError = true; this.StartCoroutine(this.ClearError()); } var realMail = mail.GetComponent <Mail>(); realMail.SendMail(); this.CurrentUserReport = null; this.isSubmitting = false; }); }
/// <summary> /// Updates the user reporting client, which updates networking communication, screenshotting, and metrics gathering. /// </summary> public void Update() { // Stopwatch this.updateStopwatch.Reset(); this.updateStopwatch.Start(); // Update Platform this.Platform.Update(this); // Measures if (this.Configuration.MetricsGatheringMode != MetricsGatheringMode.Disabled) { this.isMeasureBoundary = false; int framesPerMeasure = this.Configuration.FramesPerMeasure; if (this.measureFrames >= framesPerMeasure) { lock (this.measures) { UserReportMeasure userReportMeasure = new UserReportMeasure(); userReportMeasure.StartFrameNumber = this.frameNumber - framesPerMeasure; userReportMeasure.EndFrameNumber = this.frameNumber - 1; UserReportMeasure evictedUserReportMeasure = this.measures.GetNextEviction(); if (evictedUserReportMeasure.Metrics != null) { userReportMeasure.Metadata = evictedUserReportMeasure.Metadata; userReportMeasure.Metrics = evictedUserReportMeasure.Metrics; } else { userReportMeasure.Metadata = new List <UserReportNamedValue>(); userReportMeasure.Metrics = new List <UserReportMetric>(); } userReportMeasure.Metadata.Clear(); userReportMeasure.Metrics.Clear(); foreach (KeyValuePair <string, string> kvp in this.currentMeasureMetadata) { UserReportNamedValue userReportNamedValue = new UserReportNamedValue(); userReportNamedValue.Name = kvp.Key; userReportNamedValue.Value = kvp.Value; userReportMeasure.Metadata.Add(userReportNamedValue); } foreach (KeyValuePair <string, UserReportMetric> kvp in this.currentMetrics) { userReportMeasure.Metrics.Add(kvp.Value); } this.currentMetrics.Clear(); this.measures.Add(userReportMeasure); this.measureFrames = 0; this.isMeasureBoundary = true; } } this.measureFrames++; } else { this.isMeasureBoundary = true; } // Synchronization foreach (Action synchronizedAction in this.synchronizedActions) { this.currentSynchronizedActions.Add(synchronizedAction); } this.synchronizedActions.Clear(); foreach (Action synchronizedAction in this.currentSynchronizedActions) { synchronizedAction(); } this.currentSynchronizedActions.Clear(); // Frame Number this.frameNumber++; // Stopwatch this.updateStopwatch.Stop(); this.SampleClientMetric("UserReportingClient.Update", this.updateStopwatch.ElapsedMilliseconds); }