public static IResourcePathContextBuilder <TParentBuilder> AddPath <TParentBuilder, TFromResource, TToResource>(this IResourcePathContextBuilder <TParentBuilder> resourcePathContextBuilder, IToManyIncludedResources <TFromResource, TToResource> toManyIncludedResources)
            where TParentBuilder : class
            where TFromResource : class
            where TToResource : class
        {
            Contract.Requires(resourcePathContextBuilder != null);
            Contract.Requires(toManyIncludedResources != null);

            var fromResource = toManyIncludedResources.FromResource;
            var fromRel      = toManyIncludedResources.FromRel;

            return(resourcePathContextBuilder.AddPath(fromResource, fromRel));
        }
Beispiel #2
0
        public static IResourcePathContextBuilder <TParentBuilder> AddPath <TParentBuilder, TFromResource, TToResource>(this IResourcePathContextBuilder <TParentBuilder> resourcePathContextBuilder, IToManyResourceLinkage <TFromResource, TToResource> toManyResourceLinkage)
            where TParentBuilder : class
            where TFromResource : class, IResource
            where TToResource : class, IResource
        {
            Contract.Requires(resourcePathContextBuilder != null);
            Contract.Requires(toManyResourceLinkage != null);

            var fromResource = toManyResourceLinkage.FromResource;
            var fromRel      = toManyResourceLinkage.FromRel;

            return(resourcePathContextBuilder.AddPath(fromResource, fromRel));
        }