コード例 #1
0
 void IFastSerializable.ToStream(Serializer serializer)
 {
     serializer.Write(kernelToDriveMap.Count);
     serializer.Log("<WriteColection name=\"driveNames\" count=\"" + kernelToDriveMap.Count + "\">\r\n");
     foreach (var keyValue in kernelToDriveMap)
     {
         serializer.Write(keyValue.Key);
         serializer.Write(keyValue.Value);
     }
     serializer.Log("</WriteColection>\r\n");
     serializer.Write(systemDrive);
 }
コード例 #2
0
        void IFastSerializable.ToStream(Serializer serializer)
        {
            serializer.Write(driveMapping);

            serializer.Write(threadIDtoProcessID.Count);
            serializer.Log("<WriteColection name=\"ProcessIDForThread\" count=\"" + threadIDtoProcessID.Count + "\">\r\n");
            foreach (HistoryDictionary<int>.HistoryValue entry in threadIDtoProcessID.Entries)
            {
                serializer.Write((long)entry.Key);
                serializer.Write(entry.StartTime100ns);
                serializer.Write(entry.Value);
            }

            if (threadIDtoProcessIDRundown == null)
                serializer.Write(0);
            else
            {
                serializer.Write(threadIDtoProcessIDRundown.Count);
                serializer.Log("<WriteColection name=\"ProcessIDForThreadRundown\" count=\"" + threadIDtoProcessIDRundown.Count + "\">\r\n");
                foreach (HistoryDictionary<int>.HistoryValue entry in threadIDtoProcessIDRundown.Entries)
                {
                    serializer.Write((long)entry.Key);
                    serializer.Write(entry.StartTime100ns);
                    serializer.Write(entry.Value);
                }
            }

            serializer.Log("</WriteColection>\r\n");

            serializer.Log("<WriteColection name=\"fileIDToName\" count=\"" + fileIDToName.Count + "\">\r\n");
            serializer.Write(fileIDToName.Count);
            foreach (HistoryDictionary<string>.HistoryValue entry in fileIDToName.Entries)
            {
                serializer.Write((long)entry.Key);
                serializer.Write(entry.StartTime100ns);
                serializer.Write(entry.Value);
            }
            serializer.Log("</WriteColection>\r\n");

            serializer.Log("<WriteCollection name=\"diskEventTimeStamp\" count=\"" + diskEventTimeStamp.Count + "\">\r\n");
            serializer.Write(diskEventTimeStamp.Count);
            foreach (var entry in diskEventTimeStamp.Entries)
            {
                serializer.Write((int)entry.Key);
                serializer.Write(entry.StartTime100ns);
                serializer.Write(entry.Value);
            }
            serializer.Log("</WriteCollection>");
        }