Example #1
0
        public ILoadLinker <TRootLinkedSource> LoadLink <TRootLinkedSource>()
        {
            var loadingLevels      = GetLoadingLevelsFor <TRootLinkedSource>();
            var linkedSourceConfig = LinkedSourceConfigs.GetConfigFor <TRootLinkedSource>();

            return(linkedSourceConfig.CreateLoadLinker(_createReferenceLoader, loadingLevels, this));
        }
Example #2
0
 public ILoadLinker <TRootLinkedSource> LoadLink <TRootLinkedSource>()
 {
     return(LinkedSourceConfigs.GetConfigFor <TRootLinkedSource>().CreateLoadLinker(
                _createReferenceLoader,
                GetLoadingLevelsFor <TRootLinkedSource>(),
                this
                ));
 }
Example #3
0
        internal DependencyGraph CreateDependencyGraph(Type rootLinkedSourceType)
        {
            var dependencyGraph = new DependencyGraph();

            var rootLinkedSourceConfig = LinkedSourceConfigs.GetConfigFor(rootLinkedSourceType);
            var rootDependency         = dependencyGraph.GetOrAdd(rootLinkedSourceConfig.LinkedSourceModelType, rootLinkedSourceConfig.LinkedSourceType);

            try
            {
                AddDependenciesForAllLinkTargets(rootLinkedSourceConfig.LinkedSourceType, rootDependency);
            }
            catch (NotSupportedException ex)
            {
                throw new NotSupportedException(
                          $"Unable to create the load link protocol for {rootLinkedSourceConfig.LinkedSourceType}. For more details, see inner exception.",
                          ex
                          );
            }

            return(dependencyGraph);
        }