Exemplo n.º 1
0
        // Token: 0x060009B2 RID: 2482 RVA: 0x0002DC70 File Offset: 0x0002BE70
        internal EseLogHeaderRecord(string input)
        {
            Match match = base.Match(input);

            this.m_signature        = match.Groups["Signature"].ToString();
            this.m_generation       = long.Parse(match.Groups["Generation"].ToString(), NumberStyles.HexNumber, CultureInfo.InvariantCulture);
            this.m_logFormatVersion = match.Groups["LogFormatVersion"].ToString();
            this.m_creationTime     = DateTime.ParseExact(match.Groups["CreationTime"].ToString(), "MM/dd/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
            if ("00/00/1900 00:00:00" == match.Groups["PreviousGenerationCreationTime"].ToString())
            {
                DiagCore.RetailAssert(1L == this.m_generation, "Generation {0} has a blank PrevGenCreationTime ({1}). input is {2}, regex is {3}", new object[]
                {
                    this.m_generation,
                    match.Groups["PreviousGenerationCreationTime"].ToString(),
                    input,
                    EseLogHeaderRecord.regex.ToString()
                });
                this.m_previousGenerationCreationTime = DateTime.MinValue;
            }
            else
            {
                this.m_previousGenerationCreationTime = DateTime.ParseExact(match.Groups["PreviousGenerationCreationTime"].ToString(), "MM/dd/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
            }
            string text = match.Groups["CircularLogging"].ToString();

            if ("0x1" == text)
            {
                this.m_isCircularLoggingOn = true;
            }
            else if ("0x0" == text)
            {
                this.m_isCircularLoggingOn = false;
            }
            else
            {
                ExDiagnostics.FailFast(string.Format(CultureInfo.CurrentCulture, "circular logging field {0} failed to match {1} or {2}. input is {3}, regex is {4}", new object[]
                {
                    text,
                    "0x1",
                    "0x0",
                    input,
                    EseLogHeaderRecord.regex.ToString()
                }), true);
            }
            this.SectorSize = int.Parse(match.Groups["SectorSizeGroup"].ToString());
        }
Exemplo n.º 2
0
        // Token: 0x06000976 RID: 2422 RVA: 0x0002C708 File Offset: 0x0002A908
        private static void InternalTestCreateTempLog()
        {
            string randomFileName = Path.GetRandomFileName();
            string text           = "e13";
            string destFileName   = Path.Combine(randomFileName, "e13.log");
            string text2          = Path.Combine(randomFileName, "e13tmp.log");

            DiagCore.RetailAssert(!File.Exists(text2), "file {0} shouldn't exist", new object[]
            {
                text2
            });
            Exception ex;
            bool      condition = EseHelper.CreateTempLog(text, randomFileName, out ex);

            DiagCore.RetailAssert(condition, "CreateTempLog({0},{1}) returned false", new object[]
            {
                text,
                randomFileName
            });
            DiagCore.RetailAssert(File.Exists(text2), "file {0} should exist", new object[]
            {
                text2
            });
            condition = EseHelper.CreateTempLog(text, randomFileName, out ex);
            DiagCore.RetailAssert(condition, "CreateTempLog({0},{1}) returned false", new object[]
            {
                text,
                randomFileName
            });
            DiagCore.RetailAssert(File.Exists(text2), "file {0} should exist", new object[]
            {
                text2
            });
            File.Move(text2, destFileName);
            condition = EseHelper.CreateTempLog(text, randomFileName, out ex);
            DiagCore.RetailAssert(condition, "CreateTempLog({0},{1}) returned false", new object[]
            {
                text,
                randomFileName
            });
            DiagCore.RetailAssert(!File.Exists(text2), "file {0} shouldn't exist", new object[]
            {
                text2
            });
            Directory.Delete(randomFileName, true);
        }
Exemplo n.º 3
0
        // Token: 0x06001353 RID: 4947 RVA: 0x0004E3D8 File Offset: 0x0004C5D8
        internal static CopyStatusClientCachedEntry[] GetAllCopyStatuses(AmServerName amServer, RpcGetDatabaseCopyStatusFlags2 collectionFlags2, IEnumerable <IADDatabase> expectedDatabases, int timeoutMs, ActiveManager activeManager, bool isGetHealthStates, out RpcHealthStateInfo[] healthStates, out Exception exception)
        {
            CopyStatusClientCachedEntry[] result   = null;
            RpcDatabaseCopyStatus2[]      statuses = null;
            TimeSpan rpcDuration = TimeSpan.Zero;

            new ReplayStopwatch();
            Exception tempEx = null;

            exception    = null;
            healthStates = null;
            RpcHealthStateInfo[] tmpHealthStates = null;
            tempEx = CopyStatusHelper.TimeCopyStatusRpc(delegate
            {
                if (!isGetHealthStates)
                {
                    statuses = Dependencies.ReplayRpcClientWrapper.GetCopyStatus(amServer.Fqdn, collectionFlags2, null, timeoutMs);
                    return;
                }
                RpcCopyStatusContainer copyStatusWithHealthState = Dependencies.ReplayRpcClientWrapper.GetCopyStatusWithHealthState(amServer.Fqdn, collectionFlags2, null, timeoutMs);
                statuses        = copyStatusWithHealthState.CopyStatuses;
                tmpHealthStates = copyStatusWithHealthState.HealthStates;
            }, out rpcDuration);
            healthStates = tmpHealthStates;
            exception    = tempEx;
            if (exception != null)
            {
                result = (from db in expectedDatabases
                          select CopyStatusHelper.ConstructCopyStatusCachedEntry(db.Guid, amServer, null, tempEx, rpcDuration, activeManager)).ToArray <CopyStatusClientCachedEntry>();
            }
            else if (statuses != null)
            {
                Dictionary <Guid, RpcDatabaseCopyStatus2> tempStatusTable = statuses.ToDictionary((RpcDatabaseCopyStatus2 status) => status.DBGuid);
                tempEx = new ReplayServiceRpcUnknownInstanceException();
                result = (from db in expectedDatabases
                          let guid = db.Guid
                                     let statusFound = tempStatusTable.ContainsKey(guid)
                                                       select CopyStatusHelper.ConstructCopyStatusCachedEntry(guid, amServer, statusFound ? tempStatusTable[guid] : null, statusFound ? null : tempEx, rpcDuration, activeManager)).ToArray <CopyStatusClientCachedEntry>();
            }
            else
            {
                DiagCore.RetailAssert(false, "If no exception was thrown by GetCopyStatus RPC, then we should have some status results!", new object[0]);
            }
            return(result);
        }
 // Token: 0x0600088A RID: 2186 RVA: 0x00028CE0 File Offset: 0x00026EE0
 public static void TriggerBugcheckIfRequired(DateTime bugcheckRequestTimeUtc, string bugcheckReason)
 {
     if (RegistryParameters.DisableBugcheckOnHungIo != 0)
     {
         ReplayCrimsonEvents.BugcheckAttemptSkipped.Log <string>(bugcheckReason);
         return;
     }
     if (Interlocked.CompareExchange(ref BugcheckHelper.s_numThreadsInBugcheck, 1, 0) == 1)
     {
         ReplayCrimsonEvents.BugcheckAttemptSkippedInProgress.Log <string>(bugcheckReason);
         return;
     }
     try
     {
         DateTime utcNow        = DateTime.UtcNow;
         DateTime localBootTime = AmHelper.GetLocalBootTime();
         if (bugcheckRequestTimeUtc > localBootTime || localBootTime >= utcNow)
         {
             ReplayCrimsonEvents.BugCheckAttemptTriggered.Log <string, string>(localBootTime.ToString("s"), bugcheckReason);
             bool flag = false;
             ExTraceGlobals.FaultInjectionTracer.TraceTest <bool>(4291177789U, ref flag);
             Exception ex = null;
             if (!flag)
             {
                 ex = BugcheckHelper.KillWinInitProcess();
             }
             else
             {
                 AmTrace.Error("Skipping KillProcess() of 'winint.exe' due to Fault Injection.", new object[0]);
             }
             if (ex != null)
             {
                 ReplayCrimsonEvents.BugcheckAttemptFailed.Log <string, string, string>(ex.Message, localBootTime.ToString("s"), bugcheckReason);
             }
         }
     }
     finally
     {
         if (Interlocked.CompareExchange(ref BugcheckHelper.s_numThreadsInBugcheck, 0, 1) == 0)
         {
             DiagCore.RetailAssert(false, "We should not have more than 1 thread in TriggerBugcheckIfRequired()", new object[0]);
         }
     }
 }
Exemplo n.º 5
0
        // Token: 0x06001359 RID: 4953 RVA: 0x0004E9F4 File Offset: 0x0004CBF4
        private static CopyStatusClientCachedEntry ConstructCopyStatusCachedEntry(Guid dbGuid, AmServerName server, RpcDatabaseCopyStatus2 status, Exception exception, TimeSpan rpcDuration, ActiveManager activeManager)
        {
            CopyStatusClientCachedEntry copyStatusClientCachedEntry = new CopyStatusClientCachedEntry(dbGuid, server);

            copyStatusClientCachedEntry.CopyStatus    = status;
            copyStatusClientCachedEntry.RpcDuration   = rpcDuration;
            copyStatusClientCachedEntry.LastException = exception;
            copyStatusClientCachedEntry.Result        = CopyStatusHelper.ConvertExceptionToCopyStatusRpcResultEnum(exception);
            if (status != null)
            {
                copyStatusClientCachedEntry.ActiveServer = new AmServerName(status.ActiveDatabaseCopy, false);
            }
            else if (activeManager != null)
            {
                copyStatusClientCachedEntry.ActiveServer = CopyStatusHelper.GetActiveServerForDatabase(dbGuid, activeManager);
            }
            DiagCore.RetailAssert(copyStatusClientCachedEntry.Result != CopyStatusRpcResult.Success || copyStatusClientCachedEntry.CopyStatus != null, "If the GetCopyStatus RPC result was 'Success', we have to have a CopyStatus value!", new object[0]);
            DiagCore.RetailAssert(copyStatusClientCachedEntry.CopyStatus != null || copyStatusClientCachedEntry.Result != CopyStatusRpcResult.Success, "If the CopyStatus value was null, we have to return a Result that is *not* 'Success'!", new object[0]);
            return(copyStatusClientCachedEntry);
        }
Exemplo n.º 6
0
 // Token: 0x06001C8C RID: 7308 RVA: 0x0007DA90 File Offset: 0x0007BC90
 private void AssertMembersAreZero()
 {
     DiagCore.RetailAssert(0L == this.m_lowestGenerationPresent, "m_lowestGenerationPresent is not 0", new object[0]);
     DiagCore.RetailAssert(0L == this.m_highestGenerationPresent, "m_highestGenerationPresent is not 0", new object[0]);
     DiagCore.RetailAssert(0L == this.m_lowestGenerationRequired, "m_lowestGenerationRequired is not 0", new object[0]);
     DiagCore.RetailAssert(0L == this.m_highestGenerationRequired, "m_highestGenerationRequired is not 0", new object[0]);
     DiagCore.RetailAssert(0L == this.m_lastGenerationBackedUp, "m_lastGenerationBackedUp is not 0", new object[0]);
     DiagCore.RetailAssert(0L == this.m_checkpointGeneration, "m_checkpointGeneration is not 0", new object[0]);
     DiagCore.RetailAssert(this.m_logfileSignature == null, "m_logfileSignature is not null", new object[0]);
     DiagCore.RetailAssert(this.m_latestFullBackupTime == null, "m_latestFullBackupTime is not null", new object[0]);
     DiagCore.RetailAssert(this.m_latestIncrementalBackupTime == null, "m_latestIncrementalBackupTime is not null", new object[0]);
     DiagCore.RetailAssert(this.m_latestDifferentialBackupTime == null, "m_latestDifferentialBackupTime is not null", new object[0]);
     DiagCore.RetailAssert(this.m_latestCopyBackupTime == null, "m_latestCopyBackupTime is not null", new object[0]);
     DiagCore.RetailAssert(this.m_snapshotBackup == null, "m_snapshotBackup is not null", new object[0]);
     DiagCore.RetailAssert(this.m_snapshotLatestFullBackup == null, "m_snapshotLatestFullBackup is not null", new object[0]);
     DiagCore.RetailAssert(this.m_snapshotLatestIncrementalBackup == null, "m_snapshotLatestIncrementalBackup is not null", new object[0]);
     DiagCore.RetailAssert(this.m_snapshotLatestDifferentialBackup == null, "m_snapshotLatestDifferentialBackup is not null", new object[0]);
     DiagCore.RetailAssert(this.m_snapshotLatestCopyBackup == null, "m_snapshotLatestCopyBackup is not null", new object[0]);
     DiagCore.RetailAssert(!this.m_consistentDatabase, "m_consistentDatabase is not false", new object[0]);
 }
Exemplo n.º 7
0
        // Token: 0x06000979 RID: 2425 RVA: 0x0002C8C4 File Offset: 0x0002AAC4
        private static void InternalTestNameGeneration()
        {
            ExTraceGlobals.EseutilWrapperTracer.TraceDebug(0L, "EseHelper.InternalTestNameGeneration");
            string text = EseHelper.MakeCheckpointFileName("E09");

            DiagCore.RetailAssert("E09.chk" == text, "MakeCheckpointFileName returned {0}", new object[]
            {
                text
            });
            text = EseHelper.MakeLogfileName("E00", ".jtx", 5670691L);
            DiagCore.RetailAssert("E0000568723.jtx" == text, "MakeLogfileName returned {0}", new object[]
            {
                text
            });
            text = EseHelper.MakeLogfileName("E01", ".log");
            DiagCore.RetailAssert("E01.log" == text, "MakeLogfileName returned {0}", new object[]
            {
                text
            });
        }
 // Token: 0x06001B24 RID: 6948 RVA: 0x000751E0 File Offset: 0x000733E0
 private Exception GetException()
 {
     if (this.m_lastException != null)
     {
         return(this.m_lastException);
     }
     try
     {
         SeederRpcExceptionWrapper.Instance.ClientRethrowIfFailed(this.m_databaseName, this.m_client.ServerName, this.m_status.ErrorInfo);
     }
     catch (SeederServerException result)
     {
         return(result);
     }
     catch (SeederServerTransientException result2)
     {
         return(result2);
     }
     DiagCore.RetailAssert(false, "No exception was thrown in GetException()!", new object[0]);
     return(null);
 }
Exemplo n.º 9
0
        // Token: 0x06001143 RID: 4419 RVA: 0x00046808 File Offset: 0x00044A08
        public void WriteHeader()
        {
            this.AssertWriteOperationValid();
            if (this.m_header.NumPagesToPatch > 3276800)
            {
                throw new PagePatchTooManyPagesToPatchException(this.m_header.NumPagesToPatch, 3276800);
            }
            byte[] array  = new byte[32768L];
            byte[] array2 = SerializationServices.Serialize(this.m_header);
            DiagCore.RetailAssert(array2.Length <= array.Length - 4, "Serialized header state in bytes ({0}) is greater than pre-allocated fixed byte size of {1} bytes.", new object[]
            {
                array2.Length,
                array.Length
            });
            int num = 0;

            Array.Copy(BitConverter.GetBytes(array2.Length), 0, array, num, 4);
            num += 4;
            Array.Copy(array2, 0, array, num, array2.Length);
            this.SeekToStart();
            this.m_fileStream.Write(array, 0, array.Length);
            this.m_fileStream.Flush(true);
        }
Exemplo n.º 10
0
        // Token: 0x06000E42 RID: 3650 RVA: 0x0003DADC File Offset: 0x0003BCDC
        public unsafe static bool Compress(byte[] inBuf, int inOffset, int inLength, byte[] outBuf, int outOffset, int maxOutLength, out int compressedSize)
        {
            DiagCore.RetailAssert(outBuf.Length >= outOffset + maxOutLength, "BufferOverflow: Offset({0}) + Len({1}) exceeds buffer length({2})", new object[]
            {
                outOffset,
                maxOutLength,
                outBuf.Length
            });
            compressedSize = maxOutLength;
            fixed(byte *ptr = inBuf)
            {
                fixed(byte *ptr2 = outBuf)
                {
                    if (Xpress.EcCompressEx(new IntPtr((void *)((byte *)ptr + inOffset)), inLength, new IntPtr((void *)((byte *)ptr2 + outOffset)), ref compressedSize) == 0 && compressedSize < inLength)
                    {
                        return(true);
                    }
                }
            }

            compressedSize = inLength;
            Array.Copy(inBuf, inOffset, outBuf, outOffset, inLength);
            return(false);
        }
Exemplo n.º 11
0
 private void ProcessReadCallback(PassiveReadRequest ioReq, int bytesAvailable, bool completionIsSynchronous, Exception readEx)
 {
     PassiveBlockMode.Tracer.TraceFunction <string>((long)this.GetHashCode(), "ProcessReadCallback({0}) entered", this.DatabaseName);
     lock (this.m_workerLock)
     {
         this.DisableTimer();
         Exception ex    = null;
         bool      flag2 = false;
         try
         {
             this.m_recursionDepth++;
             DiagCore.RetailAssert(this.m_recursionDepth == 1 || completionIsSynchronous, "recursive async completion", new object[0]);
             ioReq.CompletionWasProcessed = true;
             if (completionIsSynchronous)
             {
                 ioReq.CompletedSynchronously = completionIsSynchronous;
             }
             if (readEx != null)
             {
                 PassiveBlockMode.Tracer.TraceError <string, Exception>((long)this.GetHashCode(), "ProcessReadCallback({0}) read failed: ex={1}", this.DatabaseName, readEx);
                 ex = new NetworkCommunicationException(this.Configuration.SourceMachine, readEx.Message, readEx);
             }
             else if (bytesAvailable == 0)
             {
                 PassiveBlockMode.Tracer.TraceError <string>((long)this.GetHashCode(), "ProcessReadCallback({0}) active closed connection", this.DatabaseName);
                 ex = new NetworkEndOfDataException(this.Configuration.SourceMachine, ReplayStrings.NetworkReadEOF);
             }
             else if (ioReq.Channel != this.m_netChannel)
             {
                 ex    = new NetworkEndOfDataException(this.Configuration.SourceMachine, ReplayStrings.NetworkReadEOF);
                 flag2 = true;
                 ioReq.Channel.Close();
             }
             else if (!this.IsBlockModeActive)
             {
                 PassiveBlockMode.Tracer.TraceError <string>((long)this.GetHashCode(), "Discarding read since BM was already terminated", this.DatabaseName);
             }
             else
             {
                 QueuedBlockMsg queuedBlockMsg = this.ReadInputMessage(ioReq.Channel);
                 if (queuedBlockMsg != null)
                 {
                     this.ProcessInput(queuedBlockMsg);
                     if (BitMasker.IsOn((int)queuedBlockMsg.EmitContext.grbitOperationalFlags, 2))
                     {
                         this.HandleActiveDismount();
                         return;
                     }
                     if (BitMasker.IsOn((int)queuedBlockMsg.EmitContext.grbitOperationalFlags, 16))
                     {
                         this.Copier.TrackLastContactTime(queuedBlockMsg.MessageUtc);
                     }
                 }
                 if (this.m_recursionDepth == 1)
                 {
                     while (this.IsBlockModeActive)
                     {
                         PassiveReadRequest passiveReadRequest = this.StartRead();
                         if (!passiveReadRequest.CompletionWasProcessed)
                         {
                             if (!this.m_runningAcll)
                             {
                                 this.ScheduleTimer();
                                 break;
                             }
                             break;
                         }
                     }
                 }
                 else
                 {
                     PassiveBlockMode.Tracer.TraceDebug <int>((long)this.GetHashCode(), "Recursive read avoided. Depth={0}", this.m_recursionDepth);
                 }
             }
         }
         catch (NetworkTransportException ex2)
         {
             ex = ex2;
         }
         catch (NetworkRemoteException ex3)
         {
             ex = ex3;
         }
         catch (GranularReplicationOverflowException ex4)
         {
             ex = ex4;
         }
         finally
         {
             this.m_recursionDepth--;
             if (ex != null && !flag2)
             {
                 this.Terminate();
             }
             PassiveBlockMode.Tracer.TraceFunction <string>((long)this.GetHashCode(), "ProcessReadCallback({0}) exits", this.DatabaseName);
         }
     }
 }
Exemplo n.º 12
0
        // Token: 0x06001C8A RID: 7306 RVA: 0x0007D784 File Offset: 0x0007B984
        internal static void InternalTest()
        {
            FileState.TestInternalCheck();
            FileState fileState = new FileState();

            fileState.AssertMembersAreZero();
            fileState.SetLowestAndHighestGenerationsPresent(2L, 3L);
            fileState.SetLowestAndHighestGenerationsRequired(8L, 9L, false);
            fileState.LastGenerationBackedUp = 1L;
            fileState.CheckpointGeneration   = 7L;
            DiagCore.RetailAssert(!fileState.ConsistentDatabase, "ConsistentDatabase is {0}, expected {1}", new object[]
            {
                fileState.ConsistentDatabase,
                false
            });
            DiagCore.RetailAssert(2L == fileState.LowestGenerationPresent, "LowestGenerationPresent is {0}, expected {1}", new object[]
            {
                fileState.LowestGenerationPresent,
                2
            });
            DiagCore.RetailAssert(3L == fileState.HighestGenerationPresent, "HighestGenerationPresent is {0}, expected {1}", new object[]
            {
                fileState.HighestGenerationPresent,
                3
            });
            DiagCore.RetailAssert(8L == fileState.LowestGenerationRequired, "LowestGenerationRequired is {0}, expected {1}", new object[]
            {
                fileState.LowestGenerationRequired,
                8
            });
            DiagCore.RetailAssert(9L == fileState.HighestGenerationRequired, "HighestGenerationRequired is {0}, expected {1}", new object[]
            {
                fileState.HighestGenerationRequired,
                9
            });
            DiagCore.RetailAssert(1L == fileState.LastGenerationBackedUp, "LastGenerationBackedUp is {0}, expected {1}", new object[]
            {
                fileState.LastGenerationBackedUp,
                1
            });
            DiagCore.RetailAssert(7L == fileState.CheckpointGeneration, "CheckpointGeneration is {0}, expected {1}", new object[]
            {
                fileState.CheckpointGeneration,
                7
            });
            fileState.Reset();
            fileState.AssertMembersAreZero();
            DiagCore.RetailAssert(fileState.RequiredLogfilesArePresent(), "RequiredLogfilesArePresent", new object[0]);
            fileState.SetLowestAndHighestGenerationsPresent(18L, 21L);
            fileState.SetLowestAndHighestGenerationsRequired(18L, 21L, false);
            DiagCore.RetailAssert(fileState.RequiredLogfilesArePresent(), "RequiredLogfilesArePresent", new object[0]);
            fileState.Reset();
            fileState.SetLowestAndHighestGenerationsPresent(18L, 21L);
            fileState.SetLowestAndHighestGenerationsRequired(19L, 20L, false);
            DiagCore.RetailAssert(fileState.RequiredLogfilesArePresent(), "RequiredLogfilesArePresent", new object[0]);
            fileState.Reset();
            fileState.SetLowestAndHighestGenerationsPresent(18L, 21L);
            fileState.SetLowestAndHighestGenerationsRequired(19L, 22L, false);
            DiagCore.RetailAssert(!fileState.RequiredLogfilesArePresent(), "RequiredLogfilesArePresent", new object[0]);
            fileState.Reset();
            fileState.SetLowestAndHighestGenerationsPresent(18L, 21L);
            fileState.SetLowestAndHighestGenerationsRequired(17L, 20L, false);
            DiagCore.RetailAssert(fileState.RequiredLogfilesArePresent(), "RequiredLogfilesArePresent", new object[0]);
            fileState.Reset();
        }
Exemplo n.º 13
0
        // Token: 0x0600097A RID: 2426 RVA: 0x0002C978 File Offset: 0x0002AB78
        private static void InternalTestParseLogfileDump()
        {
            ExTraceGlobals.EseutilWrapperTracer.TraceDebug(0L, "EseHelper.InternalTestParseLogfileDump");
            string value = string.Concat(new string[]
            {
                "LHGI, Create time:12/14/2005 15:30:42 Rand:9483281 Computer:, 00004B9E, 01/23/2006 09:09:02, 01/23/2006 09:06:33, 7.3704.8, 0x0",
                Environment.NewLine,
                "LHGI, Create time:01/28/2006 16:32:56 Rand:277109190 Computer:, 00000001, 01/28/2006 16:32:56, 00/00/1900 00:00:00, 7.3704.8, 0x1",
                Environment.NewLine,
                "LHAI, 1, D:\\StoreA\\MDB1\\priv1.edb",
                Environment.NewLine,
                "LRDI, 0000000075CBABC3, CreateDB , 1, C:\\temp3\\bar.edb",
                Environment.NewLine,
                "LRDI, 0000000075FBABC3, AttachDB , 2, bar.edb",
                Environment.NewLine,
                "LRDI, 0047000075CBABC3, DetachDB , 6, Z:\\temp3\\database files\\bar.edb",
                Environment.NewLine,
                "LRCI, 514F9292BBAD5F0A",
                Environment.NewLine,
                "LRPI, 00000000EF1FB879, Insert   , 005FE92F, 0000036E, 00000001, FFFFFFFFFFFFFFFF, 0000000008DCDFD0",
                Environment.NewLine,
                "LRMI, 00000000D01F91B3, McroComit",
                Environment.NewLine,
                "LRMI, 00000000D01F91B3, McroComit",
                Environment.NewLine,
                "LTEL",
                Environment.NewLine,
                string.Empty
            });
            string text = EseHelper.CreateTemporaryFile(Path.GetTempPath());

            DiagCore.RetailAssert(File.Exists(text), "Temporary file {0} doesn't exist.", new object[]
            {
                text
            });
            using (StreamWriter streamWriter = new StreamWriter(text, false, Encoding.Unicode))
            {
                streamWriter.Write(value);
            }
            EseLogRecord[] array = EseHelper.ParseLogfileDump(text);
            DiagCore.RetailAssert(!File.Exists(text), "File {0} should have been deleted.", new object[]
            {
                text
            });
            foreach (EseLogRecord eseLogRecord in array)
            {
                string value2 = eseLogRecord.ToString();
                DiagCore.RetailAssert(!string.IsNullOrEmpty(value2), "Empty string returned from EseLogRecord.ToString().", new object[0]);
            }
            int num = 0;
            EseLogHeaderRecord eseLogHeaderRecord = array[num++] as EseLogHeaderRecord;

            DiagCore.RetailAssert(eseLogHeaderRecord.Signature == "Create time:12/14/2005 15:30:42 Rand:9483281 Computer:", "EseLogHeaderRecord.Signature not correct.", new object[0]);
            DiagCore.RetailAssert(eseLogHeaderRecord.Generation == 19358L, "EseLogHeaderRecord.Generation not correct.", new object[0]);
            DateTime value3 = new DateTime(2006, 1, 23, 9, 9, 2);

            DiagCore.RetailAssert(eseLogHeaderRecord.CreationTime.Equals(value3), "EseLogHeaderRecord.CreationTime not correct.", new object[0]);
            value3 = new DateTime(2006, 1, 23, 9, 6, 33);
            DiagCore.RetailAssert(eseLogHeaderRecord.PreviousGenerationCreationTime.Equals(value3), "EseLogHeaderRecord.PreviousGenerationCreationTime not correct.", new object[0]);
            DiagCore.RetailAssert(eseLogHeaderRecord.LogFormatVersion == "7.3704.8", "EseLogHeaderRecord.LogFormatVersion not correct.", new object[0]);
            DiagCore.RetailAssert(!eseLogHeaderRecord.IsCircularLoggingOn, "EseLogHeaderRecord.IsCircularLoggingOn not correct.", new object[0]);
            eseLogHeaderRecord = (array[num++] as EseLogHeaderRecord);
            DiagCore.RetailAssert(eseLogHeaderRecord.PreviousGenerationCreationTime.Equals(DateTime.MinValue), "EseLogHeaderRecord.PreviousGenerationCreationTime not correct.", new object[0]);
            DiagCore.RetailAssert(eseLogHeaderRecord.IsCircularLoggingOn, "EseLogHeaderRecord.IsCircularLoggingOn not correct.", new object[0]);
            EseAttachInfoRecord eseAttachInfoRecord = array[num++] as EseAttachInfoRecord;

            DiagCore.RetailAssert(eseAttachInfoRecord.DatabaseId == 1, "EseAttachInfoRecord.DatabaseId not correct.", new object[0]);
            DiagCore.RetailAssert(eseAttachInfoRecord.Database == "D:\\StoreA\\MDB1\\priv1.edb", "EseAttachInfoRecord.Database not correct.", new object[0]);
            EseDatabaseFileRecord eseDatabaseFileRecord = array[num++] as EseDatabaseFileRecord;

            DiagCore.RetailAssert(eseDatabaseFileRecord.Checksum == 1976282051UL, "EseDatabaseFileRecord.Checksum not correct.", new object[0]);
            DiagCore.RetailAssert(eseDatabaseFileRecord.DatabaseId == 1, "EseDatabaseFileRecord.DatabaseId not correct.", new object[0]);
            DiagCore.RetailAssert(eseDatabaseFileRecord.Database == "C:\\temp3\\bar.edb", "EseDatabaseFileRecord.Database not correct.", new object[0]);
            DiagCore.RetailAssert(eseDatabaseFileRecord.Operation == DatabaseOperation.Create, "EseDatabaseFileRecord.Operation not correct.", new object[0]);
            eseDatabaseFileRecord = (array[num++] as EseDatabaseFileRecord);
            DiagCore.RetailAssert(eseDatabaseFileRecord.Operation == DatabaseOperation.Attach, "EseDatabaseFileRecord.Operation not correct.", new object[0]);
            eseDatabaseFileRecord = (array[num++] as EseDatabaseFileRecord);
            DiagCore.RetailAssert(eseDatabaseFileRecord.Operation == DatabaseOperation.Detach, "EseDatabaseFileRecord.Operation not correct.", new object[0]);
            DiagCore.RetailAssert(eseDatabaseFileRecord.Database == "Z:\\temp3\\database files\\bar.edb", "EseDatabaseFileRecord.Database not correct.", new object[0]);
            EseChecksumRecord eseChecksumRecord = array[num++] as EseChecksumRecord;

            DiagCore.RetailAssert(eseChecksumRecord.Checksum == 5859062799143886602UL, "EseChecksumRecord.Checksum not correct.", new object[0]);
            EsePageRecord esePageRecord = array[num++] as EsePageRecord;

            DiagCore.RetailAssert(esePageRecord.Checksum == (ulong)-283133831, "EsePageRecord.Checksum not correct.", new object[0]);
            DiagCore.RetailAssert(esePageRecord.Operation == "Insert", "EsePageRecord.Operation not correct.", new object[0]);
            DiagCore.RetailAssert(esePageRecord.PageNumber == 6285615L, "EsePageRecord.PageNumber not correct.", new object[0]);
            DiagCore.RetailAssert(esePageRecord.ObjectId == 878L, "EsePageRecord.ObjectId not correct.", new object[0]);
            DiagCore.RetailAssert(esePageRecord.DatabaseId == 1L, "EsePageRecord.DatabaseId not correct.", new object[0]);
            DiagCore.RetailAssert(esePageRecord.DbtimeBefore == ulong.MaxValue, "EsePageRecord.DbtimeBefore not correct.", new object[0]);
            DiagCore.RetailAssert(esePageRecord.DbtimeAfter == 148692944UL, "EsePageRecord.DbtimeAfter not correct.", new object[0]);
            EseMiscRecord eseMiscRecord = array[num++] as EseMiscRecord;

            DiagCore.RetailAssert(eseMiscRecord.Checksum == (ulong)-803237453, "EseMiscRecord.Checksum not correct.", new object[0]);
            DiagCore.RetailAssert(eseMiscRecord.Operation == "McroComit", "EseMiscRecord.Operation not correct.", new object[0]);
            DiagCore.RetailAssert(array[num].ToString() == array[num - 1].ToString(), "Records not equal.", new object[0]);
            DiagCore.RetailAssert(array[num].ToString() != array[num - 2].ToString(), "Records equal.", new object[0]);
            EseLogRecord eseLogRecord2 = array[num++];
        }