コード例 #1
0
 internal LoadLinker(IReferenceLoader referenceLoader, List <List <Type> > referenceTypesToBeLoadedForEachLoadingLevel, LoadLinkProtocol loadLinkProtocol)
 {
     _referenceLoader = referenceLoader;
     _referenceTypesToBeLoadedForEachLoadingLevel = referenceTypesToBeLoadedForEachLoadingLevel;
     _loadLinkProtocol = loadLinkProtocol;
     _linker           = new Linker(_loadLinkProtocol, _dataStore);
 }
コード例 #2
0
 private void AddDependenciesForAllReferences(Dependency predecessor, LoadLinkProtocol loadLinkProtocol)
 {
     foreach (var include in _includeSet.GetIncludes <IIncludeWithAddLookupId <TLink> >())
     {
         include.AddDependency(predecessor, loadLinkProtocol);
     }
 }
コード例 #3
0
ファイル: LoadLinker.cs プロジェクト: fynnen/LinkIt
 internal LoadLinker(Func <IReferenceLoader> getReferenceLoader, IReadOnlyList <IReadOnlyList <Type> > referenceTypesToBeLoadedForEachLoadingLevel, LoadLinkProtocol loadLinkProtocol, LoadLinkDetails <TRootLinkedSource, TRootLinkedSourceModel> loadLinkDetails)
 {
     _referenceLoader = getReferenceLoader();
     _referenceTypesToBeLoadedForEachLoadingLevel = referenceTypesToBeLoadedForEachLoadingLevel;
     _loadLinkProtocol = loadLinkProtocol;
     _loadLinkDetails  = loadLinkDetails;
     _linker           = new Linker(_loadLinkProtocol, _dataStore);
 }
コード例 #4
0
        private void LinkNestedLinkedSourcesFromModel(object linkedSource, LoadLinkProtocol loadLinkProtocol)
        {
            var loadLinkExpressions = loadLinkProtocol.GetLoadLinkExpressions(linkedSource);

            foreach (var loadLinkExpression in loadLinkExpressions)
            {
                loadLinkExpression.LinkNestedLinkedSourceFromModel(
                    linkedSource,
                    this,
                    loadLinkProtocol
                    );
            }
        }
コード例 #5
0
 public void LinkNestedLinkedSourceById(
     object linkedSource,
     Linker linker,
     Type referenceTypeToBeLinked,
     LoadLinkProtocol loadLinkProtocol
     )
 {
     SetLinkTargetValues(
         linkedSource,
         link => _includeSet.GetIncludeWithCreateNestedLinkedSourceByIdForReferenceType(link, referenceTypeToBeLinked),
         (link, include, linkIndex) =>
         include.CreateNestedLinkedSourceById(
             link,
             linker,
             (TLinkedSource)linkedSource,
             linkIndex,
             loadLinkProtocol
             )
         );
 }
コード例 #6
0
ファイル: LoadLinkerWrapper.cs プロジェクト: fynnen/LinkIt
 public LoadLinkerWrapper(Func <IReferenceLoader> createReferenceLoader, IReadOnlyList <IReadOnlyList <Type> > referenceTypeToBeLoadedForEachLoadingLevel, LoadLinkProtocol loadLinkProtocol)
 {
     _createReferenceLoader = createReferenceLoader;
     _referenceTypeToBeLoadedForEachLoadingLevel = referenceTypeToBeLoadedForEachLoadingLevel;
     _loadLinkProtocol = loadLinkProtocol;
 }
コード例 #7
0
 public ILoadLinker <TLinkedSource> CreateLoadLinker(Func <IReferenceLoader> createReferenceLoader,
                                                     IReadOnlyList <IReadOnlyList <Type> > referenceTypeToBeLoadedForEachLoadingLevel,
                                                     LoadLinkProtocol loadLinkProtocol)
 {
     return(new LoadLinkerWrapper <TLinkedSource, TLinkedSourceModel>(createReferenceLoader, referenceTypeToBeLoadedForEachLoadingLevel, loadLinkProtocol));
 }
コード例 #8
0
 public void LinkNestedLinkedSourceFromModel(object linkedSource, Linker linker, LoadLinkProtocol loadLinkProtocol)
 {
     SetLinkTargetValues(
         linkedSource,
         _includeSet.GetIncludeWithCreateNestedLinkedSourceFromModel,
         (link, include, linkIndex) => include.CreateNestedLinkedSourceFromModel(
             link,
             linker,
             (TLinkedSource)linkedSource,
             linkIndex,
             loadLinkProtocol
             )
         );
 }
コード例 #9
0
 private void AddDependenciesForAllNestedLinkedSources(Dependency predecessor, LoadLinkProtocol loadLinkProtocol)
 {
     foreach (var include in _includeSet.GetIncludes <IIncludeWithCreateNestedLinkedSourceFromModel <TLinkedSource, TAbstractLinkTarget, TLink> >())
     {
         include.AddDependenciesForAllLinkTargets(predecessor, loadLinkProtocol);
     }
 }
コード例 #10
0
 public void AddDependencyForEachInclude(Dependency predecessor, LoadLinkProtocol loadLinkProtocol)
 {
     AddDependenciesForAllReferences(predecessor, loadLinkProtocol);
     AddDependenciesForAllNestedLinkedSources(predecessor, loadLinkProtocol);
 }
コード例 #11
0
 public Linker(LoadLinkProtocol loadLinkProtocol, DataStore dataStore)
 {
     _loadLinkProtocol = loadLinkProtocol;
     _dataStore        = dataStore;
 }