예제 #1
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public void Dispose()
        {
            IAssemblyLoader al = AssemblyLoader;

            foreach (IMetadataModule module in al.Modules)
            {
                al.Unload(module);
            }

            _instance = null;
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RuntimeBase"/> class.
 /// </summary>
 protected RuntimeBase()
 {
     _instance = this;
 }
예제 #3
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public void Dispose()
        {
            IAssemblyLoader al = AssemblyLoader;
            foreach (IMetadataModule module in al.Modules)
                al.Unload(module);

            _instance = null;
        }
        private IMetadataModule LoadAssembly(RuntimeBase runtime, string assemblyFileName)
        {
            try
            {
                IMetadataModule assemblyModule = runtime.AssemblyLoader.Load(assemblyFileName);

                // Try to load debug information for the compilation
                this.LoadAssemblyDebugInfo(assemblyFileName);

                return assemblyModule;
            }
            catch (BadImageFormatException bife)
            {
                throw new CompilationException(String.Format("Couldn't load input file {0} (invalid format).", assemblyFileName), bife);
            }
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RuntimeBase"/> class.
 /// </summary>
 protected RuntimeBase()
 {
     _instance = this;
 }