Ejemplo n.º 1
0
        private void deserializeGITCommitsResponse(string responsecontent)
        {
            var commitsList = JsonConvert.DeserializeObject<dynamic>(responsecontent);

            if (commitsList != null && commitsList.Count > 0)
            {

                CommitDetails CommitDetailsRec = new CommitDetails();
                List<CommitDetails> CommitDetailsList = new List<CommitDetails>();

                for (int i = 0; i < 10; i++)
                {
                    CommitDetailsRec = new CommitDetails();

                    var commitmessage = commitsList[i].commit.message.Value;
                    var commitername = commitsList[i].commit.committer.name.Value;
                    //var commiteremail = commitsList[i].commit.committer.email.Value;
                    var commitdate = commitsList[i].commit.committer.date.Value;
                    CommitDetailsRec.Name = commitername;
                    // CommitDetailsRec.Email = commiteremail;
                    CommitDetailsRec.Date = commitdate.ToString();
                    CommitDetailsRec.Message = commitmessage;

                    CommitDetailsList.Add(CommitDetailsRec);
                }

                bindCommitsHistoryToWebpage(CommitDetailsList);
            }

            else
            {
                // GitHistorylabel.InnerText = "No Commit History Available";
            }
        }
Ejemplo n.º 2
0
        private void deserializeGITCommitsResponse(string responsecontent)
        {
            var commitsList = JsonConvert.DeserializeObject <dynamic>(responsecontent);

            if (commitsList != null && commitsList.Count > 0)
            {
                CommitDetails        CommitDetailsRec  = new CommitDetails();
                List <CommitDetails> CommitDetailsList = new List <CommitDetails>();

                for (int i = 0; i < 10; i++)
                {
                    CommitDetailsRec = new CommitDetails();

                    var commitmessage = commitsList[i].commit.message.Value;
                    var commitername  = commitsList[i].commit.committer.name.Value;
                    //var commiteremail = commitsList[i].commit.committer.email.Value;
                    var commitdate = commitsList[i].commit.committer.date.Value;
                    CommitDetailsRec.Name = commitername;
                    // CommitDetailsRec.Email = commiteremail;
                    CommitDetailsRec.Date    = commitdate.ToString();
                    CommitDetailsRec.Message = commitmessage;

                    CommitDetailsList.Add(CommitDetailsRec);
                }

                bindCommitsHistoryToWebpage(CommitDetailsList);
            }

            else
            {
                // GitHistorylabel.InnerText = "No Commit History Available";
            }
        }