public MethodImplementation(TypeDefinition @class, MethodReference methodDeclaration, MethodReference newMethod) : base(new MetaDataRow(@class.TableIndex, 0U, newMethod.TableIndex)) { this._class = @class; this._methodDeclaration = methodDeclaration; this._methodBody = newMethod; }
public override void LoadCache() { _class = Class; _methodBody = MethodBody; _methodDeclaration = MethodDeclaration; }
public override void ClearCache() { _class = null; _methodBody = null; _methodDeclaration = null; }
public override void ClearCache() { events = null; parent = null; }
public override void ClearCache() { base.ClearCache(); _methodRange = null; _fieldRange = null; _propertyMap = null; _eventMap = null; _nestedClasses = null; _interfaces = null; _decltype = null; _genericparams = null; _baseType = null; }
public override void LoadCache() { _eventRange = MemberRange.CreateRange<EventDefinition>(this, 1, _netheader.TablesHeap.GetTable(MetaDataTableType.Event, false)); _eventRange.LoadCache(); _parent = Parent; }
public override void ClearCache() { _propertyRange = null; _parent = null; }
public override void LoadCache() { _class = Class; _interface = Interface; }
public NestedClass(TypeDefinition nestedClass, TypeDefinition enclosingClass) : base(new MetaDataRow(nestedClass.TableIndex, enclosingClass.TableIndex)) { this._class = nestedClass; this._enclosingClass = enclosingClass; }
public override void LoadCache() { this._parent = Parent; }
public InterfaceImplementation(TypeDefinition @class, TypeReference @interface) : base(new MetaDataRow(@class.TableIndex, 0U)) { this._class = @class; this._interface = @interface; }
public override void ClearCache() { this._parent = null; }
public ClassLayout(TypeDefinition parent, uint classSize, ushort packingSize) : base(new MetaDataRow(packingSize, classSize, parent.TableIndex)) { this._parent = parent; }
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; }
public EventMap(TypeDefinition parent, uint startingIndex) : base(new MetaDataRow(parent.TableIndex, startingIndex)) { this._parent = parent; }
public override void ClearCache() { _class = null; _enclosingClass = null; }
public override void ClearCache() { _eventRange = null; _parent = null; }
public override void LoadCache() { _class = Class; _enclosingClass = EnclosingClass; }
public PropertyMap(TypeDefinition parentType, uint startingIndex) : base(new MetaDataRow(parentType.TableIndex, startingIndex)) { }
private void UpdateTypeDef(Workspace workspace, TypeDefinition typeDef) { typeDef.MetaDataRow.Parts[1] = GetStringIndex(workspace, typeDef.Namespace); typeDef.MetaDataRow.Parts[2] = GetStringIndex(workspace, typeDef.Name); typeDef.MetaDataRow.Parts[3] = GetMemberIndex(workspace, Constructor.OriginalAssembly.NETHeader.TablesHeap.TypeDefOrRef, typeDef); // method and field list updated by MetaDataBuilder class. }
public override void LoadCache() { _propertyRange = MemberRange.CreateRange<PropertyDefinition>(this, 1, NETHeader.TablesHeap.GetTable(MetaDataTableType.Property, false)); _propertyRange.LoadCache(); _parent = Parent; }
public override void ClearCache() { properties = null; parent = null; }
public override void ClearCache() { @class = null; @interface = null; }
private void ReconstructMethodBodies(Workspace workspace, TypeDefinition declaringType) { if (declaringType.HasMethods) { foreach (MethodDefinition methodDef in declaringType.Methods) { if (methodDef.HasBody) { MethodBody methodBody = methodDef.Body; byte[] serializedBody = SerializeMethodBody(workspace, methodBody); MethodBodyInfo info = new MethodBodyInfo() { Bytes = serializedBody, }; workspace.MethodBodyTable.AppendMethodBody(info); } } } }