コード例 #1
0
ファイル: Program.cs プロジェクト: flq/SoftLattice
 private static ProgrammaticStartupInfo CreateStartupInfo(string[] args)
 {
     if (args.Length != 1)
         return null;
     var assemblyNames = args[0].Split(';');
     var startupInfo = new ProgrammaticStartupInfo();
     foreach (var assembly in assemblyNames.Select(MakeAssembly).Where(a=> a != null))
         startupInfo.AddAssembly(assembly);
     return startupInfo;
 }
コード例 #2
0
 public static void LatticeAssemblies(this IAssemblyScanner scanner, ProgrammaticStartupInfo info)
 {
     if (info != null)
     {
         scanner.AssembliesFromStartupInfo(info);
         scanner.AssemblyContainingType<StartupRunner>();
         scanner.AssemblyContainingType<ILatticeGroup>();
     }
     else
     {
         scanner.ScanLatticePluginAssemblies();
     }
 }
コード例 #3
0
 public static void AssembliesFromStartupInfo(this IAssemblyScanner scanner, ProgrammaticStartupInfo info)
 {
     if (info != null)
         foreach (var a in info.PluginAssemblies)
             scanner.Assembly(a);
 }