Beispiel #1
0
        public static string GetJson(this JiraIssue issue)
        {
            IEnumerable <PropertyInfo> properties = issue.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance)
                                                    .Where(p => p.CustomAttributes.Any(a => a.AttributeType == typeof(JSONField)));
            string fieldString = string.Join(DELIM, properties.Select(p => string.Format(FIELDNAME_TEMPLATE, JSONField.GetFieldName(p)) +
                                                                      string.Format(JSONField.GetTemplate(p), p.GetValue(issue))));

            return(string.Format(ISSUE_TEMPLATE, fieldString));
        }
Beispiel #2
0
        private void btnUpdateCredentials_Click(object sender, EventArgs e)
        {
            string       input  = string.Empty;
            DialogResult result = ShowInputDialog(ref input);

            if (result == DialogResult.OK)
            {
                txtPassword.Text = JiraIssue.GetCredentialString(txtUsername.Text, input);
            }
        }