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)); }
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)); }
// 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; }
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)); }