private TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type parent, PackingSize packSize, int typeSize) { string ns = null; int lastdot = name.LastIndexOf('.'); if (lastdot > 0) { ns = name.Substring(0, lastdot); name = name.Substring(lastdot + 1); } TypeBuilder typeBuilder = __DefineNestedType(ns, name); typeBuilder.__SetAttributes(attr); typeBuilder.SetParent(parent); this.ModuleBuilder.SetPackingSizeAndTypeSize(typeBuilder, PackingSize.Unspecified, typeSize); return(typeBuilder); }
public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type parent, PackingSize packSize, int typeSize) { string ns = null; int lastdot = name.LastIndexOf('.'); if (lastdot > 0) { ns = name.Substring(0, lastdot); name = name.Substring(lastdot + 1); } TypeBuilder typeBuilder = __DefineNestedType(ns, name); typeBuilder.__SetAttributes(attr); typeBuilder.SetParent(parent); if (packSize != PackingSize.Unspecified || typeSize != 0) { typeBuilder.__SetLayout((int)packSize, typeSize); } return(typeBuilder); }