public static Type CreateTypeInheritingFromTypedPageData(ModuleBuilder moduleBuilder, Action<TypeSpecification> typeSpecificationExpression) { Type createdClass = moduleBuilder.CreateClass(type => { type.Name = "DefaultPageTypeClassName"; type.ParentType = typeof(TypedPageData); typeSpecificationExpression(type); }); return createdClass; }