Created
June 29, 2012 14:31
-
-
Save pietervp/3018279 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var typeBuilder = _assemblyBuilder.DefineType(GetGeneratedTypeName(), typeof(object), InterfaceToImplement); | |
//create private field | |
var classToWrapField = typeBuilder.DefineField(GetGeneratedToWrapFieldName(), ClassToWrap, FieldAttributes.Private); | |
//map interface members | |
MapInterfaceProperties(classToWrapField, typeBuilder); | |
MapInterfaceEvents(classToWrapField, typeBuilder); | |
MapInterfaceMethods(classToWrapField, typeBuilder); | |
//define constructor | |
DefineConstructor(classToWrapField, typeBuilder); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment