Exemplo n.º 1
0
 // for prefetching
 internal FieldDefinition(FieldReference fref)
     : this()
 {
     Owner = fref.Owner as ClassDefinition;
     Type = fref.Type;
     Name = fref.Name;
 }
Exemplo n.º 2
0
 public bool Equals(FieldReference other)
 {
     return Owner.Equals(other.Owner)
         && Name.Equals(other.Name)
         && Type.Equals(other.Type);
 }
Exemplo n.º 3
0
        private void ReadFieldReferences(BinaryReader reader)
        {
            reader.PreserveCurrentPosition(Header.FieldReferencesOffset, () =>
            {
                for (var i = 0; i < Header.FieldReferencesSize; i++)
                {
                    var classIndex = reader.ReadUInt16();
                    var typeIndex = reader.ReadUInt16();
                    var nameIndex = reader.ReadInt32();

                    var fref = new FieldReference
                    {
                        Owner = (ClassReference) Dex.TypeReferences[classIndex],
                        Type = Dex.TypeReferences[typeIndex],
                        Name = Dex.Strings[nameIndex]
                    };

                    Dex.FieldReferences.Add(fref);
                }
            });
        }
Exemplo n.º 4
0
 public bool Equals(FieldReference other)
 {
     return(Owner.Equals(other.Owner) &&
            Name.Equals(other.Name) &&
            Type.Equals(other.Type));
 }