93 instantiations of CodeTypeReference
PresentationBuildTasks (25)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (25)
874PrivateImplementationType = new CodeTypeReference(KnownTypes.Types[(int)KnownElements.IStyleConnector]) 1109PrivateImplementationType = new CodeTypeReference(KnownTypes.Types[(int)KnownElements.IComponentConnector]) 1238var iComponentConnector = new CodeTypeReference(KnownTypes.Types[(int)KnownElements.IComponentConnector]); 1470new CodeTypeReference(typeof(SuppressMessageAttribute)), 1480new CodeTypeReference(typeof(DebuggerNonUserCodeAttribute))); 2031cmmEventHandler.ReturnType = new CodeTypeReference(typeof(void)); 2052cmmEventHandlerHelper.ReturnType = new CodeTypeReference(typeof(void)); 2208new CodeTypeReference("System.Diagnostics.CodeAnalysis.SuppressMessageAttribute"), 2278_ccRoot.CodeClass.BaseTypes[0].TypeArguments.Add(new CodeTypeReference(_typeArgsList[i])); 2318ctrConstructedType = new CodeTypeReference(genericName); 2322ctrConstructedType = new CodeTypeReference(t.FullName); 2347ctrConstructedType = new CodeTypeReference(genericName); 2386ctrTypeArg = new CodeTypeReference(currTypeArg); 2403ctrTypeArg = new CodeTypeReference(typeParam); 2412ctrConstructedType = new CodeTypeReference(t.FullName); 2428new CodeTypeReference(typeof(GeneratedCodeAttribute)), 2532ElementTypeReference = new CodeTypeReference(GetFullClassName(ns, className)) 2555ReturnType = new CodeTypeReference(typeof(Delegate)), 2592cmmLC.ImplementationTypes.Add(new CodeTypeReference(KnownTypes.Types[(int)KnownElements.IComponentConnector])); 2704Type = new CodeTypeReference(typeof(bool)) 2742ctdClass.BaseTypes.Add(new CodeTypeReference("System.Windows.Markup.InternalTypeHelper")); 2765ReturnType = new CodeTypeReference(typeof(Object)) 2804ReturnType = new CodeTypeReference(typeof(Object)) 2876ReturnType = new CodeTypeReference(typeof(Delegate)) 3206cmmMain.ReturnType = new CodeTypeReference(typeof(void));
System.CodeDom (47)
src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (6)
50ArrayElementType = new CodeTypeReference(type.GetElementType()!); 102TypeArguments.Add(new CodeTypeReference(genericArgs[i])); 219typeArgumentList.Add(new CodeTypeReference(name)); 234CodeTypeReference type = new CodeTypeReference(typeName.Substring(0, end + 1), Options); 243type = new CodeTypeReference(type, q.Dequeue()); 293ArrayElementType = new CodeTypeReference(baseType);
src\libraries\Common\src\System\CodeDom\CodeTypeReferenceCollection.cs (2)
38public void Add(string value) => Add(new CodeTypeReference(value)); 40public void Add(Type value) => Add(new CodeTypeReference(value));
System\CodeDom\CodeArrayCreateExpression.cs (7)
23_createType = new CodeTypeReference(createType); 29_createType = new CodeTypeReference(createType); 41_createType = new CodeTypeReference(createType); 47_createType = new CodeTypeReference(createType); 59_createType = new CodeTypeReference(createType); 65_createType = new CodeTypeReference(createType); 71get => _createType ??= new CodeTypeReference("");
System\CodeDom\CodeAttributeDeclaration.cs (1)
47_attributeType = new CodeTypeReference(_name);
System\CodeDom\CodeCastExpression.cs (3)
18TargetType = new CodeTypeReference(targetType); 24TargetType = new CodeTypeReference(targetType); 30get => field ??= new CodeTypeReference("");
System\CodeDom\CodeCatchClause.cs (1)
39get => _catchExceptionType ??= new CodeTypeReference(typeof(Exception));
System\CodeDom\CodeDefaultValueExpression.cs (1)
19get => _type ??= new CodeTypeReference("");
System\CodeDom\CodeDelegateCreateExpression.cs (1)
22get => _delegateType ??= new CodeTypeReference("");
System\CodeDom\CodeMemberEvent.cs (1)
12get => field ??= new CodeTypeReference("");
System\CodeDom\CodeMemberField.cs (3)
18Type = new CodeTypeReference(type); 24Type = new CodeTypeReference(type); 30get => field ??= new CodeTypeReference("");
System\CodeDom\CodeMemberMethod.cs (1)
23get => field ??= new CodeTypeReference(typeof(void).FullName);
System\CodeDom\CodeMemberProperty.cs (1)
17get => field ??= new CodeTypeReference("");
System\CodeDom\CodeObjectCreateExpression.cs (3)
18CreateType = new CodeTypeReference(createType); 24CreateType = new CodeTypeReference(createType); 30get => field ??= new CodeTypeReference("");
System\CodeDom\CodeParameterDeclarationExpression.cs (3)
18Type = new CodeTypeReference(type); 24Type = new CodeTypeReference(type); 38get => field ??= new CodeTypeReference("");
System\CodeDom\CodeTypeDelegate.cs (2)
15BaseTypes.Add(new CodeTypeReference("System.Delegate")); 25get => field ??= new CodeTypeReference("");
System\CodeDom\CodeTypeOfExpression.cs (3)
17Type = new CodeTypeReference(type); 22Type = new CodeTypeReference(type); 27get => field ??= new CodeTypeReference("");
System\CodeDom\CodeTypeReferenceExpression.cs (3)
17Type = new CodeTypeReference(type); 22Type = new CodeTypeReference(type); 27get => field ??= new CodeTypeReference("");
System\CodeDom\CodeVariableDeclarationStatement.cs (5)
18Type = new CodeTypeReference(type); 24Type = new CodeTypeReference(type); 37Type = new CodeTypeReference(type); 44Type = new CodeTypeReference(type); 59get => field ??= new CodeTypeReference("");
System.Runtime.Serialization.Schema (4)
System\Runtime\Serialization\Schema\CodeExporter.cs (4)
321return new CodeTypeReference(type); 451contractCodeDomInfo.TypeReference = new CodeTypeReference((clrNamespace == null || clrNamespace.Length == 0) ? typeName : clrNamespace + "." + typeName); 505contractCodeDomInfo.TypeReference = new CodeTypeReference(containingContractCodeDomInfo.TypeReference!.BaseType + "+" + nestedTypeName); // Again, nested types by definition have containing types. 620typeReference = new CodeTypeReference(elementTypeReference, 1);
System.Windows.Forms.Design (17)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
1995CodeTypeReference typeRef = new(expressionType);
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (2)
398CodeTypeReference elementTypeRef = new(elementType); 626CodeTypeReference elementTypeRef = new(elementType);
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (2)
510CodeTypeReference type = new(typeof(IPersistComponentSettings)); 529CodeTypeReference type = new(typeof(ISupportInitialize));
System\ComponentModel\Design\Serialization\EventMemberCodeDomSerializer.cs (1)
50CodeTypeReference delegateTypeRef = new(eventToSerialize.EventType);
System\ComponentModel\Design\Serialization\PrimitiveCodeDomSerializer.cs (1)
29_ => new CodeCastExpression(new CodeTypeReference(value.GetType()), new CodePrimitiveExpression(value)),
System\Resources\Tools\StronglyTypedResourceBuilder.cs (10)
380classType.CustomAttributes.Add(new(new CodeTypeReference(typeof(DebuggerNonUserCodeAttribute)) 386classType.CustomAttributes.Add(new(new CodeTypeReference(typeof(CompilerGeneratedAttribute)) 442CodeAttributeDeclaration generatedCodeAttrib = new(new CodeTypeReference(typeof(GeneratedCodeAttribute))); 490CodeAttributeDeclaration suppressAttribute = new(new CodeTypeReference(typeof(SuppressMessageAttribute))); 502CodeTypeReference resourceManagerType = new(typeof(ResourceManager), CodeTypeReferenceOptions.GlobalReference); 511CodeTypeReference cultureInfoType = new(typeof(CultureInfo), CodeTypeReferenceOptions.GlobalReference); 537CodeTypeReference editorBrowsableStateType = new(typeof(EditorBrowsableState)) 594new CodeTypeOfExpression(new CodeTypeReference(classDeclaration.Name)), 603new CodeTypeOfExpression(new CodeTypeReference(classDeclaration.Name)), 718CodeTypeReference valueType = new(type);
156 references to CodeTypeReference
PresentationBuildTasks (9)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (9)
1238var iComponentConnector = new CodeTypeReference(KnownTypes.Types[(int)KnownElements.IComponentConnector]); 2283private static CodeTypeReference GenerateConstructedTypeReference(Type t, string [] typeArgsList, string genericName) 2285CodeTypeReference ctrConstructedType = null; 2328private static CodeTypeReference GenerateConstructedTypeReference(Type t, string [] typeArgsList, Type refType, string refTypeFullName, string eventName) 2330CodeTypeReference ctrConstructedType = null; 2336CodeTypeReference ctrTypeArg = null; 2439CodeTypeReference ctrBaseClass = null; 3401internal CodeTypeReference ElementTypeReference 3420protected CodeTypeReference _ctrElemTypeRef = null;
System (1)
src\libraries\shims\System\ref\System.cs (1)
105[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.CodeDom.CodeTypeReference))]
System.CodeDom (88)
Microsoft\CSharp\CSharpCodeGenerator.cs (7)
206private void OutputType(CodeTypeReference typeRef) => Output.Write(GetTypeOutput(typeRef)); 1922foreach (CodeTypeReference typeRef in e.BaseTypes) 2218private void OutputTypeNamePair(CodeTypeReference typeRef, string name) 2272foreach (CodeTypeReference typeRef in typeParameters[i].Constraints) 2710private string GetBaseTypeOutput(CodeTypeReference typeRef, bool preferBuiltInTypes = true) 2846public string GetTypeOutput(CodeTypeReference typeRef) 2850CodeTypeReference baseTypeRef = typeRef;
Microsoft\VisualBasic\VBCodeGenerator.cs (13)
673protected override void OutputType(CodeTypeReference typeRef) 754protected override void OutputTypeNamePair(CodeTypeReference typeRef, string name) 765private static string GetArrayPostfix(CodeTypeReference typeRef) 789private void OutputArrayPostfix(CodeTypeReference typeRef) 1388CodeTypeReference typeRef = e.Type; 1472foreach (CodeTypeReference type in e.ImplementationTypes) 1645foreach (CodeTypeReference type in e.ImplementationTypes) 1792foreach (CodeTypeReference type in e.ImplementationTypes) 2012foreach (CodeTypeReference typeRef in e.BaseTypes) 2088foreach (CodeTypeReference typeRef in constraints) 2421private string GetBaseTypeOutput(CodeTypeReference typeRef, bool preferBuiltInTypes = true) 2525private string GetTypeOutputWithoutArrayPostFix(CodeTypeReference typeRef) 2566protected override string GetTypeOutput(CodeTypeReference typeRef)
src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (5)
167var typeArgumentList = new List<CodeTypeReference>(); 234CodeTypeReference type = new CodeTypeReference(typeName.Substring(0, end + 1), Options); 273public CodeTypeReference(string typeName, params CodeTypeReference[] typeArguments) : this(typeName) 296public CodeTypeReference(CodeTypeReference arrayType, int rank) 303public CodeTypeReference? ArrayElementType { get; set; }
src\libraries\Common\src\System\CodeDom\CodeTypeReferenceCollection.cs (10)
25public CodeTypeReferenceCollection(CodeTypeReference[] value) 30public CodeTypeReference this[int index] 32get { return ((CodeTypeReference)(List[index]!)); } 36public int Add(CodeTypeReference value) => List.Add(value); 42public void AddRange(CodeTypeReference[] value) 63public bool Contains(CodeTypeReference value) => List.Contains(value); 65public void CopyTo(CodeTypeReference[] array, int index) => List.CopyTo(array, index); 67public int IndexOf(CodeTypeReference value) => List.IndexOf(value); 69public void Insert(int index, CodeTypeReference value) => List.Insert(index, value); 71public void Remove(CodeTypeReference value) => List.Remove(value);
System\CodeDom\CodeArrayCreateExpression.cs (5)
9private CodeTypeReference _createType; 15public CodeArrayCreateExpression(CodeTypeReference createType, params CodeExpression[] initializers) 33public CodeArrayCreateExpression(CodeTypeReference createType, int size) 51public CodeArrayCreateExpression(CodeTypeReference createType, CodeExpression size) 69public CodeTypeReference CreateType
System\CodeDom\CodeAttributeDeclaration.cs (4)
10private CodeTypeReference _attributeType; 25public CodeAttributeDeclaration(CodeTypeReference attributeType) : this(attributeType, null) { } 27public CodeAttributeDeclaration(CodeTypeReference attributeType, params CodeAttributeArgument[] arguments) 53public CodeTypeReference AttributeType => _attributeType;
System\CodeDom\CodeCastExpression.cs (2)
10public CodeCastExpression(CodeTypeReference targetType, CodeExpression expression) 28public CodeTypeReference TargetType
System\CodeDom\CodeCatchClause.cs (4)
8private CodeTypeReference _catchExceptionType; 18public CodeCatchClause(string localName, CodeTypeReference catchExceptionType) 24public CodeCatchClause(string localName, CodeTypeReference catchExceptionType, params CodeStatement[] statements) 37public CodeTypeReference CatchExceptionType
System\CodeDom\CodeDefaultValueExpression.cs (3)
8private CodeTypeReference _type; 12public CodeDefaultValueExpression(CodeTypeReference type) 17public CodeTypeReference Type
System\CodeDom\CodeDelegateCreateExpression.cs (3)
8private CodeTypeReference _delegateType; 13public CodeDelegateCreateExpression(CodeTypeReference delegateType, CodeExpression targetObject, string methodName) 20public CodeTypeReference DelegateType
System\CodeDom\CodeMemberEvent.cs (2)
10public CodeTypeReference Type 16public CodeTypeReference PrivateImplementationType { get; set; }
System\CodeDom\CodeMemberField.cs (2)
10public CodeMemberField(CodeTypeReference type, string name) 28public CodeTypeReference Type
System\CodeDom\CodeMemberMethod.cs (2)
21public CodeTypeReference ReturnType 55public CodeTypeReference PrivateImplementationType { get; set; }
System\CodeDom\CodeMemberProperty.cs (2)
11public CodeTypeReference PrivateImplementationType { get; set; } 15public CodeTypeReference Type
System\CodeDom\codemethodreferenceexpression.cs (1)
16public CodeMethodReferenceExpression(CodeExpression targetObject, string methodName, params CodeTypeReference[] typeParameters)
System\CodeDom\CodeObjectCreateExpression.cs (2)
10public CodeObjectCreateExpression(CodeTypeReference createType, params CodeExpression[] parameters) 28public CodeTypeReference CreateType
System\CodeDom\CodeParameterDeclarationExpression.cs (2)
10public CodeParameterDeclarationExpression(CodeTypeReference type, string name) 36public CodeTypeReference Type
System\CodeDom\CodeTypeDelegate.cs (1)
23public CodeTypeReference ReturnType
System\CodeDom\CodeTypeOfExpression.cs (2)
10public CodeTypeOfExpression(CodeTypeReference type) 25public CodeTypeReference Type
System\CodeDom\CodeTypeReferenceExpression.cs (2)
10public CodeTypeReferenceExpression(CodeTypeReference type) 25public CodeTypeReference Type
System\CodeDom\CodeVariableDeclarationStatement.cs (3)
10public CodeVariableDeclarationStatement(CodeTypeReference type, string name) 28public CodeVariableDeclarationStatement(CodeTypeReference type, string name, CodeExpression initExpression) 57public CodeTypeReference Type
System\CodeDom\Compiler\CodeDomProvider.cs (1)
148public virtual string GetTypeOutput(CodeTypeReference type) =>
System\CodeDom\Compiler\CodeGenerator.cs (4)
431string ICodeGenerator.GetTypeOutput(CodeTypeReference type) => GetTypeOutput(type); 1120protected abstract void OutputType(CodeTypeReference typeRef); 1165protected virtual void OutputTypeNamePair(CodeTypeReference typeRef, string name) 1555protected abstract string GetTypeOutput(CodeTypeReference value);
System\CodeDom\Compiler\CodeValidator.cs (5)
51else if (e is CodeTypeReference) 53ValidateTypeReference((CodeTypeReference)e); 386foreach (CodeTypeReference typeRef in e.BaseTypes) 605private static void ValidateTypeReference(CodeTypeReference e) 620private static void ValidateArity(CodeTypeReference e)
System\CodeDom\Compiler\ICodeGenerator.cs (1)
14string GetTypeOutput(CodeTypeReference type);
System.Runtime.Serialization.Schema (40)
System\Runtime\Serialization\Schema\CodeExporter.cs (30)
305internal CodeTypeReference GetCodeTypeReference(DataContract dataContract) 318private CodeTypeReference GetCodeTypeReference(Type type) 325private CodeTypeReference? GetCodeTypeReference(Type type, IList? parameters) 327CodeTypeReference codeTypeReference = GetCodeTypeReference(type); 333CodeTypeReference? paramTypeReference = null; 360internal CodeTypeReference GetElementTypeReference(DataContract dataContract, bool isElementTypeNullable) 362CodeTypeReference elementTypeReference = GetCodeTypeReference(dataContract); 412CodeTypeReference? referencedType = GetReferencedType(dataContract); 535private CodeTypeReference? GetReferencedType(DataContract dataContract) 537CodeTypeReference? typeReference = GetSurrogatedTypeReference(dataContract); 597private CodeTypeReference? GetReferencedCollectionType(DataContract? collectionContract) 606CodeTypeReference? typeReference; 618CodeTypeReference? elementTypeReference = GetElementTypeReference(itemContract, isItemTypeNullable); 647private bool TryGetReferencedDictionaryType(DataContract collectionContract, [NotNullWhen(true)] out CodeTypeReference? typeReference) 666CodeTypeReference? keyTypeReference = GetElementTypeReference(keyMember.MemberTypeContract, keyMember.IsNullable); 667CodeTypeReference? valueTypeReference = GetElementTypeReference(valueMember.MemberTypeContract, valueMember.IsNullable); 681private bool TryGetReferencedListType(DataContract itemContract, bool isItemTypeNullable, out CodeTypeReference? typeReference) 698private CodeTypeReference? GetSurrogatedTypeReference(DataContract dataContract) 703CodeTypeReference typeReference = GetCodeTypeReference(type); 846CodeTypeReference memberType = GetElementTypeReference(dataMember.MemberTypeContract, 896internal ICollection<CodeTypeReference>? GetKnownTypeReferences(DataContract dataContract) 906List<CodeTypeReference> knownTypeReferences = new List<CodeTypeReference>(); 1004private CodeTypeReference WrapNullable(CodeTypeReference memberType) 1009CodeTypeReference nullableOfMemberType = GetCodeTypeReference(typeof(Nullable<>)); 1210CodeTypeReference? baseTypeReference; 1663private CodeTypeReference CodeTypeIPropertyChange 1984private CodeMemberProperty CreateProperty(CodeTypeReference type, string propertyName, string fieldName, bool isValueType) 1989private CodeMemberProperty CreateProperty(CodeTypeReference type, string propertyName, string fieldName, bool isValueType, bool raisePropertyChanged)
System\Runtime\Serialization\Schema\ContractCodeDomInfo.cs (1)
43internal CodeTypeReference? TypeReference { get; set; }
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (9)
214/// Returns a <see cref="CodeTypeReference"/> to the CLR type generated for the schema type with the specified <see cref="XmlQualifiedName"/>. 217/// <returns>A <see cref="CodeTypeReference"/> reference to the CLR type generated for the schema type with the typeName specified.</returns> 219public CodeTypeReference GetCodeTypeReference(XmlQualifiedName typeName) 227/// Returns a <see cref="CodeTypeReference"/> for the specified XML qualified element and schema element. 231/// <returns>A <see cref="CodeTypeReference"/> that represents the type that was generated for the specified schema type.</returns> 233public CodeTypeReference GetCodeTypeReference(XmlQualifiedName typeName, XmlSchemaElement element) 261/// Returns a list of <see cref="CodeTypeReference"/> objects that represents the known types generated when generating code for the specified schema type. 264/// <returns>A collection of type <see cref="CodeTypeReference"/>.</returns> 266public ICollection<CodeTypeReference>? GetKnownTypeReferences(XmlQualifiedName typeName)
System.Windows.Forms.Design (17)
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (3)
234foreach (CodeTypeReference typeReference in typeDeclaration.BaseTypes) 898private static bool TypesEqual(CodeTypeReference typeLeft, CodeTypeReference typeRight)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (4)
45internal static string GetTypeNameFromCodeTypeReference(IDesignerSerializationManager manager, CodeTypeReference typeref) 58private static void GetTypeNameFromCodeTypeReferenceHelper(IDesignerSerializationManager manager, CodeTypeReference typeref, StringBuilder typeName) 85foreach (CodeTypeReference childref in typeref.TypeArguments) 1995CodeTypeReference typeRef = new(expressionType);
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (2)
398CodeTypeReference elementTypeRef = new(elementType); 626CodeTypeReference elementTypeRef = new(elementType);
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (2)
510CodeTypeReference type = new(typeof(IPersistComponentSettings)); 529CodeTypeReference type = new(typeof(ISupportInitialize));
System\ComponentModel\Design\Serialization\EventMemberCodeDomSerializer.cs (1)
50CodeTypeReference delegateTypeRef = new(eventToSerialize.EventType);
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (1)
58foreach (CodeTypeReference typeRef in declaration.BaseTypes)
System\Resources\Tools\StronglyTypedResourceBuilder.cs (4)
502CodeTypeReference resourceManagerType = new(typeof(ResourceManager), CodeTypeReferenceOptions.GlobalReference); 511CodeTypeReference cultureInfoType = new(typeof(CultureInfo), CodeTypeReferenceOptions.GlobalReference); 537CodeTypeReference editorBrowsableStateType = new(typeof(EditorBrowsableState)) 718CodeTypeReference valueType = new(type);
System.Windows.Forms.Design.Tests (1)
CodeDomHelpers.cs (1)
117string GetType(CodeTypeReference reference)