예제 #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);
        }
예제 #2
0
 public override object Visit(MetaDataAssemblyEvent metaDataEvent)
 {
     TimeBase += metaDataEvent.TimeDiff;
     return(null);
 }
예제 #3
0
			public override object Visit (MetaDataAssemblyEvent metaDataEvent)
			{
				TimeBase += metaDataEvent.TimeDiff;
				return null;
			}
예제 #4
0
		public virtual object Visit (MetaDataAssemblyEvent metaDataAssemblyEvent	)
		{
			return null;
		}
예제 #5
0
 public virtual object Visit(MetaDataAssemblyEvent metaDataAssemblyEvent)
 {
     return(null);
 }
예제 #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;
		}