Example #1
0
        public MergeModule(IChangesetService changesetService)
        {
            Get["/merge/candidates", runAsync: true] = async (parameter, ct) =>
            {
                var source = Request.Query.source;
                var destination = Request.Query.destination;
                var ignoreStartsWith = Request.Query.ignore.Value ?? "Merg";

                var candidates = await Task.Run(() =>
                    changesetService.MergeCandidates(source, destination, ignoreStartsWith));

                return Response.AsJson((IEnumerable<TfsChangesetMerged>)candidates);
            };
        }
Example #2
0
        public MergeModule(IChangesetService changesetService)
        {
            Get["/merge/candidates", runAsync : true] = async(parameter, ct) =>
            {
                var source           = Request.Query.source;
                var destination      = Request.Query.destination;
                var ignoreStartsWith = Request.Query.ignore.Value ?? "Merg";

                var candidates = await Task.Run(() =>
                                                changesetService.MergeCandidates(source, destination, ignoreStartsWith));

                return(Response.AsJson((IEnumerable <TfsChangesetMerged>)candidates));
            };
        }
        public ChangesetModule(ITfsService tfsService, IChangesetService changesetService)
        {
            Get["/changesets"] = parameters =>
            {
                string source         = Request.Query.source;
                var    from           = Request.Query.from;
                bool   includeChanges = false;

                var history = changesetService.History(source, from, includeChanges);

                return(Response.AsJson((IEnumerable <TfsChangeset>)history));
            };

            Get["/changeset/{id}"] = _ =>
            {
                var id = _.id;

                var changeset = tfsService.VCS.GetChangeset(id);

                return(Response.AsJson((TfsChangeset)changeset.ToModel()));
            };
        }
Example #4
0
        public ChangesetModule(ITfsService tfsService, IChangesetService changesetService)
        {
            Get["/changesets"] = parameters =>
            {
                string source = Request.Query.source;
                var from = Request.Query.from;
                bool includeChanges = false;

                var history = changesetService.History(source, from, includeChanges);

                return Response.AsJson((IEnumerable<TfsChangeset>)history);
            };

            Get["/changeset/{id}"] = _ =>
            {
                var id = _.id;

                var changeset = tfsService.VCS.GetChangeset(id);

                return Response.AsJson((TfsChangeset)changeset.ToModel());
            };
        }