Esempio n. 1
0
        static SQLiteFactory()
        {
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
            UnsafeNativeMethods.Initialize();
#endif

#if USE_INTEROP_DLL && INTEROP_LOG
            if (UnsafeNativeMethods.sqlite3_config_log_interop() == SQLiteErrorCode.Ok)
            {
                UnsafeNativeMethods.sqlite3_log(
                    SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized."));
            }
#endif

            SQLiteLog.Initialize();

            string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461
                "4.0.0.0";
#else
                "3.5.0.0";
#endif

            _dbProviderServicesType = Type.GetType(HelperMethods.StringFormat(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
        }
Esempio n. 2
0
        ///////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// This method is called to perform preliminary static initialization
        /// necessary for this class.
        /// </summary>
        internal static void PreInitialize()
        {
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
            UnsafeNativeMethods.Initialize();
#endif

            SQLiteLog.Initialize(typeof(SQLiteFactory).Name);
        }
        static SQLiteFactory()
        {
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
            UnsafeNativeMethods.Initialize();
#endif

            SQLiteLog.Initialize(typeof(SQLiteFactory).Name);

            string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
                "4.0.0.0";
#else
                "3.5.0.0";
#endif

            _dbProviderServicesType = Type.GetType(HelperMethods.StringFormat(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
        }
        static SQLiteFactory()
        {
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
            UnsafeNativeMethods.Initialize();
#endif

#if !PLATFORM_COMPACTFRAMEWORK
            SQLiteLog.Initialize();
#endif

            string version =
#if NET_20
                "3.5.0.0";
#else
                "4.0.0.0";
#endif

            _dbProviderServicesType = Type.GetType(String.Format("System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
        }