Esempio n. 1
0
 public override void LoadCache()
 {
     base.LoadCache();
     _paramRange        = MemberRange.CreateRange <ParameterDefinition>(this, 5, NETHeader.TablesHeap.GetTable(MetaDataTableType.Param, false));
     _semantics         = Semantics;
     _body              = Body;
     _genericParameters = GenericParameters;
 }
Esempio n. 2
0
 public override void ClearCache()
 {
     base.ClearCache();
     _paramRange                 = null;
     _semantics                  = null;
     _body                       = null;
     _genericParameters          = new GenericParameter[0];
     _hasLoadedGenericParameters = false;
 }
Esempio n. 3
0
 public override void ClearCache()
 {
     base.ClearCache();
     _methodRange   = null;
     _fieldRange    = null;
     _propertyMap   = null;
     _eventMap      = null;
     _nestedClasses = null;
     _interfaces    = null;
     _decltype      = null;
     _genericparams = null;
     _baseType      = null;
 }
Esempio n. 4
0
 public override void LoadCache()
 {
     base.LoadCache();
     _methodRange = MemberRange.CreateRange <MethodDefinition>(this, 5, NETHeader.TablesHeap.GetTable(MetaDataTableType.Method, false));
     _methodRange.LoadCache();
     _fieldRange = MemberRange.CreateRange <FieldDefinition>(this, 4, NETHeader.TablesHeap.GetTable(MetaDataTableType.Field, false));
     _fieldRange.LoadCache();
     _propertyMap   = PropertyMap;
     _eventMap      = EventMap;
     _nestedClasses = NestedClasses;
     _interfaces    = Interfaces;
     _decltype      = DeclaringType as TypeDefinition;
     _genericparams = GenericParameters;
     _baseType      = BaseType;
 }
Esempio n. 5
0
        public static MemberRange <T> CreateRange <T>(MetaDataMember member, int mdrowIndex, MetaDataTable targetTable) where T : MetaDataMember
        {
            MemberRange <T> range = new MemberRange <T>();

            range.Start = Convert.ToInt32(member.MetaDataRow.Parts[mdrowIndex]) - 1;

            if (targetTable == null)
            {
                range.Length = 0;
                return(range);
            }

            range.TargetTable = targetTable;

            int memberIndex = (int)(member._metadatatoken | (0xFF << 24)) - (0xFF << 24);

            if (member.Table != null)
            {
                if (memberIndex == member.Table.AmountOfRows)
                {
                    range.Length = targetTable.AmountOfRows - range.Start;
                }
                else
                {
                    int nextIndex = Convert.ToInt32(member.Table.Members[memberIndex].MetaDataRow.Parts[mdrowIndex]) - 1;
                    range.Length = nextIndex - range.Start;
                }
            }

            if (range.Length > targetTable.AmountOfRows - range.Start)
            {
                range.Length = 0;
            }

            return(range);
        }
Esempio n. 6
0
 public override void LoadCache()
 {
     _eventRange = MemberRange.CreateRange <EventDefinition>(this, 1, _netheader.TablesHeap.GetTable(MetaDataTableType.Event, false));
     _eventRange.LoadCache();
     _parent = Parent;
 }
Esempio n. 7
0
 public override void ClearCache()
 {
     _eventRange = null;
     _parent     = null;
 }
Esempio n. 8
0
 public override void LoadCache()
 {
     _propertyRange = MemberRange.CreateRange <PropertyDefinition>(this, 1, NETHeader.TablesHeap.GetTable(MetaDataTableType.Property, false));
     _propertyRange.LoadCache();
     _parent = Parent;
 }
Esempio n. 9
0
 public override void ClearCache()
 {
     _propertyRange = null;
     _parent        = null;
 }