public SymobilicateNancyModule() { var archivePath = ConfigurationManager.AppSettings["archivePath"]; var commandPath = ConfigurationManager.AppSettings["commandPath"]; _helper = new SymbolicateHelper(archivePath, commandPath); Post("/symbolicate", _ => { string packageName = Request.Form["packageName"]; string versionCode = Request.Form["versionCode"]; string stackTrace = Request.Form["stackTrace"]; if (string.IsNullOrEmpty(packageName) || string.IsNullOrEmpty(versionCode) || string.IsNullOrEmpty(stackTrace)) { return(HttpStatusCode.BadRequest); } stackTrace = stackTrace.Replace("@@@", "\r\n"); Console.WriteLine($"REQ: {packageName} {versionCode}"); var result = _helper.Symbolicate(packageName, versionCode, stackTrace); return(result); }); }
private void SymbolicateButton_Click(object sender, RoutedEventArgs e) { Properties.Settings.Default.ArchivePath = ArchivePathTextBox.Text; Properties.Settings.Default.CommandPath = CommandPathTextBox.Text; Properties.Settings.Default.PackageName = PackageNameTextBox.Text; Properties.Settings.Default.VersionCode = VersionCodeTextBox.Text; Properties.Settings.Default.Save(); var _helper = new SymbolicateHelper(ArchivePathTextBox.Text, CommandPathTextBox.Text); var symbolicatedTrace = _helper.Symbolicate(PackageNameTextBox.Text, VersionCodeTextBox.Text, InputTraceTextBox.Text); SymbolicatedTraceTextBox.Text = symbolicatedTrace.ToString(); }