/// <summary>
        /// Registers the specified namespace for loading embedded assemblies
        /// </summary>
        /// <param name="resourceNamespace">Namespace of where the embedded assemblies should be loaded</param>
        /// <param name="assembly">Assembly to load the embedded assemblies from, or null to use the calling assembly</param>
        /// <param name="domain">Application domain to load the assemblies in, or null to use the current app domain</param>
        /// <returns>A new instance of an EmbeddedAssemblyLoader, registered for the specified namespace and assembly</returns>
        public static EmbeddedAssemblyLoader Register(string resourceNamespace, Assembly assembly = null, AppDomain domain = null)
        {
            assembly = assembly ?? Assembly.GetCallingAssembly();
            var loader = new EmbeddedAssemblyLoader(resourceNamespace, assembly);

            loader.Register(domain);
            return(loader);
        }
Exemple #2
0
 static void Main()
 {
     EmbeddedAssemblyLoader.Register("PabloDraw.Assemblies");
     Program.Run();
 }