Exemple #1
0
 public static Type ResolveCmdClassByName(string name, AssemblyResolutionType targetedAssemblyResolutionType)
 {
     switch (targetedAssemblyResolutionType)
     {
         case AssemblyResolutionType.CallingAssembly:
             return ResolveAssemblyCmdClassByName(name, Assembly.GetCallingAssembly());
         case AssemblyResolutionType.EntryAssembly:
             return ResolveAssemblyCmdClassByName(name, Assembly.GetEntryAssembly());
         case AssemblyResolutionType.ExecutingAssembly:
             return ResolveAssemblyCmdClassByName(name, Assembly.GetExecutingAssembly());
     }
     return null;
 }
 public static void SetAssemblyResolution(AssemblyResolutionType resolutionType)
 {
     Interlocked.Exchange(ref s_resolutionType, (int)resolutionType);
 }