Пример #1
0
        /// <summary>
        /// Embed DLL's attached to the executable
        /// </summary>

        #region Embed DLL's

        public App()
        {
            DLLEmbed.Load("TFE_core.Library.SQLite.Community.CsharpSqlite.dll", "Community.CsharpSqlite.dll");
            DLLEmbed.Load("TFE_core.Library.SQLite.Community.CsharpSqlite.SQLiteClient.dll", "Community.CsharpSqlite.SQLiteClient.dll");
            DLLEmbed.Load("TFE_core.Library.Log4Net.log4net.dll", "log4net.dll");

            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
        }
Пример #2
0
        /// <summary>
        /// Embed DLL's attached to the executable
        /// </summary>

        #region Embed DLL's

        public App()
        {
            try
            {
                DLLEmbed.Load("TFE_core.Library.SQLite.Community.CsharpSqlite.dll", "Community.CsharpSqlite.dll");
                DLLEmbed.Load("TFE_core.Library.SQLite.Community.CsharpSqlite.SQLiteClient.dll", "Community.CsharpSqlite.SQLiteClient.dll");
                DLLEmbed.Load("TFE_core.Library.Log4Net.log4net.dll", "log4net.dll");

                AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);

                Filesystem.WriteLog("INFO : DLLs embedded in the application");
            }
            catch (Exception ex)
            {
                Filesystem.WriteLog("ERROR : DLLs embedding error : " + ex);
            }
        }
Пример #3
0
 static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
 {
     return(DLLEmbed.Get(args.Name));
 }