Model: Initial framework for custom attributes

This commit is contained in:
Katy Coe
2019-11-03 22:25:38 +01:00
parent 7f398f40cb
commit 7351e339f0
12 changed files with 73 additions and 28 deletions

View File

@@ -1,10 +1,9 @@
/*
Copyright 2017 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
All rights reserved.
*/
using System;
using System.Collections.Generic;
using System.Reflection;
@@ -15,7 +14,7 @@ namespace Il2CppInspector.Reflection {
public Assembly Assembly { get; protected set; }
// Custom attributes for this member
public IEnumerable<CustomAttributeData> CustomAttributes => throw new NotImplementedException();
public abstract IEnumerable<CustomAttributeData> CustomAttributes { get; }
// Type that this type is declared in for nested types
protected int declaringTypeDefinitionIndex { private get; set; } = -1;
@@ -27,8 +26,6 @@ namespace Il2CppInspector.Reflection {
// Name of the member
public virtual string Name { get; protected set; }
// TODO: GetCustomAttributes etc.
// For top-level members in an assembly (ie. non-nested types)
protected MemberInfo(Assembly asm) => Assembly = asm;