private LoadLinkProtocolForLinkedSourceBuilder <TLinkedSource> LoadLinkPolymorphic <TAbstractLinkTarget, TLink, TDiscriminant>(
            Func <TLinkedSource, IEnumerable <TLink> > getLinks,
            ILinkTarget <TLinkedSource, TAbstractLinkTarget> linkTarget,
            Func <TLink, TDiscriminant> getDiscriminant,
            Action <IncludeSetBuilder <TLinkedSource, TAbstractLinkTarget, TLink, TDiscriminant> > includes, bool ignoreUnhandledCases)
        {
            var includeBuilder = new IncludeSetBuilder <TLinkedSource, TAbstractLinkTarget, TLink, TDiscriminant>(linkTarget);

            includes(includeBuilder);

            var loadLinkExpression = new LoadLinkExpressionImpl <TLinkedSource, TAbstractLinkTarget, TLink, TDiscriminant>(
                getLinks,
                linkTarget,
                includeBuilder.Build(getDiscriminant, ignoreUnhandledCases)
                );

            return(AddLoadLinkExpression(loadLinkExpression));
        }
Ejemplo n.º 2
0
 internal IncludeAsBuilder(IncludeSetBuilder <TLinkedSource, TAbstractLinkTarget, TLink, TDiscriminant> includeSetBuilder)
 {
     _includeSetBuilder = includeSetBuilder;
 }