// Token: 0x06000953 RID: 2387 RVA: 0x0002BB40 File Offset: 0x00029D40
        private static EseDatabaseReader BuildEseDatabaseReader(string serverName, Guid dbGuid, string dbName, string dbPath)
        {
            EseDatabaseReader       eseDatabaseReader       = new EseDatabaseReader(dbName, dbGuid);
            SafeBackupContextHandle safeBackupContextHandle = eseDatabaseReader;

            SafeBackupContextHandle.GetAndSetIntPtrInCER(serverName, dbName, null, ref safeBackupContextHandle);
            bool flag = false;

            try
            {
                JET_DBINFOMISC jet_DBINFOMISC;
                int            databaseInfo = CReplicaSeederInterop.GetDatabaseInfo(eseDatabaseReader.handle, dbPath, out jet_DBINFOMISC);
                if (databaseInfo != 0)
                {
                    throw new FailedToGetDatabaseInfo(databaseInfo);
                }
                eseDatabaseReader.m_pageSize = (long)jet_DBINFOMISC.cbPageSize;
                eseDatabaseReader.m_dbPath   = dbPath;
                if (jet_DBINFOMISC.cbPageSize != 4096 && jet_DBINFOMISC.cbPageSize != 8192 && jet_DBINFOMISC.cbPageSize != 32768)
                {
                    throw new UnExpectedPageSizeException(dbPath, (long)jet_DBINFOMISC.cbPageSize);
                }
                flag = true;
            }
            finally
            {
                if (!flag)
                {
                    eseDatabaseReader.ReleaseHandle();
                }
            }
            return(eseDatabaseReader);
        }
        // Token: 0x06000954 RID: 2388 RVA: 0x0002BBE8 File Offset: 0x00029DE8
        public static IEseDatabaseReader GetRemoteEseDatabaseReader(string serverName, Guid databaseGuid, bool useClassicEseback)
        {
            string text;
            string text2;

            SeedHelper.GetDatabaseNameAndPath(databaseGuid, out text, out text2);
            if (useClassicEseback)
            {
                return(EseDatabaseReader.GetEseDatabaseReader(serverName, databaseGuid, text, text2));
            }
            return(new RemoteEseDatabaseReader(serverName, databaseGuid, text, text2));
        }