Esempio n. 1
0
        public void Enrich(IHalResponseBuilder halResponseBuilder, ServiceComment serviceComment, string serviceId)
        {
            if (halResponseBuilder == null)
            {
                throw new ArgumentNullException(nameof(halResponseBuilder));
            }

            if (serviceComment == null)
            {
                throw new ArgumentNullException(nameof(serviceComment));
            }

            halResponseBuilder.AddEmbedded(e => e.AddObject(_responseBuilder.GetServiceComment(serviceComment),
                                                            (l) => l.AddOtherItem("service", new Dtos.Link("/" + Constants.RouteNames.Services + "/" + serviceId))));
        }