コード例 #1
0
ファイル: AssemblyManager.cs プロジェクト: leo9223/ExtCore
    private static bool IsCandidateLibrary(ILibraryManager libraryManager, Library library)
    {
      if (library.Dependencies.Any(d => d.Contains("ExtCore.Infrastructure")))
        return true;

      return false;
    }
コード例 #2
0
        public void AddLibrary(Library library)
        {
            if (AdditionalLibraries.Any(lib => lib.Name == library.Name))
                return;

            AdditionalLibraries.Add(library);
        }
コード例 #3
0
 private IEnumerable<IPlugin> GetPluginsFromLibrary(Library library)
 {
     foreach (var assemblyName in library.Assemblies)
     {
         TypeInfo item;
         try
         {
             var assembly = Assembly.Load(assemblyName);
             item = assembly.DefinedTypes.FirstOrDefault(t => typeof(IPlugin).IsAssignableFrom(t) && !t.IsAbstract && !t.IsGenericType);
         }
         catch
         {
             yield break;
         }
         if (item != null)
         {
             var plugin = CreatePluginInstance(item);
             if (plugin != null)
                 yield return plugin;
         }
     }
 }
コード例 #4
0
 private bool IsCandidateLibrary(Library library)
 {
     return !_codeGenerationFrameworkAssemblies.Contains(library.Name);
 }
コード例 #5
0
 private static IEnumerable<AssemblyName> GetAssemblyNames(Library l)
 {
     return l.Assemblies.Where(asm =>
         !asm.Name.StartsWith("Microsoft") &&
         !asm.Name.StartsWith("System"));
 }
コード例 #6
0
 private bool IsCandidateLibrary(Library library)
 {
     Debug.Assert(ReferenceAssemblies != null);
     return !ReferenceAssemblies.Contains(library.Name);
 }
コード例 #7
0
 private bool IsCandidateLibrary(Library library)
 {
     return !ReferenceAssemblies.Contains(library.Name);
 }