Ejemplo n.º 1
0
        public void Delete(VcsRunbookResource resource, string commitMessage = null)
        {
            var uri    = branch.Link(RunbookLinkId);
            var commit = new CommitResource
            {
                CommitMessage = commitMessage
            };

            repository.Client.Delete(uri, new { id = resource.Id }, commit);
        }
Ejemplo n.º 2
0
        public VcsRunbookResource Create(VcsRunbookResource resource, string commitMessage = null)
        {
            var uri = branch.Link(RunbookLinkId);
            var resourceWithCommit = new CommitResource <VcsRunbookResource>
            {
                CommitMessage = commitMessage,
                Resource      = resource
            };

            return(repository.Client.Post <CommitResource <VcsRunbookResource>, VcsRunbookResource>(uri, resourceWithCommit));
        }
Ejemplo n.º 3
0
        public VcsRunbookResource Modify(VcsRunbookResource resource, string commitMessage = null)
        {
            var uri = resource.Link("Self");
            var resourceWithCommit = new CommitResource <VcsRunbookResource>
            {
                CommitMessage = commitMessage,
                Resource      = resource
            };

            repository.Client.Put(uri, resourceWithCommit);
            return(repository.Client.Get <VcsRunbookResource>(uri));
        }