Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
 public override object Visit(MetaDataDomainEvent metaDataEvent)
 {
     TimeBase += metaDataEvent.TimeDiff;
     return(null);
 }
Exemplo n.º 3
0
			public override object Visit (MetaDataDomainEvent metaDataEvent)
			{
				TimeBase += metaDataEvent.TimeDiff;
				return null;
			}
Exemplo n.º 4
0
		public virtual object Visit (MetaDataDomainEvent metaDataDomainEvent)
		{
			return null;
		}
Exemplo n.º 5
0
 public virtual object Visit(MetaDataDomainEvent metaDataDomainEvent)
 {
     return(null);
 }
Exemplo n.º 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;
		}