Example #1
0
            public override object Visit(MetaDataThreadEvent metaDataEvent)
            {
                TimeBase += metaDataEvent.TimeDiff;

                ThreadContext ctx;
                long          threadId = currentBuffer.Header.PtrBase * metaDataEvent.Pointer;

                if (!threadDictionary.TryGetValue(threadId, out ctx))
                {
                    threadDictionary [threadId] = ctx = new ThreadContext()
                    {
                        ThreadId = threadId
                    };
                }
                ctx.Name = metaDataEvent.Name;

                return(null);
            }
Example #2
0
        public static new Event Read(BinaryReader reader)
        {
            ulong timeDiff = reader.ReadULeb128();
            byte  type     = reader.ReadByte();
            long  pointer  = reader.ReadSLeb128();

            MetadataEvent result;

            switch (type)
            {
            case TYPE_CLASS:
                result = new MetaDataClassEvent(reader);
                break;

            case TYPE_IMAGE:
                result = new MetaDataImageEvent(reader);
                break;

            case TYPE_ASSEMBLY:
                result = new MetaDataAssemblyEvent();
                break;

            case TYPE_DOMAIN:
                result = new MetaDataDomainEvent();
                break;

            case TYPE_THREAD:
                result = new MetaDataThreadEvent(reader);
                break;

            default:
                throw new InvalidOperationException("Unknown metadata event type:" + type);
            }
            result.TimeDiff = timeDiff;
            result.Pointer  = pointer;
            return(result);
        }
			public override object Visit (MetaDataThreadEvent metaDataEvent)
			{
				TimeBase += metaDataEvent.TimeDiff;
				
				ThreadContext ctx;
				long threadId = currentBuffer.Header.PtrBase * metaDataEvent.Pointer;
				if (!threadDictionary.TryGetValue (threadId, out ctx)) {
					threadDictionary [threadId] = ctx = new ThreadContext () { ThreadId = threadId };
				}
				ctx.Name = metaDataEvent.Name;
				
				return null;
			}
Example #4
0
		public virtual object Visit (MetaDataThreadEvent metaDataThreadEvent)
		{
			return null;
		}
Example #5
0
 public virtual object Visit(MetaDataThreadEvent metaDataThreadEvent)
 {
     return(null);
 }
Example #6
0
		public static new Event Read (BinaryReader reader)
		{
			ulong timeDiff = reader.ReadULeb128 ();
			byte type = reader.ReadByte ();
			long pointer = reader.ReadSLeb128 ();
			
			MetadataEvent result;
			switch (type) {
			case TYPE_CLASS:
				result = new MetaDataClassEvent (reader);
				break;
			case TYPE_IMAGE:
				result = new MetaDataImageEvent (reader);
				break;
			case TYPE_ASSEMBLY:
				result = new MetaDataAssemblyEvent ();
				break;
			case TYPE_DOMAIN:
				result = new MetaDataDomainEvent ();
				break;
			case TYPE_THREAD:
				result = new MetaDataThreadEvent (reader);
				break;
			default:
				throw new InvalidOperationException ("Unknown metadata event type:" + type);
			}
			result.TimeDiff = timeDiff;
			result.Pointer = pointer;
			return result;
		}