Beispiel #1
0
 public void End()
 {
     if (m_debug)
     {
         int  typeId = m_starts.Pop();
         uint marker = ReadUInt32();
         Contract.Assume(marker == BuildXLWriter.ItemEndMarker);
         int e = ReadInt32();
         if (e != typeId)
         {
             Contract.Assume(false, "Expected " + typeId + " for end of type " + BuildXLWriterStats.GetTypeName(typeId) + ". Instead retrieved " + e + " corresponding to type" + BuildXLWriterStats.GetTypeName(e));
         }
     }
 }
Beispiel #2
0
        public void Start <T>()
        {
            if (m_debug)
            {
                int  typeId = BuildXLWriterStats.GetTypeId(typeof(T));
                uint marker = ReadUInt32();
                Contract.Assume(marker == BuildXLWriter.ItemStartMarker);
                int s = ReadInt32();
                if (s != typeId)
                {
                    Contract.Assume(false, "Expected " + typeId + " for start of type " + typeof(T).FullName + ". Instead retrieved " + s + " corresponding to type" + BuildXLWriterStats.GetTypeName(s));
                }

                m_starts.Push(typeId);
            }
        }