7 instantiations of TypeBuilder
mscorlib (7)
system\reflection\emit\enumbuilder.cs (1)
413m_typeBuilder = new TypeBuilder(name, visibility | TypeAttributes.Sealed, typeof(System.Enum), null, module, PackingSize.Unspecified, TypeBuilder.UnspecifiedTypeSize, null);
system\reflection\emit\methodbuilder.cs (1)
717m_inst[i] = new GenericTypeParameterBuilder(new TypeBuilder(names[i], i, this));
system\reflection\emit\modulebuilder.cs (2)
1219return new TypeBuilder(name, attr, parent, interfaces, this, packingSize, typesize, null); ; 1242return new TypeBuilder(name, attr, parent, null, this, packsize, TypeBuilder.UnspecifiedTypeSize, null);
system\reflection\emit\modulebuilderdata.cs (1)
31m_globalTypeBuilder = new TypeBuilder(module);
system\reflection\emit\typebuilder.cs (2)
1590m_inst[i] = new GenericTypeParameterBuilder(new TypeBuilder(names[i], i, this)); 2035return new TypeBuilder(name, attr, parent, interfaces, m_module, packSize, typeSize, this);
208 references to TypeBuilder
mscorlib (152)
system\activator.cs (1)
77if (type is System.Reflection.Emit.TypeBuilder)
system\reflection\emit\assemblybuilder.cs (4)
1674TypeBuilder.DefineCustomAttribute( 1779TypeBuilder typeBuilder; 1985typeBuilder = (TypeBuilder) type; 2006TypeBuilder.DefineCustomAttribute(
system\reflection\emit\assemblybuilderdata.cs (1)
318internal void CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType)
system\reflection\emit\cominterfaces.cs (1)
275[TypeLibImportClassAttribute(typeof(System.Reflection.Emit.TypeBuilder))]
system\reflection\emit\constructorbuilder.cs (4)
38Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers, ModuleBuilder mod, TypeBuilder type) 56Type[] parameterTypes, ModuleBuilder mod, TypeBuilder type) : 69private TypeBuilder GetTypeBuilder() 249TypeBuilder.AddDeclarativeSecurity(GetModuleBuilder().GetNativeHandle(), GetToken().Token, action, blob, blob.Length);
system\reflection\emit\customattributebuilder.cs (7)
205if (!TypeBuilder.IsTypeEqual(namedProperties[i].DeclaringType, con.DeclaringType)) 211if (!(namedProperties[i].DeclaringType is TypeBuilder) || 212!con.DeclaringType.IsSubclassOf(((TypeBuilder)namedProperties[i].DeclaringType).BakedRuntimeType)) 257if (!TypeBuilder.IsTypeEqual(namedFields[i].DeclaringType, con.DeclaringType)) 263if (!(namedFields[i].DeclaringType is TypeBuilder) || 264!con.DeclaringType.IsSubclassOf(((TypeBuilder)namedFields[i].DeclaringType).BakedRuntimeType)) 554TypeBuilder.DefineCustomAttribute(mod, tkOwner, tkAttrib, m_blob, toDisk,
system\reflection\emit\enumbuilder.cs (2)
413m_typeBuilder = new TypeBuilder(name, visibility | TypeAttributes.Sealed, typeof(System.Enum), null, module, PackingSize.Unspecified, TypeBuilder.UnspecifiedTypeSize, null); 447internal TypeBuilder m_typeBuilder;
system\reflection\emit\eventbuilder.cs (4)
46TypeBuilder type, // containing type 73TypeBuilder.DefineMethodSemantics( 121TypeBuilder.DefineCustomAttribute( 170private TypeBuilder m_type;
system\reflection\emit\fieldbuilder.cs (8)
27private TypeBuilder m_typeBuilder; 35internal FieldBuilder(TypeBuilder typeBuilder, String fieldName, Type type, 65m_fieldTok = TypeBuilder.DefineField(m_typeBuilder.GetModuleBuilder().GetNativeHandle(), 80internal TypeBuilder GetTypeBuilder() { return m_typeBuilder; } 195TypeBuilder.SetFieldLayoutOffset(m_typeBuilder.GetModuleBuilder().GetNativeHandle(), GetToken().Token, iOffset); 210TypeBuilder.SetFieldMarshal(m_typeBuilder.GetModuleBuilder().GetNativeHandle(), GetToken().Token, ubMarshal, ubMarshal.Length); 218TypeBuilder.SetConstantValue(m_typeBuilder.GetModuleBuilder(), GetToken().Token, m_fieldType, defaultValue); 241TypeBuilder.DefineCustomAttribute(module,
system\reflection\emit\generictypeparameterbuilder.cs (2)
27internal TypeBuilder m_type; 31internal GenericTypeParameterBuilder(TypeBuilder type)
system\reflection\emit\ilgenerator.cs (2)
1210if (cls is TypeBuilder || cls is EnumBuilder) { 1248if (cls is TypeBuilder || cls is EnumBuilder) {
system\reflection\emit\methodbuilder.cs (10)
34internal TypeBuilder m_containingType; 73Type returnType, Type[] parameterTypes, ModuleBuilder mod, TypeBuilder type, bool bIsGlobalMethod) 81ModuleBuilder mod, TypeBuilder type, bool bIsGlobalMethod) 92ModuleBuilder mod, TypeBuilder type, bool bIsGlobalMethod) 473internal TypeBuilder GetTypeBuilder() 786int token = TypeBuilder.DefineMethod(m_module.GetNativeHandle(), m_containingType.MetadataTokenInternal, m_strName, sigBytes, sigLength, Attributes); 793TypeBuilder.SetMethodImpl(m_module.GetNativeHandle(), token, m_dwMethodImplFlags); 953TypeBuilder.AddDeclarativeSecurity(m_module.GetNativeHandle(), MetadataTokenInternal, action, blob, length); 1111TypeBuilder.SetMethodImpl(m_module.GetNativeHandle(), MetadataTokenInternal, attributes); 1187TypeBuilder.DefineCustomAttribute(m_module, MetadataTokenInternal,
system\reflection\emit\methodrental.cs (3)
77if (cls is TypeBuilder) 80TypeBuilder typeBuilder = (TypeBuilder) cls;
system\reflection\emit\modulebuilder.cs (34)
409TypeBuilder typeBuilder; 412if (item is TypeBuilder) 414typeBuilder = (TypeBuilder)item; 846TypeBuilder tmpTypeBldr; 851tmpTypeBldr = (TypeBuilder)builder; 1137public TypeBuilder DefineType(String name) 1139Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1143return DefineTypeNoLock(name, TypeAttributes.NotPublic, null, null, PackingSize.Unspecified, TypeBuilder.UnspecifiedTypeSize); 1148public TypeBuilder DefineType(String name, TypeAttributes attr) 1150Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1154return DefineTypeNoLock(name, attr, null, null, PackingSize.Unspecified, TypeBuilder.UnspecifiedTypeSize); 1159public TypeBuilder DefineType(String name, TypeAttributes attr, Type parent) 1161Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1168return DefineTypeNoLock(name, attr, parent, null, PackingSize.Unspecified, TypeBuilder.UnspecifiedTypeSize); 1177public TypeBuilder DefineType(String name, TypeAttributes attr, Type parent, int typesize) 1179Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1192public TypeBuilder DefineType(String name, TypeAttributes attr, Type parent, PackingSize packingSize, int typesize) 1194Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1204public TypeBuilder DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces) 1206Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1210return DefineTypeNoLock(name, attr, parent, interfaces, PackingSize.Unspecified, TypeBuilder.UnspecifiedTypeSize); 1215private TypeBuilder DefineTypeNoLock(String name, TypeAttributes attr, Type parent, Type[] interfaces, PackingSize packingSize, int typesize) 1217Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1227public TypeBuilder DefineType(String name, TypeAttributes attr, Type parent, PackingSize packsize) 1229Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1238private TypeBuilder DefineTypeNoLock(String name, TypeAttributes attr, Type parent, PackingSize packsize) 1240Contract.Ensures(Contract.Result<TypeBuilder>() != null); 1242return new TypeBuilder(name, attr, parent, null, this, packsize, TypeBuilder.UnspecifiedTypeSize, null); 1727TypeBuilder typeBuilder = null; 1734typeBuilder = type as TypeBuilder; 2010tk = TypeBuilder.DefineMethodSpec(this.GetNativeHandle(), tk, sigBytes, sigLength); 2235return new SignatureToken(TypeBuilder.GetTokenFromSig(GetNativeHandle(), sigBytes, sigLength), this); 2247return new SignatureToken(TypeBuilder.GetTokenFromSig(GetNativeHandle(), localSigBytes, sigLength), this); 2268TypeBuilder.DefineCustomAttribute(
system\reflection\emit\modulebuilderdata.cs (1)
100internal TypeBuilder m_globalTypeBuilder;
system\reflection\emit\parameterbuilder.cs (4)
41TypeBuilder.SetFieldMarshal( 52TypeBuilder.SetConstantValue( 75TypeBuilder.DefineCustomAttribute( 113m_pdToken = new ParameterToken( TypeBuilder.SetParamInfo(
system\reflection\emit\propertybuilder.cs (5)
49TypeBuilder containingType) // the containing type 77TypeBuilder.SetConstantValue( 117TypeBuilder.DefineMethodSemantics( 160TypeBuilder.DefineCustomAttribute( 305private TypeBuilder m_containingType;
system\reflection\emit\signaturehelper.cs (4)
389else if (clsArgument is TypeBuilder) 391TypeBuilder clsBuilder = (TypeBuilder)clsArgument; 414TypeBuilder clsBuilder = ((EnumBuilder)clsArgument).m_typeBuilder;
system\reflection\emit\typebuilder.cs (40)
85TypeBuilder.DefineCustomAttribute(module, token, module.GetConstructorToken(m_con).Token, 99if (!(type is TypeBuilder) && !(type is TypeBuilderInstantiation)) 132if (!(type is TypeBuilder) && !(type is TypeBuilderInstantiation)) 143if (type is TypeBuilder && type.IsGenericTypeDefinition) 153if (!(type is TypeBuilder) && !(type is TypeBuilderInstantiation)) 164if (type is TypeBuilder && type.IsGenericTypeDefinition) 367TypeBuilder tb1 = null; 368TypeBuilder tb2 = null; 373if (t1 is TypeBuilder) 375tb1 =(TypeBuilder)t1; 384if (t2 is TypeBuilder) 386tb2 =(TypeBuilder)t2; 437TypeBuilder typeBldr; 447else if ((typeBldr = destType as TypeBuilder) != null) 546private TypeBuilder m_DeclaringType; 558private TypeBuilder m_genTypeDef; 585private TypeBuilder(string szName, int genParamPos, TypeBuilder declType) 610TypeBuilder enclosingType) 617PackingSize iPackingSize, int iTypeSize, TypeBuilder enclosingType) 860TypeBuilder valueClassType; 881valueClassType = temp as TypeBuilder; 1018m_ca = new List<TypeBuilder.CustAttr>(); 1303if (TypeBuilder.IsTypeEqual(c, this)) 1307TypeBuilder fromTypeBuilder = c as TypeBuilder; 1341if (TypeBuilder.IsTypeEqual(interfaces[i], this)) 1431if (TypeBuilder.IsTypeEqual(p, c)) 1438if (TypeBuilder.IsTypeEqual(p, c)) 1807if (genericTypeDefinition is TypeBuilder) 1808genericTypeDefinition = ((TypeBuilder)genericTypeDefinition).m_bakedRuntimeType; 1816con = TypeBuilder.GetConstructor(inst, genericTypeDefinition.GetConstructor( 1953public TypeBuilder DefineNestedType(String name) 1963public TypeBuilder DefineNestedType(String name, TypeAttributes attr, Type parent, Type[] interfaces) 1976public TypeBuilder DefineNestedType(String name, TypeAttributes attr, Type parent) 1985public TypeBuilder DefineNestedType(String name, TypeAttributes attr) 1998public TypeBuilder DefineNestedType(String name, TypeAttributes attr, Type parent, int typeSize) 2011public TypeBuilder DefineNestedType(String name, TypeAttributes attr, Type parent, PackingSize packSize) 2024public TypeBuilder DefineNestedType(String name, TypeAttributes attr, Type parent, PackingSize packSize, int typeSize) 2033private TypeBuilder DefineNestedTypeNoLock(String name, TypeAttributes attr, Type parent, Type[] interfaces, PackingSize packSize, int typeSize) 2605TypeBuilder.DefineCustomAttribute(m_module, m_tdType.Token, ((ModuleBuilder)m_module).GetConstructorToken(con).Token,
system\rttype.cs (1)
3728if (c is System.Reflection.Emit.TypeBuilder)
system\runtime\interopservices\tceadaptergen\eventproviderwriter.cs (7)
34TypeBuilder OutputTypeBuilder = m_OutputModule.DefineType( 94private MethodBuilder DefineAddEventMethod( TypeBuilder OutputTypeBuilder, MethodInfo SrcItfMethod, Type SinkHelperClass, FieldBuilder fbSinkHelperArray, FieldBuilder fbEventCP, MethodBuilder mbInitSrcItf ) 237private MethodBuilder DefineRemoveEventMethod( TypeBuilder OutputTypeBuilder, MethodInfo SrcItfMethod, Type SinkHelperClass, FieldBuilder fbSinkHelperArray, FieldBuilder fbEventCP ) 463private MethodBuilder DefineInitSrcItfMethod( TypeBuilder OutputTypeBuilder, Type SourceInterface, FieldBuilder fbSinkHelperArray, FieldBuilder fbEventCP, FieldBuilder fbCPC ) 553private void DefineConstructor( TypeBuilder OutputTypeBuilder, FieldBuilder fbCPC ) 584private MethodBuilder DefineFinalizeMethod( TypeBuilder OutputTypeBuilder, Type SinkHelperClass, FieldBuilder fbSinkHelper, FieldBuilder fbEventCP ) 743private void DefineDisposeMethod( TypeBuilder OutputTypeBuilder, MethodBuilder FinalizeMethod )
system\runtime\interopservices\tceadaptergen\eventsinkhelperwriter.cs (4)
36TypeBuilder OutputTypeBuilder = TCEAdapterGenerator.DefineUniqueType( 97private void DefineBlankMethod(TypeBuilder OutputTypeBuilder, MethodInfo Method) 119private void DefineEventMethod( TypeBuilder OutputTypeBuilder, MethodInfo Method, Type DelegateCls, FieldBuilder fbDelegate ) 254private void DefineConstructor( TypeBuilder OutputTypeBuilder, FieldBuilder fbCookie, FieldBuilder[] afbDelegates )
system\runtime\interopservices\tceadaptergen\tceadaptergenerator.cs (3)
41internal static void SetClassInterfaceTypeToNone(TypeBuilder tb) 59internal static TypeBuilder DefineUniqueType(String strInitFullName, TypeAttributes attrs, Type BaseType, Type[] aInterfaceTypes, ModuleBuilder mb) 71internal static void SetHiddenAttribute(TypeBuilder tb)
System (1)
regex\system\text\regularexpressions\RegexCompiler.cs (1)
3072private TypeBuilder _typebuilder;
System.Activities (3)
System\Activities\Debugger\StateManager.cs (3)
537TypeBuilder typeBuilder = this.dynamicModule.DefineType(typeName, TypeAttributes.Public | TypeAttributes.Class); 574internal MethodBuilder CreateMethodBuilder(TypeBuilder typeBuilder, Type typeIslandArguments, State state, bool withPriming) 637MethodBuilder CreateIsland(TypeBuilder typeBuilder, State state, bool withPrimingTest, Dictionary<string, byte[]>checksumCache)
System.Core (8)
Microsoft\Scripting\Ast\LambdaExpression.cs (2)
173var type = method.DeclaringType as TypeBuilder;
Microsoft\Scripting\Compiler\AssemblyGen.cs (2)
103private TypeBuilder DefineType(string name, Type parent, TypeAttributes attr) { 123internal static TypeBuilder DefineDelegateType(string name) {
Microsoft\Scripting\Compiler\DelegateHelpers.cs (1)
36TypeBuilder builder = AssemblyGen.DefineDelegateType("Delegate" + types.Length);
Microsoft\Scripting\Compiler\ILGen.cs (1)
529return t is TypeBuilder || t.IsGenericParameter || t.IsVisible;
Microsoft\Scripting\Compiler\LambdaCompiler.cs (2)
51private readonly TypeBuilder _typeBuilder; 140_typeBuilder = (TypeBuilder)method.DeclaringType;
System.Data.Entity (19)
System\Data\Objects\Internal\EntityProxyFactory.cs (19)
611private TypeBuilder _typeBuilder; 700private TypeBuilder TypeBuilder 734private void EmitBaseGetter(TypeBuilder typeBuilder, PropertyBuilder propertyBuilder, PropertyInfo baseProperty) 754private void EmitBaseSetter(TypeBuilder typeBuilder, PropertyBuilder propertyBuilder, PropertyInfo baseProperty) 860public void Implement(TypeBuilder typeBuilder, Action<FieldBuilder, bool> registerField) 870public bool EmitMember(TypeBuilder typeBuilder, EdmMember member, PropertyBuilder propertyBuilder, PropertyInfo baseProperty, BaseProxyImplementor baseImplementor) 889MethodInfo interceptorInvoke = TypeBuilder.GetMethod(interceptorType, typeof(Func<,,>).GetMethod("Invoke")); 967public void Implement(TypeBuilder typeBuilder, Action<FieldBuilder, bool> registerField) 982private void ImplementBaseGetter(TypeBuilder typeBuilder) 1005private void ImplementBaseSetter(TypeBuilder typeBuilder) 1130public void Implement(TypeBuilder typeBuilder, Action<FieldBuilder, bool> registerField) 1197public bool EmitMember(TypeBuilder typeBuilder, EdmMember member, PropertyBuilder propertyBuilder, PropertyInfo baseProperty, BaseProxyImplementor baseImplementor) 1224private void EmitScalarSetter(TypeBuilder typeBuilder, PropertyBuilder propertyBuilder, PropertyInfo baseProperty, bool isKeyMember) 1345private void EmitReferenceProperty(TypeBuilder typeBuilder, PropertyBuilder propertyBuilder, PropertyInfo baseProperty, NavigationProperty navProperty) 1369private void EmitCollectionProperty(TypeBuilder typeBuilder, PropertyBuilder propertyBuilder, PropertyInfo baseProperty, NavigationProperty navProperty) 1401private void ImplementIEntityWithChangeTracker(TypeBuilder typeBuilder, Action<FieldBuilder, bool> registerField) 1444private void ImplementIEntityWithRelationships(TypeBuilder typeBuilder, Action<FieldBuilder, bool> registerField) 1534internal void Implement(TypeBuilder typeBuilder, Action<FieldBuilder, bool> registerField) 1609internal void Implement(TypeBuilder typeBuilder, IEnumerable<FieldBuilder> serializedFields)
System.Data.SqlXml (3)
System\Xml\Xsl\IlGen\XmlILModule.cs (2)
33private TypeBuilder typeBldr; 77public XmlILModule(TypeBuilder typeBldr) {
System\Xml\Xsl\XmlIlGenerator.cs (1)
77public XmlILCommand Generate(QilExpression query, TypeBuilder typeBldr) {
System.ServiceModel (1)
System\ServiceModel\ComIntegration\EmitterCache.cs (1)
78TypeBuilder typeBuilder = DynamicModule.DefineType(interfaceType.Name + "MarshalByRefObject", TypeAttributes.Public | TypeAttributes.Class | TypeAttributes.Abstract,
System.Web (2)
Util\FactoryGenerator.cs (1)
145TypeBuilder factoryTypeBuilder = _dynamicModule.DefineType("T_" + typeName,
Util\FastPropertyAccessor.cs (1)
113TypeBuilder accessorTypeBuilder = _dynamicModule.DefineType("T_" + typeName,
System.Web.Extensions (4)
UI\WebControls\Dynamic.cs (4)
319TypeBuilder tb = this.module.DefineType(typeName, TypeAttributes.Class | 335FieldInfo[] GenerateProperties(TypeBuilder tb, DynamicProperty[] properties) { 363void GenerateEquals(TypeBuilder tb, FieldInfo[] fields) { 398void GenerateGetHashCode(TypeBuilder tb, FieldInfo[] fields) {
System.Web.Mobile (1)
UI\MobileControls\FactoryGenerator.cs (1)
160TypeBuilder factoryTypeBuilder = _dynamicModule.DefineType("T_" + typeName,
System.Xml (14)
System\Xml\Serialization\CodeGenerator.cs (3)
47TypeBuilder typeBuilder; 58internal CodeGenerator(TypeBuilder typeBuilder) { 1774static internal TypeBuilder CreateTypeBuilder(ModuleBuilder moduleBuilder, string name, TypeAttributes attributes, Type parent, Type[] interfaces) {
System\Xml\Serialization\XmlSerializationILGen.cs (10)
35protected TypeBuilder typeBuilder; 77internal MethodBuilder EnsureMethodBuilder(TypeBuilder typeBuilder, string methodName, 127internal FieldBuilder GenerateHashtableGetBegin(string privateName, string publicName, TypeBuilder serializerContractTypeBuilder) { 188internal FieldBuilder GeneratePublicMethods(string privateName, string publicName, string[] methods, XmlMapping[] xmlMappings, TypeBuilder serializerContractTypeBuilder) { 211internal void GenerateSupportedTypes(Type[] types, TypeBuilder serializerContractTypeBuilder) { 251TypeBuilder baseSerializerTypeBuilder = CodeGenerator.CreateTypeBuilder( 299TypeBuilder typedSerializerTypeBuilder = CodeGenerator.CreateTypeBuilder( 391FieldBuilder GenerateTypedSerializers(Hashtable serializers, TypeBuilder serializerContractTypeBuilder) { 419void GenerateGetSerializer(Hashtable serializers, XmlMapping[] xmlMappings, TypeBuilder serializerContractTypeBuilder) { 464TypeBuilder serializerContractTypeBuilder = CodeGenerator.CreateTypeBuilder(
System\Xml\Xslt\XslCompiledTransform.cs (1)
219public static CompilerErrorCollection CompileToType(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver, bool debug, TypeBuilder typeBuilder, string scriptAssemblyPath) {