コード例 #1
0
 public EmitTypeBuilder DefineType(string ns, string name, EmitTypeKind kind = EmitTypeKind.Class, 
     EmitVisibility visibility = EmitVisibility.Public, EmitTypeReference baseType = null, 
     IReadOnlyList<EmitTypeReference> implementedInterfaces = null, bool isAbstract = false,
     bool isSealed = false)
 {
     baseType = baseType ?? typeof(object);
     var typeBuilder = new EmitTypeBuilder(this, ns, name, kind, null, visibility, baseType, result => implementedInterfaces ?? new List<EmitTypeReference>(), isAbstract, isSealed);
     typeBuilders.Add(new EmitTypeReference(() => typeBuilder));
     return typeBuilder;
 }
コード例 #2
0
        public EmitTypeBuilder DefineType(string ns, string name, EmitTypeKind kind = EmitTypeKind.Class,
                                          EmitVisibility visibility = EmitVisibility.Public, EmitTypeReference baseType   = null,
                                          IReadOnlyList <EmitTypeReference> implementedInterfaces = null, bool isAbstract = false,
                                          bool isSealed = false)
        {
            baseType = baseType ?? typeof(object);
            var typeBuilder = new EmitTypeBuilder(this, ns, name, kind, null, visibility, baseType, result => implementedInterfaces ?? new List <EmitTypeReference>(), isAbstract, isSealed);

            typeBuilders.Add(new EmitTypeReference(() => typeBuilder));
            return(typeBuilder);
        }