示例#1
0
        public static TBuilder AddSelfLink <TBuilder, TParentBuilder>(this ILinksBuilder <TBuilder, TParentBuilder> linksBuilder, IEnumerable <Link> linkCollection)
        {
            Contract.Requires(linksBuilder != null);
            Contract.Requires(linkCollection != null);

            return(linksBuilder.AddLink(Keywords.Self, linkCollection));
        }
示例#2
0
        public static TBuilder AddSelfLink <TBuilder, TParentBuilder>(this ILinksBuilder <TBuilder, TParentBuilder> linksBuilder, Link link)
        {
            Contract.Requires(linksBuilder != null);
            Contract.Requires(link != null);

            return(linksBuilder.AddLink(Keywords.Self, link));
        }
示例#3
0
        // PUBLIC METHODS ///////////////////////////////////////////////////
        #region Extension Methods
        public static TBuilder AddLink <TBuilder, TParentBuilder>(this ILinksBuilder <TBuilder, TParentBuilder> linksBuilder, string rel, params Link[] linkCollection)
        {
            Contract.Requires(linksBuilder != null);
            Contract.Requires(linkCollection != null);

            return(linksBuilder.AddLink(rel, linkCollection.AsEnumerable()));
        }
 public ProductsController(ILogger <ProductsController> logger, IDutchArtRepository repository, IMapper mapper, ILinksBuilder linksBuilder)
 {
     this.logger       = logger;
     this.repository   = repository;
     this.mapper       = mapper;
     this.linksBuilder = linksBuilder;
 }
示例#5
0
        public static TBuilder AddSelfLink <TBuilder, TParentBuilder>(this ILinksBuilder <TBuilder, TParentBuilder> linksBuilder)
            where TBuilder : class
            where TParentBuilder : class
        {
            Contract.Requires(linksBuilder != null);

            return(linksBuilder.AddLink(Keywords.Self));
        }