Ejemplo n.º 1
0
 /// <summary>
 /// 装载引用。
 /// </summary>
 /// <param name="reference">引用描述符。</param>
 /// <returns>程序集。</returns>
 public virtual Assembly LoadReference(DependencyReferenceDescriptor reference)
 {
     return null;
 }
        /// <summary>
        /// 装载引用。
        /// </summary>
        /// <param name="reference">引用描述符。</param>
        /// <returns>程序集。</returns>
        public override Assembly LoadReference(DependencyReferenceDescriptor reference)
        {
            if (Disabled)
                return null;

            Logger.Information("加载引用 '{0}'", reference.Name);

            var result = _assemblyProbingFolder.LoadAssembly(new AssemblyDescriptor(reference.Name));

            Logger.Information("完成加载引用 '{0}'", reference.Name);
            return result;
        }