예제 #1
0
        public object Build(AmendmentDetails model)
        {
            var index = this.GetAmendmentIndex(model.Owner, model.Amendment);

            var visitor = new ResourceBuildingAmendmentVisitor(model.Owner);

            return(model.Amendment.Accept(visitor, index));
        }
        public object Build(UndoAmendmentDetails model)
        {
            var visitor = new ResourceBuildingAmendmentVisitor(model.Owner);

            var amendments = model.Owner.Amendments.Select((amendment, index) => amendment.Accept(visitor, index));

            return(new UndoAmendmentResource
            {
                Amendments = amendments.ToArray(),
                Links = this.GetLinks(model)
            });
        }
예제 #3
0
        public object Build(AmendmentsDetails model)
        {
            var visitor = new ResourceBuildingAmendmentVisitor(model.Owner);

            return(model.Owner.Amendments.Select((amendment, index) => amendment.Accept(visitor, index)));
        }