Пример #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(MetaDataClassEvent metaDataEvent)
 {
     TimeBase += metaDataEvent.TimeDiff;
     return(null);
 }
Пример #3
0
			public override object Visit (MetaDataClassEvent metaDataEvent)
			{
				TimeBase += metaDataEvent.TimeDiff;
				return null;
			}
Пример #4
0
		public virtual object Visit (MetaDataClassEvent metaDataClassEvent)
		{
			return null;
		}
Пример #5
0
 public virtual object Visit(MetaDataClassEvent metaDataClassEvent)
 {
     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;
		}