创建和分析对象用的类层次结构:
Assembly AssemblyBuilder
Assembly.GetModules() || AssemblyBuilder.DefineModule()
\/
Module ModuleBuilder
Module.GetTypes() || ModuleBuilder.DefineType()
\/
Type TypeBuilder
Type.GetFields() || TypeBuilder.DefineField()
Type.GetProperties() || TypeBuilder.DefineProperty()
Type.GetEvents() || TypeBuilder.DefineEvent()
Type.GetMethods() || TypeBuilder.DefineMethod()
Type.GetConstructors() || TypeBuilder.DefineConstructor()
\/
FieldInfo FieldBuilder
PropertyInfo PropertyBuilder
EventInfo EventBuilder
MethodBase MethodBuilder -----
ConstructorInfo ConstructorBuilder---- |.GetILGenerator()
||
\/
ILGenerator
.Emit()
.EmitCall()
.DeclareLocal()
.DefineLabel()
.MarkLabel()
.BeginExceptionBlock()
.BeginExceptFilterBlock()
.BeginCatchBlock()
.BeginFaultBlock()
.BeginFinallyBlock()
.EndExceptionBlock()