3 types derived from Type
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (1)
13internal partial class ModifiedType : Type
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
17internal abstract class SignatureType : Type
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeInfo.cs (1)
9public abstract partial class TypeInfo : Type, IReflectableType
22583 references to Type
ApiExplorerWebSite (2)
ApiExplorerInboundOutboundConvention.cs (1)
17public ApiExplorerInboundOutboundConvention(Type type)
ApiExplorerVisibilityDisabledConvention.cs (1)
16public ApiExplorerVisibilityDisabledConvention(Type type)
AssemblyStripper (54)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Cil\GuidAttribute.cs (2)
64 public static int GetValueFromGuid (Guid id, Type enumeration) 73 public static Guid GetGuidFromValue (int value, Type enumeration)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Cil\SymbolStoreHelper.cs (3)
64 Type factoryType = Type.GetType (type_name + ", " + assembly_name, false); 92 return Type.GetType ("Mono.Runtime") != null;
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Metadata\Utilities.cs (1)
487 internal static Type GetCorrespondingTable (TokenType t)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Signatures\SignatureWriter.cs (1)
490 elem.FieldOrPropType = GetElementTypeFromTypeCode (Type.GetTypeCode (elem.Value.GetType ()));
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil\ConstructorCollection.cs (4)
116 parameters = Type.EmptyTypes; 127 if (param is Type) 128 pname = ReflectionHelper.GetTypeSignature (param as Type); 149 public MethodDefinition GetConstructor (bool isStatic, Type [] parameters)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil\MethodDefinitionCollection.cs (3)
130 if (param is Type) 131 pname = ReflectionHelper.GetTypeSignature (param as Type); 152 public MethodDefinition GetMethod (string name, Type [] parameters)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil\ModuleDefinition.cs (3)
241 public TypeReference Import (Type type) 249 public TypeReference Import (Type type, TypeDefinition context) 258 public TypeReference Import (Type type, MethodDefinition context)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil\ReflectionHelper.cs (33)
72 public static string GetTypeSignature (Type t) 97 Type [] genArgs = GetGenericArguments (t); 128 public static bool IsGenericType (Type t) 133 static bool IsGenericParameter (Type t) 138 static bool IsGenericTypeDefinition (Type t) 143 static bool IsGenericTypeSpec (Type t) 148 static Type GetGenericTypeDefinition (Type t) 150 return (Type) t.GetType ().GetMethod ("GetGenericTypeDefinition").Invoke (t, null); 153 static Type [] GetGenericArguments (Type t) 155 return (Type []) t.GetType ().GetMethod ("GetGenericArguments").Invoke (t, null); 158 GenericInstanceType GetGenericType (Type t, TypeReference element, ImportContext context) 161 foreach (Type genArg in GetGenericArguments (t)) 167 static bool GenericParameterOfMethod (Type t) 172 static GenericParameter GetGenericParameter (Type t, ImportContext context) 187 TypeReference GetTypeSpec (Type t, ImportContext context) 195 t = (Type) t.GetType ().GetMethod ("GetGenericTypeDefinition").Invoke (t, null); 202 t = (Type) s.Pop (); 218 TypeReference AdjustReference (Type type, TypeReference reference) 224 Type [] parameters = GetGenericArguments (type); 232 public TypeReference ImportSystemType (Type t, ImportContext context) 252 foreach (Type genParam in GetGenericArguments (t)) 261 static string GetMethodBaseSignature (SR.MethodBase meth, Type declaringType, Type retType) 271 Type [] genArgs = GetGenericArguments (meth as SR.MethodInfo); 305 static Type [] GetGenericArguments (SR.MethodInfo mi) 307 return (Type []) mi.GetType ().GetMethod ("GetGenericArguments").Invoke (mi, null); 321 foreach (Type genArg in GetGenericArguments (mi)) 327 MethodReference ImportMethodBase (SR.MethodBase mb, Type retType, ImportContext context) 332 Type originalDecType = mb.DeclaringType; 333 Type declaringTypeDef = originalDecType; 362 foreach (Type genParam in GetGenericArguments (mb as SR.MethodInfo))
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil\ReflectionWriter.cs (2)
722 Type t = hc.Constant.GetType (); 1381 Type t = o.GetType ();
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24312.1\contentFiles\cs\netstandard2.0\Mono.Cecil\SecurityDeclarationReader.cs (2)
128 Type secattr = null; 133 secattr = Type.GetType (cname, false);
BasicWebSite (3)
Formatters\VCardFormatter_V3.cs (1)
24protected override bool CanWriteType(Type type)
Formatters\VCardFormatter_V4.cs (1)
25protected override bool CanWriteType(Type type)
RequestScopedActionConstraint.cs (1)
27var constraintType = typeof(Constraint);
Binding.UDS.IntegrationTests (3)
ServiceHelper.cs (3)
19var startupType = typeof(TStartup); 20var configureServicesMethod = startupType.GetMethod("ConfigureServices", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, new Type[] { typeof(IServiceCollection) }); 21var configureMethod = startupType.GetMethod("Configure", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, new Type[] { typeof(IHost) });
Client.ExpectedExceptions.IntegrationTests (2)
CallbackDebugBehaviorTests.cs (2)
39System.Collections.ObjectModel.KeyedCollection<Type, IEndpointBehavior> endpointBehaviors = factory.Endpoint.EndpointBehaviors; 65System.Collections.ObjectModel.KeyedCollection<Type, IEndpointBehavior> endpointBehaviors2 = factory2.Endpoint.EndpointBehaviors;
Contract.Data.IntegrationTests (4)
DataContractTests.4.1.1.cs (4)
70public override Type ResolveName(string typeName, string typeNamespace, Type declaredType, DataContractResolver knownTypeResolver) 82public override bool TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, out XmlDictionaryString typeName, out XmlDictionaryString typeNamespace)
Contract.Fault.IntegrationTests (1)
FaultExceptionTests.cs (1)
23Type detail = typeof(FaultDetail);
ControllersFromServicesWebSite (1)
Startup.cs (1)
43public TypesPart(params Type[] types)
Diagnostics.EFCore.FunctionalTests (1)
Helpers\PlatformHelper.cs (1)
12return Type.GetType("Mono.Runtime") != null;
dotnet-svcutil.xmlserializer (44)
Microsoft\Tools\ServiceModel\SvcUtil\ExportModule.cs (11)
24internal delegate bool IsTypeExcludedDelegate(Type t); 25internal delegate void TypeLoadErrorEventHandler(Type type, string errorMessage); 31private readonly List<Type> _types = new List<Type>(); 34private static Type serviceContractAttributeType = Tool.SMAssembly.GetType("System.ServiceModel.ServiceContractAttribute"); 51foreach (Type type in _types) 62private object LoadContract(Type type) 66Type contractDescription = Tool.SMAssembly.GetType("System.ServiceModel.Description.ContractDescription"); 67MethodInfo GetContract = contractDescription.GetMethod("GetContract", BindingFlags.Public| BindingFlags.Static, null, new Type[] { typeof(Type) }, null); 84private static bool IsContractType(Type type)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (4)
231static public Type[] LoadTypes(Assembly assembly) 233Type[] types; 246types = Array.FindAll<Type>(rtle.Types, delegate (Type t) { return t != null; });
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (16)
32private List<Type> _referencedTypes; 34private Dictionary<string, Type> _excludedTypes; 44internal List<Type> ReferencedTypes { get { return _referencedTypes; } } 123internal bool IsTypeExcluded(Type type) 134private static Type s_typeOfDateTimeOffset = typeof(DateTimeOffset); 333_parent._referencedTypes = new List<Type>(); 339Dictionary<string, Type> foundCollectionTypes = AddSpecifiedTypesToDictionary(collectionTypesArgs, Options.Cmd.CollectionType); 382private Dictionary<string, Type> AddSpecifiedTypesToDictionary(IList<string> typeArgs, string cmd) 384Dictionary<string, Type> specifiedTypes = new Dictionary<string, Type>(typeArgs.Count); 394private void AddReferencedTypesFromAssembly(Assembly assembly, Dictionary<string, Type> foundCollectionTypes) 396foreach (Type type in InputModule.LoadTypes(assembly)) 406private void AddMscorlib(Dictionary<string, Type> foundCollectionTypes) 477internal static bool IsTypeSpecified(Type type, Dictionary<string, Type> specifiedTypes, string cmd) 479Type foundType = null;
Microsoft\Tools\ServiceModel\SvcUtil\XmlSerializerGenerator.cs (13)
48List<Type> types = CollectXmlSerializerTypes(assembly, mappings); 117private List<Type> CollectXmlSerializerTypes(Assembly assembly, List<XmlMapping> mappings) 119List<Type> types = new List<Type>(); 122contractLoader.ContractLoadErrorCallback = delegate (Type contractType, string errorMessage) 127Type contractDescriptionType = Tool.SMAssembly.GetType("System.ServiceModel.Description.ContractDescription"); 141Type xmlSerializerOperationBehaviorType = Tool.SMAssembly.GetType("System.ServiceModel.Description.XmlSerializerOperationBehavior"); 148Type operationType = Tool.SMAssembly.GetType("System.ServiceModel.Description.OperationDescription"); 162Type keyedByTypeCollectionType = Tool.SMAssembly.GetType("System.Collections.Generic.KeyedByTypeCollection`1"); 169Type iOperationBehaviorType = Tool.SMAssembly.GetType("System.ServiceModel.Description.IOperationBehavior"); 176keyedByTypeCollectionType = keyedByTypeCollectionType.MakeGenericType(new Type[] { iOperationBehaviorType }); 190findMethod = findMethod.MakeGenericMethod(new Type[] { xmlSerializerOperationBehaviorType }); 230types.Add((Type)contractTypeProperty.GetValue(contract));
dotnet-svcutil-lib (2477)
CodeDomFixup\CodeDomHelpers.cs (6)
27Type namespaceHelper = typeof(ServiceContractGenerator).GetTypeInfo().Assembly.GetType(typeof(ServiceContractGenerator).FullName + "+NamespaceHelper"); 125internal static bool MatchType(CodeTypeReference typeRef, Type type) 167internal static bool MatchGenericBaseType(CodeTypeReference typeRef, Type type) 172internal static bool MatchBaseType(CodeTypeReference typeRef, Type type) 177internal static bool MatchAnyBaseType(CodeTypeReference typeRef, Type[] types) 197internal static bool MatchSignatures(CodeParameterDeclarationExpressionCollection args1, Type[] args2)
CodeDomFixup\CodeDomVisitors\AttributeFixer.cs (2)
16private static Type[] s_attrsToRemove = new Type[]
CodeDomFixup\CodeDomVisitors\ConstructorFixer.cs (13)
17private static Type[][] s_validCtors = new Type[][] 19Array.Empty<Type>(), 20new Type[] { typeof(string), }, 21new Type[] { typeof(InstanceContext), }, 22new Type[] { typeof(string), typeof(string), }, 23new Type[] { typeof(string), typeof(EndpointAddress), }, 24new Type[] { typeof(InstanceContext), typeof(string), }, 25new Type[] { typeof(InstanceContext), typeof(string), typeof(string), }, 26new Type[] { typeof(InstanceContext), typeof(string), typeof(EndpointAddress), }, 27new Type[] { typeof(Binding), typeof(EndpointAddress), }, 28new Type[] { typeof(InstanceContext), typeof(Binding), typeof(EndpointAddress), }, 41private static bool IsValidConstructor(CodeConstructor ctor, Type[][] validCtors)
CodeDomFixup\CodeDomVisitors\NamespaceFixer.cs (6)
18private Dictionary<string, Type> _xmlTypes = new Dictionary<string, Type>(); 19private Dictionary<string, Type> _codeDomTypes = new Dictionary<string, Type>(); 25foreach (var type in msxmlTypes) 36foreach (var type in mscodedomTypes)
CodeDomFixup\CodeDomVisitors\PropertyFieldNameScope.cs (1)
14public PropertyFieldNameScope(Type type)
CodeDomFixup\CodeDomVisitors\SimpleTypeRemapper.cs (4)
12protected Type srcType; 15public SimpleTypeRemapper(Type srcType, Type destType) : this(srcType, destType.FullName) { } 16public SimpleTypeRemapper(Type srcType, string destType)
CodeDomFixup\CodeDomVisitors\XmlDomAttributeFixer.cs (2)
13private static readonly Type[] s_filteredTypes = new Type[] { typeof(Microsoft.Xml.XmlAttribute), };
CodeDomFixup\MethodCreationHelper.cs (1)
1358Type bindingElementType = isHttps ? typeof(HttpsTransportBindingElement) : typeof(HttpTransportBindingElement);
CommandProcessorOptions.cs (21)
41public List<Type> ReferencedTypes { get; private set; } 43public List<Type> ReferencedCollectionTypes { get; private set; } 102this.ReferencedTypes = new List<Type>(); 104this.ReferencedCollectionTypes = new List<Type>(); 845private static Dictionary<string, Type> AddSpecifiedTypesToDictionary(IList<string> typeArgs, string cmd) 847Dictionary<string, Type> specifiedTypes = new Dictionary<string, Type>(typeArgs.Count); 859private void AddReferencedTypesFromAssembly(Assembly assembly, Dictionary<string, Type> foundCollectionTypes, Dictionary<string, Type> excludedTypes) 861foreach (Type type in TypeLoader.LoadTypes(assembly, this.Verbosity.Value)) 879private void AddStdLibraries(Dictionary<string, Type> foundCollectionTypes, Dictionary<string, Type> excludedTypes) 881List<Type> coreTypes = new List<Type> 888foreach (var type in coreTypes) 898private static bool IsTypeSpecified(Type type, Dictionary<string, Type> specifiedTypes, string cmd) 904if (specifiedTypes.TryGetValue(type.FullName, out Type foundType)) 932private void AddReferencedCollectionTypes(IList<string> collectionTypesArgs, Dictionary<string, Type> foundCollectionTypes) 939Type foundType = null; 958foundType = foundType ?? Type.GetType(collectionType);
FrameworkFork\Microsoft.CodeDom\Compiler\CodeDOMProvider.cs (1)
154public virtual TypeConverter GetConverter(Type type)
FrameworkFork\Microsoft.CodeDom\Compiler\CompilerInfo.cs (7)
23private Type _type; 37public Type CodeDomProviderType 47_type = Type.GetType(_codeDomProviderTypeName); 64Type type = Type.GetType(_codeDomProviderTypeName); 79ConstructorInfo ci = CodeDomProviderType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) }); 94ConstructorInfo constructor = CodeDomProviderType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) });
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (3)
78public override TypeConverter GetConverter(Type type) 4613public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 4651public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
FrameworkFork\Microsoft.CodeDom\System\CodeArrayCreateExpression.cs (3)
62public CodeArrayCreateExpression(Type createType, params CodeExpression[] initializers) 92public CodeArrayCreateExpression(Type createType, int size) 122public CodeArrayCreateExpression(Type createType, CodeExpression size)
FrameworkFork\Microsoft.CodeDom\System\CodeCastExpression.cs (1)
62public CodeCastExpression(Type targetType, CodeExpression expression)
FrameworkFork\Microsoft.CodeDom\System\CodeMemberField.cs (1)
61public CodeMemberField(Type type, string name)
FrameworkFork\Microsoft.CodeDom\System\CodeObjectCreateExpression.cs (1)
61public CodeObjectCreateExpression(Type createType, params CodeExpression[] parameters)
FrameworkFork\Microsoft.CodeDom\System\CodeParameterDeclarationExpression.cs (1)
63public CodeParameterDeclarationExpression(Type type, string name)
FrameworkFork\Microsoft.CodeDom\System\CodeTypeOfExpression.cs (1)
57public CodeTypeOfExpression(Type type)
FrameworkFork\Microsoft.CodeDom\System\CodeTypeReference.cs (5)
57public CodeTypeReference(Type type) 78public CodeTypeReference(Type type, CodeTypeReferenceOptions codeTypeReferenceOption) : this(type) 100private void InitializeFromType(Type type) 105Type currentType = type; 119Type[] genericArgs = type.GetGenericArguments();
FrameworkFork\Microsoft.CodeDom\System\CodeTypeReferenceCollection.cs (1)
88public void Add(Type value)
FrameworkFork\Microsoft.CodeDom\System\CodeTypeReferenceExpression.cs (1)
57public CodeTypeReferenceExpression(Type type)
FrameworkFork\Microsoft.CodeDom\System\CodeVariableDeclarationStatement.cs (2)
61public CodeVariableDeclarationStatement(Type type, string name) 93public CodeVariableDeclarationStatement(Type type, string name, CodeExpression initExpression)
FrameworkFork\Microsoft.Xml\External\Extensions.cs (4)
19public static MethodInfo GetMethod(this Type type, String name, BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) 24public static MethodInfo GetMethod(this Type type, String name, BindingFlags bindingAttr, System.Reflection.Binder binder, Type[] types, ParameterModifier[] modifiers)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (16)
21internal static readonly Type TypeOfObject = typeof(System.Object); 22internal static readonly Type TypeOfString = typeof(System.String); 24private static volatile Type[] s_tokenTypeMap = null; 320private System.Type _valueType; 641public override System.Type ValueType 1768public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 3287Type[] map = new Type[256]; 3299Type TypeOfInt32 = typeof(System.Int32); 3302Type TypeOfDecimal = typeof(System.Decimal); 3308Type TypeOfDateTime = typeof(System.DateTime); 3317Type TypeOfDateTimeOffset = typeof(System.DateTimeOffset); 3321Type TypeOfByteArray = typeof(System.Byte[]); 3339private System.Type GetValueType(BinXmlToken token) 3341Type t = s_tokenTypeMap[(int)token]; 4213private object ValueAs(BinXmlToken token, Type returnType, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReaderAsync.cs (2)
37public override Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 57public override Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlAsyncCheckReader.cs (6)
231public override System.Type ValueType 294public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 414public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 420public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver, string localName, string namespaceURI) 826public override Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 850public override Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReader.cs (4)
202public virtual System.Type ValueType 378public virtual object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 586public virtual object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 599public virtual object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver, string localName, string namespaceURI)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderAsync.cs (2)
57public virtual async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 111public virtual async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlSubtreeReader.cs (1)
795public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlSubtreeReaderAsync.cs (1)
220public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWrappingReader.cs (1)
52public override System.Type ValueType { get { return reader.ValueType; } }
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReader.cs (4)
130private static volatile Type s_typeOfString; 408public override System.Type ValueType 709public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 1042public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReaderAsync.cs (2)
78public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 173public override async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolver.cs (4)
40internal virtual bool SupportsType(Type type) 115internal override bool SupportsType(Type type) 224public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn) 266public override bool SupportsType(Uri absoluteUri, Type type)
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
21Type ofObjectToReturn)
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlSystemPathResolver.cs (1)
21public override Object GetEntity(Uri uri, string role, Type typeOfObjectToReturn)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (103)
433Type derivedType = this.GetType(); 434Type baseType = datatype.GetType(); 492public override Type ValueType { get { return typeof(string); } } 536internal abstract Type ListValueType { get; } 542internal override object ParseValue(string s, Type typDest, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr) 1022public override Type ValueType { get { return ListValueType; } } 1026internal override Type ListValueType { get { return _itemType.ListValueType; } } 1184private static readonly Type s_atomicValueType = typeof(object); 1185private static readonly Type s_listValueType = typeof(object[]); 1218public override Type ValueType { get { return s_atomicValueType; } } 1224internal override Type ListValueType { get { return s_listValueType; } } 1374private static readonly Type s_atomicValueType = typeof(string); 1375private static readonly Type s_listValueType = typeof(string[]); 1384public override Type ValueType { get { return s_atomicValueType; } } 1388internal override Type ListValueType { get { return s_listValueType; } } 1525private static readonly Type s_atomicValueType = typeof(bool); 1526private static readonly Type s_listValueType = typeof(bool[]); 1537public override Type ValueType { get { return s_atomicValueType; } } 1539internal override Type ListValueType { get { return s_listValueType; } } 1605private static readonly Type s_atomicValueType = typeof(float); 1606private static readonly Type s_listValueType = typeof(float[]); 1617public override Type ValueType { get { return s_atomicValueType; } } 1619internal override Type ListValueType { get { return s_listValueType; } } 1694private static readonly Type s_atomicValueType = typeof(double); 1695private static readonly Type s_listValueType = typeof(double[]); 1706public override Type ValueType { get { return s_atomicValueType; } } 1708internal override Type ListValueType { get { return s_listValueType; } } 1785private static readonly Type s_atomicValueType = typeof(decimal); 1786private static readonly Type s_listValueType = typeof(decimal[]); 1798public override Type ValueType { get { return s_atomicValueType; } } 1800internal override Type ListValueType { get { return s_listValueType; } } 1878private static readonly Type s_atomicValueType = typeof(TimeSpan); 1879private static readonly Type s_listValueType = typeof(TimeSpan[]); 1890public override Type ValueType { get { return s_atomicValueType; } } 1892internal override Type ListValueType { get { return s_listValueType; } } 2023private static readonly Type s_atomicValueType = typeof(DateTime); 2024private static readonly Type s_listValueType = typeof(DateTime[]); 2045public override Type ValueType { get { return s_atomicValueType; } } 2047internal override Type ListValueType { get { return s_listValueType; } } 2426private static readonly Type s_atomicValueType = typeof(byte[]); 2427private static readonly Type s_listValueType = typeof(byte[][]); 2438public override Type ValueType { get { return s_atomicValueType; } } 2440internal override Type ListValueType { get { return s_listValueType; } } 2527private static readonly Type s_atomicValueType = typeof(byte[]); 2528private static readonly Type s_listValueType = typeof(byte[][]); 2539public override Type ValueType { get { return s_atomicValueType; } } 2541internal override Type ListValueType { get { return s_listValueType; } } 2627private static readonly Type s_atomicValueType = typeof(Uri); 2628private static readonly Type s_listValueType = typeof(Uri[]); 2639public override Type ValueType { get { return s_atomicValueType; } } 2648internal override Type ListValueType { get { return s_listValueType; } } 2723private static readonly Type s_atomicValueType = typeof(XmlQualifiedName); 2724private static readonly Type s_listValueType = typeof(XmlQualifiedName[]); 2750public override Type ValueType { get { return s_atomicValueType; } } 2752internal override Type ListValueType { get { return s_listValueType; } } 3059private static readonly Type s_atomicValueType = typeof(XmlQualifiedName); 3060private static readonly Type s_listValueType = typeof(XmlQualifiedName[]); 3086public override Type ValueType { get { return s_atomicValueType; } } 3088internal override Type ListValueType { get { return s_listValueType; } } 3265private static readonly Type s_atomicValueType = typeof(long); 3266private static readonly Type s_listValueType = typeof(long[]); 3286public override Type ValueType { get { return s_atomicValueType; } } 3288internal override Type ListValueType { get { return s_listValueType; } } 3329private static readonly Type s_atomicValueType = typeof(int); 3330private static readonly Type s_listValueType = typeof(int[]); 3342public override Type ValueType { get { return s_atomicValueType; } } 3344internal override Type ListValueType { get { return s_listValueType; } } 3386private static readonly Type s_atomicValueType = typeof(short); 3387private static readonly Type s_listValueType = typeof(short[]); 3399public override Type ValueType { get { return s_atomicValueType; } } 3401internal override Type ListValueType { get { return s_listValueType; } } 3442private static readonly Type s_atomicValueType = typeof(sbyte); 3443private static readonly Type s_listValueType = typeof(sbyte[]); 3455public override Type ValueType { get { return s_atomicValueType; } } 3457internal override Type ListValueType { get { return s_listValueType; } } 3530private static readonly Type s_atomicValueType = typeof(ulong); 3531private static readonly Type s_listValueType = typeof(ulong[]); 3543public override Type ValueType { get { return s_atomicValueType; } } 3545internal override Type ListValueType { get { return s_listValueType; } } 3586private static readonly Type s_atomicValueType = typeof(uint); 3587private static readonly Type s_listValueType = typeof(uint[]); 3599public override Type ValueType { get { return s_atomicValueType; } } 3601internal override Type ListValueType { get { return s_listValueType; } } 3642private static readonly Type s_atomicValueType = typeof(ushort); 3643private static readonly Type s_listValueType = typeof(ushort[]); 3655public override Type ValueType { get { return s_atomicValueType; } } 3657internal override Type ListValueType { get { return s_listValueType; } } 3697private static readonly Type s_atomicValueType = typeof(byte); 3698private static readonly Type s_listValueType = typeof(byte[]); 3710public override Type ValueType { get { return s_atomicValueType; } } 3712internal override Type ListValueType { get { return s_listValueType; } } 3806private static readonly Type s_atomicValueType = typeof(XmlQualifiedName); 3807private static readonly Type s_listValueType = typeof(XmlQualifiedName[]); 3836public override Type ValueType { get { return s_atomicValueType; } } 3838internal override Type ListValueType { get { return s_listValueType; } } 3848private static readonly Type s_atomicValueType = typeof(char); 3849private static readonly Type s_listValueType = typeof(char[]); 3851public override Type ValueType { get { return s_atomicValueType; } } 3853internal override Type ListValueType { get { return s_listValueType; } } 3950private static readonly Type s_atomicValueType = typeof(Guid); 3951private static readonly Type s_listValueType = typeof(Guid[]); 3953public override Type ValueType { get { return s_atomicValueType; } } 3955internal override Type ListValueType { get { return s_listValueType; } }
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (52)
22public static Type[] InterfaceTypes = { typeof(Boolean), typeof(DateTime), typeof(Decimal), typeof(Double), typeof(Int32), typeof(Int64), typeof(Single), typeof(String), typeof(Object) }; 383List<Type> uniqueTypes = new List<Type>(); 386foreach (Type tSrc in group.FindUniqueSourceTypes(null)) 389foreach (Type tDst in group.FindUniqueDestinationTypes(null)) 393foreach (Type t in uniqueTypes) 399foreach (Type tDst in InterfaceTypes) 401foreach (Type tSrc in InterfaceTypes) 441IList<Type> uniqueSourceTypes, uniqueDestTypes; 446foreach (Type tDst in InterfaceTypes) 459foreach (Type tSrc in InterfaceTypes) 489foreach (Type tSrc in uniqueSourceTypes) 514foreach (Type tSrc in InterfaceTypes) 529foreach (Type tDst in uniqueDestTypes) 557foreach (Type tDst in group.FindUniqueDestinationTypes(null)) 588foreach (Type tSrc in uniqueSourceTypes) 600foreach (Type tDst in group.FindUniqueDestinationTypes(typeof(object))) 604foreach (Type tSrc in group.FindUniqueSourceTypes(typeof(object))) 633foreach (Type tSrc in uniqueSourceTypes) 649foreach (Type tDst in uniqueDestTypes) 664private void StartMethod(Type typeSrc, Type typeDst) 686private void StartMethodSignature(Type typeSrc, Type typeDst) 714private bool MethodHasResolver(Type typeSrc, Type typeDst) 789Type tSrc, tDst; 829private string GenerateSourceTypeMatch(Type type) 841private static string ClrTypeName(Type type) 849private static string ClrTypeToCSharpName(Type type) 869private static bool IsInterfaceMethod(Type type) 888Type clrTypeSrc = ClrTypeNameToType(rule[1]); 889Type clrTypeDst = ClrTypeNameToType(rule[2]); 901public IList<Type> FindUniqueSourceTypes(Type tDst) 903List<Type> types = new List<Type>(); 914public IList<Type> FindUniqueDestinationTypes(Type tSrc) 916List<Type> types = new List<Type>(); 927public IList<ConversionRule> Find(XmlTypeCode code, Type tSrc, Type tDst) 985private static Type ClrTypeNameToType(string name) 987Type type = Type.GetType("System." + name); 990type = Type.GetType("System.IO." + name); 1009private Type _clrTypeSrc,_clrTypeDst; 1012public ConversionRule(XmlTypeCode xmlType, Type clrTypeSrc, Type clrTypeDst, string convExpr) 1025public Type SourceType 1030public Type DestinationType
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (1)
370Type returnType = obj.GetType();
FrameworkFork\Microsoft.Xml\Xml\schema\XmlAtomicValue.cs (2)
201public override Type ValueType 344public override object ValueAs(Type type, IXmlNamespaceResolver nsResolver)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaDatatype.cs (5)
29public abstract Type ValueType { get; } 54public virtual object ChangeType(object value, Type targetType) 71public virtual object ChangeType(object value, Type targetType, IXmlNamespaceResolver namespaceResolver) 113internal abstract object ParseValue(string s, Type typDest, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr); 274Type t = value.GetType();
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (167)
263public abstract object ChangeType(bool value, Type destinationType); 264public abstract object ChangeType(int value, Type destinationType); 265public abstract object ChangeType(long value, Type destinationType); 266public abstract object ChangeType(decimal value, Type destinationType); 267public abstract object ChangeType(float value, Type destinationType); 268public abstract object ChangeType(double value, Type destinationType); 269public abstract object ChangeType(DateTime value, Type destinationType); 270public abstract object ChangeType(DateTimeOffset value, Type destinationType); 271public abstract object ChangeType(string value, Type destinationType); 272public abstract object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver); 273public abstract object ChangeType(object value, Type destinationType); 274public abstract object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver); 281private Type _clrTypeDefault; 335protected XmlBaseConverter(XmlBaseConverter converterAtomic, Type clrTypeDefault) 342protected static readonly Type ICollectionType = typeof(ICollection); 343protected static readonly Type IEnumerableType = typeof(IEnumerable); 344protected static readonly Type IListType = typeof(IList); 345protected static readonly Type ObjectArrayType = typeof(object[]); 346protected static readonly Type StringArrayType = typeof(string[]); 347protected static readonly Type XmlAtomicValueArrayType = typeof(XmlAtomicValue[]); 350protected static readonly Type DecimalType = typeof(decimal); 351protected static readonly Type Int32Type = typeof(int); 352protected static readonly Type Int64Type = typeof(long); 353protected static readonly Type StringType = typeof(string); 354protected static readonly Type XmlAtomicValueType = typeof(XmlAtomicValue); 355protected static readonly Type ObjectType = typeof(object); 356protected static readonly Type ByteType = typeof(byte); 357protected static readonly Type Int16Type = typeof(short); 358protected static readonly Type SByteType = typeof(sbyte); 359protected static readonly Type UInt16Type = typeof(ushort); 360protected static readonly Type UInt32Type = typeof(uint); 361protected static readonly Type UInt64Type = typeof(ulong); 362protected static readonly Type XPathItemType = typeof(XPathItem); 363protected static readonly Type DoubleType = typeof(double); 364protected static readonly Type SingleType = typeof(float); 365protected static readonly Type DateTimeType = typeof(DateTime); 366protected static readonly Type DateTimeOffsetType = typeof(DateTimeOffset); 367protected static readonly Type BooleanType = typeof(bool); 368protected static readonly Type ByteArrayType = typeof(Byte[]); 369protected static readonly Type XmlQualifiedNameType = typeof(XmlQualifiedName); 370protected static readonly Type UriType = typeof(Uri); 371protected static readonly Type TimeSpanType = typeof(TimeSpan); 372protected static readonly Type XPathNavigatorType = typeof(XPathNavigator); 475public override object ChangeType(bool value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 476public override object ChangeType(DateTime value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 477public override object ChangeType(DateTimeOffset value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 478public override object ChangeType(decimal value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 479public override object ChangeType(double value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 480public override object ChangeType(int value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 481public override object ChangeType(long value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 482public override object ChangeType(float value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 483public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) { return (object)ChangeType((object)value, destinationType, nsResolver); } 484public override object ChangeType(string value, Type destinationType) { return this.ChangeType(value, destinationType, null); } 485public override object ChangeType(object value, Type destinationType) { return this.ChangeType(value, destinationType, null); } 537protected Type DefaultClrType 545protected static bool IsDerivedFrom(Type derivedType, Type baseType) 561protected Exception CreateInvalidClrMappingException(Type sourceType, Type destinationType) 598protected virtual object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 1022Type sourceType = value.GetType(); 1068Type sourceType = value.GetType(); 1107Type sourceType = value.GetType(); 1153Type sourceType = value.GetType(); 1169public override object ChangeType(decimal value, Type destinationType) 1184public override object ChangeType(int value, Type destinationType) 1199public override object ChangeType(long value, Type destinationType) 1214public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) 1230public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 1235Type sourceType = value.GetType(); 1279private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 1281Type sourceType = value.GetType(); 1292private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 1363Type sourceType = value.GetType(); 1411Type sourceType = value.GetType(); 1446Type sourceType = value.GetType(); 1461public override object ChangeType(double value, Type destinationType) 1475public override object ChangeType(float value, Type destinationType) 1489public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) 1504public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 1509Type sourceType = value.GetType(); 1589Type sourceType = value.GetType(); 1634Type sourceType = value.GetType(); 1723Type sourceType = value.GetType(); 1738public override object ChangeType(DateTime value, Type destinationType) 1752public override object ChangeType(DateTimeOffset value, Type destinationType) 1766public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) 1781public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 1786Type sourceType = value.GetType(); 1843Type sourceType = value.GetType(); 1913Type sourceType = value.GetType(); 1927public override object ChangeType(bool value, Type destinationType) 1940public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) 1954public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 1959Type sourceType = value.GetType(); 2058Type sourceType = value.GetType(); 2096public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) 2134public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 2139Type sourceType = value.GetType(); 2253private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 2255Type sourceType = value.GetType(); 2261private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 2346Type sourceType = value.GetType(); 2359public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) 2372public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 2377Type sourceType = value.GetType(); 2430Type sourceType = value.GetType(); 2452Type sourceType = value.GetType(); 2474Type sourceType = value.GetType(); 2495Type sourceType = value.GetType(); 2517Type sourceType = value.GetType(); 2539Type sourceType = value.GetType(); 2561Type sourceType = value.GetType(); 2583Type sourceType = value.GetType(); 2637Type sourceType = value.GetType(); 2668public override object ChangeType(bool value, Type destinationType) 2678public override object ChangeType(DateTime value, Type destinationType) 2688public override object ChangeType(DateTimeOffset value, Type destinationType) 2698public override object ChangeType(decimal value, Type destinationType) 2708public override object ChangeType(double value, Type destinationType) 2718public override object ChangeType(int value, Type destinationType) 2728public override object ChangeType(long value, Type destinationType) 2738public override object ChangeType(float value, Type destinationType) 2748public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) 2779public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 2784Type sourceType = value.GetType(); 2882private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 2884Type sourceType = value.GetType(); 2890private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 2904protected override object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 2906Type sourceType = value.GetType(); 2924private bool SupportsType(Type clrType) 3019public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 3024Type sourceType = value.GetType(); 3060Type sourceType = value.GetType(); 3076Type sourceType = value.GetType(); 3091Type sourceType = value.GetType(); 3107Type sourceType = value.GetType(); 3123Type sourceType = value.GetType(); 3139Type sourceType = value.GetType(); 3155Type sourceType = value.GetType(); 3171Type sourceType = value.GetType(); 3190public override object ChangeType(bool value, Type destinationType) 3200public override object ChangeType(DateTime value, Type destinationType) 3210public override object ChangeType(DateTimeOffset value, Type destinationType) 3220public override object ChangeType(decimal value, Type destinationType) 3230public override object ChangeType(double value, Type destinationType) 3240public override object ChangeType(int value, Type destinationType) 3250public override object ChangeType(long value, Type destinationType) 3260public override object ChangeType(float value, Type destinationType) 3270public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver) 3281public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 3286Type sourceType = value.GetType(); 3364private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 3366Type sourceType = value.GetType(); 3372private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 3406public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 3431protected XmlListConverter(XmlBaseConverter atomicConverter, Type clrTypeDefault) : base(atomicConverter, clrTypeDefault) 3462public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 3475protected override object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 3477Type sourceType = value.GetType(); 3504Type itemTypeDst = destinationType.GetElementType(); 3554private bool IsListType(Type type) 3657private new Exception CreateInvalidClrMappingException(Type sourceType, Type destinationType) 3704public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver) 3709Type sourceType = value.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\Advanced\SchemaImporterExtension.cs (1)
71public int Add(string name, Type type)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeExporter.cs (7)
120internal static CodeAttributeDeclaration FindAttributeDeclaration(Type type, CodeAttributeDeclarationCollection metadata) 180internal void ExportRoot(StructMapping mapping, Type includeType) 239internal CodeTypeDeclaration ExportEnum(EnumMapping mapping, Type type) 265internal void AddTypeMetadata(CodeAttributeDeclarationCollection metadata, Type type, string defaultName, string name, string ns, bool includeInSchema) 293internal static void AddIncludeMetadata(CodeAttributeDeclarationCollection metadata, StructMapping mapping, Type type) 306internal static void ExportConstant(CodeTypeDeclaration codeClass, ConstantMapping constant, Type type, bool init, long enumValue) 321internal static object PromoteType(Type type, object value)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (81)
31internal static Type[] EmptyTypeArray = new Type[] { }; 41private Dictionary<Tuple<Type, string>, Queue<LocalBuilder>> _freeLocals; 51internal static bool IsNullableGenericType(Type type) 56internal static void AssertHasInterface(Type type, Type iType) 61internal void BeginMethod(Type returnType, string methodName, Type[] argTypes, string[] argNames, MethodAttributes methodAttributes) 68internal void BeginMethod(Type returnType, MethodBuilderInfo methodBuilderInfo, Type[] argTypes, string[] argNames, MethodAttributes methodAttributes) 78private void InitILGeneration(Type[] argTypes, string[] argNames, bool isStatic) 85_freeLocals = new Dictionary<Tuple<Type, string>, Queue<LocalBuilder>>(); 155private Dictionary<Type, LocalBuilder> _tmpLocals = new Dictionary<Type, LocalBuilder>(); 156internal LocalBuilder GetTempLocal(Type type) 167internal Type GetVariableType(object var) 231private bool TryDequeueLocal(Type type, string name, out LocalBuilder local) 238Tuple<Type, string> key = new Tuple<Type, string>(type, name); 255internal LocalBuilder DeclareLocal(Type type, string name) 267internal LocalBuilder DeclareOrGetLocal(Type type, string name) 324Type varType = GetVariableType(forState.End); 540internal void BeginCatchBlock(Type exception) 663internal void InitObj(Type valueType) 668internal void NewArray(Type elementType, object len) 683Type objType = GetVariableType(obj).GetElementType(); 697Type arrayType = GetVariableType(obj); 701Call(typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) })); 705Type objType = arrayType.GetElementType(); 719private static bool IsStruct(Type objType) 725internal Type LoadMember(object obj, MemberInfo memberInfo) 738Type currentType = propertyInfo.DeclaringType.GetTypeInfo().BaseType; 772internal Type LoadMember(MemberInfo memberInfo) 774Type memberType = null; 810internal Type LoadMemberAddress(MemberInfo memberInfo) 812Type memberType = null; 979internal void ConvertAddress(Type source, Type target) 984internal void ConvertValue(Type source, Type target) 989internal void Castclass(Type target) 994internal void Box(Type type) 999internal void Unbox(Type type) 1064internal void Ldobj(Type type) 1066OpCode opCode = GetLdindOpCode(Type.GetTypeCode(type)); 1077internal void Stobj(Type type) 1116internal void Ldtoken(Type t) 1123Type valueType = o.GetType(); 1124if (o is Type) 1126Ldtoken((Type)o); 1127Call(typeof(Type).GetMethod("GetTypeFromHandle", BindingFlags.Static | BindingFlags.Public, null, new Type[] { typeof(RuntimeTypeHandle) }, null)); 1135switch (Type.GetTypeCode(valueType)) 1172new Type[] { typeof(Int32), typeof(Int32), typeof(Int32), typeof(Boolean), typeof(Byte) } 1184ConstructorInfo DateTime_ctor = typeof(DateTime).GetConstructor(new Type[] { typeof(Int64) }); 1293internal void Stloc(Type type, string name) 1309internal void Ldloc(Type type, string name) 1520internal void Ldelem(Type arrayElementType) 1528OpCode opCode = GetLdelemOpCode(Type.GetTypeCode(arrayElementType)); 1535internal void Ldelema(Type arrayElementType) 1602internal void Stelem(Type arrayElementType) 1608OpCode opCode = GetStelemOpCode(Type.GetTypeCode(arrayElementType)); 1787private void InternalConvert(Type source, Type target, bool isAddress) 1797OpCode opCode = GetConvOpCode(Type.GetTypeCode(target)); 1857static internal TypeBuilder CreateTypeBuilder(ModuleBuilder moduleBuilder, string name, TypeAttributes attributes, Type parent, Type[] interfaces) 2195internal void IsInst(Type type) 2552internal Type ArgType; 2553internal ArgBuilder(string name, int index, Type argType) 2706public void AddToFreeLocals(Dictionary<Tuple<Type, string>, Queue<LocalBuilder>> freeLocals) 2710Tuple<Type, string> key = new Tuple<Type, string>(item.Value.LocalType, item.Key); 2868public readonly Type[] ParameterTypes; 2869public MethodBuilderInfo(MethodBuilder methodBuilder, Type[] parameterTypes) 2875public void Validate(Type returnType, Type[] parameterTypes, MethodAttributes attributes) 2891private Type _sourceType; 2892private Type _targetType; 2896public CodeGeneratorConversionException(Type sourceType, Type targetType, bool isAddress, string reason)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifier.cs (5)
174private static int GetCSharpName(Type t, Type[] parameters, int index, StringBuilder sb) 209internal static string GetCSharpName(Type t) 231Type[] arguments = info.IsGenericType || info.ContainsGenericParameters ? t.GetGenericArguments() : new Type[0];
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifiers.cs (1)
183public object ToArray(Type type)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Compilation.cs (5)
48internal TempAssembly(XmlMapping[] xmlMappings, Type[] types, string defaultNamespace, string location) 96internal static Assembly LoadGeneratedAssembly(Type type, string defaultNamespace, out XmlSerializerImplementation contract) 105private static MethodInfo GetMethodFromType(Type type, string methodName, Assembly assembly) 119internal static Type GetTypeFromAssembly(Assembly assembly, string typeName) 122Type type = assembly.GetType(typeName);
FrameworkFork\Microsoft.Xml\Xml\Serialization\ImportContext.cs (1)
335Type t = item.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (2)
1109private Type _type; 1224internal Type Type
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (18)
33internal TypeModel GetTypeModel(Type type) 38internal TypeModel GetTypeModel(Type type, bool directReference) 72internal ArrayModel GetArrayModel(Type type) 92private Type _type; 95protected TypeModel(Type type, TypeDesc typeDesc, ModelScope scope) 102internal Type Type 120internal ArrayModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 130internal PrimitiveModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 135internal SpecialModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 140internal StructModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 185private void CheckSupportedMember(TypeDesc typeDesc, MemberInfo member, Type type) 258private Type _fieldType; 262internal FieldModel(string name, Type fieldType, TypeDesc fieldTypeDesc, bool checkSpecified, bool checkShouldPersist) : 266internal FieldModel(string name, Type fieldType, TypeDesc fieldTypeDesc, bool checkSpecified, bool checkShouldPersist, bool readOnly) 276internal FieldModel(MemberInfo memberInfo, Type fieldType, TypeDesc fieldTypeDesc) 282_checkShouldPersistMethodInfo = memberInfo.DeclaringType.GetMethod("ShouldSerialize" + memberInfo.Name, new Type[0]); 327internal Type FieldType 402internal EnumModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { }
FrameworkFork\Microsoft.Xml\Xml\Serialization\NameTable.cs (1)
93internal Array ToArray(Type type)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SchemaImporter.cs (1)
150internal void MakeDerived(StructMapping structMapping, Type baseType, bool baseTypeCanBeIndirect)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SchemaObjectWriter.cs (7)
337System.Type t = o.GetType(); 972System.Type t = o.GetType(); 1034System.Type t = o.GetType(); 1057System.Type t = o.GetType(); 1089System.Type t = o.GetType(); 1115System.Type t = o.GetType(); 1137System.Type t = o.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapAttributeOverrides.cs (4)
26public void Add(Type type, SoapAttributes attributes) 35public void Add(Type type, string member, SoapAttributes attributes) 54public SoapAttributes this[Type type] 66public SoapAttributes this[Type type, string member]
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapIncludeAttribute.cs (3)
16private Type _type; 22public SoapIncludeAttribute(Type type) 31public Type Type
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (14)
72public void IncludeTypes(Type provider) 76private void IncludeTypes(Type provider, RecursionLimiter limiter) 88public void IncludeType(Type type) 93private void IncludeType(Type type, RecursionLimiter limiter) 102public XmlTypeMapping ImportTypeMapping(Type type) 111public XmlTypeMapping ImportTypeMapping(Type type, string defaultNamespace) 177private SoapAttributes GetAttributes(Type type) 288private NullableMapping CreateNullableMapping(TypeMapping baseMapping, Type type) 711Type accessorType = model.FieldType; 786internal string XsdTypeName(Type type) 794internal string XsdTypeName(Type type, SoapAttributes a, string name) 802Type genType = type.GetGenericTypeDefinition(); 803Type[] names = genType.GetGenericArguments(); 804Type[] types = type.GetGenericArguments();
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (2)
57public XmlTypeMapping ImportDerivedTypeMapping(XmlQualifiedName name, Type baseType, bool baseTypeCanBeIndirect) 125public XmlMembersMapping ImportMembersMapping(string name, string ns, SoapSchemaMember[] members, bool hasWrapperElement, Type baseType, bool baseTypeCanBeIndirect)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (16)
29new Type[] { typeof(Int32) }, 37public readonly Type Type; 40public SourceInfo(string source, string arg, MemberInfo memberInfo, Type type, CodeGenerator ilg) 54public void LoadAddress(Type elementType) 59public void Load(Type elementType) 64private void InternalLoad(Type elementType, bool asAddress = false) 70Type varType = ILG.GetVariableType(varA); 76Type eType = varType.GetElementType(); 106new Type[] { typeof(Int32) }, 117Type eType = get_Item.ReturnType; 142Type varType; 174Type memberType = (MemberInfo is FieldInfo) ? 205private void Convert(Type sourceType, Type targetType, bool asAddress) 216private void ConvertNullableValue(Type nullableType, Type targetType)
FrameworkFork\Microsoft.Xml\Xml\Serialization\TypeExtensions.cs (2)
15public static bool TryConvertTo(this Type targetType, object data, out object returnValue) 29Type sourceType = data.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (44)
82private Type _type; 118internal TypeDesc(Type type, bool isXsdType, XmlSchemaType dataType, string formatterName, TypeFlags flags) 124internal TypeDesc(Type type, string name, string fullName, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags, TypeDesc arrayElementTypeDesc) 183internal Type Type 365internal TypeDesc GetNullableTypeDesc(Type type) 574internal static bool IsKnownType(Type type) 580switch (Type.GetTypeCode(type)) 653private static void AddPrimitive(Type type, string dataTypeName, string formatterName, TypeFlags flags) 664private static void AddNonXsdPrimitive(Type type, string dataTypeName, string ns, string formatterName, XmlQualifiedName baseTypeName, XmlSchemaFacet[] facets, TypeFlags flags) 682private static void AddSoapEncodedPrimitive(Type type, string dataTypeName, string ns, string formatterName, XmlQualifiedName baseTypeName, TypeFlags flags) 710internal TypeDesc GetTypeDesc(Type type) 715internal TypeDesc GetTypeDesc(Type type, MemberInfo source) 720internal TypeDesc GetTypeDesc(Type type, MemberInfo source, bool directReference) 725internal TypeDesc GetTypeDesc(Type type, MemberInfo source, bool directReference, bool throwOnError) 747internal TypeDesc GetArrayTypeDesc(Type type) 771internal Type GetTypeFromTypeDesc(TypeDesc typeDesc) 778return de.Key as Type; 783private TypeDesc ImportTypeDesc(Type type, MemberInfo memberInfo, bool directReference) 787Type arrayElementType = null; 788Type baseType = null; 990Type t = type.DeclaringType; 997private static bool IsArraySegment(Type t) 1002internal static bool IsOptionalValue(Type type) 1021internal static string TypeName(Type t) 1039Type[] arguments = t.GetGenericArguments(); 1057internal static Type GetArrayElementType(Type type, string memberInfo) 1209private static bool ShouldBeReplaced(MemberInfo memberInfoToBeReplaced, Type derivedType, out MemberInfo replacedInfo) 1212Type currentType = derivedType; 1213Type typeToBeReplaced = memberInfoToBeReplaced.DeclaringType; 1254private static TypeFlags GetConstructorFlags(Type type, ref Exception exception) 1256ConstructorInfo ctor = type.GetConstructor(new Type[0]); 1277private static Type GetEnumeratorElementType(Type type, ref TypeFlags flags) 1281MethodInfo enumerator = type.GetMethod("GetEnumerator", new Type[0]); 1305enumerator = type.GetMethod("System.Collections.IEnumerable.GetEnumerator", BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic, null, new Type[0], null); 1319Type currentType = (p == null ? typeof(object) : p.PropertyType); 1321MethodInfo addMethod = type.GetMethod("Add", new Type[] { currentType }); 1326addMethod = type.GetMethod("Add", new Type[] { currentType }); 1340internal static PropertyInfo GetDefaultIndexer(Type type, string memberInfo) 1358for (Type t = type; t != null; t = t.GetTypeInfo().BaseType) 1383MethodInfo addMethod = type.GetMethod("Add", new Type[] { indexer.PropertyType }); 1390private static Type GetCollectionElementType(Type type, string memberInfo)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlArrayItemAttribute.cs (4)
18private Type _type; 47public XmlArrayItemAttribute(Type type) 56public XmlArrayItemAttribute(string elementName, Type type) 66public Type Type
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlAttributeAttribute.cs (4)
18private Type _type; 44public XmlAttributeAttribute(Type type) 53public XmlAttributeAttribute(string attributeName, Type type) 63public Type Type
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlAttributeOverrides.cs (4)
26public void Add(Type type, XmlAttributes attributes) 35public void Add(Type type, string member, XmlAttributes attributes) 54public XmlAttributes this[Type type] 66public XmlAttributes this[Type type, string member]
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlAttributes.cs (2)
48private static volatile Type s_ignoreAttributeType; 80private static Type IgnoreAttribute
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (4)
218Type type = value.GetType(); 400Type formatter = typeof(XmlConvert); 402MethodInfo format = formatter.GetMethod("To" + pm.TypeDesc.FormatterName, new Type[] { typeof(string) }); 891private void ExportMetadata(CodeAttributeDeclarationCollection metadata, Type attributeType, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, object isNullable, XmlSchemaForm form, int nestingLevel, int sequenceId)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCountingReader.cs (4)
53public override Type ValueType { get { return _innerReader.ValueType; } } 147public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 222public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 227public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver, string localName, string namespaceURI)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCustomFormatter.cs (1)
24Type type = value.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlElementAttribute.cs (4)
18private Type _type; 47public XmlElementAttribute(Type type) 56public XmlElementAttribute(string elementName, Type type) 66public Type Type
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlIncludeAttribute.cs (3)
16private Type _type; 22public XmlIncludeAttribute(Type type) 31public Type Type
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlMapping.cs (1)
122internal static string GenerateKey(Type type, XmlRootAttribute root, string ns)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (45)
94public void IncludeTypes(Type provider) 99private void IncludeTypes(Type provider, RecursionLimiter limiter) 103Type type = attrib.Type; 112public void IncludeType(Type type) 117private void IncludeType(Type type, RecursionLimiter limiter) 141public XmlTypeMapping ImportTypeMapping(Type type) 150public XmlTypeMapping ImportTypeMapping(Type type, string defaultNamespace) 159public XmlTypeMapping ImportTypeMapping(Type type, XmlRootAttribute root) 168public XmlTypeMapping ImportTypeMapping(Type type, XmlRootAttribute root, string defaultNamespace) 240private XmlAttributes GetAttributes(Type type, bool canBeSimpleType) 477internal static MethodInfo GetMethodFromSchemaProvider(XmlSchemaProviderAttribute provider, Type type) 491MethodInfo getMethod = getMethod = type.GetMethod(provider.MethodName, /* BindingFlags.DeclaredOnly | */ BindingFlags.Static | BindingFlags.Public, null, new Type[] { typeof(XmlSchemaSet) }, null); 501private SpecialMapping ImportSpecialMapping(Type type, TypeDesc typeDesc, string ns, ImportContext context, RecursionLimiter limiter) 626private static Exception InvalidAttributeUseException(Type type) 648private NullableMapping CreateNullableMapping(TypeMapping baseMapping, Type type) 712private TypeMapping GetTypeMapping(string typeName, string ns, TypeDesc typeDesc, NameTable typeLib, Type type) 953internal string XsdTypeName(Type type) 962internal string XsdTypeName(Type type, XmlAttributes a, string name) 970Type genType = type.GetGenericTypeDefinition(); 971Type[] names = genType.GetGenericArguments(); 972Type[] types = type.GetGenericArguments(); 999private void SetArrayMappingType(ArrayMapping mapping, string defaultNs, Type type) 1380Type choiceIdentifierType = null; 1409Type choiceIdentifierType = null; 1418private Type CheckChoiceIdentifierType(Type type, bool isArrayLike, string identifierName, string memberName) 1443private Type GetChoiceIdentifierType(XmlChoiceIdentifierAttribute choice, XmlReflectionMember[] xmlReflectionMembers, bool isArrayLike, string accessorName) 1456private Type GetChoiceIdentifierType(XmlChoiceIdentifierAttribute choice, StructModel structModel, bool isArrayLike, string accessorName) 1486Type enumType = member.FieldType; 1491private void CreateArrayElementsFromAttributes(ArrayMapping arrayMapping, XmlArrayItemAttributes attributes, Type arrayElementType, string arrayElementNs, RecursionLimiter limiter) 1500Type targetType = xmlArrayItem.Type != null ? xmlArrayItem.Type : arrayElementType; 1515private void ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, string ns, Type choiceIdentifierType, bool rpc, bool openModel, RecursionLimiter limiter) 1525Type accessorType = model.FieldType; 1557Type arrayElementType = TypeScope.GetArrayElementType(accessorType, model.FieldTypeDesc.FullName + "." + model.Name); 1584Type targetType = a.XmlAttribute.Type == null ? arrayElementType : a.XmlAttribute.Type; 1615Type targetType = a.XmlText.Type == null ? arrayElementType : a.XmlText.Type; 1630Type targetType = xmlElement.Type == null ? arrayElementType : xmlElement.Type; 1671Type targetType = typeof(IXmlSerializable).IsAssignableFrom(arrayElementType) ? arrayElementType : typeof(XmlNode).IsAssignableFrom(arrayElementType) ? arrayElementType : typeof(XmlElement); 1874Type targetType = xmlElement.Type == null ? accessorType : xmlElement.Type; 1914Type targetType = typeof(IXmlSerializable).IsAssignableFrom(accessorType) ? accessorType : typeof(XmlNode).IsAssignableFrom(accessorType) ? accessorType : typeof(XmlElement); 2065private void CheckAmbiguousChoice(XmlAttributes a, Type accessorType, string accessorName) 2074Type type = elements[i].Type == null ? accessorType : elements[i].Type; 2099Type type = items[i].Type == null ? accessorType : items[i].Type; 2133private object GetDefaultValue(TypeDesc fieldTypeDesc, Type t, XmlAttributes a) 2247internal static XmlTypeMapping GetTopLevelMapping(Type type, string defaultNamespace)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionMember.cs (2)
17private Type _type; 27public Type MemberType
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaExporter.cs (2)
966Type formatter = typeof(XmlConvert); 967System.Reflection.MethodInfo format = formatter.GetMethod("ToString", new Type[] { pm.TypeDesc.Type });
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (18)
68public XmlTypeMapping ImportDerivedTypeMapping(XmlQualifiedName name, Type baseType) 91public XmlTypeMapping ImportDerivedTypeMapping(XmlQualifiedName name, Type baseType, bool baseTypeCanBeIndirect) 130public XmlTypeMapping ImportSchemaType(XmlQualifiedName typeName, Type baseType) 139public XmlTypeMapping ImportSchemaType(XmlQualifiedName typeName, Type baseType, bool baseTypeCanBeIndirect) 247public XmlMembersMapping ImportMembersMapping(XmlQualifiedName[] names, Type baseType, bool baseTypeCanBeIndirect) 298private ElementAccessor ImportElement(XmlQualifiedName name, Type desiredMappingType, Type baseType) 313private ElementAccessor ImportElement(XmlSchemaElement element, string identifier, Type desiredMappingType, Type baseType, string ns, bool topLevelElement) 371private TypeMapping ImportElementType(XmlSchemaElement element, string identifier, Type desiredMappingType, Type baseType, string ns) 526private TypeMapping ImportType(XmlQualifiedName name, Type desiredMappingType, Type baseType, TypeFlags flags, bool addref) 553private TypeMapping ImportType(XmlSchemaComplexType type, string typeNs, string identifier, Type desiredMappingType, Type baseType, TypeFlags flags) 600private StructMapping ImportStructType(XmlSchemaType type, string typeNs, string identifier, Type baseType, bool arrayLike) 709private StructMapping ImportStructDataType(XmlSchemaSimpleType dataType, string typeNs, string identifier, Type baseType) 1765private TypeMapping ImportDataType(XmlSchemaSimpleType dataType, string typeNs, string identifier, Type baseType, TypeFlags flags, bool isList)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemas.cs (3)
313public object Find(XmlQualifiedName name, Type type) 317internal object Find(XmlQualifiedName name, Type type, bool checkCache) 709Type type = o.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationGeneratedCode.cs (3)
179internal void GenerateSupportedTypes(Type[] types) 184_writer.Write(typeof(Type).FullName); 190Type type = types[i];
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (24)
21internal Dictionary<string, Type> CreatedTypes = new Dictionary<string, Type>(); 83MethodAttributes attributes, Type returnType, Type[] parameterTypes) 208new Type[] { typeof(Object), typeof(Object) }, 225internal void GenerateSupportedTypes(Type[] types, TypeBuilder serializerContractTypeBuilder) 231new Type[] { typeof(Type) }, 237Type type = types[i]; 298Type baseSerializerType = baseSerializerTypeBuilder.CreateTypeInfo().AsType(); 321new Type[] { typeof(XmlReader) }, 338new Type[] { typeof(String), typeof(String) }, 358new Type[] { typeof(object), typeof(XmlSerializationWriter) }, 365new Type[] { (mapping is XmlMembersMapping) ? typeof(object[]) : typeof(object) }, 384new Type[] { typeof(XmlSerializationReader) }, 400Type typedSerializerType = typedSerializerTypeBuilder.CreateTypeInfo().AsType(); 414new Type[] { typeof(Object), typeof(Object) }, 438new Type[] { typeof(Type) }, 446Type type = xmlMappings[i].Accessor.Mapping.TypeDesc.Type; 476internal void GenerateSerializerContract(string className, XmlMapping[] xmlMappings, Type[] types, string readerType, string[] readMethods, string writerType, string[] writerMethods, Hashtable serializers) 554Type serializerContractType = serializerContractTypeBuilder.CreateTypeInfo().AsType(); 568internal void ILGenLoad(string source, Type type) 577Type memType = memInfo is FieldInfo ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (14)
295private Type GetPrimitiveType(XmlQualifiedName typeName, bool throwOnUnknown) 1399protected Exception CreateUnknownConstantException(string value, Type enumType) 1405protected Exception CreateInvalidCastException(Type type, object value) 1411protected Exception CreateInvalidCastException(Type type, object value, string id) 1435protected Array EnsureArrayIndex(Array a, int index, Type elementType) 1445protected Array ShrinkArray(Array a, int length, Type elementType, bool isNullable) 1657Type fallbackElementType = null; 1662Type arrayType = (Type)_types[new XmlQualifiedName(typeName, typeNs)]; 1687Type elementType = null; 1692elementType = (Type)_types[qname]; 1821Type itemType = null; 1827Type currItemType = currItem.GetType(); 1954protected void AddReadCallback(string name, string ns, Type type, XmlSerializationReadCallback read)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (46)
189private XmlQualifiedName GetPrimitiveTypeName(Type type) 194private XmlQualifiedName GetPrimitiveTypeName(Type type, bool throwIfUnknown) 202internal static XmlQualifiedName GetPrimitiveTypeNameInternal(Type type) 207switch (Type.GetTypeCode(type)) 254Type t = o.GetType(); 257switch (Type.GetTypeCode(t)) 814protected Exception CreateUnknownTypeException(Type type) 861protected Exception CreateInvalidAnyTypeException(Type type) 1211protected void AddWriteCallback(Type type, string typeName, string typeNs, XmlSerializationWriteCallback callback) 1221private void WriteArray(string name, string ns, object o, Type type) 1223Type elementType = TypeScope.GetArrayElementType(type, null); 1260Type elementBaseType = elementType.GetTypeInfo().BaseType; 1352protected void WritePotentiallyReferencingElement(string n, string ns, object o, Type ambientType) 1358protected void WritePotentiallyReferencingElement(string n, string ns, object o, Type ambientType, bool suppressReference) 1364protected void WritePotentiallyReferencingElement(string n, string ns, object o, Type ambientType, bool suppressReference, bool isNullable) 1371Type t = o.GetType(); 1413private void WriteReferencedElement(object o, Type ambientType) 1418private void WriteReferencedElement(string name, string ns, object o, Type ambientType) 1421Type t = o.GetType(); 1438private TypeEntry GetTypeEntry(Type t) 1512internal Type type; 2379Writer.Write(typeof(Type).FullName); 3445private void WriteElementCall(string func, Type cast, string source, string name, string ns, bool isNullable, bool isAny) 3524Type type = value.GetType(); 3526switch (Type.GetTypeCode(type)) 3718internal static bool IsTypeDynamic(Type type) 3734Type[] parameterTypes = type.GetGenericArguments(); 3739Type parameterType = parameterTypes[i]; 3756internal static bool IsTypeDynamic(Type[] arguments) 3758foreach (Type t in arguments) 3834foreach (Type type in scope.Types) 3842private string WriteTypeInfo(TypeScope scope, TypeDesc typeDesc, Type type) 3857_writer.WriteLine("static " + typeof(Type).FullName + " " + typeVariable + " = " + elementTypeVariable + ".MakeArrayType();"); 3862_writer.Write("static " + typeof(Type).FullName + " " + typeVariable + " = " + assemblyVariable + ".GetType("); 3871Type parameterType = Nullable.GetUnderlyingType(type); 3875_writer.WriteLine("static " + typeof(Type).FullName + " " + typeVariable + " = typeof(System.Nullable<>).MakeGenericType(new " + typeof(Type).FullName + "[] {" + parameterTypeVariable + "});"); 3880_writer.Write("static " + typeof(Type).FullName + " " + typeVariable + " = " + assemblyVariable + ".GetType("); 3907"object", "string", typeof(Type).FullName, 3915private void WriteMappingInfo(TypeMapping mapping, string typeVariable, Type type) 3951private void WriteCollectionInfo(string typeVariable, TypeDesc typeDesc, Type type) 3974private string WriteAssemblyInfo(Type type) 3993private string WriteMemberInfo(Type type, string escapedName, string typeVariable, string memberName) 4043_writer.Write("new " + typeof(Type).FullName + "[] { "); 4055private string WriteDefaultIndexerInit(Type type, string escapedName, bool collectionUseReflection, bool elementUseReflection) 4069_writer.Write(typeof(Type[]).FullName);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (91)
61internal Type GenerateEnd() 99List<Type> argTypes = new List<Type>(); 126private void WriteEnumValue(EnumMapping mapping, SourceInfo source, out Type returnType) 141new Type[] { mapping.TypeDesc.Type }); 148private void WritePrimitiveValue(TypeDesc typeDesc, SourceInfo source, out Type returnType) 159Type argType = typeDesc.Type; 164new Type[] { argType }, 184new Type[] { typeDesc.Type }, 233List<Type> argTypes = new List<Type>(); 242Type argType; 258ConstructorInfo XmlQualifiedName_ctor = typeof(XmlQualifiedName).GetConstructor(new Type[] { typeof(String), typeof(String) }); 286new Type[] { typeof(String), typeof(String) }, 301new Type[] { typeof(string), typeof(string), typeof(object), typeof(Boolean) }, 335new Type[] { typeof(Object) }, 366new Type[] { typeof(object[]) }, 563new Type[] { typeof(object) }, 615List<Type> argTypes = new List<Type>(); 700new Type[] { typeof(Int64), typeof(String[]), typeof(Int64[]), typeof(String) }, 729new Type[] { typeof(IFormatProvider) }, 736new Type[] { typeof(object), typeof(string) }, 775List<Type> argTypes = new List<Type>(); 782Type oType = ilg.GetVariableType(oVar); 836new Type[] { typeof(String), typeof(String) }, 848new Type[] { typeof(String), typeof(String) }, 859new Type[] { mapping.TypeDesc.Type } 865new Type[] { typeof(String) }, 912new Type[] { typeof(String), typeof(String) }, 924new Type[] { typeof(String), typeof(String) }, 956List<Type> argTypes = new List<Type>(5); 986new Type[] { typeof(String), typeof(String) }, 1001LocalBuilder tLoc = ilg.DeclareLocal(typeof(Type), "t"); 1027new Type[] { typeof(String), typeof(String), typeof(Object), typeof(Boolean) }, 1044new Type[] { typeof(Object) }, 1064new Type[] { typeof(Boolean) }, 1101new Type[] { typeof(String), typeof(String), typeof(Object), typeof(Boolean), typeof(XmlSerializerNamespaces) }, 1113new Type[] { typeof(String), typeof(String) }, 1240new Type[] { typeof(String), typeof(String), typeof(String) }, 1282Type methodType; 1283Type argType = typeof(string); 1301new Type[] { typeof(String) }, 1319new Type[] { typeof(string) }, 1342new Type[] { argType }, 1394List<Type> argTypes = new List<Type>(); 1449new Type[] { typeof(XmlNode), typeof(Object) }, 1469private static object GetConvertedDefaultValue(Type targetType, object rawDefaultValue) 1538new Type[] { typeof(String), typeof(String) }, 1582Type typeIEnumerable = arrayTypeDesc.IsGenericInterface ? typeof(IEnumerable<>).MakeGenericType(arrayElementTypeDesc.Type) : typeof(IEnumerable); 1818new Type[] { typeof(string), typeof(string) }, 1843new Type[] { typeof(String), typeof(String), typeof(String), typeof(String) }, 1872new Type[] { typeof(String), typeof(String) }, 1937new Type[] { typeof(Object) }, 1958Type argType; 1972new Type[] { argType }, 1987new Type[] { typeof(XmlWriter) }, 2113List<Type> argTypes = new List<Type>(); 2171new Type[] { typeof(Object) }, 2188private void WriteElementCall(string func, Type cast, SourceInfo source, string name, string ns, bool isNullable, bool isAny) 2194new Type[] { cast, typeof(String), typeof(String), typeof(Boolean), typeof(Boolean) }, 2262Type valueType = value.GetType(); 2269new Type[] { valueType, valueType }, 2301new Type[] { typeof(String), typeof(String), typeof(String) }, 2331new Type[] { typeof(XmlSerializerNamespaces) }, 2351private void WriteLocalDecl(string variableName, string initValue, Type type) 2360private void WriteTypeCompare(string variable, Type type) 2364private void WriteInstanceOf(SourceInfo source, Type type) 2368private void WriteArrayTypeCompare(string variable, Type arrayType) 2446foreach (Type type in scope.Types) 2492internal void ILGenForEnumMember(CodeGenerator ilg, Type type, string memberName) 2506internal void ILGenForCreateInstance(CodeGenerator ilg, Type type, bool ctorInaccessible, bool cast) 2527internal void ILGenForCreateInstance(CodeGenerator ilg, Type type, Type cast, bool nonPublic) 2541Type xName = type.GetTypeInfo().Assembly.GetType("System.Xml.Linq.XName"); 2548new Type[] { typeof(String) }, 2551ConstructorInfo XElement_ctor = type.GetConstructor(new Type[] { xName }); 2573new Type[] { typeof(Type), typeof(BindingFlags), typeof(Binder), typeof(Object[]), typeof(CultureInfo) }, 2588Type localType = initValue.Type; 2627internal void WriteCreateInstance(string source, bool ctorInaccessible, Type type, CodeGenerator ilg) 2633internal void WriteInstanceOf(SourceInfo source, Type type, CodeGenerator ilg) 2647Type localType = (typeName == arrayTypeDesc.CSharpName) ? arrayTypeDesc.Type : arrayTypeDesc.Type.MakeArrayType(); 2656internal void WriteTypeCompare(string variable, Type type, CodeGenerator ilg) 2660ilg.Ldloc(typeof(Type), variable); 2664internal void WriteArrayTypeCompare(string variable, Type arrayType, CodeGenerator ilg) 2669ilg.Ldloc(typeof(Type), variable);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializer.cs (30)
107public virtual bool CanSerialize(Type type) { throw new NotSupportedException(); } 109public virtual XmlSerializer GetSerializer(Type type) { throw new NotSupportedException(); } 120private Type _primitiveType; 156public XmlSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace) : 165public XmlSerializer(Type type, XmlRootAttribute root) : this(type, null, new Type[0], root, null, null) 173public XmlSerializer(Type type, Type[] extraTypes) : this(type, null, extraTypes, null, null, null) 181public XmlSerializer(Type type, XmlAttributeOverrides overrides) : this(type, overrides, new Type[0], null, null, null) 199public XmlSerializer(Type type) : this(type, (string)null) 207public XmlSerializer(Type type, string defaultNamespace) 255internal XmlSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace, string location) 284internal static TempAssembly GenerateTempAssembly(XmlMapping xmlMapping, Type type, string defaultNamespace) 288return new TempAssembly(new XmlMapping[] { xmlMapping }, new Type[] { type }, defaultNamespace, null); 291internal static TempAssembly GenerateTempAssembly(XmlMapping xmlMapping, Type type, string defaultNamespace, string location) 293return new TempAssembly(new XmlMapping[] { xmlMapping }, new Type[] { type }, defaultNamespace, location); 531return FromMappings(mappings, (Type)null); 539public static XmlSerializer[] FromMappings(XmlMapping[] mappings, Type type) 555tempAssembly = new TempAssembly(mappings, new Type[] { type }, null, null); 584private static XmlSerializer[] GetSerializersFromCache(XmlMapping[] mappings, Type type) 621TempAssembly tempAssembly = new TempAssembly(pendingMappings, new Type[] { type }, null, null); 642public static XmlSerializer[] FromTypes(Type[] types) 661public static string GetXmlSerializerAssemblyName(Type type) 671public static string GetXmlSerializerAssemblyName(Type type, string defaultNamespace) 758private static XmlTypeMapping GetKnownMapping(Type type, string ns) 776switch (Type.GetTypeCode(_primitiveType)) 850switch (Type.GetTypeCode(_primitiveType))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializerFactory.cs (12)
34public XmlSerializer CreateSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace) 43public XmlSerializer CreateSerializer(Type type, XmlRootAttribute root) 45return CreateSerializer(type, null, new Type[0], root, null, null); 52public XmlSerializer CreateSerializer(Type type, Type[] extraTypes) 61public XmlSerializer CreateSerializer(Type type, XmlAttributeOverrides overrides) 63return CreateSerializer(type, overrides, new Type[0], null, null, null); 80public XmlSerializer CreateSerializer(Type type) 89public XmlSerializer CreateSerializer(Type type, string defaultNamespace) 126public XmlSerializer CreateSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace, string location)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializerVersionAttribute.cs (3)
21private Type _type; 35public XmlSerializerVersionAttribute(Type type) 75public Type Type
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlTextAttribute.cs (3)
16private Type _type; 31public XmlTextAttribute(Type type) 40public Type Type
FrameworkFork\Microsoft.Xml\Xml\XmlNullResolver.cs (1)
18public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn)
FrameworkFork\Microsoft.Xml\Xml\XmlResolver.cs (2)
32Type ofObjectToReturn); 78public virtual bool SupportsType(Uri absoluteUri, Type type)
FrameworkFork\Microsoft.Xml\Xml\XmlResolverAsync.cs (1)
16Type ofObjectToReturn)
FrameworkFork\Microsoft.Xml\Xml\XmlUrlResolver.cs (1)
45public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn)
FrameworkFork\Microsoft.Xml\Xml\XmlXapResolver.cs (1)
25public override object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn)
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathItem.cs (3)
34public abstract Type ValueType { get; } 40public virtual object ValueAs(Type returnType) { return ValueAs(returnType, null); } 41public abstract object ValueAs(Type returnType, IXmlNamespaceResolver nsResolver);
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (2)
157public override Type ValueType 389public override object ValueAs(Type returnType, IXmlNamespaceResolver nsResolver)
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigatorReader.cs (1)
193public override System.Type ValueType
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (31)
76internal ClassDataContract(Type type) : base(new ClassDataContractCriticalHelper(type)) 86private ClassDataContract(Type type, XmlDictionaryString ns, string[] memberNames) : base(new ClassDataContractCriticalHelper(type, ns, memberNames)) 264internal Type[] KeyValuePairGenericArguments 353internal static ClassDataContract CreateClassDataContractForKeyValue(Type type, XmlDictionaryString ns, string[] memberNames) 370Type declaringType = memberContract.MemberInfo.DeclaringType; 383internal static XmlDictionaryString GetChildNamespaceToDeclare(DataContract dataContract, Type childType, XmlDictionary dictionary) 396private static bool IsArraySegment(Type t) 408static internal bool IsNonAttributedTypeValidForSerialization(Type type) 428Type[] interfaceTypes = type.GetInterfaces(); 432foreach (Type interfaceType in interfaceTypes) 449type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()) != null); 473internal static bool IsKnownSerializableType(Type type) 782internal ClassDataContractCriticalHelper(Type type) : base(type) 796Type baseType = type.GetTypeInfo().BaseType; 854internal ClassDataContractCriticalHelper(Type type, XmlDictionaryString ns, string[] memberNames) : base(type) 873private void EnsureIsReferenceImported(Type type) 927Type type = this.UnderlyingType; 1170private XmlQualifiedName GetStableNameAndSetHasDataContract(Type type) 1182private void SetIsNonAttributedType(Type type) 1200Type type = this.UnderlyingType; 1205Type prevAttributeType = null; 1225private static bool IsValidCallback(MethodInfo method, ParameterInfo[] parameters, Type attributeType, MethodInfo currentCallback, ref Type prevAttributeType) 1348private void SetKeyValuePairAdapterFlags(Type type) 1354_keyValuePairCtorInfo = type.GetConstructor(Globals.ScanAllMembers, new Type[] { Globals.TypeOfKeyValuePair.MakeGenericType(_keyValuePairGenericArguments) }); 1360private Type[] _keyValuePairGenericArguments; 1374internal Type[] KeyValuePairGenericArguments 1394Type type = UnderlyingType; 1399ConstructorInfo ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()); 1509internal Type ObjectType 1513Type type = UnderlyingType;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (11)
228private bool TryGetReferencedType(XmlQualifiedName stableName, DataContract dataContract, out Type type) 358private CodeTypeReference GetCodeTypeReference(Type type) 533Type type = null; 582type = (Type)typeReference.UserData[s_codeUserDataActualTypeKey]; 638Type type; 660Type type; 676Type type = DataContractSurrogateCaller.GetReferencedTypeOnImport( 698Type type; 843Type actualType = (Type)baseContractCodeDomInfo.TypeReference.UserData[s_codeUserDataActualTypeKey]; 1052private void ThrowIfReferencedBaseTypeSealed(Type baseType, DataContract dataContract)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (51)
38s_getTypeFromHandle = typeof(Type).GetMethod("GetTypeFromHandle"); 85s_arraySetValue = typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) }); 102s_objectToString = typeof(object).GetMethod("ToString", Array.Empty<Type>()); 117s_stringFormat = typeof(string).GetMethod("Format", new Type[] { typeof(string), typeof(object[]) }); 125private Type _delegateType; 180internal void BeginMethod(DynamicMethod dynamicMethod, Type delegateType, string methodName, Type[] argTypes, bool allowPrivateMemberAccess) 190internal void BeginMethod(string methodName, Type delegateType, bool allowPrivateMemberAccess) 194Type[] paramTypes = new Type[parameters.Length]; 202private void BeginMethod(Type returnType, string methodName, Type[] argTypes, bool allowPrivateMemberAccess) 219private void InitILGeneration(string methodName, Type[] argTypes) 272internal Type GetVariableType(object var) 282internal LocalBuilder DeclareLocal(Type type, string name, object initialValue) 290internal LocalBuilder DeclareLocal(Type type, string name) 295internal LocalBuilder DeclareLocal(Type type, string name, bool isPinned) 382internal void ForEach(LocalBuilder local, Type elementType, Type enumeratorType, 417Type type = GetVariableType(value); 629internal void InitObj(Type valueType) 636internal void NewArray(Type elementType, object len) 646Type objType = GetVariableType(obj).GetElementType(); 660Type arrayType = GetVariableType(obj); 667Type objType = arrayType.GetElementType(); 681private static bool IsStruct(Type objType) 686internal Type LoadMember(MemberInfo memberInfo) 688Type memberType = null; 766internal void LoadDefaultValue(Type type) 856internal void ConvertAddress(Type source, Type target) 861internal void ConvertValue(Type source, Type target) 867internal void Castclass(Type target) 874internal void Box(Type type) 881internal void Unbox(Type type) 923internal void Ldobj(Type type) 940internal void Stobj(Type type) 962internal void Ldtoken(Type t) 971Type valueType = o.GetType(); 972if (o is Type) 974Ldtoken((Type)o); 1266internal void Ldelem(Type arrayElementType) 1283internal void Ldelema(Type arrayElementType) 1330internal void Stelem(Type arrayElementType) 1504private void InternalConvert(Type source, Type target, bool isAddress) 1595internal void EmitStackTop(Type stackTopType) 1703internal void ToString(Type type) 1721internal Type ArgType; 1722internal ArgBuilder(int index, Type argType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (73)
162internal CollectionDataContract(Type type) : base(new CollectionDataContractCriticalHelper(type)) 172private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor) 183private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired) 194private CollectionDataContract(Type type, string invalidCollectionInSharedContractMessage) : base(new CollectionDataContractCriticalHelper(type, invalidCollectionInSharedContractMessage)) 214private static Type[] KnownInterfaces 236public Type ItemType 571private static Type[] s_knownInterfaces; 573private Type _itemType; 594internal static Type[] KnownInterfaces 601s_knownInterfaces = new Type[] 617private void Init(CollectionKind kind, Type itemType, CollectionDataContractAttribute collectionContractAttribute) 677internal CollectionDataContractCriticalHelper(Type type) : base(type) 688internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor) : base(type) 707internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired) 713internal CollectionDataContractCriticalHelper(Type type, string invalidCollectionInSharedContractMessage) : base(type) 724internal Type ItemType 885private DataContract GetSharedTypeContract(Type type) 898internal static bool IsCollectionInterface(Type type) 902return ((IList<Type>)KnownInterfaces).Contains(type); 905internal static bool IsCollection(Type type) 907Type itemType; 911internal static bool IsCollection(Type type, out Type itemType) 916internal static bool IsCollection(Type type, bool constructorRequired) 918Type itemType; 922private static bool IsCollectionHelper(Type type, out Type itemType, bool constructorRequired) 933internal static bool TryCreate(Type type, out DataContract dataContract) 935Type itemType; 939internal static bool CreateGetOnlyCollectionDataContract(Type type, out DataContract dataContract) 941Type itemType; 953internal static bool TryCreateGetOnlyCollectionDataContract(Type type, out DataContract dataContract) 956Type itemType; 980internal static MethodInfo GetTargetMethodWithName(string name, Type type, Type interfaceType) 982Type t = type.GetInterfaces().Where(it => it.Equals(interfaceType)).FirstOrDefault(); 988private static bool IsArraySegment(Type t) 993private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataContract dataContract, out Type itemType, bool constructorRequired) 1005Type baseType = type.GetTypeInfo().BaseType; 1027Type interfaceTypeToCheck = type.GetTypeInfo().IsGenericType ? type.GetGenericTypeDefinition() : type; 1028Type[] knownInterfaces = KnownInterfaces; 1036Type[] genericArgs = type.GetGenericArguments(); 1048var collectionType = Globals.TypeOfICollectionGeneric.MakeGenericType(itemType); 1086defaultCtor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Array.Empty<Type>()); 1094Type knownInterfaceType = null; 1097Type[] interfaceTypes = type.GetInterfaces(); 1098foreach (Type interfaceType in interfaceTypes) 1100Type interfaceTypeToCheck = interfaceType.GetTypeInfo().IsGenericType ? interfaceType.GetGenericTypeDefinition() : interfaceType; 1101Type[] knownInterfaces = KnownInterfaces; 1131GetCollectionMethods(type, knownInterfaceType, new Type[] { itemType }, 1149Type[] addMethodTypeArray = null; 1159addMethodTypeArray = new Type[] { Globals.TypeOfObject, Globals.TypeOfObject }; 1169addMethodTypeArray = new Type[] { itemType }; 1189internal static bool IsCollectionDataContract(Type type) 1194private static bool HandleIfInvalidCollection(Type type, bool tryCreate, bool hasCollectionDataContract, bool createContractWithException, string message, string param, ref DataContract dataContract) 1218private static void FindCollectionMethodsOnInterface(Type type, Type interfaceType, ref MethodInfo addMethod, ref MethodInfo getEnumeratorMethod) 1220Type t = type.GetInterfaces().Where(it => it.Equals(interfaceType)).FirstOrDefault(); 1228private static void GetCollectionMethods(Type type, Type interfaceType, Type[] addMethodTypeArray, bool addMethodOnInterface, out MethodInfo getEnumeratorMethod, out MethodInfo addMethod) 1240Type[] parentInterfaceTypes = interfaceType.GetInterfaces(); 1241foreach (Type parentInterfaceType in parentInterfaceTypes) 1265getEnumeratorMethod = type.GetMethod(Globals.GetEnumeratorMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>()); 1268Type ienumerableInterface = interfaceType.GetInterfaces().Where(t => t.FullName.StartsWith("System.Collections.Generic.IEnumerable")).FirstOrDefault(); 1276private static bool IsKnownInterface(Type type) 1278Type typeToCheck = type.GetTypeInfo().IsGenericType ? type.GetGenericTypeDefinition() : type; 1279foreach (Type knownInterfaceType in KnownInterfaces)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (96)
109internal static DataContract GetDataContract(Type type) 114internal static DataContract GetDataContract(RuntimeTypeHandle typeHandle, Type type) 119internal static DataContract GetDataContract(RuntimeTypeHandle typeHandle, Type type, SerializationMode mode) 137internal static DataContract GetDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type type) 142internal static DataContract GetGetOnlyCollectionDataContract(int id, RuntimeTypeHandle typeHandle, Type type, SerializationMode mode) 158internal static DataContract GetGetOnlyCollectionDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type type) 198public static DataContract GetBuiltInDataContract(Type type) 238internal static void ThrowInvalidDataContractException(string message, Type type) 259public Type UnderlyingType 271public Type OriginalUnderlyingType { get; set; } 285internal Type TypeForInitialization 529private static Dictionary<Type, DataContract> s_typeToBuiltInContract; 542private Type _underlyingType; 558private Type _typeForInitialization; 567internal static DataContract GetDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type type) 588internal static DataContract GetGetOnlyCollectionDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type type) 677private static DataContract CreateDataContract(int id, RuntimeTypeHandle typeHandle, Type type) 688type = Type.GetTypeFromHandle(typeHandle); 692var originalType = type; 755private static bool IsTypeSerializable(Type type) 760private static DataContract CreateGetOnlyCollectionDataContract(int id, RuntimeTypeHandle typeHandle, Type type) 769type = Type.GetTypeFromHandle(typeHandle); 781internal static Type GetDataContractAdapterType(Type type) 808public static DataContract GetBuiltInDataContract(Type type) 816s_typeToBuiltInContract = new Dictionary<Type, DataContract>(); 846static public bool TryCreateBuiltInDataContract(Type type, out DataContract dataContract) 1085internal static void ThrowInvalidDataContractException(string message, Type type) 1114internal DataContractCriticalHelper(Type type) 1121internal Type UnderlyingType 1135internal Type TypeForInitialization 1146private void SetTypeForInitialization(Type classType) 1238MethodInfo method = UnderlyingType.GetMethod(Globals.ParseMethodName, BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(string) }); 1281static internal bool IsTypeSerializable(Type type) 1283return IsTypeSerializable(type, new HashSet<Type>()); 1286private static bool IsTypeSerializable(Type type, HashSet<Type> previousCollectionTypes) 1288Type itemType; 1313private static void ValidatePreviousCollectionTypes(Type collectionType, Type itemType, HashSet<Type> previousCollectionTypes) 1326internal static Type UnwrapRedundantNullableType(Type type) 1328Type nullableType = type; 1337internal static Type UnwrapNullableType(Type type) 1401internal static XmlQualifiedName GetStableName(Type type) 1407internal static XmlQualifiedName GetStableName(Type type, out bool hasDataContract) 1409return GetStableName(type, new HashSet<Type>(), out hasDataContract); 1419internal static XmlQualifiedName GetStableName(Type type, HashSet<Type> previousCollectionTypes, out bool hasDataContract) 1445private static XmlQualifiedName GetDCTypeStableName(Type type, DataContractAttribute dataContractAttribute) 1473private static XmlQualifiedName GetNonDCTypeStableName(Type type, HashSet<Type> previousCollectionTypes) 1477Type itemType; 1498private static bool TryGetBuiltInXmlAndArrayTypeStableName(Type type, HashSet<Type> previousCollectionTypes, out XmlQualifiedName stableName) 1517Type itemType = type.GetElementType(); 1530internal static bool TryGetDCAttribute(Type type, out DataContractAttribute dataContractAttribute) 1572internal static XmlQualifiedName GetCollectionStableName(Type type, Type itemType, out CollectionDataContractAttribute collectionContractAttribute) 1574return GetCollectionStableName(type, itemType, new HashSet<Type>(), out collectionContractAttribute); 1577internal static XmlQualifiedName GetCollectionStableName(Type type, Type itemType, HashSet<Type> previousCollectionTypes, out CollectionDataContractAttribute collectionContractAttribute) 1621private static string GetArrayPrefix(ref Type itemType) 1656internal static XmlQualifiedName GetDefaultStableName(Type type) 1661private static string GetDefaultStableLocalName(Type type) 1690Type[] genParams = type.GetGenericArguments(); 1693Type genParam = genParams[i]; 1718private static string GetDefaultDataContractNamespace(Type type) 1773internal static string GetDefaultStableNamespace(Type type) 1791private static void CheckExplicitDataContractNamespaceUri(string dataContractNs, Type type) 1811internal static string GetClrTypeFullName(Type type) 2000private static string ExpandGenericParameters(string format, Type type) 2051static internal bool IsTypeNullable(Type type) 2060internal static DataContractDictionary ImportKnownTypeAttributes(Type type) 2063Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 2068private static void ImportKnownTypeAttributes(Type type, Dictionary<Type, Type> typesChecked, ref DataContractDictionary knownDataContracts) 2110MethodInfo method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()); 2123foreach (Type ty in (IEnumerable<Type>)types) 2168internal static void CheckAndAdd(Type type, Dictionary<Type, Type> typesChecked, ref DataContractDictionary nameToDataContractTable) 2216static internal bool IsTypeVisible(Type t) 2221foreach (Type genericType in t.GetGenericArguments()) 2268private static bool IsTypeVisibleInSerializationModule(Type type) 2346internal GenericNameProvider(Type type) 2412Type paramType = o as Type;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractResolver.cs (4)
12public abstract bool TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, out XmlDictionaryString typeName, out XmlDictionaryString typeNamespace); 13public abstract Type ResolveName(string typeName, string typeNamespace, Type declaredType, DataContractResolver knownTypeResolver);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSerializer.cs (38)
22private Type _rootType; 30private ReadOnlyCollection<Type> _knownTypeCollection; 31internal IList<Type> knownTypeList; 37public DataContractSerializer(Type type) 38: this(type, (IEnumerable<Type>)null) 42public DataContractSerializer(Type type, IEnumerable<Type> knownTypes) 48public DataContractSerializer(Type type, string rootName, string rootNamespace) 53public DataContractSerializer(Type type, string rootName, string rootNamespace, IEnumerable<Type> knownTypes) 60public DataContractSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNamespace) 65public DataContractSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNamespace, IEnumerable<Type> knownTypes) 73internal DataContractSerializer(Type type, IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, bool preserveObjectReferences) 79public DataContractSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNamespace, 80IEnumerable<Type> knownTypes, 89public DataContractSerializer(Type type, DataContractSerializerSettings settings) 99private void Initialize(Type type, 100IEnumerable<Type> knownTypes, 112this.knownTypeList = new List<Type>(); 113foreach (Type knownType in knownTypes) 129private void Initialize(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNamespace, 130IEnumerable<Type> knownTypes, 144public ReadOnlyCollection<Type> KnownTypes 152_knownTypeCollection = new ReadOnlyCollection<Type>(knownTypeList); 156_knownTypeCollection = new ReadOnlyCollection<Type>(Array.Empty<Type>()); 311Type declaredType = contract.UnderlyingType; 312Type graphType = (graph == null) ? declaredType : graph.GetType(); 365internal static DataContract GetDataContract(DataContract declaredTypeContract, Type declaredType, Type objectType) 451internal override Type GetSerializeType(object graph) 456internal override Type GetDeserializeType() 461internal static object SurrogateToDataContractType(ISerializationSurrogateProvider serializationSurrogateProvider, object oldObj, Type surrogatedDeclaredType, ref Type objType) 471internal static Type GetSurrogatedType(ISerializationSurrogateProvider serializationSurrogateProvider, Type type)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSerializerSettings.cs (1)
31public IEnumerable<Type> KnownTypes { get; set; }
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (30)
22private ICollection<Type> _referencedTypes; 23private ICollection<Type> _referencedCollectionTypes; 27internal DataContractSet(IDataContractSurrogate dataContractSurrogate, ICollection<Type> referencedTypes, ICollection<Type> referencedCollectionTypes) 97internal void Add(Type type) 104internal static void EnsureTypeNotGeneric(Type type) 219internal XmlQualifiedName GetStableName(Type clrType) 223Type dcType = DataContractSurrogateCaller.GetDataContractType(_dataContractSurrogate, clrType); 232internal DataContract GetDataContract(Type clrType) 239Type dcType = DataContractSurrogateCaller.GetDataContractType(_dataContractSurrogate, clrType); 257Type dataMemberType = dataMember.MemberType; 262Type dcType = DataContractSurrogateCaller.GetDataContractType(_dataContractSurrogate, dataMemberType); 358foreach (Type type in _referencedTypes) 377foreach (Type type in _referencedCollectionTypes) 391private void AddReferencedType(Dictionary<XmlQualifiedName, object> referencedTypes, Type type) 414Type referencedType = value as Type; 420List<Type> types = new List<Type>(); 428List<Type> types = (List<Type>)value; 438internal bool TryGetReferencedType(XmlQualifiedName stableName, DataContract dataContract, out Type type) 443internal bool TryGetReferencedCollectionType(XmlQualifiedName stableName, DataContract dataContract, out Type type) 448private bool TryGetReferencedType(XmlQualifiedName stableName, DataContract dataContract, bool useReferencedCollectionTypes, out Type type) 454type = value as Type; 460List<Type> types = (List<Type>)value; 465Type conflictingType = types[i]; 495private static bool IsTypeReferenceable(Type type) 497Type itemType;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSurrogateCaller.cs (14)
14internal static Type GetDataContractType(IDataContractSurrogate surrogate, Type type) 18Type dcType = surrogate.GetDataContractType(type); 24internal static Type GetDataContractType(ISerializationSurrogateProvider surrogateProvider, Type type) 31internal static object GetObjectToSerialize(ISerializationSurrogateProvider surrogateProvider, object obj, Type objType, Type membertype) 40internal static object GetDeserializedObject(ISerializationSurrogateProvider surrogateProvider, object obj, Type objType, Type memberType) 49internal static object GetCustomDataToExport(IDataContractSurrogate surrogate, MemberInfo memberInfo, Type dataContractType) 54internal static object GetCustomDataToExport(IDataContractSurrogate surrogate, Type clrType, Type dataContractType) 61internal static void GetKnownCustomDataTypes(IDataContractSurrogate surrogate, Collection<Type> customDataTypes) 66internal static Type GetReferencedTypeOnImport(IDataContractSurrogate surrogate, string typeName, string typeNamespace, object customData)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataMember.cs (2)
138internal Type MemberType 256internal Type MemberType
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\EnumDataContract.cs (14)
48static internal Type GetBaseType(XmlQualifiedName baseContractName) 71internal EnumDataContract(Type type) : base(new EnumDataContractCriticalHelper(type)) 147private static Dictionary<Type, XmlQualifiedName> s_typeToName; 148private static Dictionary<XmlQualifiedName, Type> s_nameToType; 160s_typeToName = new Dictionary<Type, XmlQualifiedName>(); 161s_nameToType = new Dictionary<XmlQualifiedName, Type>(); 172static internal void Add(Type type, string localName) 179static internal Type GetBaseType(XmlQualifiedName baseContractName) 181Type retVal = null; 191internal EnumDataContractCriticalHelper(Type type) : base(type) 194Type baseType = Enum.GetUnderlyingType(type); 229Type baseType = GetBaseType(_baseContractName); 266private void ImportBaseType(Type baseType) 273Type type = this.UnderlyingType;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (13)
54public ExceptionDataContract(Type type) : base(new ExceptionDataContractCriticalHelper(type)) 149public ExceptionDataContractCriticalHelper(Type type) 153Type baseType = Globals.TypeOfException; 253Type type = this.UnderlyingType; 305Type type = this.UnderlyingType; 362Type type = value.GetType(); 401Type fieldType; 453Type declaringType = memberContract.MemberInfo.DeclaringType; 470Type exceptionType = Globals.TypeOfException; 474DynamicMethod baseMessageImpl = new DynamicMethod("NonVirtual_Message", typeof(string), new Type[] { Globals.TypeOfException }, Globals.TypeOfException); 507Type type = obj.GetType(); 541private bool TryWritePrimitive(Type type, object value, XmlWriterDelegator writer, XmlObjectSerializerWriteContext context) 554private static bool TryCheckIfNoCountIDictionary(Type type, object value)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExtensionDataObject.cs (3)
76Type DataType { get; } 93protected Type dataType; 114public Type DataType
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\GenericParameterDataContract.cs (2)
17internal GenericParameterDataContract(Type type) 42internal GenericParameterDataContractCriticalHelper(Type type)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (142)
60private static Type s_typeOfObject; 61internal static Type TypeOfObject 73private static Type s_typeOfValueType; 74internal static Type TypeOfValueType 86private static Type s_typeOfArray; 87internal static Type TypeOfArray 99private static Type s_typeOfException; 100internal static Type TypeOfException 112private static Type s_typeOfString; 113internal static Type TypeOfString 125private static Type s_typeOfInt; 126internal static Type TypeOfInt 138private static Type s_typeOfULong; 139internal static Type TypeOfULong 151private static Type s_typeOfVoid; 152internal static Type TypeOfVoid 164private static Type s_typeOfByteArray; 165internal static Type TypeOfByteArray 177private static Type s_typeOfTimeSpan; 178internal static Type TypeOfTimeSpan 190private static Type s_typeOfGuid; 191internal static Type TypeOfGuid 203private static Type s_typeOfDateTimeOffset; 204internal static Type TypeOfDateTimeOffset 216private static Type s_typeOfDateTimeOffsetAdapter; 217internal static Type TypeOfDateTimeOffsetAdapter 229private static Type s_typeOfUri; 230internal static Type TypeOfUri 242private static Type s_typeOfTypeEnumerable; 243internal static Type TypeOfTypeEnumerable 249s_typeOfTypeEnumerable = typeof(IEnumerable<Type>); 255private static Type s_typeOfStreamingContext; 256internal static Type TypeOfStreamingContext 268private static Type s_typeOfXmlFormatClassWriterDelegate; 269internal static Type TypeOfXmlFormatClassWriterDelegate 281private static Type s_typeOfXmlFormatCollectionWriterDelegate; 282internal static Type TypeOfXmlFormatCollectionWriterDelegate 294private static Type s_typeOfXmlFormatClassReaderDelegate; 295internal static Type TypeOfXmlFormatClassReaderDelegate 307private static Type s_typeOfXmlFormatCollectionReaderDelegate; 308internal static Type TypeOfXmlFormatCollectionReaderDelegate 320private static Type s_typeOfXmlFormatGetOnlyCollectionReaderDelegate; 321internal static Type TypeOfXmlFormatGetOnlyCollectionReaderDelegate 333private static Type s_typeOfKnownTypeAttribute; 334internal static Type TypeOfKnownTypeAttribute 349private static Type s_typeOfDataContractAttribute; 350internal static Type TypeOfDataContractAttribute 366private static Type s_typeOfContractNamespaceAttribute; 367internal static Type TypeOfContractNamespaceAttribute 379private static Type s_typeOfDataMemberAttribute; 380internal static Type TypeOfDataMemberAttribute 392private static Type s_typeOfEnumMemberAttribute; 393internal static Type TypeOfEnumMemberAttribute 405private static Type s_typeOfCollectionDataContractAttribute; 406internal static Type TypeOfCollectionDataContractAttribute 418private static Type s_typeOfObjectArray; 419internal static Type TypeOfObjectArray 431private static Type s_typeOfOnSerializingAttribute; 432internal static Type TypeOfOnSerializingAttribute 444private static Type s_typeOfOnSerializedAttribute; 445internal static Type TypeOfOnSerializedAttribute 457private static Type s_typeOfOnDeserializingAttribute; 458internal static Type TypeOfOnDeserializingAttribute 470private static Type s_typeOfOnDeserializedAttribute; 471internal static Type TypeOfOnDeserializedAttribute 484private static Type s_typeOfFlagsAttribute; 485internal static Type TypeOfFlagsAttribute 497private static Type s_typeOfIXmlSerializable; 498internal static Type TypeOfIXmlSerializable 510private static Type s_typeOfXmlSchemaProviderAttribute; 511internal static Type TypeOfXmlSchemaProviderAttribute 523private static Type s_typeOfXmlRootAttribute; 524internal static Type TypeOfXmlRootAttribute 536private static Type s_typeOfXmlQualifiedName; 537internal static Type TypeOfXmlQualifiedName 606private static Type s_typeOfIPropertyChange; 607internal static Type TypeOfIPropertyChange 619private static Type s_typeOfIExtensibleDataObject; 620internal static Type TypeOfIExtensibleDataObject 632private static Type s_typeOfExtensionDataObject; 633internal static Type TypeOfExtensionDataObject 645private static Type s_typeOfNullable; 646internal static Type TypeOfNullable 658private static Type s_typeOfIDictionaryGeneric; 659internal static Type TypeOfIDictionaryGeneric 671private static Type s_typeOfIDictionary; 672internal static Type TypeOfIDictionary 684private static Type s_typeOfIListGeneric; 685internal static Type TypeOfIListGeneric 697private static Type s_typeOfIList; 698internal static Type TypeOfIList 710private static Type s_typeOfICollectionGeneric; 711internal static Type TypeOfICollectionGeneric 723private static Type s_typeOfICollection; 724internal static Type TypeOfICollection 736private static Type s_typeOfIEnumerableGeneric; 737internal static Type TypeOfIEnumerableGeneric 749private static Type s_typeOfIEnumerable; 750internal static Type TypeOfIEnumerable 762private static Type s_typeOfIEnumeratorGeneric; 763internal static Type TypeOfIEnumeratorGeneric 775private static Type s_typeOfIEnumerator; 776internal static Type TypeOfIEnumerator 788private static Type s_typeOfKeyValuePair; 789internal static Type TypeOfKeyValuePair 801private static Type s_typeOfKeyValuePairAdapter; 802internal static Type TypeOfKeyValuePairAdapter 814private static Type s_typeOfKeyValue; 815internal static Type TypeOfKeyValue 827private static Type s_typeOfIDictionaryEnumerator; 828internal static Type TypeOfIDictionaryEnumerator 840private static Type s_typeOfDictionaryEnumerator; 841internal static Type TypeOfDictionaryEnumerator 853private static Type s_typeOfGenericDictionaryEnumerator; 854internal static Type TypeOfGenericDictionaryEnumerator 866private static Type s_typeOfDictionaryGeneric; 867internal static Type TypeOfDictionaryGeneric 879private static Type s_typeOfHashtable; 880internal static Type TypeOfHashtable 892private static Type s_typeOfListGeneric; 893internal static Type TypeOfListGeneric 905private static Type s_typeOfXmlElement; 906internal static Type TypeOfXmlElement 918private static Type s_typeOfXmlSerializableServices; 919internal static Type TypeOfXmlSerializableServices 931private static Type s_typeOfXmlNodeArray; 932internal static Type TypeOfXmlNodeArray 944private static Type s_typeOfXmlSchemaSet; 945internal static Type TypeOfXmlSchemaSet 959private static Type s_typeOfDBNull; 960internal static Type TypeOfDBNull 967s_typeOfDBNull = Type.GetType("System.DBNull, System.Data.Common, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", false); 1007private static bool TypeSequenceEqual(Type[] seq1, Type[] seq2) 1019private static MethodBase FilterMethodBases(MethodBase[] methodBases, Type[] parameterTypes, string methodName) 1029internal static ConstructorInfo GetConstructor(this Type type, BindingFlags bindingFlags, Type[] parameterTypes) 1036internal static MethodInfo GetMethod(this Type type, string methodName, BindingFlags bindingFlags, Type[] parameterTypes) 1045private static Type s_typeOfScriptObject; 1055internal static bool TypeOfScriptObject_IsAssignableFrom(Type type) 1060internal static void SetScriptObjectJsonSerializer(Type typeOfScriptObject, Func<object, string> serializeFunc, Func<string, object> deserializeFunc)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\IDataContractSurrogate.cs (9)
14Type GetDataContractType(Type type); 15object GetObjectToSerialize(object obj, Type targetType); 16object GetDeserializedObject(object obj, Type targetType); 17object GetCustomDataToExport(MemberInfo memberInfo, Type dataContractType); 18object GetCustomDataToExport(Type clrType, Type dataContractType); 19void GetKnownCustomDataTypes(Collection<Type> customDataTypes); 20Type GetReferencedTypeOnImport(string typeName, string typeNamespace, object customData);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ImportOptions.cs (6)
17private ICollection<Type> _referencedTypes; 18private ICollection<Type> _referencedCollectionTypes; 47public ICollection<Type> ReferencedTypes 53_referencedTypes = new List<Type>(); 59public ICollection<Type> ReferencedCollectionTypes 65_referencedCollectionTypes = new List<Type>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\KnownTypeAttribute.cs (3)
11private Type _type; 18public KnownTypeAttribute(Type type) 33public Type Type
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\KnownTypeDataContractResolver.cs (4)
24public override bool TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, out XmlDictionaryString typeName, out XmlDictionaryString typeNamespace) 54public override Type ResolveName(string typeName, string typeNamespace, Type declaredType, DataContractResolver knownTypeResolver)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Primitive\ISerializationSurrogateProvider.cs (4)
9Type GetSurrogateType(Type type); 10object GetObjectToSerialize(object obj, Type targetType); 11object GetDeserializedObject(object obj, Type targetType);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\PrimitiveDataContract.cs (7)
35protected PrimitiveDataContract(Type type, XmlDictionaryString name, XmlDictionaryString ns) : base(new PrimitiveDataContractCriticalHelper(type, name, ns)) 40static internal PrimitiveDataContract GetPrimitiveDataContract(Type type) 100_helper.XmlFormatWriterMethod = typeof(XmlWriterDelegator).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 102_helper.XmlFormatWriterMethod = typeof(XmlObjectSerializerWriteContext).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 120_helper.XmlFormatContentWriterMethod = typeof(XmlWriterDelegator).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { UnderlyingType }); 122_helper.XmlFormatContentWriterMethod = typeof(XmlObjectSerializerWriteContext).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), UnderlyingType }); 180internal PrimitiveDataContractCriticalHelper(Type type, XmlDictionaryString name, XmlDictionaryString ns) : base(type)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaExporter.cs (4)
17internal static void GetXmlTypeInfo(Type type, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot) 32private static bool InvokeSchemaProviderMethod(Type clrType, XmlSchemaSet schemas, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot) 58MethodInfo getMethod = clrType.GetMethod(methodName, /*BindingFlags.DeclaredOnly |*/ BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, new Type[] { typeof(XmlSchemaSet) }); 113internal static bool IsSpecialXmlType(Type type, out XmlQualifiedName typeName, out XmlSchemaType xsdType, out bool hasRoot)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (6)
188Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>(); 508Type referencedType; 753Type referencedType; 1343Collection<Type> knownTypes = new Collection<Type>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SerializationExtensionMethods.cs (1)
17public static bool IsAttributeDefined(this TypeInfo type, Type attributeType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SpecialTypeDataContract.cs (2)
27public SpecialTypeDataContract(Type type, XmlDictionaryString name, XmlDictionaryString ns) : base(new SpecialTypeDataContractCriticalHelper(type, name, ns)) 47internal SpecialTypeDataContractCriticalHelper(Type type, XmlDictionaryString name, XmlDictionaryString ns) : base(type)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\TypeCode.cs (1)
9public static TypeCode GetTypeCode(this Type type)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlDataContract.cs (8)
49internal XmlDataContract(Type type) : base(new XmlDataContractCriticalHelper(type)) 232internal XmlDataContractCriticalHelper(Type type) : base(type) 357Type type = UnderlyingType; 362ConstructorInfo ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()); 390Type type = this.UnderlyingType; 422Type xName = type.GetTypeInfo().Assembly.GetType("System.Xml.Linq.XName"); 428new Type[] { typeof(String) } 432new Type[] { xName }
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (23)
33s_writeStartElementMethod2 = typeof(XmlWriterDelegator).GetMethod("WriteStartElement", Globals.ScanAllMembers, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 49s_writeStartElementMethod3 = typeof(XmlWriterDelegator).GetMethod("WriteStartElement", Globals.ScanAllMembers, new Type[] { typeof(string), typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 65s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Array.Empty<Type>()); 81s_writeNamespaceDeclMethod = typeof(XmlWriterDelegator).GetMethod("WriteNamespaceDecl", Globals.ScanAllMembers, new Type[] { typeof(XmlDictionaryString) }); 97s_dictionaryEnumeratorCtor = Globals.TypeOfDictionaryEnumerator.GetConstructor(Globals.ScanAllMembers, new Type[] { Globals.TypeOfIDictionaryEnumerator }); 159s_isStartElementMethod2 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 175s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Array.Empty<Type>()); 191s_getUninitializedObjectMethod = typeof(XmlFormatReaderGenerator).GetMethod("UnsafeGetUninitializedObject", Globals.ScanAllMembers, new Type[] { typeof(int) }); 222s_hashtableCtor = Globals.TypeOfHashtable.GetConstructor(Globals.ScanAllMembers, Array.Empty<Type>()); 268s_storeCollectionMemberInfoMethod = typeof(XmlObjectSerializerReadContext).GetMethod("StoreCollectionMemberInfo", Globals.ScanAllMembers, new Type[] { typeof(object) }); 348s_internalDeserializeMethod = typeof(XmlObjectSerializerReadContext).GetMethod("InternalDeserialize", Globals.ScanAllMembers, new Type[] { typeof(XmlReaderDelegator), typeof(int), typeof(RuntimeTypeHandle), typeof(string), typeof(string) }); 444s_readIfNullOrRefMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ReadIfNullOrRef", Globals.ScanAllMembers, new Type[] { typeof(XmlReaderDelegator), typeof(Type), typeof(bool) }); 637s_createSerializationExceptionMethod = typeof(XmlObjectSerializerReadContext).GetMethod("CreateSerializationException", Globals.ScanAllMembers, new Type[] { typeof(string) }); 653s_createUnexpectedStateExceptionMethod = typeof(XmlObjectSerializerReadContext).GetMethod("CreateUnexpectedStateException", Globals.ScanAllMembers, new Type[] { typeof(XmlNodeType), typeof(XmlReaderDelegator) }); 701s_writeNullMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("WriteNull", Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), typeof(Type), typeof(bool) }); 733s_incrementCollectionCountMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("IncrementCollectionCount", Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), typeof(ICollection) }); 831s_isMemberTypeSameAsMemberValue = typeof(XmlObjectSerializerWriteContext).GetMethod("IsMemberTypeSameAsMemberValue", Globals.ScanAllMembers, new Type[] { typeof(object), typeof(Type) }); 1006s_getTypeHandleMethod = typeof(Type).GetMethod("get_TypeHandle"); 1036s_throwInvalidDataContractExceptionMethod = typeof(DataContract).GetMethod("ThrowInvalidDataContractException", Globals.ScanAllMembers, new Type[] { typeof(string), typeof(Type) });
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (22)
82private Type _objectType; 203Type type = _objectType = classContract.UnderlyingType; 308Type memberType = dataMember.MemberType; 379private LocalBuilder ReadValue(Type type, string name, string ns) 469private void InternalDeserialize(LocalBuilder value, Type type, string name, string ns) 473Type declaredType = type; 486Type innerType = innerValue.LocalType, outerType = outerValue.LocalType; 491Type type = Globals.TypeOfNullable.MakeGenericType(innerType); 492_ilg.New(type.GetConstructor(new Type[] { innerType })); 495_ilg.Call(outerType.GetConstructor(new Type[] { innerType })); 500Type type = collectionContract.UnderlyingType; 501Type itemType = collectionContract.ItemType; 512constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>()); 639Type type = collectionContract.UnderlyingType; 640Type itemType = collectionContract.ItemType; 699private bool TryReadPrimitiveArray(Type type, Type itemType, LocalBuilder size) 746private LocalBuilder ReadCollectionItem(CollectionDataContract collectionContract, Type itemType, string itemName, string itemNs) 853static internal object UnsafeGetUninitializedObject(Type type) 870var type = DataContract.GetDataContractForInitialization(id).TypeForInitialization; 874static internal object TryGetUninitializedObjectWithFormatterServices(Type type) 877var formatterServiceType = typeof(string).GetTypeInfo().Assembly.GetType("System.Runtime.Serialization.FormatterServices");
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatWriterGenerator.cs (24)
128private void InitArgs(Type objType) 242Type memberType = member.MemberType; 316Type itemType = collectionContract.ItemType; 360Type enumeratorType = null; 361Type[] keyValueTypes = null; 371keyValueTypes = new Type[] { Globals.TypeOfObject, Globals.TypeOfObject }; 378MethodInfo moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>()); 379MethodInfo getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>()); 391Type ienumeratorInterface = Globals.TypeOfIEnumerator; 395Type[] interfaceTypes = enumeratorType.GetInterfaces(); 396foreach (Type interfaceType in interfaceTypes) 413Type elementType = getCurrentMethod.ReturnType; 425Type ctorParam = Globals.TypeOfIEnumeratorGeneric.MakeGenericType(Globals.TypeOfKeyValuePair.MakeGenericType(keyValueTypes)); 426ConstructorInfo dictEnumCtor = enumeratorType.GetConstructor(Globals.ScanAllMembers, new Type[] { ctorParam }); 460private bool TryWritePrimitive(Type type, LocalBuilder value, MemberInfo memberInfo, LocalBuilder arrayItemIndex, LocalBuilder ns, LocalBuilder name, int nameIndex) 506private bool TryWritePrimitiveArray(Type type, Type itemType, LocalBuilder value, LocalBuilder itemName, LocalBuilder itemNamespace) 545_ilg.Call(typeof(XmlWriterDelegator).GetMethod(writeArrayMethod, Globals.ScanAllMembers, new Type[] { type, typeof(XmlDictionaryString), typeof(XmlDictionaryString) })); 553Type memberType = memberValue.LocalType; 617private void InternalSerialize(MethodInfo methodInfo, LocalBuilder memberValue, Type memberType, bool writeXsiType) 636Type memberType = memberValue.LocalType; 642Type innerType = memberType.GetGenericArguments()[0]; 662private bool NeedsPrefix(Type type, XmlDictionaryString ns) 667private void WriteStartElement(Type type, XmlDictionaryString ns, LocalBuilder namespaceLocal, LocalBuilder nameLocal, int nameIndex)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializer.cs (3)
381internal static string GetTypeInfoError(string errorMessage, Type type, Exception innerException) 388internal virtual Type GetSerializeType(object graph) 393internal virtual Type GetDeserializeType()
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerContext.cs (17)
26protected IList<Type> serializerKnownTypeList; 125internal DataContract GetDataContract(Type type) 130internal virtual DataContract GetDataContract(RuntimeTypeHandle typeHandle, Type type) 142internal virtual DataContract GetDataContractSkipValidation(int typeId, RuntimeTypeHandle typeHandle, Type type) 167internal virtual void CheckIfTypeSerializable(Type memberType, bool isMemberTypeSerializable) 173internal virtual Type GetSurrogatedType(Type type) 200internal static DataContractDictionary GetDataContractsForKnownTypes(IList<Type> knownTypeList) 204Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 207Type knownType = knownTypeList[i]; 216internal bool IsKnownType(DataContract dataContract, DataContractDictionary knownDataContracts, Type declaredType) 234internal bool IsKnownType(DataContract dataContract, Type declaredType) 240internal Type ResolveNameFromKnownTypes(XmlQualifiedName typeName) 276Type dataContractType = _dataContractResolver.ResolveName(typeName, typeNs, null, KnownTypeResolver);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (7)
69internal static void ThrowNullValueReturnedForGetOnlyCollectionException(Type type) 78internal static void ThrowArrayExceededSizeException(int arraySize, Type type) 113internal virtual object InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, string name, string ns) 119internal virtual object InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, string name, string ns) 126protected bool TryHandleNullOrRef(XmlReaderDelegator reader, Type declaredType, string name, string ns, ref object retObj) 333internal string ReadIfNullOrRef(XmlReaderDelegator xmlReader, Type memberType, bool isMemberTypeSerializable) 432internal object GetExistingObject(string id, Type type, string name, string ns)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (14)
44return InternalDeserializeWithSurrogate(xmlReader, Type.GetTypeFromHandle(declaredTypeHandle), null /*surrogateDataContract*/, name, ns); 48return InternalDeserializeInSharedTypeMode(xmlReader, declaredTypeID, Type.GetTypeFromHandle(declaredTypeHandle), name, ns); 52internal override object InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, string name, string ns) 67internal override object InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, string name, string ns) 82private object InternalDeserializeInSharedTypeMode(XmlReaderDelegator xmlReader, int declaredTypeID, Type declaredType, string name, string ns) 94Type type; 120private object InternalDeserializeWithSurrogate(XmlReaderDelegator xmlReader, Type declaredType, DataContract surrogateDataContract, string name, string ns) 137private Type ResolveDataContractTypeInSharedTypeMode(string assemblyName, string typeName, out Assembly assembly) 142private DataContract ResolveDataContractInSharedTypeMode(string assemblyName, string typeName, out Assembly assembly, out Type type) 164Type type; 171internal override void CheckIfTypeSerializable(Type memberType, bool isMemberTypeSerializable) 186internal override Type GetSurrogatedType(Type type) 195Type surrogateType = DataContractSerializer.GetSurrogatedType(_serializationSurrogateProvider, type);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (17)
117Type declaredType = Globals.TypeOfObject; 137SerializeWithXsiType(xmlWriter, obj, objTypeHandle, null /*type*/, declaredTypeID, declaredTypeHandle, Type.GetTypeFromHandle(declaredTypeHandle)); 158internal virtual void SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType) 161Type declaredType = rootTypeDataContract.UnderlyingType; 177protected virtual void SerializeWithXsiType(XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle objectTypeHandle, Type objectType, int declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type declaredType) 204objectType = Type.GetTypeFromHandle(objectTypeHandle); 256protected void SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, object obj, bool verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType) 296internal virtual bool WriteClrTypeInfo(XmlWriterDelegator xmlWriter, Type dataContractType, string clrTypeName, string clrAssemblyName) 441internal void WriteNull(XmlWriterDelegator xmlWriter, Type memberType, bool isMemberTypeSerializable) 448internal void WriteNull(XmlWriterDelegator xmlWriter, Type memberType, bool isMemberTypeSerializable, XmlDictionaryString name, XmlDictionaryString ns) 495internal static bool IsMemberTypeSameAsMemberValue(object obj, Type memberType) 526internal static void ThrowRequiredMemberMustBeEmitted(string memberName, Type type) 589private void WriteResolvedTypeInfo(XmlWriterDelegator writer, Type objectType, Type declaredType) 598private bool ResolveType(Type objectType, Type declaredType, out XmlDictionaryString typeName, out XmlDictionaryString typeNamespace)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (9)
51internal override bool WriteClrTypeInfo(XmlWriterDelegator xmlWriter, Type dataContractType, string clrTypeName, string clrAssemblyName) 214internal override void CheckIfTypeSerializable(Type memberType, bool isMemberTypeSerializable) 229internal override Type GetSurrogatedType(Type type) 238Type surrogateType = DataContractSerializer.GetSurrogatedType(_serializationSurrogateProvider, type); 256Type objType = Type.GetTypeFromHandle(objTypeHandle); 257Type declaredType = GetSurrogatedType(Type.GetTypeFromHandle(declaredTypeHandle));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
910internal Type ValueType { get { return reader.ValueType; } }
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlSerializableReader.cs (2)
85public override Type ValueType { get { return InnerReader.ValueType; } } 122public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) { return InnerReader.ReadContentAs(returnType, namespaceResolver); }
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlWriterDelegator.cs (2)
287private Exception CreateInvalidPrimitiveTypeException(Type type) 297internal void WriteAnyType(object value, Type valueType)
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (1)
170public Type ToType()
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (3)
1631public override object ReadContentAs(Type type, IXmlNamespaceResolver namespaceResolver) 1711public override Type ValueType 1717Type type = _node.Value.ToType();
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReader.cs (1)
1138public override bool IsStartArray(out Type type)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (1)
1140Type type = reader.ValueType;
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReader.cs (4)
480public override object ReadContentAs(Type type, IXmlNamespaceResolver namespaceResolver) 905public virtual bool IsStartArray(out Type type) 1514public override Type ValueType 1674public override object ReadContentAs(Type type, IXmlNamespaceResolver namespaceResolver)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryWriter.cs (4)
256private void WriteArrayNode(XmlDictionaryReader reader, string prefix, string localName, string namespaceUri, Type type) 285private void WriteArrayNode(XmlDictionaryReader reader, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, Type type) 314private void WriteArrayNode(XmlDictionaryReader reader, Type type) 358Type type;
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (34)
14public static Assembly Assembly(this Type type) 18public static Type BaseType(this Type type) 22public static bool ContainsGenericParameters(this Type type) 26public static ConstructorInfo GetConstructor(this Type type, BindingFlags bindingAttr, object binder, Type[] types, object[] modifiers) 30public static PropertyInfo GetProperty(this Type type, string name, BindingFlags bindingAttr) 34public static Type[] GetGenericArguments(this Type type) 38public static Type[] GetInterfaces(this Type type) 42public static bool IsAbstract(this Type type) 46public static bool IsAssignableFrom(this Type type, Type otherType) 50public static bool IsClass(this Type type) 54public static bool IsDefined(this Type type, Type attributeType, bool inherit) 58public static bool IsEnum(this Type type) 62public static bool IsGenericType(this Type type) 66public static bool IsInterface(this Type type) 70public static bool IsInstanceOfType(this Type type, object o) 74public static bool IsMarshalByRef(this Type type) 78public static bool IsNotPublic(this Type type) 82public static bool IsSealed(this Type type) 86public static bool IsValueType(this Type type) 90public static InterfaceMapping GetInterfaceMap(this Type type, Type interfaceType) 94public static MemberInfo[] GetMember(this Type type, string name, BindingFlags bindingAttr) 98public static MemberInfo[] GetMembers(this Type type, BindingFlags bindingAttr) 102public static MethodInfo GetMethod(this Type type, string name) 107public static MethodInfo GetMethod(this Type type, string name, Type[] types) 114public static TypeCode GetTypeCode(this Type type) 191public static Type ReflectedType(this MethodInfo mi)
FrameworkFork\System.ServiceModel\Framework\System\ComponentModel\InvalidEnumArgumentException.cs (1)
45public InvalidEnumArgumentException(string argumentName, int invalidValue, Type enumClass)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (16)
28private static Type[] s_breakOnExceptionTypesCache; 235internal static Type[] BreakOnExceptionTypes 248List<Type> types = new List<Type>(typeNames.Length); 251types.Add(Type.GetType(typeNames[i], false)); 566private readonly Type _elementType; 569public CacheAttribute(Type elementType, CacheAttrition cacheAttrition) 584public Type ElementType 609private readonly Type _elementType; 611public QueueAttribute(Type elementType) 624public Type ElementType 772public Type CancelDeclaringType { get; set; } 807private readonly Type _exceptionType; 810public ThrowsAttribute(Type exceptionType, string diagnosis) 825public Type ExceptionType 850public Type FromDeclaringType { get; set; }
FrameworkFork\System.ServiceModel\System\IdentityModel\Security\WSTrust.cs (2)
58protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(BinarySecretSecurityToken) }; }
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenSerializer.cs (7)
178public abstract Type GetTokenType(SecurityKeyIdentifierClause clause); 212private Type[] _tokenTypes = null; 216public Type TokenType { get { return GetTokenTypes()[0]; } } 220public bool SupportsCore(Type tokenType) 222Type[] tokenTypes = GetTokenTypes(); 231protected abstract Type[] GetTokenTypesCore(); 233public Type[] GetTokenTypes()
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\KeyInfoSerializer.cs (2)
336internal Type[] GetTokenTypes(string tokenTypeUri) 353protected internal virtual string GetTokenTypeUri(Type tokenType)
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\LocalIdKeyIdentifierClause.cs (12)
13private readonly Type[] _ownerTypes; 16: this(localId, (Type[])null) 20public LocalIdKeyIdentifierClause(string localId, Type ownerType) 21: this(localId, ownerType == null ? (Type[])null : new Type[] { ownerType }) 25public LocalIdKeyIdentifierClause(string localId, byte[] derivationNonce, int derivationLength, Type ownerType) 26: this(null, derivationNonce, derivationLength, ownerType == null ? (Type[])null : new Type[] { ownerType }) 30internal LocalIdKeyIdentifierClause(string localId, Type[] ownerTypes) 35internal LocalIdKeyIdentifierClause(string localId, byte[] derivationNonce, int derivationLength, Type[] ownerTypes) 55public Type OwnerType 66public bool Matches(string localId, Type ownerType)
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\WSSecurityJan2004.cs (24)
122protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(GenericXmlSecurityToken) }; } 134protected override Type[] GetTokenTypesCore() 144protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(SamlSecurityToken) }; } 153protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(UserNameSecurityToken) }; } 162protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(WrappedKeySecurityToken) }; } 176protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(X509SecurityToken), typeof(X509WindowsSecurityToken) }; } 258protected abstract Type ClauseType { get; } 260public abstract Type TokenType { get; } 281public override Type GetTokenType(SecurityKeyIdentifierClause clause) 327protected override Type ClauseType { get { throw new NotImplementedException(); } } 329public override Type TokenType { get { return typeof(KerberosRequestorSecurityToken); } } 354protected override Type ClauseType { get { throw new NotImplementedException(); } } 356public override Type TokenType { get { return typeof(X509SecurityToken); } } 385public override Type GetTokenType(SecurityKeyIdentifierClause clause) 393Type tokenType = GetTokenType(clause); 418Type[] tokenTypes = null; 479public override Type GetTokenType(SecurityKeyIdentifierClause clause) 531public override Type GetTokenType(SecurityKeyIdentifierClause clause) 558public override Type GetTokenType(SecurityKeyIdentifierClause clause)
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\WSSecurityXXX2005.cs (5)
132protected override Type ClauseType { get { throw new NotImplementedException(); } } 134public override Type TokenType { get { return typeof(WrappedKeySecurityToken); } } 165protected override Type ClauseType { get { throw new NotImplementedException(); } } 167public override Type TokenType { get { return typeof(X509SecurityToken); } } 196public override Type GetTokenType(SecurityKeyIdentifierClause clause)
FrameworkFork\System.ServiceModel\System\ServiceModel\ChannelFactory.cs (5)
392private Type _channelType; 394private Type _callbackType; 397protected ChannelFactory(Type channelType) 507internal Type CallbackType 601Type implementationType = implementation.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeader.cs (2)
35Type type = GetObjectType(value); 63private static Type GetObjectType(object value)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BindingElementCollection.cs (1)
61public bool Contains(Type bindingElementType)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelManagerBase.cs (1)
46internal Exception CreateChannelTypeNotSupportedException(Type type)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelRequirements.cs (28)
60public static Type[] ComputeRequiredChannels(ref ChannelRequirements requirements) 67return new Type[] { 73return new Type[] { 78return new Type[] { 88return new Type[] { 96return new Type[] { 102return new Type[] { 112return new Type[] { 122return new Type[] { 129return new Type[] { 141return new Type[] { 149return new Type[] { 155return new Type[] { 166return new Type[] { 176return new Type[] { 183return new Type[] { 193public static bool IsSessionful(Type channelType) 202public static bool IsOneWay(Type channelType) 210public static bool IsRequestReply(Type channelType) 218public static bool IsDuplex(Type channelType) 224public static Exception CantCreateListenerException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels, string bindingName) 242public static Exception CantCreateChannelException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels, string bindingName) 259public static Exception BindingContractMismatchException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels, 269foreach (Type channelType in requiredChannels) 312foreach (Type channelType in supportedChannels)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CommunicationObject.cs (1)
580protected virtual Type GetCommunicationObjectType()
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
440Type channelType = typeof(TChannel);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (6)
22private static readonly Type s_delegatingHandlerType = typeof(DelegatingHandler); 24private Type[] _httpMessageHandlers; 39public HttpMessageHandlerFactory(params Type[] handlers) 54Type handler = handlers[cnt]; 69ConstructorInfo ctorInfo = handler.GetConstructor(Array.Empty<Type>()); 164instances[cnt] = (DelegatingHandler)_handlerCtors[cnt].Invoke(Array.Empty<Type>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (1)
108private static Type GetObjectType(object value)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncodingBindingElementImporter.cs (1)
39Type elementType = messageEncodingBindingElement.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestReplyCorrelator.cs (4)
25Type stateType = typeof(T); 45Type stateType = typeof(T); 225internal Type StateType; 227internal Key(UniqueId messageId, Type stateType)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (1)
420internal bool CanCastTo(Type t)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelFactory.cs (7)
123Type[] requiredChannels = ChannelRequirements.ComputeRequiredChannels(ref requirements); 130foreach (Type type in requiredChannels) 177foreach (Type type in requiredChannels) 200Dictionary<Type, byte> supportedChannels = new Dictionary<Type, byte>(); 365internal static object CreateProxy(Type interfaceType, Type proxiedType, MessageDirection direction, ServiceChannel serviceChannel)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (13)
21private Type _proxiedType; 64Type declaringType = method.DeclaringType; 257public TaskCompletionSourceProxy(Type resultType) 283private static ConcurrentDictionary<Type, TaskCompletionSourceInfo> s_cache = new ConcurrentDictionary<Type, TaskCompletionSourceInfo>(); 285public TaskCompletionSourceInfo(Type resultType) 288Type tcsType = typeof(TaskCompletionSource<>); 289GenericType = tcsType.MakeGenericType(new Type[] { resultType }); 292TrySetExceptionMethod = GenericType.GetRuntimeMethod("TrySetException", new Type[] { typeof(Exception) }); 293TrySetCanceledMethod = GenericType.GetRuntimeMethod("TrySetCanceled", Array.Empty<Type>()); 296public Type ResultType { get; private set; } 297public Type GenericType { get; private set; } 303public static TaskCompletionSourceInfo GetTaskCompletionSourceInfo(Type resultType)
FrameworkFork\System.ServiceModel\System\ServiceModel\Configuration\BindingElementExtensionElement.cs (1)
24public abstract Type BindingElementType
FrameworkFork\System.ServiceModel\System\ServiceModel\Configuration\SecurityElementBase.cs (1)
33public override Type BindingElementType
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ClientClassGenerator.cs (28)
34private static Type s_clientBaseType = typeof(ClientBase<>); 35private static Type s_duplexClientBaseType = typeof(DuplexClientBase<>); 36private static Type s_instanceContextType = typeof(InstanceContext); 37private static Type s_objectType = typeof(object); 38private static Type s_objectArrayType = typeof(object[]); 39private static Type s_exceptionType = typeof(Exception); 40private static Type s_boolType = typeof(bool); 41private static Type s_stringType = typeof(string); 42private static Type s_endpointAddressType = typeof(EndpointAddress); 43private static Type s_uriType = typeof(Uri); 44private static Type s_bindingType = typeof(Binding); 45private static Type s_sendOrPostCallbackType = typeof(SendOrPostCallback); 46private static Type s_asyncCompletedEventArgsType = typeof(AsyncCompletedEventArgs); 47private static Type s_eventHandlerType = typeof(EventHandler<>); 48private static Type s_voidType = typeof(void); 49private static Type s_asyncResultType = typeof(IAsyncResult); 50private static Type s_asyncCallbackType = typeof(AsyncCallback); 66private static Type[][] s_clientCtorParamTypes = new Type[][] 68new Type[] { }, 69new Type[] { s_stringType, }, 70new Type[] { s_stringType, s_stringType, }, 71new Type[] { s_stringType, s_endpointAddressType, }, 72new Type[] { s_bindingType, s_endpointAddressType, }, 84private static Type[] s_eventArgsCtorParamTypes = new Type[] 121Type[] duplexCtorTypes1 = DebugCheckTable_InsertAtStart(s_clientCtorParamTypes[i], s_objectType); 122Type[] duplexCtorTypes2 = DebugCheckTable_InsertAtStart(s_clientCtorParamTypes[i], s_instanceContextType);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ContractDescription.cs (10)
18private Type _callbackContractType; 20private Type _contractType; 57public Type ContractType 63public Type CallbackContractType 141public KeyedCollection<Type, IContractBehavior> ContractBehaviors 152public static ContractDescription GetContract(Type contractType) 161public static ContractDescription GetContract(Type contractType, Type serviceType) 174public static ContractDescription GetContract(Type contractType, object serviceImplementation) 183Type serviceType = serviceImplementation.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\CustomAttributeProvider.cs (6)
28if (attrProvider is Type) 30this.Type = (Type)attrProvider; 55internal Type Type { get; private set; } 77public object[] GetCustomAttributes(Type attributeType, bool inherit) 96public bool IsDefined(Type attributeType, bool inherit) 128public static implicit operator CustomAttributeProvider(Type attrProvider)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerOperationBehavior.cs (4)
92public virtual XmlObjectSerializer CreateSerializer(Type type, string name, string ns, IList<Type> knownTypes) 97public virtual XmlObjectSerializer CreateSerializer(Type type, XmlDictionaryString name, XmlDictionaryString ns, IList<Type> knownTypes)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\FaultDescription.cs (2)
16private Type _detailType; 40public Type DetailType
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (8)
50static internal void ImportMessageBinding(WsdlImporter importer, WsdlEndpointConversionContext endpointContext, Type schemaImporterType) 1226private static bool CheckAndAddPart(XmlQualifiedName typeNameFound, XmlQualifiedName typeNameRequired, string name, string ns, Type type, MessageDescription description, bool isReply) 1627Type type = typeof(DataContractSerializerSchemaImporter); 1680internal static bool TryGetFailedReferenceType(Exception ex, out Type failedReferenceType) 1687failedReferenceType = ex.Data[FailedReferenceTypeExceptionKey] as Type; 1702Type failedReferenceType; 1946_xmlImporter.Extensions.Add(extTypeName, Type.GetType(extTypeName, true /*throwOnError*/)); 1984Type type = typeof(XmlSerializerSchemaImporter);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageDescription.cs (4)
17private static Type s_typeOfUntypedMessage; 22private Type _messageType; 121internal static Type TypeOfUntypedMessage 142public Type MessageType
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessagePartDescription.cs (2)
19private Type _type; 94public Type Type
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (2)
447internal static void TraceReceiveReply(string sourceUrl, Type metadataType) 647Type metadataType = null;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataSet.cs (5)
264System.Type t = o.GetType(); 319System.Type t = o.GetType(); 401System.Type t = o.GetType(); 1047public override System.Boolean CanSerialize(System.Type type) 1052public override Microsoft.Xml.Serialization.XmlSerializer GetSerializer(System.Type type)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationDescription.cs (5)
27private Collection<Type> _knownTypes; 59_knownTypes = new Collection<Type>(); 68public KeyedCollection<Type, IOperationBehavior> OperationBehaviors 195public Collection<Type> KnownTypes 223internal Type TaskTResult
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (2)
983Type attributeType = attribute.GetType(); 1023Type type = val.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceContractGenerator.cs (5)
28private Dictionary<ContractDescription, Type> _referencedTypes; 48_referencedTypes = new Dictionary<ContractDescription, Type>(); 51internal CodeTypeReference GetCodeTypeReference(Type type) 85public Dictionary<ContractDescription, Type> ReferencedTypes 122Type existingType;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceEndpoint.cs (1)
51public KeyedCollection<Type, IEndpointBehavior> EndpointBehaviors
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceEndpointCollection.cs (3)
16public ServiceEndpoint Find(Type contractType) 52public ServiceEndpoint Find(Type contractType, XmlQualifiedName bindingName) 119public Collection<ServiceEndpoint> FindAll(Type contractType)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (48)
49internal static string TypeName(Type t) 51Type[] args = null; 83internal static XmlQualifiedName GetContractName(Type contractType, string name, string ns) 348internal static readonly Type VoidType = typeof(void); 350internal static readonly Type taskType = typeof(Task); 351internal static readonly Type taskTResultType = typeof(Task<>); 352internal static readonly Type CancellationTokenType = typeof(CancellationToken); 353internal static readonly Type IProgressType = typeof(IProgress<>); 354private static readonly Type s_asyncCallbackType = typeof(AsyncCallback); 355private static readonly Type s_asyncResultType = typeof(IAsyncResult); 356private static readonly Type s_objectType = typeof(object); 357private static readonly Type s_OperationContractAttributeType = typeof(OperationContractAttribute); 359static internal Type GetOperationContractProviderType(MethodInfo method) 374static internal List<Type> GetInterfaces(Type service) 376List<Type> types = new List<Type>(); 385Type t = GetAncestorImplicitContractClass(service); 392Type operationContractProviderType = GetOperationContractProviderType(method); 399foreach (Type t in service.GetInterfaces()) 414private static Type GetAncestorImplicitContractClass(Type service) 426static internal List<Type> GetInheritedContractTypes(Type service) 428List<Type> types = new List<Type>(); 429foreach (Type t in service.GetInterfaces()) 446static internal object[] GetCustomAttributes(CustomAttributeProvider attrProvider, Type attrType) 451static internal object[] GetCustomAttributes(CustomAttributeProvider attrProvider, Type attrType, bool inherit) 481Type type = attrProvider.Type; 514Type attrType = typeof(T); 529Type attrType = typeof(T); 554static internal T GetSingleAttribute<T>(CustomAttributeProvider attrProvider, Type[] attrTypeGroup) 560Type attrType = typeof(T); 561foreach (Type otherType in attrTypeGroup) 576static internal T GetRequiredSingleAttribute<T>(CustomAttributeProvider attrProvider, Type[] attrTypeGroup) 586static internal Type GetContractType(Type interfaceType) 592static internal Type GetContractTypeAndAttribute(Type interfaceType, out ServiceContractAttribute contractAttribute) 600List<Type> types = new List<Type>(GetInheritedContractTypes(interfaceType)); 607foreach (Type potentialContractRoot in types) 610foreach (Type t in types) 627private static List<MethodInfo> GetMethodsInternal(Type interfaceType) 862static internal bool IsTask(MethodInfo method, out Type taskTResult) 865Type methodReturnType = method.ReturnType; 957static internal bool IsParameterDisposable(Type type)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (86)
22private static Type[] s_messageContractMemberAttributes = { 27private static Type[] s_formatterAttributes = { 32private static Type[] s_knownTypesMethodParamType = new Type[] { typeof(CustomAttributeProvider) }; 37private static readonly Type s_OperationContractAttributeType = typeof(OperationContractAttribute); 45private readonly Dictionary<Type, ContractDescription> _contracts; 46private readonly Dictionary<Type, MessageDescriptionItems> _messages; 51_contracts = new Dictionary<Type, ContractDescription>(); 52_messages = new Dictionary<Type, MessageDescriptionItems>(); 56private ContractDescription LoadContractDescriptionHelper(Type contractType, Type serviceType, object serviceImplementation) 70Type actualContractType = ServiceReflector.GetContractTypeAndAttribute(contractType, out actualContractAttribute); 102private void EnsureNoInheritanceWithContractClasses(Type actualContractType) 107for (Type service = actualContractType.BaseType(); service != null; service = service.BaseType()) 118private void EnsureNoOperationContractsOnNonServiceContractTypes(Type actualContractType) 120foreach (Type t in actualContractType.GetInterfaces()) 124for (Type u = actualContractType.BaseType(); u != null; u = u.BaseType()) 130private void EnsureNoOperationContractsOnNonServiceContractTypes_Helper(Type aParentType) 138Type operationContractProviderType = ServiceReflector.GetOperationContractProviderType(methodInfo); 156public ContractDescription LoadContractDescription(Type contractType) 163public ContractDescription LoadContractDescription(Type contractType, Type serviceType) 171public ContractDescription LoadContractDescription(Type contractType, Type serviceType, object serviceImplementation) 182Type channelType = typeof(IOutputChannel); 197Type channelType = typeof(IRequestChannel); 212private void AddBehaviors(ContractDescription contractDesc, Type implType, bool implIsCallback, ContractReflectionInfo reflectionInfo) 230Type targetIface = implIsCallback ? opDesc.DeclaringContract.CallbackContractType : opDesc.DeclaringContract.ContractType; 246delegate (Type currentType, KeyedByTypeCollection<IOperationBehavior> behaviors) 260delegate (Type currentType, KeyedByTypeCollection<IOperationBehavior> behaviors) 273Type targetInterface = implIsCallback ? reflectionInfo.callbackiface : reflectionInfo.iface; 305private void GetIContractBehaviorsFromInterfaceType(Type interfaceType, KeyedByTypeCollection<IContractBehavior> behaviors) 315private static void UpdateContractDescriptionWithAttributesFromServiceType(ContractDescription description, Type serviceType) 319delegate (Type currentType, KeyedByTypeCollection<IContractBehavior> behaviors) 331IEnumerable<Type> knownTypes = GetKnownTypes(customAttributes, reflectionInfo.iface); 332foreach (Type knownType in knownTypes) 345foreach (Type knownType in knownTypes) 356private IEnumerable<Type> GetKnownTypes(object[] knownTypeAttributes, CustomAttributeProvider provider) 363Type type = knownTypeAttribute.DeclaringType; 374if (!typeof(IEnumerable<Type>).IsAssignableFrom(method.ReturnType)) 377return (IEnumerable<Type>)method.Invoke(null, new object[] { provider }); 381List<Type> knownTypes = new List<Type>(); 392private KeyedByTypeCollection<IOperationBehavior> GetIOperationBehaviorAttributesFromType(OperationDescription opDesc, Type targetIface, Type implType) 427Type ifaceType, Type implType, bool useImplAttrs) 502private static MethodInfo GetCorrespondingMethodFromType(Type type, MethodInfo methodInfo) 581internal void AddBehaviorsSFx(ServiceEndpoint serviceEndpoint, Type contractType) 593internal void AddBehaviorsFromImplementationType(ServiceEndpoint serviceEndpoint, Type implementationType) 610Type targetIface = serviceEndpoint.Contract.CallbackContractType; 618delegate (Type currentType, KeyedByTypeCollection<IOperationBehavior> behaviors) 631Type t = behavior.GetType(); 673Type contractToGetMethodsFrom, 701internal static void EnsureCallbackType(Type callbackType) 710internal static void EnsureSubcontract(ServiceContractAttribute svcContractAttr, Type contractType) 712Type callbackType = svcContractAttr.CallbackContract; 714List<Type> types = ServiceReflector.GetInheritedContractTypes(contractType); 717Type inheritedContractType = types[i]; 738private ContractDescription CreateContractDescription(ServiceContractAttribute contractAttr, Type contractType, Type serviceType, out ContractReflectionInfo reflectionInfo, object serviceImplementation) 750Type callbackType = contractAttr.CallbackContract; 765List<Type> types = ServiceReflector.GetInheritedContractTypes(contractType); 766List<Type> inheritedCallbackTypes = new List<Type>(); 769Type inheritedContractType = types[i]; 863Type taskTResult; 988IEnumerable<Type> knownTypes = GetKnownTypes(methodAttributes, methodInfo); 989foreach (Type knownType in knownTypes) 1118Type taskTResult, 1157Type responseType = isTask ? taskTResult : methodInfo.ReturnType; 1202Type returnType, 1252private static MessagePartDescription CreateParameterPartDescription(XmlName defaultName, string defaultNS, int index, CustomAttributeProvider attrProvider, Type type) 1266internal MessageDescription CreateTypedMessageDescription(Type typedMessageType, 1293for (Type baseType = typedMessageType; baseType != null && baseType != typeof(object) && baseType != typeof(ValueType); baseType = baseType.BaseType()) 1358Type memberType; 1413private MessagePartDescription CreateMessagePartDescription(Type bodyType, 1449private MessageHeaderDescription CreateMessageHeaderDescription(Type headerParameterType, 1520internal static Type GetParameterType(ParameterInfo parameterInfo) 1522Type parameterType = parameterInfo.ParameterType; 1958internal Type iface; 1959internal Type callbackiface; 1975Type serviceType, 1983for (Type currentType = serviceType; currentType != null; currentType = currentType.BaseType()) 1989public delegate void ServiceInheritanceCallback<IBehavior, TBehaviorCollection>(Type currentType, KeyedByTypeCollection<IBehavior> behaviors); 2001Type type,
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (11)
178internal Reflector(string defaultNs, Type type) 198Type contractType = operation.DeclaringContract != null ? operation.DeclaringContract.ContractType : null; 341foreach (Type knownType in Operation.KnownTypes) 589internal XmlTypeMapping ImportTypeMapping(Type type) 594internal void IncludeType(Type knownType) 604private Type _type; 607internal SerializerGenerationContext(Type type) 675private XmlSerializer[] CreateSerializersFromMappings(XmlMapping[] mappings, Type type) 825static internal XmlReflectionMember GetXmlReflectionMember(XmlName memberName, XmlName elementName, string ns, Type type, MemberInfo additionalAttributesProvider, bool isMultiple, bool isWrapped) 844Type invalidAttributeType = null; 924public static XmlSerializer[] FromMappings(XmlMapping[] mappings, Type type)
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\SecurityTraceRecordHelper.cs (4)
27internal static void TraceIdentityVerificationSuccess(EventTraceActivity eventTraceActivity, EndpointIdentity identity, Claim claim, Type identityVerifier) 31internal static void TraceIdentityVerificationFailure(EndpointIdentity identity, AuthorizationContext authContext, Type identityVerifier) 35internal static void TraceIdentityDeterminationSuccess(EndpointAddress epr, EndpointIdentity identity, Type identityVerifier) 39internal static void TraceIdentityDeterminationFailure(EndpointAddress epr, Type identityVerifier)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelHandler.cs (2)
481Type contractType = clientRuntime.ContractClientType; 482Type callbackType = clientRuntime.CallbackClientType;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientOperation.cs (2)
48private Type _taskTResult; 261public Type TaskTResult
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientRuntime.cs (4)
51private Type _callbackProxyType; 55private Type _contractProxyType; 120public Type CallbackClientType 148public Type ContractClientType
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerFaultFormatter.cs (1)
11internal DataContractSerializerFaultFormatter(Type[] detailTypes)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (27)
20internal static DataContractSerializer CreateSerializer(Type type, int maxItems) 25internal static DataContractSerializer CreateSerializer(Type type, IList<Type> knownTypes, int maxItems) 32internal static DataContractSerializer CreateSerializer(Type type, string rootName, string rootNs, int maxItems) 37internal static DataContractSerializer CreateSerializer(Type type, IList<Type> knownTypes, string rootName, string rootNs, int maxItems) 46internal static DataContractSerializer CreateSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNs, int maxItems) 51internal static DataContractSerializer CreateSerializer(Type type, IList<Type> knownTypes, XmlDictionaryString rootName, XmlDictionaryString rootNs, int maxItems) 63private static Type s_typeOfIQueryable = typeof(IQueryable); 64private static Type s_typeOfIQueryableGeneric = typeof(IQueryable<>); 65private static Type s_typeOfIEnumerable = typeof(IEnumerable); 66private static Type s_typeOfIEnumerableGeneric = typeof(IEnumerable<>); 70private IList<Type> _knownTypes; 81foreach (Type type in description.KnownTypes) 84_knownTypes = new List<Type>(); 132private void ValidateDataContractType(Type type) 250KeyValuePair<Type, ArrayList>[] multipleHeaderValues = null; 282multipleHeaderValues = new KeyValuePair<Type, ArrayList>[parameters.Length]; 285multipleHeaderValues[headerDescription.Index] = new KeyValuePair<System.Type, System.Collections.ArrayList>(headerDescription.TypedHeader ? TypedHeaderManager.GetMessageHeaderType(headerDescription.Type) : headerDescription.Type, new ArrayList()); 327Type dataContractType = DataContractSerializerOperationFormatter.GetSubstituteDataContractType(headerDescription.Type, out isQueryable); 451internal static Type GetSubstituteDataContractType(Type type, out bool isQueryable) 509private IList<Type> _knownTypes; 511private Type _contractType; 515IList<Type> knownTypes, DataContractSerializerOperationBehavior behavior) 527public Type ContractType
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DispatchRuntime.cs (2)
33private Type _type; 193public Type Type
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultContractInfo.cs (7)
14private Type _detail; 17private IList<Type> _knownTypes; 20public FaultContractInfo(string action, Type detail) 24internal FaultContractInfo(string action, Type detail, XmlName elementName, string ns, IList<Type> knownTypes) 45public Type Detail { get { return _detail; } } 51internal IList<Type> KnownTypes { get { return _knownTypes; } }
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (10)
17internal FaultFormatter(Type[] detailTypes) 40Type detailType = null; 43Type faultExceptionOfT = null; 44for (Type faultType = faultException.GetType(); faultType != typeof(FaultException); faultType = faultType.BaseType()) 68protected virtual XmlObjectSerializer GetSerializer(Type detailType, string faultExceptionAction, out string action) 110Type detailType = null; 137object detailObj, Type detailType, XmlDictionaryReader detailReader) 156Type knownFaultType = typeof(FaultException<>).MakeGenericType(detailType); 181private static MessageFault CreateMessageFault(XmlObjectSerializer serializer, FaultException faultException, Type detailType) 191Type operationFaultType = typeof(OperationFault<>).MakeGenericType(detailType);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (1)
158private static object CreateTypedMessageInstance(Type messageContractType)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (4)
205private static string GetArrayItemName(Type type) 230Type type = part.Type; 295Type type = bodyDescription.Type; 327private static bool IsArrayTypeSupported(Type type)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (2)
138internal Type TaskTResult 264internal static object GetDefaultParameterValue(Type parameterType)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (2)
25public TaskMethodInvoker(MethodInfo taskMethod, Type taskType) 119returnVal = _taskTResultGetMethod.Invoke(task, Type.EmptyTypes);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerFaultFormatter.cs (3)
22internal XmlSerializerFaultFormatter(Type[] detailTypes, 45protected override XmlObjectSerializer GetSerializer(Type detailType, string faultExceptionAction, out string action) 89Type detailType = null;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerObjectSerializer.cs (4)
18private Type _rootType; 23internal XmlSerializerObjectSerializer(Type type) 28internal XmlSerializerObjectSerializer(Type type, XmlQualifiedName qualifiedName, XmlSerializer xmlSerializer) 37private void Initialize(Type type, string rootName, string rootNamespace, XmlSerializer xmlSerializer)
FrameworkFork\System.ServiceModel\System\ServiceModel\DuplexChannelFactory.cs (11)
14public DuplexChannelFactory(Type callbackInstanceType) 17public DuplexChannelFactory(Type callbackInstanceType, Binding binding, String remoteAddress) 20public DuplexChannelFactory(Type callbackInstanceType, Binding binding, EndpointAddress remoteAddress) 23public DuplexChannelFactory(Type callbackInstanceType, Binding binding) 26public DuplexChannelFactory(Type callbackInstanceType, string endpointConfigurationName, EndpointAddress remoteAddress) 29public DuplexChannelFactory(Type callbackInstanceType, string endpointConfigurationName) 32public DuplexChannelFactory(Type callbackInstanceType, ServiceEndpoint endpoint) 173if (callbackInstance is Type) 175this.CallbackType = (Type)callbackInstance; 233Type userObjectType = callbackInstance.UserObject.GetType(); 234Type callbackType = this.Endpoint.Contract.CallbackContractType;
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultContractAttribute.cs (3)
17private Type _type; 21public FaultContractAttribute(Type detailType) 29public Type DetailType
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultException.cs (2)
156public static FaultException CreateFault(MessageFault messageFault, params Type[] faultDetailTypes) 161public static FaultException CreateFault(MessageFault messageFault, string action, params Type[] faultDetailTypes)
FrameworkFork\System.ServiceModel\System\ServiceModel\KeyedByTypeCollection.cs (2)
10public class KeyedByTypeCollection<TItem> : KeyedCollection<Type, TItem> 88protected override Type GetKeyForItem(TItem item)
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageHeaderT.cs (13)
61internal Type GetGenericArgument() 81private static Dictionary<Type, TypedHeaderManager> s_cache = new Dictionary<Type, TypedHeaderManager>(); 83private static Type s_GenericAdapterType = typeof(GenericAdapter<>); 85internal static object Create(Type t, object content, bool mustUnderstand, bool relay, string actor) 90internal static object GetContent(Type t, object typedHeaderInstance, out bool mustUnderstand, out bool relay, out string actor) 95internal static Type GetMessageHeaderType(Type contentType) 99internal static Type GetHeaderType(Type headerParameterType) 107private static TypedHeaderManager GetTypedHeaderManager(Type t) 149protected abstract Type GetMessageHeaderType(); 180protected override Type GetMessageHeaderType()
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\RequestSecurityToken.cs (2)
39private Type _appliesToType; 378internal Type AppliesToType
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\RequestSecurityTokenResponse.cs (2)
40private Type _appliesToType; 397internal Type AppliesToType
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
740Type authenticatorType = spec.TokenAuthenticator.GetType(); 744Type spec2AuthenticatorType = spec2.TokenAuthenticator.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SecurityContextCookieSerializer.cs (3)
24private IList<Type> _knownTypes; 26public SecurityContextCookieSerializer(SecurityStateEncoder securityStateEncoder, IList<Type> knownTypes) 33_knownTypes = knownTypes ?? new List<Type>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WrapperSecurityCommunicationObject.cs (1)
27protected override Type GetCommunicationObjectType()
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSKeyInfoSerializer.cs (7)
106public override Type GetTokenType(SecurityKeyIdentifierClause clause) 188private Type[] _tokenTypes; 202protected override Type[] GetTokenTypesCore() 205_tokenTypes = new Type[] { typeof(SecurityContextSecurityToken) }; 218private Type[] _tokenTypes; 231protected override Type[] GetTokenTypesCore() 234_tokenTypes = new Type[] { typeof(DerivedKeySecurityToken) };
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecureConversation.cs (5)
97protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(DerivedKeySecurityToken) }; } 309public SecurityContextTokenEntry(WSSecureConversation parent, SecurityStateEncoder securityStateEncoder, IList<Type> knownClaimTypes) 322protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(SecurityContextSecurityToken) }; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecureConversationDec2005.cs (5)
34private IList<Type> _knownClaimTypes; 36public WSSecureConversationDec2005(WSSecurityTokenSerializer tokenSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes, 49_knownClaimTypes = new List<Type>(); 53foreach (Type knownType in knownTypes) 81public SecurityContextTokenEntryDec2005(WSSecureConversationDec2005 parent, SecurityStateEncoder securityStateEncoder, IList<Type> knownClaimTypes)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecureConversationFeb2005.cs (5)
34private IList<Type> _knownClaimTypes; 36public WSSecureConversationFeb2005(WSSecurityTokenSerializer tokenSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes, 49_knownClaimTypes = new List<Type>(); 53foreach (Type knownType in knownTypes) 73public SecurityContextTokenEntryFeb2005(WSSecureConversationFeb2005 parent, SecurityStateEncoder securityStateEncoder, IList<Type> knownClaimTypes)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityJan2004.cs (10)
157protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(GenericXmlSecurityToken) }; } 200protected override Type[] GetTokenTypesCore() 242protected override Type[] GetTokenTypesCore() 277protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(UserNameSecurityToken) }; } 421protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(WrappedKeySecurityToken) }; } 476protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(X509SecurityToken), typeof(X509WindowsSecurityToken) }; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityTokenSerializer.cs (13)
60public WSSecurityTokenSerializer(SecurityVersion securityVersion, bool emitBspRequiredAttributes, SamlSerializer samlSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes) 65public WSSecurityTokenSerializer(SecurityVersion securityVersion, TrustVersion trustVersion, SecureConversationVersion secureConversationVersion, bool emitBspRequiredAttributes, SamlSerializer samlSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes) 70public WSSecurityTokenSerializer(SecurityVersion securityVersion, bool emitBspRequiredAttributes, SamlSerializer samlSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes, 76public WSSecurityTokenSerializer(SecurityVersion securityVersion, TrustVersion trustVersion, SecureConversationVersion secureConversationVersion, bool emitBspRequiredAttributes, SamlSerializer samlSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes, 359internal Type[] GetTokenTypes(string tokenTypeUri) 376protected internal virtual string GetTokenTypeUri(Type tokenType) 445private Type[] _tokenTypes = null; 455public Type TokenType { get { return GetTokenTypes()[0]; } } 459protected abstract Type[] GetTokenTypesCore(); 461public Type[] GetTokenTypes() 468public bool SupportsCore(Type tokenType) 470Type[] tokenTypes = GetTokenTypes(); 484protected static SecurityKeyIdentifierClause CreateDirectReference(XmlElement issuedTokenXml, string idAttributeLocalName, string idAttributeNamespace, Type tokenType)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSTrust.cs (2)
88protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(BinarySecretSecurityToken) }; }
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceContractAttribute.cs (2)
14private Type _callbackContract = null; 103public Type CallbackContract
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceKnownTypeAttribute.cs (6)
10private Type _declaringType; 12private Type _type; 19public ServiceKnownTypeAttribute(Type type) 29public ServiceKnownTypeAttribute(string methodName, Type declaringType) 35public Type DeclaringType 45public Type Type
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
267Type type = (value == null) ? typeof(Object) : value.GetType();
FrameworkFork\System.Web.Services\Configuration\WebServicesSection.cs (8)
30internal static void LoadXmlFormatExtensions(Type[] extensionTypes, XmlAttributeOverrides overrides, XmlSerializerNamespaces namespaces) 51foreach (Type extensionType in extensionTypes) 64foreach (Type extensionPointType in extensionAttr.ExtensionPoints) 91foreach (Type extensionPointType in table.Keys) 103internal Type[] GetAllFormatExtensionTypes() 109private static XmlFormatExtensionPointAttribute GetExtensionPointAttribute(Type type) 117private Type[] _defaultFormatTypes = new Type[] {
FrameworkFork\System.Web.Services\Services\Description\ServiceDescription.cs (3)
1637public object Find(Type type) 1655public object[] FindAll(Type type) 3211private static string GetDuplicateMessage(Type type, string elemName)
FrameworkFork\System.Web.Services\Services\Description\ServiceDescriptionSerializer.cs (88)
30System.Type t = o.GetType(); 142System.Type t = o.GetType(); 212System.Type t = o.GetType(); 299System.Type t = o.GetType(); 327System.Type t = o.GetType(); 355System.Type t = o.GetType(); 383System.Type t = o.GetType(); 480System.Type t = o.GetType(); 578System.Type t = o.GetType(); 660System.Type t = o.GetType(); 709System.Type t = o.GetType(); 758System.Type t = o.GetType(); 864System.Type t = o.GetType(); 901System.Type t = o.GetType(); 979System.Type t = o.GetType(); 1016System.Type t = o.GetType(); 1065System.Type t = o.GetType(); 1093System.Type t = o.GetType(); 1122System.Type t = o.GetType(); 1162System.Type t = o.GetType(); 1202System.Type t = o.GetType(); 1244System.Type t = o.GetType(); 1285System.Type t = o.GetType(); 1327System.Type t = o.GetType(); 1368System.Type t = o.GetType(); 1482System.Type t = o.GetType(); 1509System.Type t = o.GetType(); 1536System.Type t = o.GetType(); 1580System.Type t = o.GetType(); 1608System.Type t = o.GetType(); 1656System.Type t = o.GetType(); 1688System.Type t = o.GetType(); 1716System.Type t = o.GetType(); 1748System.Type t = o.GetType(); 1818System.Type t = o.GetType(); 1919System.Type t = o.GetType(); 1980System.Type t = o.GetType(); 2041System.Type t = o.GetType(); 2102System.Type t = o.GetType(); 2172System.Type t = o.GetType(); 2234System.Type t = o.GetType(); 2303System.Type t = o.GetType(); 2439System.Type t = o.GetType(); 2502System.Type t = o.GetType(); 2563System.Type t = o.GetType(); 2623System.Type t = o.GetType(); 2682System.Type t = o.GetType(); 2760System.Type t = o.GetType(); 2817System.Type t = o.GetType(); 2933System.Type t = o.GetType(); 2982System.Type t = o.GetType(); 3023System.Type t = o.GetType(); 3072System.Type t = o.GetType(); 3122System.Type t = o.GetType(); 3185System.Type t = o.GetType(); 3224System.Type t = o.GetType(); 3330System.Type t = o.GetType(); 3372System.Type t = o.GetType(); 3414System.Type t = o.GetType(); 3456System.Type t = o.GetType(); 3498System.Type t = o.GetType(); 3540System.Type t = o.GetType(); 3582System.Type t = o.GetType(); 3624System.Type t = o.GetType(); 3666System.Type t = o.GetType(); 3708System.Type t = o.GetType(); 3750System.Type t = o.GetType(); 3792System.Type t = o.GetType(); 3834System.Type t = o.GetType(); 3928System.Type t = o.GetType(); 4052System.Type t = o.GetType(); 4094System.Type t = o.GetType(); 4170System.Type t = o.GetType(); 4208System.Type t = o.GetType(); 4248System.Type t = o.GetType(); 4297System.Type t = o.GetType(); 4375System.Type t = o.GetType(); 4430System.Type t = o.GetType(); 4521System.Type t = o.GetType(); 4612System.Type t = o.GetType(); 4666System.Type t = o.GetType(); 4800System.Type t = o.GetType(); 4866System.Type t = o.GetType(); 4906System.Type t = o.GetType(); 4972System.Type t = o.GetType(); 5010System.Type t = o.GetType(); 5049System.Type t = o.GetType(); 5125System.Type t = o.GetType();
FrameworkFork\System.Web.Services\Services\Description\WebReferenceOptions.cs (1)
231System.Type t = o.GetType();
FrameworkFork\System.Web.Services\Services\Description\XmlFormatExtensionAttribute.cs (18)
16private Type[] _types; 29public XmlFormatExtensionAttribute(string elementName, string ns, Type extensionPoint1) : this(elementName, ns, new Type[] { extensionPoint1 }) 33public XmlFormatExtensionAttribute(string elementName, string ns, Type extensionPoint1, Type extensionPoint2) : this(elementName, ns, new Type[] { extensionPoint1, extensionPoint2 }) 37public XmlFormatExtensionAttribute(string elementName, string ns, Type extensionPoint1, Type extensionPoint2, Type extensionPoint3) : this(elementName, ns, new Type[] { extensionPoint1, extensionPoint2, extensionPoint3 }) 41public XmlFormatExtensionAttribute(string elementName, string ns, Type extensionPoint1, Type extensionPoint2, Type extensionPoint3, Type extensionPoint4) : this(elementName, ns, new Type[] { extensionPoint1, extensionPoint2, extensionPoint3, extensionPoint4 }) 49public XmlFormatExtensionAttribute(string elementName, string ns, Type[] extensionPoints) 60public Type[] ExtensionPoints 62get { return _types == null ? new Type[0] : _types; }
ImportModule.cs (5)
169var importer1 = ServiceDescriptor.DefaultUseMessageFormat ? typeof(DataContractSerializerMessageContractImporter) : typeof(XmlSerializerMessageContractImporter); 170var importer2 = ServiceDescriptor.DefaultUseMessageFormat ? typeof(XmlSerializerMessageContractImporter) : typeof(DataContractSerializerMessageContractImporter); 319foreach (Type referencedType in options.ReferencedTypes) 321foreach (Type referencedCollectionType in options.ReferencedCollectionTypes) 364private static void RemoveExtension(Type extensionType, Collection<IWsdlImportExtension> wsdlImportExtensions)
Metadata\ServiceDescriptor.cs (4)
116Type type = assembly.GetType("Microsoft.Tools.ServiceModel.Svcutil.NamedPipeMetadataImporter"); 259Type wsdlImporterType = typeof(WsdlImporter); 261Type importerQuotasType = smAssembly.GetType("System.ServiceModel.Description.MetadataImporterQuotas", throwOnError: false, ignoreCase: true); 268new Type[4]
Shared\Options\OptionsSerializer.cs (2)
33public override bool CanConvert(Type objectType) 39public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Shared\Options\OptionValueParser.cs (4)
26var valueType = typeof(TValue); 94var valueType = value.GetType(); 178var valueType = value.GetType(); 225Type thisType = typeof(TValue);
Shared\ProjectPropertyResolver.cs (1)
52var projType = msbuildAssembly.GetType("Microsoft.Build.Evaluation.Project", true, false);
TypeLoader.cs (10)
38static public Type[] LoadTypes(Assembly assembly, Verbosity verbosity) 40List<Type> listType = new List<Type>(); 49listType.AddRange(Array.FindAll<Type>(rtle.Types, delegate (Type t) 94static private List<Type> GetUnAvailableTypes(List<Type> types) 96List<Type> unavailableTypes = new List<Type>(); 97foreach (Type type in types)
FormatterWebSite (4)
IModelConverter.cs (2)
11public override bool CanConvert(Type objectType) 16public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Models\InfinitelyRecursiveModel.cs (2)
15public override bool CanConvert(Type objectType) => objectType == typeof(RecursiveIdentifier); 17public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
GetDocument.Insider (15)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.6.24307.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (4)
97var programType = assembly?.EntryPoint?.DeclaringType; 190var hostType = host.GetType(); 352Type? publicHostAbortedExceptionType = Type.GetType("Microsoft.Extensions.Hosting.HostAbortedException, Microsoft.Extensions.Hosting.Abstractions", throwOnError: false);
Commands\GetDocumentCommandWorker.cs (11)
38private static readonly Type[] _getDocumentsParameterTypes = Type.EmptyTypes; 39private static readonly Type _getDocumentsReturnType = typeof(IEnumerable<string>); 42private static readonly Type[] _generateMethodParameterTypes = [typeof(string), typeof(TextWriter)]; 43private static readonly Type[] _generateWithVersionMethodParameterTypes = [typeof(string), typeof(TextWriter), typeof(OpenApiSpecVersion)]; 44private static readonly Type _generateMethodReturnType = typeof(Task); 59var entryPointType = assembly.EntryPoint?.DeclaringType; 193Type serviceType = null; 406private MethodInfo GetMethod(string methodName, Type type, Type[] parameterTypes, Type returnType)
HealthChecksSample (3)
Program.cs (3)
8private static readonly Dictionary<string, Type> _scenarios; 12_scenarios = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase) 39if (!_scenarios.TryGetValue(scenario, out var startupType))
IIS.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
illink (124)
ILLink.RoslynAnalyzer (103)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (103)
14 /// <see cref="System.Reflection.IntrospectionExtensions.GetTypeInfo(System.Type)"/> 18 /// <see cref="System.Type.GetTypeFromHandle(System.RuntimeTypeHandle)"/> 22 /// <see cref="System.Type.TypeHandle"/> 57 /// <see cref="System.Array.CreateInstance(System.Type, int)"/> 61 /// <see cref="System.Type.MakeGenericType(System.Type[])"/> 66 /// <item><see cref="System.Type.GetType(string)"/></item> 67 /// <item><see cref= "System.Type.GetType(string, bool)" /></item> 68 /// <item><see cref="System.Type.GetType(string, bool, bool)"/></item> 69 /// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?)"/></item> 70 /// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool)"/></item> 71 /// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool, bool)"/></item> 76 /// <item><see cref="System.Type.GetConstructor(System.Type[])"/></item> 77 /// <item><see cref="System.Type.GetConstructor(System.Reflection.BindingFlags, System.Type[])"/></item> 78 /// <item><see cref="System.Type.GetConstructor(System.Reflection.BindingFlags, System.Reflection.Binder?, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 79 /// <item><see cref="System.Type.GetConstructor(System.Reflection.BindingFlags, System.Reflection.Binder?, System.Reflection.CallingConventions, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 84 /// <see cref="System.Type.GetConstructors(System.Reflection.BindingFlags)"/> 88 /// <item><see cref="System.Type.GetMethod(string)"/></item> 89 /// <item><see cref="System.Type.GetMethod(string, System.Reflection.BindingFlags)"/></item> 90 /// <item><see cref="System.Type.GetMethod(string, System.Type[])"/></item> 91 /// <item><see cref="System.Type.GetMethod(string, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 92 /// <item><see cref="System.Type.GetMethod(string, System.Reflection.BindingFlags, System.Type[])"/></item> 93 /// <item><see cref="System.Type.GetMethod(string, System.Reflection.BindingFlags, System.Reflection.Binder, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 94 /// <item><see cref="System.Type.GetMethod(string, System.Reflection.BindingFlags, System.Reflection.Binder, System.Reflection.CallingConventions, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 95 /// <item><see cref="System.Type.GetMethod(string, int, System.Type[])"/></item> 96 /// <item><see cref="System.Type.GetMethod(string, int, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 97 /// <item><see cref="System.Type.GetMethod(string, int, System.Reflection.BindingFlags, System.Reflection.Binder?, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 98 /// <item><see cref="System.Type.GetMethod(string, int, System.Reflection.BindingFlags, System.Reflection.Binder?, System.Reflection.CallingConventions, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 103 /// <see cref="System.Type.GetMethod(System.Reflection.BindingFlags)"/> 108 /// <item><see cref="System.Type.GetField(string)"/></item> 109 /// <item><see cref="System.Type.GetField(string, System.Reflection.BindingFlags)"/></item> 114 /// <see cref="System.Type.GetFields(System.Reflection.BindingFlags)"/> 119 /// <item><see cref="System.Type.GetProperty(string)"/></item> 120 /// <item><see cref="System.Type.GetProperty(string, System.Reflection.BindingFlags)"/></item> 121 /// <item><see cref="System.Type.GetProperty(string, System.Type?)"/></item> 122 /// <item><see cref="System.Type.GetProperty(string, System.Type[])"/></item> 123 /// <item><see cref="System.Type.GetProperty(string, System.Type?, System.Type[])"/></item> 124 /// <item><see cref="System.Type.GetProperty(string, System.Type?, System.Type[], System.Reflection.ParameterModifier[])"/></item> 125 /// <item><see cref="System.Type.GetProperty(string, System.Reflection.BindingFlags, System.Reflection.Binder?, System.Type?, System.Type[], System.Reflection.ParameterModifier[]?)"/></item> 130 /// <see cref="System.Type.GetProperties(System.Reflection.BindingFlags)"/> 135 /// <item><see cref="System.Type.GetEvent(string)"/></item> 136 /// <item><see cref="System.Type.GetEvent(string, System.Reflection.BindingFlags)"/></item> 141 /// <see cref="System.Type.GetEvents(System.Reflection.BindingFlags)"/> 146 /// <item><see cref="System.Type.GetNestedType(string)"/></item> 147 /// <item><see cref="System.Type.GetNestedType(string, System.Reflection.BindingFlags)"/></item> 152 /// <see cref="System.Type.GetNestedTypes(System.Reflection.BindingFlags)"/> 157 /// <item><see cref="System.Type.GetMember(string)"/></item> 158 /// <item><see cref="System.Type.GetMember(string, System.Reflection.BindingFlags)"/></item> 159 /// <item><see cref="System.Type.GetMember(string, System.Reflection.MemberTypes, System.Reflection.BindingFlags)"/></item> 164 /// <see cref="System.Type.GetMembers(System.Reflection.BindingFlags)"/> 169 /// <item><see cref="System.Type.GetInterface(string)"/></item> 170 /// <item><see cref="System.Type.GetInterface(string, bool)"/></item> 175 /// <see cref="System.Type.AssemblyQualifiedName"/> 179 /// <see cref="System.Type.UnderlyingSystemType"/> 183 /// <see cref="System.Type.BaseType"/> 187 /// <see cref="System.Linq.Expressions.Expression.Call(System.Type, string, System.Type[]?, System.Linq.Expressions.Expression[]?))"/> 191 /// <see cref="System.Linq.Expressions.Expression.Field(System.Linq.Expressions.Expression?, System.Type, string)"/> 197 /// <item><see cref="System.Linq.Expressions.Expression.Property(System.Linq.Expressions.Expression?, System.Type, string)"/></item> 202 /// <see cref="System.Linq.Expressions.Expression.New(System.Type)"/> 206 /// <see cref="System.Enum.GetValues(System.Type)"/> 210 /// <see cref="System.Runtime.InteropServices.Marshal.SizeOf(System.Type)"/> 214 /// <see cref="System.Runtime.InteropServices.Marshal.OffsetOf(System.Type, string)"/> 218 /// <see cref="System.Runtime.InteropServices.Marshal.PtrToStructure(nint, System.Type)"/> 222 /// <see cref="System.Runtime.InteropServices.Marshal.DestroyStructure(nint, System.Type)"/> 226 /// <see cref="System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(nint, System.Type)"/> 230 /// <item><see cref="System.Activator.CreateInstance(System.Type)"/></item> 231 /// <item><see cref="System.Activator.CreateInstance(System.Type, bool)"/></item> 232 /// <item><see cref="System.Activator.CreateInstance(System.Type, object[])"/></item> 233 /// <item><see cref="System.Activator.CreateInstance(System.Type, object[], object[])"/></item> 234 /// <item><see cref="System.Activator.CreateInstance(System.Type, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo)"/></item> 235 /// <item><see cref="System.Activator.CreateInstance(System.Type, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item> 320 /// <see cref="System.Reflection.RuntimeReflectionExtensions.GetRuntimeEvent(System.Type, string)"/> 324 /// <see cref="System.Reflection.RuntimeReflectionExtensions.GetRuntimeField(System.Type, string)"/> 328 /// <see cref="System.Reflection.RuntimeReflectionExtensions.GetRuntimeMethod(System.Type, string, System.Type[])"/> 332 /// <see cref="System.Reflection.RuntimeReflectionExtensions.GetRuntimeProperty(System.Type, string)"/> 340 /// <see cref="System.Reflection.MethodInfo.MakeGenericMethod(System.Type[])"/> 344 /// <see cref="System.Nullable.GetUnderlyingType(System.Type)"/>
Infrastructure.Common (3)
xunit\ConditionAttribute.cs (3)
43Type testMethodDeclaringType = testMethodInfo.DeclaringType; 58Type declaringType = testMethodDeclaringType; 105internal static MethodInfo LookupConditionalMethod(Type t, string name)
InMemory.FunctionalTests (38)
Http3\Http3TestBase.cs (1)
137public void AssertExpectedErrorMessages(Type exceptionType, string[] expectedErrorMessage)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
142internal async Task WaitForConnectionErrorAsync<TException>(bool ignoreNonGoAwayFrames, long? expectedLastStreamId, Http3ErrorCode expectedErrorCode, Action<Type, string[]> matchExpectedErrorMessage = null, params string[] expectedErrorMessage) 175private void AssertConnectionError<TException>(Http3ErrorCode expectedErrorCode, Action<Type, string[]> matchExpectedErrorMessage = null, params string[] expectedErrorMessage) where TException : Exception
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (2)
23public List<Type> IgnoredExceptions { get; } = new List<Type>();
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
32public List<Type> IgnoredCriticalLogExceptions => TestApplicationErrorLogger.IgnoredExceptions;
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (23)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 70private object? ExtraFeatureGet(Type key) 87private void ExtraFeatureSet(Type key, object? value) 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 126object? IFeatureCollection.this[Type key] 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature); 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
src\Shared\TypeNameHelper\TypeNameHelper.cs (9)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 46/// <param name="type">The <see cref="Type"/>.</param> 52public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 59private static void ProcessType(StringBuilder builder, Type type, in DisplayNameOptions options) 93private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 95var innerType = type; 112private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\TestStartup.cs (1)
19var type = startup.GetType();
KeyManagementSimulator (3)
Program.cs (3)
269object IActivator.CreateInstance(Type type, string _friendlyName) => type switch 271Type t when t == typeof(IXmlDecryptor) => decryptor, 272Type t when t == typeof(IAuthenticatedEncryptorDescriptorDeserializer) => descriptorDeserializer,
Microsoft.Arcade.Common (1)
MSBuildTaskBase.cs (1)
68public Type[] GetExecuteParameterTypes()
Microsoft.Arcade.Test.Common (2)
AssertEx.cs (2)
29var type = typeof(T); 376var type = ex.GetType();
Microsoft.AspNetCore (1)
ConfigureWebHostBuilder.cs (1)
176IWebHostBuilder ISupportsStartup.UseStartup([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType)
Microsoft.AspNetCore.Analyzer.Testing (1)
DiagnosticProject.cs (1)
31public static Project Create(Assembly testAssembly, string[] sources, Func<Workspace> workspaceFactory = null, Type analyzerReference = null)
Microsoft.AspNetCore.App.Analyzers.Test (3)
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (3)
61private (Type exportType, Type metadataType) GetContractType(Type contractType, bool importMany)
Microsoft.AspNetCore.Authentication (1)
AuthenticationSchemeOptions.cs (1)
38public Type? EventsType { get; set; }
Microsoft.AspNetCore.Authentication.Abstractions (3)
AuthenticationScheme.cs (2)
20public AuthenticationScheme(string name, string? displayName, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type handlerType) 48public Type HandlerType { get; }
AuthenticationSchemeBuilder.cs (1)
36public Type? HandlerType { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
LoggingExtensions.cs (1)
172public static partial void InvalidSecurityTokenTypeFromHandler(this ILogger logger, Type? securityTokenType);
Microsoft.AspNetCore.Authentication.Test (24)
BearerTokenTests.cs (1)
12protected override Type HandlerType
CookieTests.cs (1)
28protected override Type HandlerType => typeof(CookieAuthenticationHandler);
FacebookTests.cs (1)
25protected override Type HandlerType => typeof(FacebookHandler);
GoogleTests.cs (1)
25protected override Type HandlerType => typeof(GoogleHandler);
JwtBearerTests.cs (8)
30protected override Type HandlerType => typeof(JwtBearerHandler); 306public async Task ExceptionReportedInHeaderForAuthenticationFailures(Type errorType, string message) 330public async Task ExceptionReportedInHeaderWithDetailsForAuthenticationFailures(Type errorType, string message) 350public async Task ExceptionNotReportedInHeaderForOtherFailures(Type errorType) 1020public InvalidTokenValidator(Type exceptionType) 1025public Type ExceptionType { get; set; } 1052public DetailedInvalidTokenValidator(Type exceptionType) 1057public Type ExceptionType { get; set; }
JwtBearerTests_Handler.cs (8)
30protected override Type HandlerType => typeof(JwtBearerHandler); 297public async Task ExceptionReportedInHeaderForAuthenticationFailures(Type errorType, string message) 318public async Task ExceptionReportedInHeaderWithDetailsForAuthenticationFailures(Type errorType, string message) 335public async Task ExceptionNotReportedInHeaderForOtherFailures(Type errorType) 1068public InvalidTokenValidator(Type exceptionType) 1073public Type ExceptionType { get; set; } 1095public DetailedInvalidTokenValidator(Type exceptionType) 1100public Type ExceptionType { get; set; }
MicrosoftAccountTests.cs (1)
26protected override Type HandlerType => typeof(MicrosoftAccountHandler);
OAuthTests.cs (1)
21protected override Type HandlerType => typeof(OAuthHandler<OAuthOptions>);
SharedAuthenticationTests.cs (1)
19protected abstract Type HandlerType { get; }
TwitterTests.cs (1)
24protected override Type HandlerType => typeof(TwitterHandler);
Microsoft.AspNetCore.Components (122)
BindConverter.cs (8)
1668private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>(); 1778else if (typeof(T).IsEnum || Nullable.GetUnderlyingType(typeof(T)) is Type { IsEnum: true } innerType) 1785var elementType = typeof(T).GetElementType()!; 1853private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>(); 1979else if (Nullable.GetUnderlyingType(typeof(T)) is Type innerType && innerType.IsEnum) 1988var elementType = typeof(T).GetElementType()!;
CascadingParameterInfo.cs (2)
24public Type PropertyType { get; } 26internal CascadingParameterInfo(CascadingParameterAttributeBase attribute, string propertyName, Type propertyType)
CascadingParameterState.cs (4)
17private static readonly ConcurrentDictionary<Type, CascadingParameterInfo[]> _cachedInfos = new(); 30var componentType = componentState.Component.GetType(); 105[DynamicallyAccessedMembers(Component)] Type componentType) 117[DynamicallyAccessedMembers(Component)] Type componentType)
ChangeDetection.cs (4)
18var oldValueType = oldValue!.GetType(); 19var newValueType = newValue!.GetType(); 42private static bool IsKnownImmutableType(Type type) 43=> Type.GetTypeCode(type) != TypeCode.Object
ComponentFactory.cs (5)
19private static readonly ConcurrentDictionary<Type, ComponentTypeInfoCacheEntry> _cachedComponentTypeInfo = new(); 32private static ComponentTypeInfoCacheEntry GetComponentTypeInfo([DynamicallyAccessedMembers(Component)] Type componentType) 49public IComponent InstantiateComponent(IServiceProvider serviceProvider, [DynamicallyAccessedMembers(Component)] Type componentType, IComponentRenderMode? callerSpecifiedRenderMode, int? parentComponentId) 100private static Action<IServiceProvider, IComponent> CreatePropertyInjector([DynamicallyAccessedMembers(Component)] Type type) 103List<(string name, Type propertyType, PropertySetter setter, object? serviceKey)>? injectables = null;
DefaultComponentActivator.cs (4)
12private static readonly ConcurrentDictionary<Type, ObjectFactory> _cachedComponentTypeInfo = new(); 17public IComponent CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type componentType) 29private static ObjectFactory GetObjectFactory([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type componentType) 36factory = ActivatorUtilities.CreateFactory(componentType, Type.EmptyTypes);
DynamicComponent.cs (2)
33public Type Type { get; set; } = default!; 71Type = (Type)entry.Value;
EventHandlerAttribute.cs (3)
17public EventHandlerAttribute(string attributeName, Type eventArgsType) : this(attributeName, eventArgsType, false, false) 28public EventHandlerAttribute(string attributeName, Type eventArgsType, bool enableStopPropagation, bool enablePreventDefault) 47public Type EventArgsType { get; }
IComponentActivator.cs (1)
20IComponent CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type componentType);
LayoutAttribute.cs (2)
19public LayoutAttribute([DynamicallyAccessedMembers(Component)] Type layoutType) 39public Type LayoutType { get; private set; }
LayoutView.cs (5)
33public Type Layout { get; set; } = default!; 57var layoutType = Layout; 67private static RenderFragment WrapInLayout([DynamicallyAccessedMembers(Component)] Type layoutType, RenderFragment bodyParam) 79private static Type? GetParentLayoutType(Type type)
NavigationManagerExtensions.cs (5)
26private static readonly Dictionary<Type, QueryParameterFormatter<object>> _queryParameterFormatters = new() 222var valueType = value.GetType(); 227var elementType = valueType.GetElementType()!; 717private static QueryParameterFormatter<object> GetFormatterFromParameterValueType(Type parameterValueType) 719var underlyingParameterValueType = Nullable.GetUnderlyingType(parameterValueType) ?? parameterValueType;
Reflection\ComponentProperties.cs (11)
19private static readonly ConcurrentDictionary<Type, WritersForType> _cachedWritersByType 20= new ConcurrentDictionary<Type, WritersForType>(); 28var targetType = target.GetType(); 178internal static IEnumerable<PropertyInfo> GetCandidateBindableProperties([DynamicallyAccessedMembers(Component)] Type targetType) 182private static void ThrowForUnknownIncomingParameterName([DynamicallyAccessedMembers(Component)] Type targetType, 213private static void ThrowForSettingCascadingParameterWithNonCascadingValue(Type targetType, string parameterName) 221private static void ThrowForSettingParameterWithCascadingValue(Type targetType, string parameterName) 229private static void ThrowForCaptureUnmatchedValuesConflict(Type targetType, string parameterName, Dictionary<string, object> unmatched) 238private static void ThrowForMultipleCaptureUnmatchedValuesParameters([DynamicallyAccessedMembers(Component)] Type targetType) 259private static void ThrowForInvalidCaptureUnmatchedValuesParameterType(Type targetType, PropertyInfo propertyInfo) 273public WritersForType([DynamicallyAccessedMembers(Component)] Type targetType)
Reflection\MemberAssignment.cs (2)
14[DynamicallyAccessedMembers(Component)] Type type, 19Type? currentType = type;
Reflection\PropertySetter.cs (1)
21public PropertySetter(Type targetType, PropertyInfo property)
Rendering\RenderTreeBuilder.cs (2)
498public void OpenComponent(int sequence, [DynamicallyAccessedMembers(Component)] Type componentType) 554private void OpenComponentUnchecked(int sequence, [DynamicallyAccessedMembers(Component)] Type componentType)
RenderTree\EventArgsTypeCache.cs (4)
11private static readonly ConcurrentDictionary<MethodInfo, Type> Cache = new ConcurrentDictionary<MethodInfo, Type>(); 13public static Type GetEventArgsType(MethodInfo methodInfo) 28var declaredType = parameterInfos[0].ParameterType;
RenderTree\Renderer.cs (4)
196protected IComponent InstantiateComponent([DynamicallyAccessedMembers(Component)] Type componentType) 314internal Type GetRootComponentType(int componentId) 506public Type GetEventArgsType(ulong eventHandlerId) 1252[DynamicallyAccessedMembers(Component)] Type componentType,
RenderTree\Renderer.Log.cs (5)
14private static partial void InitializingChildComponent(ILogger logger, int componentId, Type componentType, int parentComponentId, Type parentComponentType); 17private static partial void InitializingRootComponent(ILogger logger, int componentId, Type componentType); 35private static partial void RenderingComponent(ILogger logger, int componentId, Type componentType); 46private static partial void DisposingComponent(ILogger logger, int componentId, Type componentType);
RenderTree\RenderTreeFrame.cs (4)
144internal Type ComponentTypeField; 171public Type ComponentType => ComponentTypeField; 316private RenderTreeFrame(int sequence, int componentSubtreeLength, [DynamicallyAccessedMembers(LinkerFlags.Component)] Type componentType, ComponentState componentState, object componentKey) 402internal static RenderTreeFrame ChildComponent(int sequence, [DynamicallyAccessedMembers(LinkerFlags.Component)] Type componentType)
RenderTree\RenderTreeFrameArrayBuilder.cs (1)
78public void AppendComponent(int sequence, [DynamicallyAccessedMembers(Component)] Type componentType)
RouteView.cs (4)
21private static readonly ConcurrentDictionary<Type, Type?> _layoutAttributeCache = new(); 48public Type DefaultLayout { get; set; } 78var pageLayoutType = _layoutAttributeCache
Routing\QueryParameterValueSupplier.cs (2)
30public object? GetQueryParameterValue(Type targetType, string queryParameterName) 33var elementType = isArray ? targetType.GetElementType()! : targetType;
Routing\RouteContext.cs (1)
49public Type? Handler => Entry?.Handler;
Routing\RouteData.cs (2)
20public RouteData([DynamicallyAccessedMembers(Component)] Type pageType, IReadOnlyDictionary<string, object?> routeValues) 37public Type PageType { get; }
Routing\Router.cs (1)
344internal static partial void NavigatingToComponent(ILogger logger, Type componentType, string path, string baseUri);
Routing\RouteTable.cs (2)
14private static readonly ConcurrentDictionary<(Type, string), InboundRouteEntry> _routeEntryCache = new(); 28((Type page, string template) key) => RouteTableFactory.CreateEntry(key.page, key.template));
Routing\RouteTableFactory.cs (10)
50private static List<Type> GetRouteableComponents(RouteKey routeKey) 52var routeableComponents = new List<Type>(); 72static void GetRouteableComponents(List<Type> routeableComponents, Assembly assembly) 74foreach (var type in assembly.ExportedTypes) 86internal static RouteTable Create(List<Type> componentTypes, IServiceProvider serviceProvider) 88var templatesByHandler = new Dictionary<Type, string[]>(); 89foreach (var componentType in componentTypes) 102private static string[] GetTemplates(Type componentType) 116internal static RouteTable Create(Dictionary<Type, string[]> templatesByHandler, IServiceProvider serviceProvider) 170internal static InboundRouteEntry CreateEntry([DynamicallyAccessedMembers(Component)] Type pageType, string template)
Routing\UrlValueConstraint.cs (3)
17private static readonly ConcurrentDictionary<Type, UrlValueConstraint> _cachedInstances = new(); 19public static bool TryGetByTargetType(Type targetType, [MaybeNullWhen(false)] out UrlValueConstraint result) 65private static UrlValueConstraint? Create(Type targetType) => targetType switch
src\Components\Shared\src\HotReloadManager.cs (1)
27public static void UpdateApplication(Type[]? _) => Default.OnDeltaApplied?.Invoke();
src\Http\Routing\src\DefaultInlineConstraintResolver.cs (1)
21private readonly IDictionary<string, Type> _inlineConstraintMap;
src\Http\Routing\src\ParameterPolicyActivator.cs (7)
18IDictionary<string, Type> inlineParameterPolicyMap, 32out var parameterPolicyType)) 70IDictionary<string, Type> inlineParameterPolicyMap, 74[NotNullWhen(true)] out Type? policyType) 97private static IParameterPolicy CreateParameterPolicy(IServiceProvider? serviceProvider, Type parameterPolicyType, string? argumentString) 159private static ConstructorInfo GetLongestConstructor(List<ConstructorInfo> constructors, Type parameterPolicyType) 218var parameterType = parameter.ParameterType;
src\Http\Routing\src\RouteOptions.cs (7)
23private IDictionary<string, Type> _constraintTypeMap = GetDefaultConstraintMap(); 81public IDictionary<string, Type> ConstraintMap 100internal IDictionary<string, Type> TrimmerSafeConstraintMap => _constraintTypeMap; 102private static IDictionary<string, Type> GetDefaultConstraintMap() 104var defaults = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 163public void SetParameterPolicy(string token, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) 173private static void AddConstraint<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TConstraint>(Dictionary<string, Type> constraintMap, string text) where TConstraint : IRouteConstraint
src\Http\Routing\src\Tree\InboundRouteEntry.cs (1)
44public Type Handler { get; set; }
src\Http\Routing\src\Tree\TreeRouteBuilder.cs (1)
86[DynamicallyAccessedMembers(Component)] Type handler,
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Verifiers\DiagnosticVerifier.cs (1)
244var analyzerType = analyzer.GetType();
Microsoft.AspNetCore.Components.Authorization (3)
AttributeAuthorizeDataCache.cs (3)
11private static readonly ConcurrentDictionary<Type, IAuthorizeData[]?> _cache = new(); 13public static IAuthorizeData[]? GetAuthorizeDataForType(Type type) 24private static IAuthorizeData[]? ComputeAuthorizeDataForType(Type type)
Microsoft.AspNetCore.Components.Authorization.Tests (7)
src\Components\Shared\test\AssertFrame.cs (1)
67public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null)
src\Components\Shared\test\TestServiceProvider.cs (6)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 14private Dictionary<(Type, object?), Func<object?>>? _keyedFactories; 16private Dictionary<(Type, object?), Func<object?>> KeyedFactories 25public object? GetService(Type serviceType) 30public object? GetKeyedService(Type serviceType, object? serviceKey) 41public object GetRequiredKeyedService(Type serviceType, object? serviceKey)
Microsoft.AspNetCore.Components.Endpoints (224)
Builder\ComponentTypeMetadata.cs (2)
18public ComponentTypeMetadata([DynamicallyAccessedMembers(Component)] Type componentType) 27public Type Type { get; }
Builder\RazorComponentEndpointDataSource.cs (1)
156public void OnHotReloadClearCache(Type[]? types)
Builder\RazorComponentEndpointFactory.cs (1)
24[DynamicallyAccessedMembers(Component)] Type rootComponent,
Builder\RazorComponentsEndpointHttpContextExtensions.cs (3)
20private static readonly ConcurrentDictionary<Type, bool> AcceptsInteractiveRoutingCache = new(); 33var pageType = context.GetEndpoint()?.Metadata.GetMetadata<ComponentTypeMetadata>()?.Type; 46public static void ClearCache(Type[]? _)
Builder\RenderModeEndpointProvider.cs (1)
36[DynamicallyAccessedMembers(Component)] Type rootComponent,
Builder\RootComponentMetadata.cs (2)
18public RootComponentMetadata([DynamicallyAccessedMembers(Component)] Type rootComponentType) 27public Type Type { get; }
DependencyInjection\HotReloadService.cs (5)
20private static event Action<Type[]?>? UpdateApplicationEvent; 21internal static event Action<Type[]?>? ClearCacheEvent; 27public static void UpdateApplication(Type[]? changedTypes) 32public static void ClearCache(Type[]? types) 37private void NotifyUpdateApplication(Type[]? changedTypes)
DependencyInjection\IComponentPrerenderer.cs (2)
26[DynamicallyAccessedMembers(Component)] Type componentType, 41/// Gets a <see cref="Dispatcher"/> that should be used for calls to <see cref="PrerenderComponentAsync(HttpContext, Type, IComponentRenderMode, ParameterView)"/>.
DependencyInjection\ServerComponentSerializer.cs (2)
19public void SerializeInvocation(ref ComponentMarker marker, ServerComponentInvocationSequence invocationId, Type type, ParameterView parameters) 27Type rootComponent,
DependencyInjection\WebAssemblyComponentSerializer.cs (1)
11public static void SerializeInvocation(ref ComponentMarker marker, Type type, ParameterView parameters)
Discovery\ComponentBuilder.cs (1)
37EqualityComparer<Type>.Default.Equals(ComponentType, other.ComponentType);
Discovery\ComponentInfo.cs (4)
20/// <param name="componentType">The component <see cref="Type"/>.</param> 21public ComponentInfo(Type componentType) 28/// Gets the component <see cref="Type"/>. 30public Type ComponentType { get; }
Discovery\IRazorComponentApplication.cs (1)
28var candidate = exported[i];
Discovery\PageCollectionBuilder.cs (1)
78private static void ResolveMetadata(Type componentType, List<object> result)
Discovery\PageComponentBuilder.cs (1)
65EqualityComparer<Type>.Default.Equals(PageType, other.PageType);
Discovery\PageComponentInfo.cs (3)
20/// <param name="type">The page <see cref="System.Type"/>.</param> 25[DynamicallyAccessedMembers(Component)] Type type, 44public Type Type { get; }
FormMapping\Converters\CollectionConverter.cs (2)
27private static readonly Type _elementType = typeof(TElement); 55Type type,
FormMapping\Converters\CompiledComplexTypeConverter.cs (2)
10public delegate bool ConverterDelegate(ref FormDataReader reader, Type type, FormDataMapperOptions options, out T? result, out bool found); 14internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out T? result, out bool found)
FormMapping\Converters\DictionaryConverter.cs (2)
19private static readonly Type _elementType = typeof(TValue); 31Type type,
FormMapping\Converters\EnumConverter.cs (1)
30internal override bool TryRead(ref FormDataReader reader, Type type, FormDataMapperOptions options, out TEnum result, out bool found)
FormMapping\Converters\FileConverter.cs (1)
16internal override bool TryRead(ref FormDataReader reader, Type type, FormDataMapperOptions options, out T? result, out bool found)
FormMapping\Converters\NullableConverter.cs (1)
33internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out T? result, out bool found)
FormMapping\Converters\ParsableConverter.cs (1)
30internal override bool TryRead(ref FormDataReader reader, Type type, FormDataMapperOptions options, out T? result, out bool found)
FormMapping\Converters\UriFormDataConverter.cs (1)
32internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out Uri? result, out bool found)
FormMapping\Factories\CollectionConverterFactory.cs (8)
15public bool CanConvert(Type type, FormDataMapperOptions options) 17var element = ResolveElementType(type); 34public static Type? ResolveElementType(Type type) 36var enumerable = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IEnumerable<>)); 47public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 55var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IEnumerable<>)); 56var elementType = enumerableType?.GetGenericArguments()[0];
FormMapping\Factories\Collections\ConcreteTypeCollectionConverterFactory.cs (2)
16public bool CanConvert(Type _, FormDataMapperOptions options) => true; 20public FormDataConverter CreateConverter(Type _, FormDataMapperOptions options)
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (7)
15public abstract bool CanConvert(Type type, FormDataMapperOptions options); 19public abstract FormDataConverter CreateConverter(Type type, FormDataMapperOptions options); 26public override bool CanConvert(Type _, FormDataMapperOptions options) 35var type = typeof(TCollection); 65var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) && type.GetConstructor(Type.EmptyTypes) != null => true, 111public override FormDataConverter CreateConverter(Type _, FormDataMapperOptions options) 118var type = typeof(TCollection);
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactory.cs (1)
12internal abstract FormDataConverter CreateConverter(Type type, FormDataMapperOptions options);
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (20)
16internal override CompiledComplexTypeConverter<T> CreateConverter(Type type, FormDataMapperOptions options) 24private CompiledComplexTypeConverter<T>.ConverterDelegate CreateConverterBody(Type type, FormDataMapperOptions options) 159Array.Empty<Type>(), 185Array.Empty<Type>(), 287Array.Empty<Type>(), 297Array.Empty<Type>(), 304Array.Empty<Type>(), 314Array.Empty<Type>(), 343var propertyConverterType = typeof(FormDataConverter<>).MakeGenericType(property.Type); 379Array.Empty<Type>(), 388Type.EmptyTypes, 398Array.Empty<Type>(), 406Array.Empty<Type>(), 443var constructorParameterConverterType = typeof(FormDataConverter<>).MakeGenericType(constructorParameter.Type); 483Array.Empty<Type>(), 491Type.EmptyTypes, 501Array.Empty<Type>(), 509Array.Empty<Type>(), 552Expression.Not(Expression.Call(readerParam, nameof(FormDataReader.CurrentPrefixExists), Array.Empty<Type>())), 575Expression.Parameter(typeof(Type), "type"),
FormMapping\Factories\ComplexTypeConverterFactory.cs (2)
18public bool CanConvert(Type type, FormDataMapperOptions options) 99public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
FormMapping\Factories\Dictionary\ConcreteTypeDictionaryConverterFactory.cs (2)
15public bool CanConvert(Type type, FormDataMapperOptions options) => true; 19public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (4)
16public bool CanConvert(Type type, FormDataMapperOptions options) 61var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null => true, 71public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 143var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null =>
FormMapping\Factories\DictionaryConverterFactory.cs (13)
15public bool CanConvert(Type type, FormDataMapperOptions options) 42internal static (Type keyType, Type valueType) ResolveDictionaryTypes(Type type) 46var dictionaryType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IDictionary<,>)) ?? 55var keyType = dictionaryType.GetGenericArguments()[0]; 61var parsableKeyType = ClosedGenericMatcher.ExtractGenericInterface(keyType, typeof(IParsable<>)); 67var valueType = dictionaryType.GetGenericArguments()[1]; 73public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 77var dictionaryType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IDictionary<,>)) ?? 85var keyType = dictionaryType?.GetGenericArguments()[0]; 91var parsableKeyType = ClosedGenericMatcher.ExtractGenericInterface(keyType, typeof(IParsable<>)); 98var valueType = dictionaryType?.GetGenericArguments()[1];
FormMapping\Factories\EnumConverterFactory.cs (2)
12public bool CanConvert(Type type, FormDataMapperOptions options) => type.IsEnum; 16public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
FormMapping\Factories\FileConverterFactory.cs (3)
17public bool CanConvert(Type type, FormDataMapperOptions options) => CanConvertCommon(type) || type == typeof(IBrowserFile) || type == typeof(IReadOnlyList<IBrowserFile>); 22private static bool CanConvertCommon(Type type) => type == typeof(IFormFile) || type == typeof(IFormFileCollection) || type == typeof(IReadOnlyList<IFormFile>); 26public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
FormMapping\Factories\NullableConverterFactory.cs (5)
15public bool CanConvert(Type type, FormDataMapperOptions options) 17var underlyingType = Nullable.GetUnderlyingType(type); 23public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 25var underlyingType = Nullable.GetUnderlyingType(type); 31var expectedConverterType = typeof(NullableConverter<>).MakeGenericType(underlyingType);
FormMapping\Factories\ParsableConverterFactory.cs (2)
15public bool CanConvert(Type type, FormDataMapperOptions options) 22public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
FormMapping\FormDataConverterOfT.cs (1)
12internal abstract bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out T? result, out bool found);
FormMapping\FormDataMapper.cs (1)
46public static partial void CannotResolveConverter(ILogger logger, Type type, Exception? ex);
FormMapping\FormDataMapperOptions.cs (4)
14private readonly ConcurrentDictionary<Type, FormDataConverter> _converters = new(); 60private static FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 75internal FormDataConverter ResolveConverter(Type type) 90internal bool CanConvert(Type type)
FormMapping\HttpContextFormValueMapper.cs (3)
21private static readonly ConcurrentDictionary<Type, FormValueSupplier> _cache = new(); 31public bool CanMap(Type valueType, string scopeName, string? formName) 92private FormValueSupplier CreateDeserializer(Type type) =>
FormMapping\IFormDataConverterFactory.cs (2)
12public bool CanConvert(Type type, FormDataMapperOptions options); 16public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options);
FormMapping\Metadata\FormDataMetadataFactory.cs (31)
26public FormDataTypeMetadata? GetOrCreateMetadataFor(Type type, FormDataMapperOptions options) 267internal bool HasMetadataFor(Type type) => _context.TypeMetadata.ContainsKey(type); 269private void DetectCyclesAndMarkMetadataTypesAsRecursive(Type type, FormDataTypeMetadata result) 303void ReportRecursiveChain(Type type) 315public Dictionary<Type, FormDataTypeMetadata> TypeMetadata { get; set; } = new(); 317public List<Type> CurrentTypes { get; set; } = new(); 340internal void Track(Type type) 345internal void Untrack(Type type) 354public static partial void StartResolveMetadataGraph(ILogger logger, Type type); 357public static partial void EndResolveMetadataGraph(ILogger logger, Type type); 360public static partial void MetadataFound(ILogger<FormDataMetadataFactory> logger, Type type); 363public static partial void NoMetadataFound(ILogger<FormDataMetadataFactory> logger, Type type); 366public static partial void RecursiveTypeFound(ILogger<FormDataMetadataFactory> logger, Type type, string chain); 369public static partial void PrimitiveType(ILogger<FormDataMetadataFactory> logger, Type type); 372public static partial void DictionaryType(ILogger<FormDataMetadataFactory> logger, Type type); 375public static partial void CollectionType(ILogger<FormDataMetadataFactory> logger, Type type); 378public static partial void ObjectType(ILogger<FormDataMetadataFactory> logger, Type type); 381public static partial void ConstructorFound(ILogger<FormDataMetadataFactory> logger, Type type, string parameters); 384public static partial void ConstructorParameter(ILogger<FormDataMetadataFactory> logger, Type type, string name, Type parameterType); 387public static partial void CandidateProperty(ILogger<FormDataMetadataFactory> logger, string name, Type propertyType); 405public static partial void MetadataComputed(ILogger<FormDataMetadataFactory> logger, Type type); 408public static partial void GenericTypeDefinitionNotSupported(ILogger<FormDataMetadataFactory> logger, Type type); 411public static partial void MultiplePublicConstructorsFound(ILogger<FormDataMetadataFactory> logger, Type type); 414public static partial void InterfacesNotSupported(ILogger<FormDataMetadataFactory> logger, Type type); 417public static partial void AbstractClassesNotSupported(ILogger<FormDataMetadataFactory> logger, Type type); 420public static partial void NoPublicConstructorFound(ILogger<FormDataMetadataFactory> logger, Type type); 423public static partial void ConstructorParameterTypeNotSupported(ILogger<FormDataMetadataFactory> logger, Type type, string name, Type parameterType); 426public static partial void PropertyTypeNotSupported(ILogger<FormDataMetadataFactory> logger, Type type, string name, Type propertyType);
FormMapping\Metadata\FormDataParameterMetadata.cs (2)
11public Type Type { get; set; } = parameter.ParameterType; 22public Type Type { get; }
FormMapping\Metadata\FormDataPropertyMetadata.cs (1)
15public Type Type => property.PropertyType;
FormMapping\Metadata\FormDataTypeMetadata.cs (2)
8internal class FormDataTypeMetadata(Type type) 12public Type Type { get; set; } = type;
FormMapping\WellKnownConverters.cs (2)
13public static readonly IReadOnlyDictionary<Type, FormDataConverter> Converters; 19var converters = new Dictionary<Type, FormDataConverter>
RazorComponentEndpointHost.cs (2)
26public Type ComponentType { get; set; } = default!; 43var pageLayoutType = ComponentType.GetCustomAttribute<LayoutAttribute>()?.LayoutType;
RazorComponentEndpointInvoker.cs (2)
49var rootComponent = endpoint.Metadata.GetRequiredMetadata<RootComponentMetadata>().Type; 50var pageComponent = endpoint.Metadata.GetRequiredMetadata<ComponentTypeMetadata>().Type;
Rendering\EndpointComponentState.cs (2)
17private static readonly ConcurrentDictionary<Type, StreamRenderingAttribute?> _streamRenderingAttributeByComponentType = new(); 41public static void UpdateApplication(Type[]? _) => _streamRenderingAttributeByComponentType.Clear();
Rendering\EndpointHtmlRenderer.cs (1)
74[DynamicallyAccessedMembers(Component)] Type? componentType = null,
Rendering\EndpointHtmlRenderer.Prerendering.cs (4)
18protected override IComponent ResolveComponentForRenderMode([DynamicallyAccessedMembers(Component)] Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode) 86[DynamicallyAccessedMembers(Component)] Type componentType, 93[DynamicallyAccessedMembers(Component)] Type componentType, 134[DynamicallyAccessedMembers(Component)] Type rootComponentType,
Rendering\SSRRenderModeBoundary.cs (6)
23private static readonly ConcurrentDictionary<Type, string> _componentTypeNameHashCache = new(); 26private readonly Type _componentType; 36[DynamicallyAccessedMembers(Component)] Type componentType, 52private static void AssertRenderModeIsConfigured(HttpContext httpContext, Type componentType, IComponentRenderMode renderMode) 78private static void AssertRenderModeIsConfigured<TRequiredMode>(Type componentType, IComponentRenderMode specifiedMode, IComponentRenderMode[] configuredModes, string expectedCall) where TRequiredMode : IComponentRenderMode 125var valueType = value.GetType();
Rendering\TypeNameHash.cs (2)
14public static string Compute(Type type) 18throw new InvalidOperationException($"Cannot compute a hash for a type without a {nameof(Type.FullName)}.");
Results\RazorComponentResult.cs (4)
25public RazorComponentResult([DynamicallyAccessedMembers(Component)] Type componentType) 36[DynamicallyAccessedMembers(Component)] Type componentType, 48[DynamicallyAccessedMembers(Component)] Type componentType, 68public Type ComponentType { get; }
Results\RazorComponentResultExecutor.cs (1)
43[DynamicallyAccessedMembers(Component)] Type componentType,
src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (16)
19/// Determine whether <paramref name="queryType"/> is or implements a closed generic <see cref="Type"/> 22/// <param name="queryType">The <see cref="Type"/> of interest.</param> 23/// <param name="interfaceType">The open generic <see cref="Type"/> to match. Usually an interface.</param> 25/// The closed generic <see cref="Type"/> created from <paramref name="interfaceType"/> that 26/// <paramref name="queryType"/> is or implements. <c>null</c> if the two <see cref="Type"/>s have no such 34public static Type? ExtractGenericInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 59private static bool IsGenericInstantiation(Type candidate, Type interfaceType) 66private static Type? GetGenericInstantiation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 68Type? bestMatch = null; 70foreach (var @interface in interfaces) 96var baseType = queryType?.BaseType;
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
src\Shared\PropertyHelper\PropertyHelper.cs (21)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 50/// This constructor does not cache the helper. For caching, use <see cref="GetProperties(Type)"/>. 123[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 144[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 244Type openGenericDelegateType, 248var typeInput = propertyGetMethod.DeclaringType!; 249var typeOutput = propertyGetMethod.ReturnType; 251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 290var typeInput = setMethod.DeclaringType!; 291var parameterType = parameters[0].ParameterType; 412Type type, 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 444var declaringType = propertyHelper.Property.DeclaringType; 457Type? currentType = type; 493Type type, 494ConcurrentDictionary<Type, PropertyHelper[]>? cache) 509foreach (var @interface in type.GetInterfaces()) 523[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 562public static void ClearCache(Type[]? _)
Microsoft.AspNetCore.Components.Endpoints.Tests (41)
Binding\FormDataMapperTests.cs (15)
23public void CanDeserialize_PrimitiveTypes(string value, Type type, object expected) 93public void PrimitiveTypes_MissingValues_DoNotAddErrors(string _, Type type, object __) 159public void CanDeserialize_NullablePrimitiveTypes(string value, Type type, object expected) 176public void CanDeserialize_NullValues(Type type) 520elementConverter.OnTryReadDelegate = (ref FormDataReader context, Type type, FormDataMapperOptions options, out int result, out bool found) => 2096public static TheoryData<string, Type, object> NullableBasicTypes 2100var result = new TheoryData<string, Type, object> 2138public static TheoryData<Type> NullNullableBasicTypes 2142var result = new TheoryData<Type> 2180public static TheoryData<string, Type, object> PrimitiveTypesData 2184var result = new TheoryData<string, Type, object> 2223private object CallDeserialize(FormDataReader reader, FormDataMapperOptions options, Type type) 2521internal delegate bool OnTryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out int result, out bool found); 2524(ref FormDataReader context, Type type, FormDataMapperOptions options, out int result, out bool found) => 2527internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out int result, out bool found) =>
HotReloadServiceTests.cs (3)
188private ComponentApplicationBuilder CreateBuilder(params Type[] types) 204private IServiceProvider CreateServices(params Type[] types) 207foreach (var type in types)
RazorComponentEndpointDataSourceTest.cs (12)
41public static TheoryData<IComponentRenderMode[], Type[], Type[], string[]> ConfiguredAndDiscoveredRenderModes => 133public static TheoryData<IComponentRenderMode[], Type[], Type[]> SetRenderModesFailures => 139Array.Empty<Type>(), 158Array.Empty<Type>(), 171Array.Empty<Type>() 177Array.Empty<Type>(), 192Array.Empty<Type>() 196private ComponentApplicationBuilder CreateBuilder(params Type[] types) 212private IServiceProvider CreateServices(params Type[] types) 215foreach (var type in types)
RazorComponentsServiceCollectionExtensionsTest.cs (7)
71private IEnumerable<Type> SingleRegistrationServiceTypes 85private Dictionary<Type, Type[]> MultiRegistrationServiceTypes 89return new Dictionary<Type, Type[]>() 102Type serviceType, 116Type serviceType)
TypeNameHashTest.cs (4)
42var type = new { Foo = "bar" }.GetType(); 58var type = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).GetType(); 72var type = typeof(Nullable<>).GetGenericArguments()[0]; 76Assert.Equal($"Cannot compute a hash for a type without a {nameof(Type.FullName)}.", ex.Message);
Microsoft.AspNetCore.Components.Forms (9)
EditContextDataAnnotationsExtensions.cs (2)
55private static void ClearCache(Type[]? _) 62private static readonly ConcurrentDictionary<(Type ModelType, string FieldName), PropertyInfo?> _propertyInfoCache = new();
FieldIdentifier.cs (4)
19private static readonly ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func<object, object>> _fieldAccessors = new(); 30/// <typeparam name="TField">The field <see cref="Type"/>.</typeparam> 155ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func<object, object>>? cache = null) 187static Func<object, object> CreateAccessor((Type model, MemberInfo member) arg)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
167var declaringType = methodInfo.DeclaringType; 248var memberType = memberExpression.Type;
src\Components\Shared\src\HotReloadManager.cs (1)
27public static void UpdateApplication(Type[]? _) => Default.OnDeltaApplied?.Invoke();
Microsoft.AspNetCore.Components.Forms.Tests (8)
FieldIdentifierTest.cs (1)
146var cache = new ConcurrentDictionary<(Type ModelType, MemberInfo FieldName), Func<object, object>>();
src\Components\Shared\test\AssertFrame.cs (1)
67public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null)
src\Components\Shared\test\TestServiceProvider.cs (6)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 14private Dictionary<(Type, object?), Func<object?>>? _keyedFactories; 16private Dictionary<(Type, object?), Func<object?>> KeyedFactories 25public object? GetService(Type serviceType) 30public object? GetKeyedService(Type serviceType, object? serviceKey) 41public object GetRequiredKeyedService(Type serviceType, object? serviceKey)
Microsoft.AspNetCore.Components.Performance (8)
RenderTreeDiffBuilderBenchmark.cs (1)
106public object GetService(Type serviceType)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Components.QuickGrid (4)
Columns\PropertyColumn.cs (1)
55var nullableUnderlyingTypeOrNull = Nullable.GetUnderlyingType(typeof(TProp));
Infrastructure\AsyncQueryExecutorSupplier.cs (3)
24private static readonly ConcurrentDictionary<Type, bool> IsEntityFrameworkProviderTypeCache = new(); 38var providerType = queryable.Provider?.GetType(); 56private static bool IsEntityFrameworkProviderType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryableProviderType)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Verifiers\DiagnosticVerifier.cs (1)
244var analyzerType = analyzer.GetType();
Microsoft.AspNetCore.Components.Server (38)
BlazorPack\BlazorPackHubProtocolWorker.cs (2)
13protected override object? DeserializeObject(ref MessagePackReader reader, Type type, string field) 71protected override void Serialize(ref MessagePackWriter writer, Type type, object value)
Circuits\CircuitHost.cs (1)
893private static partial void CircuitHandlerFailed(ILogger logger, Type handlerType, string handlerMethod, string message, Exception exception);
Circuits\ComponentDescriptor.cs (2)
8public Type ComponentType { get; set; } 14public void Deconstruct(out Type componentType, out ParameterView parameters, out int sequence) =>
Circuits\ComponentParameterDeserializer.cs (1)
54var parameterType = _parametersCache.GetParameterType(definition.Assembly, definition.TypeName);
Circuits\RemoteRenderer.cs (3)
64public Task AddComponentAsync(Type componentType, ParameterView parameters, string domElementSelector) 78internal Type GetExistingComponentType(int componentId) => 304protected override IComponent ResolveComponentForRenderMode([DynamicallyAccessedMembers(Component)] Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
Circuits\ServerComponentDeserializer.cs (3)
190if (!TryDeserializeComponentTypeAndParameters(serverComponent, out var componentType, out var parameters)) 206private bool TryDeserializeComponentTypeAndParameters(ServerComponent serverComponent, [NotNullWhen(true)] out Type? componentType, out ParameterView parameters) 279if (!TryDeserializeComponentTypeAndParameters(serverComponent, out var componentType, out var parameters))
src\Components\Shared\src\ComponentParametersTypeCache.cs (4)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new(); 14public Type? GetParameterType(string assembly, string type) 17if (_typeToKeyLookUp.TryGetValue(key, out var resolvedType)) 28private static Type? ResolveType(Key key, Assembly[] assemblies)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
src\Components\Shared\src\RootComponentOperation.cs (2)
26Type componentType, 29public Type ComponentType { get; } = componentType;
src\Components\Shared\src\RootComponentTypeCache.cs (4)
13private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new(); 15public Type? GetRootComponent(string assembly, string type) 18if (_typeToKeyLookUp.TryGetValue(key, out var resolvedType)) 29private static Type? ResolveType(Key key, Assembly[] assemblies)
src\Components\Shared\src\WebRootComponentManager.cs (6)
37[DynamicallyAccessedMembers(Component)] Type componentType, 61[DynamicallyAccessedMembers(Component)] Type newComponentType, 89private readonly Type _componentType; 98[DynamicallyAccessedMembers(Component)] Type componentType, 115[DynamicallyAccessedMembers(Component)] Type componentType, 130[DynamicallyAccessedMembers(Component)] Type newComponentType,
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (5)
148var itemType = binder.GetStreamItemType(invocationId); 178var itemType = ProtocolHelper.TryGetReturnType(binder, invocationId); 296private object?[] BindArguments(ref MessagePackReader reader, IReadOnlyList<Type> parameterTypes) 322protected abstract object? DeserializeObject(ref MessagePackReader reader, Type type, string field); 507protected abstract void Serialize(ref MessagePackWriter writer, Type type, object value);
src\SignalR\common\Shared\TryGetReturnType.cs (1)
10internal static Type? TryGetReturnType(IInvocationBinder binder, string invocationId)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\Utilities.cs (2)
20internal static readonly bool IsMono = Type.GetType("Mono.Runtime") is Type;
Microsoft.AspNetCore.Components.Server.Tests (16)
Circuits\CircuitHostTest.cs (1)
671private ComponentMarker CreateMarker(Type type, string locationHash, Dictionary<string, object> parameters = null, string componentKey = "")
Circuits\ServerComponentDeserializerTest.cs (4)
446private ComponentMarker CreateMarker(Type type, Dictionary<string, object> parameters = null) 459private ComponentMarker[] CreateMarkers(params Type[] types) 472private ComponentMarker[] CreateMarkers(params (Type, Dictionary<string, object>)[] types) 490private ComponentMarker[] CreateMarkers(ServerComponentInvocationSequence sequence, params Type[] types)
src\Components\Endpoints\src\DependencyInjection\ServerComponentSerializer.cs (2)
19public void SerializeInvocation(ref ComponentMarker marker, ServerComponentInvocationSequence invocationId, Type type, ParameterView parameters) 27Type rootComponent,
src\SignalR\common\SignalR.Common\test\Internal\Protocol\TestBinder.cs (9)
13private readonly Type[] _paramTypes; 14private readonly Type _returnType; 36public TestBinder(Type[] paramTypes) : this(paramTypes, null) { } 37public TestBinder(Type returnType) : this(null, returnType) { } 38public TestBinder(Type[] paramTypes, Type returnType) 44public IReadOnlyList<Type> GetParameterTypes(string methodName) 53public Type GetReturnType(string invocationId) 62public Type GetStreamItemType(string streamId)
Microsoft.AspNetCore.Components.Tests (47)
BindConverterTest.cs (3)
390public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 410public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 420public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
ComponentFactoryTest.cs (16)
17var componentType = typeof(EmptyComponent); 33var componentType = typeof(List<string>); 46var componentType = typeof(EmptyComponent); 67var componentType = typeof(EmptyComponent); 79var componentType = typeof(DerivedComponent); 103var componentType = typeof(ComponentWithNonInjectableProperties); 122var componentType = typeof(ComponentWithInjectProperties); 141var componentType = typeof(ComponentWithRenderMode); 173var componentType = typeof(DerivedComponentWithRenderMode); 191var componentType = typeof(ComponentWithNonInjectableProperties); 215var componentType = typeof(ComponentWithRenderMode); 236var componentType = typeof(ComponentWithConstructorInjection); 364public IComponent CreateInstance(Type componentType) 372public IComponent CreateInstance(Type componentType) 419public Type RequestedComponentType { get; private set; } 436protected internal override IComponent ResolveComponentForRenderMode(Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
EventCallbackFactoryBinderExtensionsTest.cs (1)
690public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
RendererTest.cs (6)
617var eventArgsType = renderer.GetEventArgsType(eventHandlerId); 640var eventArgsType = renderer.GetEventArgsType(eventHandlerId); 5142protected internal override IComponent ResolveComponentForRenderMode(Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode) 5156public List<Type> RequestedComponentTypes { get; } = new List<Type>(); 5158public IComponent CreateInstance(Type componentType)
Rendering\RenderTreeBuilderTest.cs (1)
633var componentType = typeof(TestComponent);
Routing\QueryParameterValueSupplierTest.cs (4)
171public void RejectsUnparseableValues(string key, string value, Type targetType) 196public void RejectsUnparseableArrayEntries(string key, string validValue, string invalidValue, Type targetType) 213public void RejectsBlankValuesWhenNotNullable(string key, Type targetType) 278public void RejectsBlankArrayEntriesWhenNotNullable(string key, Type targetType)
Routing\RouteTableFactoryTests.cs (9)
96var routeTable = RouteTableFactory.Create(new List<Type> { typeof(MyComponent), }, _serviceProvider); 113var routeTable = RouteTableFactory.Create(new List<Type> { typeof(MyComponent), typeof(MyInheritedComponent) }, _serviceProvider); 456public void CorrectlyMatchesVariableLengthSegments(string path, string expectedValue, string first, string second, Type handler) 929var handler = typeof(int); 981var handler = typeof(int); 1110readonly IList<(string Template, Type Handler)> _routeTemplates = new List<(string, Type)>(); 1111readonly Type _handler = typeof(object); 1113public TestRouteTableBuilder AddRoute(string template, Type handler = null)
src\Components\Shared\test\AssertFrame.cs (1)
67public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null)
src\Components\Shared\test\TestServiceProvider.cs (6)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 14private Dictionary<(Type, object?), Func<object?>>? _keyedFactories; 16private Dictionary<(Type, object?), Func<object?>> KeyedFactories 25public object? GetService(Type serviceType) 30public object? GetKeyedService(Type serviceType, object? serviceKey) 41public object GetRequiredKeyedService(Type serviceType, object? serviceKey)
Microsoft.AspNetCore.Components.Web (38)
Forms\InputBase.cs (1)
26private Type? _nullableUnderlyingType;
Forms\InputDate.cs (1)
55var type = Nullable.GetUnderlyingType(typeof(TValue)) ?? typeof(TValue);
Forms\InputNumber.cs (1)
22var targetType = Nullable.GetUnderlyingType(typeof(TValue)) ?? typeof(TValue);
Forms\Mapping\FormValueMappingContext.cs (3)
13internal FormValueMappingContext(string acceptMappingScopeName, string? acceptFormName, Type valueType, string parameterName) 41/// Gets the <see cref="Type"/> of the value to map. 43public Type ValueType { get; }
Forms\Mapping\IFormValueMapper.cs (2)
14/// <param name="valueType">The <see cref="Type"/> for the value to map.</param> 18bool CanMap(Type valueType, string scopeName, string? formName);
HtmlRendering\HtmlRenderer.cs (4)
76[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType) 89[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, 109[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType) 131[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType,
HtmlRendering\StaticHtmlRenderer.cs (1)
53[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType,
JSComponents\JSComponentConfigurationExtensions.cs (2)
45public static void RegisterForJavaScript(this IJSComponentConfiguration configuration, [DynamicallyAccessedMembers(Component)] Type componentType, string identifier) 56public static void RegisterForJavaScript(this IJSComponentConfiguration configuration, [DynamicallyAccessedMembers(Component)] Type componentType, string identifier, string javaScriptInitializer)
JSComponents\JSComponentConfigurationStore.cs (6)
24private readonly Dictionary<string, Type> _jsComponentTypesByIdentifier = new(StringComparer.Ordinal); 28internal void Add([DynamicallyAccessedMembers(LinkerFlags.Component)] Type componentType, string identifier) 46[NotNullWhen(true)][DynamicallyAccessedMembers(LinkerFlags.Component)] out Type? componentType) 55internal void Add([DynamicallyAccessedMembers(LinkerFlags.Component)] Type componentType, string identifier, string javaScriptInitializer) 76public JSComponentParameter(string name, Type dotNetType) 82private static string GetJSType(Type dotNetType) => dotNetType switch
JSComponents\JSComponentInterop.cs (11)
26private static readonly ConcurrentDictionary<Type, ParameterTypeCache> ParameterTypeCaches = new(); 68if (!Configuration.TryGetComponentType(identifier, out var componentType)) 90var componentType = Renderer.GetRootComponentType(componentId); 158internal static ParameterTypeCache GetComponentParameters(Type componentType) 161internal static bool IsEventCallbackType(Type type) 166private static ParameterKind GetParameterKind(Type type) 182private static object CreateEventCallbackWithSingleParameter(Type eventCallbackType, IJSObjectReference? jsObjectReference) 189private static bool TryGetComponentParameterInfo(Type componentType, string parameterName, out ParameterInfo parameterInfo) 200public ParameterTypeCache(Type componentType) 223public readonly Type Type { get; } 226public ParameterInfo(Type parameterType)
Routing\FocusOnNavigate.cs (1)
15private Type? _lastNavigatedPageType = typeof(NonMatchingType);
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
167var declaringType = methodInfo.DeclaringType; 248var memberType = memberExpression.Type;
src\Components\Shared\src\JsonSerialization\JsonConverterFactoryTypeInfoResolver.cs (1)
21public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options)
WebEventData\WebEventData.cs (1)
78var eventArgsType = renderer.GetEventArgsType(eventHandlerId);
WebRenderer.cs (1)
77protected internal int AddRootComponent([DynamicallyAccessedMembers(Component)] Type componentType, string domElementSelector)
Microsoft.AspNetCore.Components.Web.Tests (11)
Forms\EditFormTest.cs (1)
276public bool CanMap(Type valueType, string mappingScopeName, string formName) => false;
Forms\Mapping\FormMappingScopeTest.cs (1)
149public bool CanMap(Type valueType, string mappingScopeName, string formName) => false;
Forms\Mapping\SupplyParameterFromFormTest.cs (1)
85public bool CanMap(Type valueType, string mappingScopeName, string formName)
HtmlRendering\HtmlRendererTest.cs (1)
1387public bool CanMap(Type valueType, string mappingScopeName, string formName)
src\Components\Shared\test\AssertFrame.cs (1)
67public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null)
src\Components\Shared\test\TestServiceProvider.cs (6)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 14private Dictionary<(Type, object?), Func<object?>>? _keyedFactories; 16private Dictionary<(Type, object?), Func<object?>> KeyedFactories 25public object? GetService(Type serviceType) 30public object? GetKeyedService(Type serviceType, object? serviceKey) 41public object GetRequiredKeyedService(Type serviceType, object? serviceKey)
Microsoft.AspNetCore.Components.WebAssembly (42)
Hosting\RootComponentMapping.cs (3)
20public RootComponentMapping([DynamicallyAccessedMembers(Component)] Type componentType, string selector) 45public RootComponentMapping([DynamicallyAccessedMembers(Component)] Type componentType, string selector, ParameterView parameters) : this(componentType, selector) 54public Type ComponentType { get; }
Hosting\RootComponentMappingCollection.cs (2)
36public void Add([DynamicallyAccessedMembers(Component)] Type componentType, string selector) 47public void Add([DynamicallyAccessedMembers(Component)] Type componentType, string selector, ParameterView parameters)
Hosting\WebAssemblyHostBuilder.cs (1)
143var componentType = _rootComponentCache.GetRootComponent(registeredComponent.Assembly!, registeredComponent.TypeName!);
HotReload\HotReloadAgent.cs (14)
51public List<Action<Type[]?>> ClearCache { get; } = new(); 52public List<Action<Type[]?>> UpdateApplication { get; } = new(); 79ctorArgs[0].Value is not Type handlerType) 94[DynamicallyAccessedMembers(HotReloadHandlerLinkerFlags)] Type handlerType) 116Action<Type[]?> CreateAction(MethodInfo update) 118Action<Type[]?> action = update.CreateDelegate<Action<Type[]?>>(); 132MethodInfo? GetUpdateMethod([DynamicallyAccessedMembers(HotReloadHandlerLinkerFlags)] Type handlerType, string name) 134if (handlerType.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, new[] { typeof(Type[]) }) is MethodInfo updateMethod && 213Type[]? updatedTypes = GetMetadataUpdateTypes(deltas); 227private static Type[] GetMetadataUpdateTypes(IReadOnlyList<UpdateDelta> deltas) 229List<Type>? types = null; 243var type = assemblyTypes.FirstOrDefault(t => t.MetadataToken == updatedType); 252return types?.ToArray() ?? Type.EmptyTypes;
HotReload\WebAssemblyHotReload.cs (1)
69var method = typeof(System.Reflection.Metadata.MetadataUpdater).GetMethod("GetCapabilities", BindingFlags.NonPublic | BindingFlags.Static, Type.EmptyTypes);
Prerendering\WebAssemblyComponentParameterDeserializer.cs (1)
52var parameterType = _parametersCache.GetParameterType(definition.Assembly, definition.TypeName);
Rendering\WebAssemblyRenderer.cs (2)
87public Task AddComponentAsync([DynamicallyAccessedMembers(Component)] Type componentType, ParameterView parameters, string domElementSelector) 182protected override IComponent ResolveComponentForRenderMode([DynamicallyAccessedMembers(Component)] Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
src\Components\Shared\src\ComponentParametersTypeCache.cs (4)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new(); 14public Type? GetParameterType(string assembly, string type) 17if (_typeToKeyLookUp.TryGetValue(key, out var resolvedType)) 28private static Type? ResolveType(Key key, Assembly[] assemblies)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
src\Components\Shared\src\RootComponentOperation.cs (2)
26Type componentType, 29public Type ComponentType { get; } = componentType;
src\Components\Shared\src\RootComponentTypeCache.cs (4)
13private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new(); 15public Type? GetRootComponent(string assembly, string type) 18if (_typeToKeyLookUp.TryGetValue(key, out var resolvedType)) 29private static Type? ResolveType(Key key, Assembly[] assemblies)
src\Components\Shared\src\WebRootComponentManager.cs (6)
37[DynamicallyAccessedMembers(Component)] Type componentType, 61[DynamicallyAccessedMembers(Component)] Type newComponentType, 89private readonly Type _componentType; 98[DynamicallyAccessedMembers(Component)] Type componentType, 115[DynamicallyAccessedMembers(Component)] Type componentType, 130[DynamicallyAccessedMembers(Component)] Type newComponentType,
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
Microsoft.AspNetCore.Components.WebAssembly.Tests (4)
Hosting\WebAssemblyHostBuilderTest.cs (3)
206private static IReadOnlyList<Type> DefaultServiceTypes 210return new Type[] 228foreach (var type in DefaultServiceTypes)
WebAssemblyHotReloadTest.cs (1)
15var hotReloadManager = typeof(Renderer).Assembly.GetType("Microsoft.AspNetCore.Components.HotReload.HotReloadManager");
Microsoft.AspNetCore.Components.WebView (6)
Services\WebViewRenderer.cs (1)
64public new int AddRootComponent(Type componentType, string domElementSelector)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
374public override Dictionary<string, StaticWebAssetNode> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
WebViewManager.cs (3)
89public Task AddRootComponentAsync(Type componentType, string selector, ParameterView parameters) 118/// <param name="selector">The CSS selector describing where in the page the component was placed. This must exactly match the selector provided on an earlier call to <see cref="AddRootComponentAsync(Type, string, ParameterView)"/>.</param> 248public Type ComponentType { get; init; }
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Connections.Abstractions (6)
ConnectionBuilderExtensions.cs (1)
19/// <typeparam name="TConnectionHandler">The <see cref="Type"/> of the <see cref="ConnectionHandler"/>.</typeparam>
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (3)
26[DynamicallyAccessedMembers(ActivatorAccessibility)] Type instanceType, 92[DynamicallyAccessedMembers(ActivatorAccessibility)] Type type) 116var givenType = givenParameters[givenIndex]?.GetType();
src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (2)
47Type? underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType); 87private static object? CreateValueType(Type t) => RuntimeHelpers.GetUninitializedObject(t);
Microsoft.AspNetCore.DataProtection (37)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (2)
167private static Type GetManagedTypeFromEncryptionAlgorithm(EncryptionAlgorithm algorithm) 185private static Type GetManagedTypeFromValidationAlgorithm(ValidationAlgorithm algorithm)
AuthenticatedEncryption\ConfigurationModel\ManagedAlgorithmHelpers.cs (7)
14private static readonly List<Type> KnownAlgorithmTypes = new List<Type> 24public static string TypeToFriendlyName(Type type) 40public static Type FriendlyNameToType(string typeName) 42foreach (var knownType in KnownAlgorithmTypes) 50var type = TypeExtensions.GetTypeWithTrimFriendlyErrorMessage(typeName); 59if (type.GetConstructor(Type.EmptyTypes) == null)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorConfiguration.cs (3)
29public Type EncryptionAlgorithmType { get; set; } = typeof(Aes); 53public Type ValidationAlgorithmType { get; set; } = typeof(HMACSHA256); 83private static string TypeToFriendlyName(Type type)
AuthenticatedEncryption\ConfigurationModel\XmlSerializedDescriptorInfo.cs (2)
23public XmlSerializedDescriptorInfo(XElement serializedDescriptorElement, Type deserializerType) 43public Type DeserializerType { get; }
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactory.cs (1)
116public static Func<T> CreateFactory<T>([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type implementation) where T : class
Internal\DefaultTypeNameResolver.cs (2)
18public bool TryResolveType(string typeName, [NotNullWhen(true)] out Type? type) 25type = Type.GetType(typeName, throwOnError: false);
Internal\IActivator.cs (1)
19object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type expectedBaseType, string implementationTypeName);
Internal\ITypeNameResolver.cs (1)
11bool TryResolveType(string typeName, [NotNullWhen(true)] out Type? type);
LoggingServiceProviderExtensions.cs (1)
36public static ILogger GetLogger(this IServiceProvider? services, Type type)
SimpleActivator.cs (4)
16private static readonly Type[] _serviceProviderTypeArray = { typeof(IServiceProvider) }; 32public virtual object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type expectedBaseType, string implementationTypeName) 35var implementationType = TypeExtensions.GetTypeWithTrimFriendlyErrorMessage(implementationTypeName); 41var ctorParameterless = implementationType.GetConstructor(Type.EmptyTypes);
TypeExtensions.cs (7)
11/// Helpful extension methods on <see cref="Type"/>. 19public static void AssertIsAssignableFrom(this Type expectedBaseType, Type implementationType) 32public static Type GetTypeWithTrimFriendlyErrorMessage(string typeName) 36return Type.GetType(typeName, throwOnError: true)!; 44public static bool MatchName(this Type matchType, string resolvedTypeName, ITypeNameResolver typeNameResolver) 50return typeNameResolver.TryResolveType(resolvedTypeName, out var resolvedType) && resolvedType == matchType;
TypeForwardingActivator.cs (4)
30public override object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type expectedBaseType, string originalTypeName) 35internal object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type expectedBaseType, string originalTypeName, out bool forwarded) 39var type = Type.GetType(forwardedTypeName, false);
XmlEncryption\EncryptedXmlInfo.cs (2)
22public EncryptedXmlInfo(XElement encryptedElement, Type decryptorType) 42public Type DecryptorType { get; }
Microsoft.AspNetCore.DataProtection.Abstractions (11)
src\Shared\TrimmingAttributes.cs (11)
184/// with the specified signature of a member on a <see cref="System.Type"/>. 187/// <param name="type">The <see cref="System.Type"/> containing <paramref name="memberSignature"/>.</param> 188public DynamicDependencyAttribute(string memberSignature, Type type) 210/// with the specified types of members on a <see cref="System.Type"/>. 213/// <param name="type">The <see cref="System.Type"/> containing the specified members.</param> 214public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, Type type) 254/// Gets the <see cref="System.Type"/> containing the specified member. 260public Type? Type { get; } 286/// Indicates that certain members on a specified <see cref="Type"/> are accessed dynamically, 293/// This attribute is valid on members whose type is <see cref="Type"/> or <see cref="string"/>. 299/// can be accessed dynamically on <see cref="Type"/> instances returned from calling
Microsoft.AspNetCore.DataProtection.Tests (13)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializerTests.cs (2)
19public void ImportFromXml_BuiltInTypes_CreatesAppropriateDescriptor(Type encryptionAlgorithmType, Type validationAlgorithmType)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorTests.cs (2)
44public void ExportToXml_BuiltInTypes_ProducesCorrectPayload(Type encryptionAlgorithmType, Type validationAlgorithmType)
Internal\KeyManagementOptionsSetupTest.cs (1)
49["KeyEscrowSinks"] = String.Join(" ;; ; ", new Type[] { typeof(MyKeyEscrowSink1), typeof(MyKeyEscrowSink2) }.Select(t => t.AssemblyQualifiedName)),
RegistryPolicyResolverTests.cs (1)
39["KeyEscrowSinks"] = String.Join(" ;; ; ", new Type[] { typeof(MyKeyEscrowSink1), typeof(MyKeyEscrowSink2) }.Select(t => t.AssemblyQualifiedName))
TypeForwardingActivatorTests.cs (4)
51public void CreateInstance_Generics(Type type) 64public void CreateInstance_ThrowsForOpenGenerics(Type type) 92public void CreateInstance_DoesNotForwardingTypesExternalTypes(Type type) 109var type = typeof(ClassWithParameterlessCtor);
XmlEncryption\XmlEncryptionExtensionsTests.cs (3)
77Type resolvedType; 98var resolvedType = typeof(NullXmlDecryptor); 130Type resolvedType = null;
Microsoft.AspNetCore.Diagnostics (14)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (5)
84var type = method.DeclaringType; 116var parameterType = parameter.ParameterType; 161var type = method.DeclaringType; 196private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType) 203var parentType = declaringType.DeclaringType;
src\Shared\TypeNameHelper\TypeNameHelper.cs (9)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 46/// <param name="type">The <see cref="Type"/>.</param> 52public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 59private static void ProcessType(StringBuilder builder, Type type, in DisplayNameOptions options) 93private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 95var innerType = type; 112private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (9)
DatabaseContextDetails.cs (2)
8public Type Type { get; } 13public DatabaseContextDetails(Type type, bool databaseExists, bool pendingModelChanges, IEnumerable<string> pendingMigrations)
DatabaseDeveloperPageExceptionFilter.cs (1)
67foreach (var registeredContext in registeredContexts)
DatabaseErrorPageMiddleware.cs (3)
28public void Hold(Exception exception, Type contextType) 35public Type? ContextType { get; private set; } 97var contextType = _localDiagnostic.Value!.ContextType;
DiagnosticsEntityFrameworkCoreLoggerExtensions.cs (1)
32public static partial void AttemptingToMatchException(this ILogger logger, Type exceptionType);
HttpContextDatabaseContextDetailsExtensions.cs (1)
19public static async ValueTask<DatabaseContextDetails?> GetContextDetailsAsync(this HttpContext httpContext, Type dbcontextType, ILogger logger)
MigrationsEndPointMiddleware.cs (1)
113var contextType = registeredContexts.FirstOrDefault(c => string.Equals(contextTypeName, c.AssemblyQualifiedName, StringComparison.Ordinal));
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests (6)
Helpers\AssertHelpers.cs (6)
8public static void DisplaysScaffoldFirstMigration(Type contextType, string content) 14public static void NotDisplaysScaffoldFirstMigration(Type contextType, string content) 20public static void DisplaysApplyMigrations(Type contextType, string content) 26public static void NotDisplaysApplyMigrations(Type contextType, string content) 32public static void DisplaysScaffoldNextMigraion(Type contextType, string content) 38public static void NotDisplaysScaffoldNextMigraion(Type contextType, string content)
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerMiddlewareTest.cs (1)
527public object GetService(Type serviceType)
Microsoft.AspNetCore.Grpc.JsonTranscoding (91)
Internal\Binding\IServiceInvokerResolver.cs (1)
16Type[] methodParameters,
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (1)
273public static partial void MethodDescriptorNotFound(ILogger logger, string methodName, Type serviceType);
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (2)
94public static partial void BindMethodNotFound(ILogger logger, Type serviceType); 97public static partial void ServiceDescriptorError(ILogger logger, Type serviceType, Exception ex);
Internal\Binding\ReflectionServiceInvokerResolver.cs (5)
14private readonly Type _declaringType; 16public ReflectionServiceInvokerResolver(Type declaringType) 23Type[] methodParameters, 51private MethodInfo? GetMethod(string methodName, Type[] methodParameters) 53Type? currentType = typeof(TService);
Internal\GrpcServerLog.cs (2)
24public static partial void DeserializingMessage(ILogger logger, Type messageType); 42public static partial void SerializedMessage(ILogger logger, Type messageType);
Internal\Json\AnyConverter.cs (2)
8using Type = System.Type; 21public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\BoolConverter.cs (2)
6using Type = System.Type; 12public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\ByteStringConverter.cs (2)
7using Type = System.Type; 13public override ByteString? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\DurationConverter.cs (2)
8using Type = System.Type; 18public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\EnumConverter.cs (2)
9using Type = System.Type; 19public override TEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\FieldMaskConverter.cs (2)
10using Type = System.Type; 20public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\Int64Converter.cs (2)
6using Type = System.Type; 16public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\JsonConverterFactoryForEnum.cs (4)
7using Type = System.Type; 20public override bool CanConvert(Type typeToConvert) 26Type typeToConvert, JsonSerializerOptions options) 29typeof(EnumConverter<>).MakeGenericType(new Type[] { typeToConvert }),
Internal\Json\JsonConverterFactoryForWellKnownTypes.cs (5)
8using Type = System.Type; 21public override bool CanConvert(Type typeToConvert) 38Type typeToConvert, JsonSerializerOptions options) 41var converterType = JsonConverterHelper.WellKnownTypeNames[descriptor.FullName]; 44converterType.MakeGenericType(new Type[] { typeToConvert }),
Internal\Json\JsonConverterFactoryForWrappers.cs (4)
9using Type = System.Type; 22public override bool CanConvert(Type typeToConvert) 39Type typeToConvert, JsonSerializerOptions options) 42typeof(WrapperConverter<>).MakeGenericType(new Type[] { typeToConvert }),
Internal\Json\JsonConverterHelper.cs (12)
15using Type = System.Type; 23internal static readonly Dictionary<string, Type> WellKnownTypeNames = new Dictionary<string, Type> 63internal static Type GetFieldType(FieldDescriptor descriptor) 75var itemType = GetFieldTypeCore(descriptor); 86private static Type GetFieldTypeCore(FieldDescriptor descriptor, bool nullableType = false) 135var keyType = GetFieldType(mapKey); 136var valueType = GetFieldType(mapValue); 138var repeatedFieldType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); 150var fieldType = GetFieldType(fieldDescriptor); 151var itemType = fieldType.GetGenericArguments()[0]; 152var repeatedFieldType = typeof(List<>).MakeGenericType(itemType);
Internal\Json\ListValueConverter.cs (2)
8using Type = System.Type; 18public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\MessageTypeInfoResolver.cs (3)
13using Type = System.Type; 26public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options) 64private bool IsStandardMessage(Type type, [NotNullWhen(true)] out MessageDescriptor? messageDescriptor)
Internal\Json\NullValueConverter.cs (2)
7using Type = System.Type; 15public override NullValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\StructConverter.cs (2)
8using Type = System.Type; 18public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\TimestampConverter.cs (2)
8using Type = System.Type; 18public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\UInt64Converter.cs (2)
7using Type = System.Type; 17public override ulong Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\ValueConverter.cs (2)
7using Type = System.Type; 19public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Internal\Json\WrapperConverter.cs (3)
6using Type = System.Type; 16public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 20var t = JsonConverterHelper.GetFieldType(valueDescriptor);
Internal\JsonRequestHelpers.cs (2)
192Type type; 380Type responseType;
src\Grpc\JsonTranscoding\src\Shared\DescriptorRegistry.cs (3)
14private readonly ConcurrentDictionary<Type, DescriptorBase> _typeDescriptorMap = new ConcurrentDictionary<Type, DescriptorBase>(); 79public DescriptorBase? FindDescriptorByType(Type type)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (5)
43using Type = System.Type; 374private static readonly ConcurrentDictionary<Type, Dictionary<object, string>> _dictionaries 375= new ConcurrentDictionary<Type, Dictionary<object, string>>(); 379var enumType = value.GetType(); 395private static Dictionary<object, string> GetNameMapping(Type enumType)
src\Grpc\JsonTranscoding\src\Shared\Server\BindMethodFinder.cs (9)
28internal static MethodInfo? GetBindMethod(Type serviceType) 42internal static MethodInfo? GetBindMethodUsingAttribute(Type serviceType) 44Type? currentServiceType = serviceType; 67internal static MethodInfo? GetBindMethodFallback(Type serviceType) 70var baseType = GetServiceBaseType(serviceType); 77var declaringType = baseType.DeclaringType; 88private static Type? GetServiceBaseType(Type serviceImplementation) 92var baseType = serviceImplementation.BaseType;
src\Grpc\JsonTranscoding\src\Shared\Server\InterceptorPipelineBuilder.cs (1)
179var activatorType = typeof(IGrpcInterceptorActivator<>).MakeGenericType(Registration.Type);
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (3)
29using Type = System.Type; 55public static ServiceDescriptor? GetServiceDescriptor(Type serviceReflectionType) 408public static BodyDescriptorInfo? ResolveBodyDescriptor(string body, Type serviceType, MethodDescriptor methodDescriptor)
Microsoft.AspNetCore.Grpc.JsonTranscoding.IntegrationTests (1)
Infrastructure\DynamicGrpcServiceRegistry.cs (1)
170Type[] methodParameters,
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (11)
ConverterTests\JsonConverterWriteTests.cs (2)
16using Type = System.Type; 555private static DescriptorRegistry CreateDescriptorRegistry(Type type)
Infrastructure\TestHelpers.cs (2)
35internal static MessageDescriptor GetMessageDescriptor(Type typeToConvert) 37var property = typeToConvert.GetProperty("Descriptor", BindingFlags.Static | BindingFlags.Public, binder: null, typeof(MessageDescriptor), Type.EmptyTypes, modifiers: null);
ServerStreamingServerCallHandlerTests.cs (3)
26using Type = System.Type; 306List<(Type Type, object[] Args)>? interceptors = null, 323List<(Type Type, object[] Args)>? interceptors = null,
UnaryServerCallHandlerTests.cs (4)
30using Type = System.Type; 1405var interceptors = new List<(Type Type, object[] Args)>(); 1809List<(Type Type, object[] Args)>? interceptors = null, 1826List<(Type Type, object[] Args)>? interceptors = null,
Microsoft.AspNetCore.Grpc.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Grpc.Swagger (21)
Internal\GrpcDataContractResolver.cs (3)
10using Type = System.Type; 25public DataContract GetDataContractForType(Type type) 108var fieldType = MessageDescriptorHelpers.ResolveFieldType(field);
Internal\GrpcJsonTranscodingDescriptionProvider.cs (1)
79var responseType = responseBodyDescriptor != null ? MessageDescriptorHelpers.ResolveFieldType(responseBodyDescriptor) : methodDescriptor.OutputType.ClrType;
Internal\GrpcModelMetadata.cs (1)
20public override Type BinderType { get; }
Internal\MessageDescriptorHelpers.cs (3)
10public static Type ResolveFieldType(FieldDescriptor field) 15var valueType = GetTypeFromFieldType(mapFields[1]); 28private static Type GetTypeFromFieldType(FieldDescriptor field)
Internal\XmlComments\GrpcXmlCommentsDocumentFilter.cs (1)
53private bool TryAdd(OpenApiDocument swaggerDoc, KeyValuePair<string, ActionDescriptor> nameAndType, Type type)
Internal\XmlComments\GrpcXmlCommentsOperationFilter.cs (1)
63private void ApplyServiceTags(OpenApiOperation operation, Type controllerType)
src\Grpc\JsonTranscoding\src\Shared\DescriptorRegistry.cs (3)
14private readonly ConcurrentDictionary<Type, DescriptorBase> _typeDescriptorMap = new ConcurrentDictionary<Type, DescriptorBase>(); 79public DescriptorBase? FindDescriptorByType(Type type)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (5)
43using Type = System.Type; 374private static readonly ConcurrentDictionary<Type, Dictionary<object, string>> _dictionaries 375= new ConcurrentDictionary<Type, Dictionary<object, string>>(); 379var enumType = value.GetType(); 395private static Dictionary<object, string> GetNameMapping(Type enumType)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (3)
29using Type = System.Type; 55public static ServiceDescriptor? GetServiceDescriptor(Type serviceReflectionType) 408public static BodyDescriptorInfo? ResolveBodyDescriptor(string body, Type serviceType, MethodDescriptor methodDescriptor)
Microsoft.AspNetCore.Grpc.Swagger.Tests (3)
SchemaGeneratorIntegrationTests.cs (1)
18private (OpenApiSchema Schema, SchemaRepository SchemaRepository) GenerateSchema(System.Type type, IDescriptor descriptor)
XmlComments\XmlCommentsDocumentFilterTests.cs (2)
29public void Apply_SetsTagDescription_FromControllerSummaryTags(Type serviceType, string expectedDescription) 46static ApiDescription CreateApiDescription(Type serviceType)
Microsoft.AspNetCore.Hosting (42)
GenericHost\GenericWebHostBuilder.cs (6)
102var startupType = StartupLoader.FindStartupType(webHostOptions.StartupAssembly!, webhostContext.HostingEnvironment.EnvironmentName); 166public IWebHostBuilder UseStartup([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType) 215private void UseStartup([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, HostBuilderContext context, IServiceCollection services, object? instance = null) 283var containerType = configureContainerBuilder.GetContainerType(); 291var actionType = typeof(Action<,>).MakeGenericType(typeof(HostBuilderContext), containerType); 369public object? GetService(Type serviceType)
GenericHost\HostingStartupWebHostBuilder.cs (1)
81public IWebHostBuilder UseStartup([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType)
GenericHost\SlimWebHostBuilder.cs (1)
67public IWebHostBuilder UseStartup([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.PublicMethods)] Type startupType)
Infrastructure\ISupportsStartup.cs (3)
12/// <see cref="WebHostBuilderExtensions.UseStartup(IWebHostBuilder, Type)"/> and <see cref="WebHostBuilderExtensions.UseStartup{TStartup}(IWebHostBuilder, Func{WebHostBuilderContext, TStartup})"/> 34/// <param name="startupType">The <see cref="Type"/> to be used.</param> 36IWebHostBuilder UseStartup([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType);
Internal\ConfigureContainerBuilder.cs (1)
22public Type GetContainerType()
Internal\StartupLoader.cs (12)
41public static StartupMethods LoadMethods(IServiceProvider hostingServiceProvider, [DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, string environmentName, object? instance = null) 55var type = configureContainerMethod.MethodInfo != null ? configureContainerMethod.GetContainerType() : typeof(object); 69static Type CreateConfigureServicesDelegateBuilder(Type type) 238public static Type FindStartupType(string startupAssemblyName, string environmentName) 260var type = 294internal static ConfigureBuilder FindConfigureDelegate([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, string environmentName) 300internal static ConfigureContainerBuilder FindConfigureContainerDelegate([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, string environmentName) 306internal static bool HasConfigureServicesIServiceProviderDelegate([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, string environmentName) 311internal static ConfigureServicesBuilder FindConfigureServicesDelegate([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, string environmentName) 318private static MethodInfo? FindMethod([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, string methodName, string environmentName, Type? returnType = null, bool required = true)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (5)
84var type = method.DeclaringType; 116var parameterType = parameter.ParameterType; 161var type = method.DeclaringType; 196private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType) 203var parentType = declaringType.DeclaringType;
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
374public override Dictionary<string, StaticWebAssetNode> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
src\Shared\TypeNameHelper\TypeNameHelper.cs (9)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 46/// <param name="type">The <see cref="Type"/>.</param> 52public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 59private static void ProcessType(StringBuilder builder, Type type, in DisplayNameOptions options) 93private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 95var innerType = type; 112private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
WebHostBuilder.cs (1)
318var startupType = StartupLoader.FindStartupType(startupAssemblyName, _hostingEnvironment.EnvironmentName);
WebHostBuilderExtensions.cs (2)
131/// <param name="startupType">The <see cref="Type"/> to be used.</param> 133public static IWebHostBuilder UseStartup(this IWebHostBuilder hostBuilder, [DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType)
Microsoft.AspNetCore.Hosting.Abstractions (2)
HostingStartupAttribute.cs (2)
18public HostingStartupAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type hostingStartupType) 35public Type HostingStartupType { get; }
Microsoft.AspNetCore.Hosting.Tests (25)
Fakes\GenericWebHostBuilderWrapper.cs (1)
77public IWebHostBuilder UseStartup(Type startupType)
Fakes\StartupThrowTypeLoadException.cs (1)
14classes: new Type[] { GetType() },
HostingApplicationTests.cs (2)
214public object this[Type key] { get => Features[key]; set => Features[key] = value; } 224public IEnumerator<KeyValuePair<Type, object>> GetEnumerator() => Features.GetEnumerator();
Internal\MyContainer.cs (1)
19public object GetService(Type serviceType)
StartupManagerTests.cs (17)
27var type = typeof(VoidReturningStartupServicesFiltersStartup); 49var type = typeof(VoidReturningStartupServicesFiltersStartup); 70var type = typeof(IServiceProviderReturningStartupServicesFiltersStartup); 95var type = typeof(ConfigureContainerStartupServicesFiltersStartup); 117var type = typeof(ConfigureContainerStartupServicesFiltersStartup); 139var type = typeof(ConfigureServicesAndConfigureContainerStartup); 297var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "WithServices"); 319var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "WithScopedServices"); 346var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", environment); 366var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "Boom"); 378var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", environment); 393var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", environment); 414var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "TwoConfigures"); 429var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "PrivateConfigure"); 443var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "TwoConfigureServices"); 456var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "WithNullConfigureServices"); 473var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "WithConfigureServices");
WebHostTests.AsyncDisposable.cs (1)
74public object GetService(Type serviceType) => _serviceProvider.GetService(serviceType);
WebHostTests.cs (2)
1306public object this[Type key] 1331public IEnumerator<KeyValuePair<Type, object>> GetEnumerator()
Microsoft.AspNetCore.Html.Abstractions (1)
HtmlFormattableString.cs (1)
158public object? GetFormat(Type? formatType)
Microsoft.AspNetCore.Http (1)
MiddlewareFactory.cs (1)
28public IMiddleware? Create(Type middlewareType)
Microsoft.AspNetCore.Http.Abstractions (62)
EndpointFilterFactoryContext.cs (1)
30public object? GetService(Type serviceType) => null;
EndpointFilterInvocationContext.cs (1)
28/// <typeparam name="T">The <see cref="Type"/> of the resolved argument.</typeparam>
Extensions\EndpointBuilder.cs (1)
49public object? GetService(Type serviceType) => null;
Extensions\UseMiddlewareExtensions.cs (12)
50[DynamicallyAccessedMembers(MiddlewareAccessibility)] Type middleware, 105private readonly Type _middleware; 112[DynamicallyAccessedMembers(MiddlewareAccessibility)] Type middleware, 159private readonly Type _middlewareType; 161public InterfaceMiddlewareBinder(Type middlewareType) 205var parameterType = parameters[i].ParameterType; 255var middleware = typeof(T); 265var parameterType = parameters[i].ParameterType; 274Expression.Constant(parameterType, typeof(Type)), 275Expression.Constant(methodInfo.DeclaringType, typeof(Type)) 295private static object GetService(IServiceProvider sp, Type type, Type middleware)
HttpContext.cs (2)
111public DictionaryItemDebugView<Type, object>[] Items => _features.Select(pair => new DictionaryItemDebugView<Type, object>(pair)).ToArray();
IMiddlewareFactory.cs (2)
14/// <param name="middlewareType">The concrete <see cref="Type"/> of the <see cref="IMiddleware"/>.</param> 16IMiddleware? Create(Type middlewareType);
Metadata\AcceptsMetadata.cs (2)
21public AcceptsMetadata(string[] contentTypes, Type? type = null, bool isOptional = false) 38public Type? RequestType { get; }
Metadata\IAcceptsMetadata.cs (1)
23Type? RequestType { get; }
Metadata\IProducesResponseTypeMetadata.cs (1)
14Type? Type { get; }
Metadata\ProducesResponseTypeMetadata.cs (4)
24public ProducesResponseTypeMetadata(int statusCode, Type? type = null, string[]? contentTypes = null) 54private ProducesResponseTypeMetadata(int statusCode, Type? type, IEnumerable<string> contentTypes) 64public Type? Type { get; private set; } 82internal static ProducesResponseTypeMetadata CreateUnvalidated(Type? type, int statusCode, IEnumerable<string> contentTypes) => new(statusCode, type, contentTypes);
PathString.cs (2)
514public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 523CultureInfo? culture, object? value, Type destinationType)
Routing\EndpointMetadataCollection.cs (2)
30private readonly ConcurrentDictionary<Type, object[]> _cache; 41_cache = new ConcurrentDictionary<Type, object[]>();
Routing\RouteValueDictionary.cs (5)
44private static readonly ConcurrentDictionary<Type, PropertyHelper[]> _propertyCache = new ConcurrentDictionary<Type, PropertyHelper[]>(); 891var type = Value.GetType(); 900private static void ValidatePropertyNames(Type type, PropertyHelper[] properties) 927internal static void ClearCache(Type[]? _)
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (3)
26[DynamicallyAccessedMembers(ActivatorAccessibility)] Type instanceType, 92[DynamicallyAccessedMembers(ActivatorAccessibility)] Type type) 116var givenType = givenParameters[givenIndex]?.GetType();
src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (2)
47Type? underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType); 87private static object? CreateValueType(Type t) => RuntimeHelpers.GetUninitializedObject(t);
src\Shared\PropertyHelper\PropertyHelper.cs (21)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 50/// This constructor does not cache the helper. For caching, use <see cref="GetProperties(Type)"/>. 123[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 144[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 244Type openGenericDelegateType, 248var typeInput = propertyGetMethod.DeclaringType!; 249var typeOutput = propertyGetMethod.ReturnType; 251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 290var typeInput = setMethod.DeclaringType!; 291var parameterType = parameters[0].ParameterType; 412Type type, 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 444var declaringType = propertyHelper.Property.DeclaringType; 457Type? currentType = type; 493Type type, 494ConcurrentDictionary<Type, PropertyHelper[]>? cache) 509foreach (var @interface in type.GetInterfaces()) 523[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 562public static void ClearCache(Type[]? _)
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Http.Abstractions.Tests (6)
UseMiddlewareTest.cs (6)
237public IMiddleware? Create(Type middlewareType) 251public IMiddleware? Create(Type middlewareType) => null; 258private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>(); 260public void AddService(Type type, object value) => _services[type] = value; 262public object? GetService(Type serviceType)
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
837public object? GetService(Type serviceType) => null;
Microsoft.AspNetCore.Http.Connections.Client (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type) 54private static void ThrowObjectDisposedException(Type? type)
Microsoft.AspNetCore.Http.Extensions (269)
DefaultProblemDetailsWriter.cs (1)
63var problemDetailsType = context.ProblemDetails.GetType();
HeaderDictionaryTypeExtensions.cs (2)
264var type = typeof(T); 301var type = typeof(T);
HttpRequestJsonExtensions.cs (3)
172Type type, 194Type type, 237Type type,
HttpResponseJsonExtensions.cs (5)
211Type type, 234Type type, 257Type type, 283Type type, 308Type type,
RequestDelegateFactory.cs (28)
57private static readonly MethodInfo GetRequiredServiceMethod = typeof(ServiceProviderServiceExtensions).GetMethod(nameof(ServiceProviderServiceExtensions.GetRequiredService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider) })!; 58private static readonly MethodInfo GetServiceMethod = typeof(ServiceProviderServiceExtensions).GetMethod(nameof(ServiceProviderServiceExtensions.GetService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider) })!; 59private static readonly MethodInfo GetRequiredKeyedServiceMethod = typeof(ServiceProviderKeyedServiceExtensions).GetMethod(nameof(ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider), typeof(object) })!; 60private static readonly MethodInfo GetKeyedServiceMethod = typeof(ServiceProviderKeyedServiceExtensions).GetMethod(nameof(ServiceProviderKeyedServiceExtensions.GetKeyedService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider), typeof(object) })!; 67private static readonly MethodInfo ArrayEmptyOfObjectMethod = typeof(Array).GetMethod(nameof(Array.Empty), BindingFlags.Public | BindingFlags.Static)!.MakeGenericMethod(new Type[] { typeof(object) }); 348var returnType = methodInfo.ReturnType; 504private static Expression MapHandlerReturnTypeToValueTask(Expression methodCall, Type returnType) 537var typeArg = coercedAwaitableInfo.AwaitableInfo.ResultType; 543var typeArg = coercedAwaitableInfo.AwaitableInfo.ResultType; 604var constructorType = factoryContext.ArgumentTypes?.Length switch 645factoryContext.ArgumentTypes = new Type[parameters.Length]; 917private static Expression CreateParamCheckingResponseWritingMethodCall(Type returnType, RequestDelegateFactoryContext factoryContext) 1005private static void PopulateBuiltInResponseTypeMetadata(Type returnType, EndpointBuilder builder) 1033private static Expression AddResponseWritingToMethodCall(Expression methodCall, Type returnType, RequestDelegateFactoryContext factoryContext) 1087var typeArg = returnType.GetGenericArguments()[0]; 1135var typeArg = returnType.GetGenericArguments()[0]; 1342[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type bodyType, 1397private static object? CreateValueType(Type t) => RuntimeHelpers.GetUninitializedObject(t); 1526private static Expression GetValueFromProperty(MemberExpression sourceExpression, PropertyInfo itemProperty, string key, Type? returnType = null) 1535var parameterType = parameter.ParameterType; 1646var targetParseType = parameter.ParameterType.IsArray ? parameter.ParameterType.GetElementType()! : parameter.ParameterType; 1648var underlyingNullableType = Nullable.GetUnderlyingType(targetParseType); 1651var nonNullableParameterType = underlyingNullableType ?? targetParseType; 1931private static Type? GetExpressionType(Type type) => 1987private static void AddInferredAcceptsMetadata(RequestDelegateFactoryContext factoryContext, Type type, string[] contentTypes) 2585private static NotSupportedException GetUnsupportedReturnTypeException(Type returnType) 2865public object? GetService(Type serviceType) => null;
RequestDelegateFactoryContext.cs (2)
57public Type[] ArgumentTypes { get; set; } = Array.Empty<Type>();
src\Components\Endpoints\src\FormMapping\Converters\CollectionConverter.cs (2)
27private static readonly Type _elementType = typeof(TElement); 55Type type,
src\Components\Endpoints\src\FormMapping\Converters\CompiledComplexTypeConverter.cs (2)
10public delegate bool ConverterDelegate(ref FormDataReader reader, Type type, FormDataMapperOptions options, out T? result, out bool found); 14internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out T? result, out bool found)
src\Components\Endpoints\src\FormMapping\Converters\DictionaryConverter.cs (2)
19private static readonly Type _elementType = typeof(TValue); 31Type type,
src\Components\Endpoints\src\FormMapping\Converters\EnumConverter.cs (1)
30internal override bool TryRead(ref FormDataReader reader, Type type, FormDataMapperOptions options, out TEnum result, out bool found)
src\Components\Endpoints\src\FormMapping\Converters\FileConverter.cs (1)
16internal override bool TryRead(ref FormDataReader reader, Type type, FormDataMapperOptions options, out T? result, out bool found)
src\Components\Endpoints\src\FormMapping\Converters\NullableConverter.cs (1)
33internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out T? result, out bool found)
src\Components\Endpoints\src\FormMapping\Converters\ParsableConverter.cs (1)
30internal override bool TryRead(ref FormDataReader reader, Type type, FormDataMapperOptions options, out T? result, out bool found)
src\Components\Endpoints\src\FormMapping\Converters\UriFormDataConverter.cs (1)
32internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out Uri? result, out bool found)
src\Components\Endpoints\src\FormMapping\Factories\CollectionConverterFactory.cs (8)
15public bool CanConvert(Type type, FormDataMapperOptions options) 17var element = ResolveElementType(type); 34public static Type? ResolveElementType(Type type) 36var enumerable = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IEnumerable<>)); 47public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 55var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IEnumerable<>)); 56var elementType = enumerableType?.GetGenericArguments()[0];
src\Components\Endpoints\src\FormMapping\Factories\Collections\ConcreteTypeCollectionConverterFactory.cs (2)
16public bool CanConvert(Type _, FormDataMapperOptions options) => true; 20public FormDataConverter CreateConverter(Type _, FormDataMapperOptions options)
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (7)
15public abstract bool CanConvert(Type type, FormDataMapperOptions options); 19public abstract FormDataConverter CreateConverter(Type type, FormDataMapperOptions options); 26public override bool CanConvert(Type _, FormDataMapperOptions options) 35var type = typeof(TCollection); 65var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) && type.GetConstructor(Type.EmptyTypes) != null => true, 111public override FormDataConverter CreateConverter(Type _, FormDataMapperOptions options) 118var type = typeof(TCollection);
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactory.cs (1)
12internal abstract FormDataConverter CreateConverter(Type type, FormDataMapperOptions options);
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (20)
16internal override CompiledComplexTypeConverter<T> CreateConverter(Type type, FormDataMapperOptions options) 24private CompiledComplexTypeConverter<T>.ConverterDelegate CreateConverterBody(Type type, FormDataMapperOptions options) 159Array.Empty<Type>(), 185Array.Empty<Type>(), 287Array.Empty<Type>(), 297Array.Empty<Type>(), 304Array.Empty<Type>(), 314Array.Empty<Type>(), 343var propertyConverterType = typeof(FormDataConverter<>).MakeGenericType(property.Type); 379Array.Empty<Type>(), 388Type.EmptyTypes, 398Array.Empty<Type>(), 406Array.Empty<Type>(), 443var constructorParameterConverterType = typeof(FormDataConverter<>).MakeGenericType(constructorParameter.Type); 483Array.Empty<Type>(), 491Type.EmptyTypes, 501Array.Empty<Type>(), 509Array.Empty<Type>(), 552Expression.Not(Expression.Call(readerParam, nameof(FormDataReader.CurrentPrefixExists), Array.Empty<Type>())), 575Expression.Parameter(typeof(Type), "type"),
src\Components\Endpoints\src\FormMapping\Factories\ComplexTypeConverterFactory.cs (2)
18public bool CanConvert(Type type, FormDataMapperOptions options) 99public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\ConcreteTypeDictionaryConverterFactory.cs (2)
15public bool CanConvert(Type type, FormDataMapperOptions options) => true; 19public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (4)
16public bool CanConvert(Type type, FormDataMapperOptions options) 61var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null => true, 71public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 143var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null =>
src\Components\Endpoints\src\FormMapping\Factories\DictionaryConverterFactory.cs (13)
15public bool CanConvert(Type type, FormDataMapperOptions options) 42internal static (Type keyType, Type valueType) ResolveDictionaryTypes(Type type) 46var dictionaryType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IDictionary<,>)) ?? 55var keyType = dictionaryType.GetGenericArguments()[0]; 61var parsableKeyType = ClosedGenericMatcher.ExtractGenericInterface(keyType, typeof(IParsable<>)); 67var valueType = dictionaryType.GetGenericArguments()[1]; 73public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 77var dictionaryType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IDictionary<,>)) ?? 85var keyType = dictionaryType?.GetGenericArguments()[0]; 91var parsableKeyType = ClosedGenericMatcher.ExtractGenericInterface(keyType, typeof(IParsable<>)); 98var valueType = dictionaryType?.GetGenericArguments()[1];
src\Components\Endpoints\src\FormMapping\Factories\EnumConverterFactory.cs (2)
12public bool CanConvert(Type type, FormDataMapperOptions options) => type.IsEnum; 16public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
src\Components\Endpoints\src\FormMapping\Factories\FileConverterFactory.cs (3)
19public bool CanConvert(Type type, FormDataMapperOptions options) => CanConvertCommon(type); 22private static bool CanConvertCommon(Type type) => type == typeof(IFormFile) || type == typeof(IFormFileCollection) || type == typeof(IReadOnlyList<IFormFile>); 26public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
src\Components\Endpoints\src\FormMapping\Factories\NullableConverterFactory.cs (5)
15public bool CanConvert(Type type, FormDataMapperOptions options) 17var underlyingType = Nullable.GetUnderlyingType(type); 23public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 25var underlyingType = Nullable.GetUnderlyingType(type); 31var expectedConverterType = typeof(NullableConverter<>).MakeGenericType(underlyingType);
src\Components\Endpoints\src\FormMapping\Factories\ParsableConverterFactory.cs (2)
15public bool CanConvert(Type type, FormDataMapperOptions options) 22public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options)
src\Components\Endpoints\src\FormMapping\FormDataConverterOfT.cs (1)
12internal abstract bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out T? result, out bool found);
src\Components\Endpoints\src\FormMapping\FormDataMapper.cs (1)
46public static partial void CannotResolveConverter(ILogger logger, Type type, Exception? ex);
src\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (4)
14private readonly ConcurrentDictionary<Type, FormDataConverter> _converters = new(); 60private static FormDataConverter CreateConverter(Type type, FormDataMapperOptions options) 75internal FormDataConverter ResolveConverter(Type type) 90internal bool CanConvert(Type type)
src\Components\Endpoints\src\FormMapping\IFormDataConverterFactory.cs (2)
12public bool CanConvert(Type type, FormDataMapperOptions options); 16public FormDataConverter CreateConverter(Type type, FormDataMapperOptions options);
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (31)
26public FormDataTypeMetadata? GetOrCreateMetadataFor(Type type, FormDataMapperOptions options) 267internal bool HasMetadataFor(Type type) => _context.TypeMetadata.ContainsKey(type); 269private void DetectCyclesAndMarkMetadataTypesAsRecursive(Type type, FormDataTypeMetadata result) 303void ReportRecursiveChain(Type type) 315public Dictionary<Type, FormDataTypeMetadata> TypeMetadata { get; set; } = new(); 317public List<Type> CurrentTypes { get; set; } = new(); 340internal void Track(Type type) 345internal void Untrack(Type type) 354public static partial void StartResolveMetadataGraph(ILogger logger, Type type); 357public static partial void EndResolveMetadataGraph(ILogger logger, Type type); 360public static partial void MetadataFound(ILogger<FormDataMetadataFactory> logger, Type type); 363public static partial void NoMetadataFound(ILogger<FormDataMetadataFactory> logger, Type type); 366public static partial void RecursiveTypeFound(ILogger<FormDataMetadataFactory> logger, Type type, string chain); 369public static partial void PrimitiveType(ILogger<FormDataMetadataFactory> logger, Type type); 372public static partial void DictionaryType(ILogger<FormDataMetadataFactory> logger, Type type); 375public static partial void CollectionType(ILogger<FormDataMetadataFactory> logger, Type type); 378public static partial void ObjectType(ILogger<FormDataMetadataFactory> logger, Type type); 381public static partial void ConstructorFound(ILogger<FormDataMetadataFactory> logger, Type type, string parameters); 384public static partial void ConstructorParameter(ILogger<FormDataMetadataFactory> logger, Type type, string name, Type parameterType); 387public static partial void CandidateProperty(ILogger<FormDataMetadataFactory> logger, string name, Type propertyType); 405public static partial void MetadataComputed(ILogger<FormDataMetadataFactory> logger, Type type); 408public static partial void GenericTypeDefinitionNotSupported(ILogger<FormDataMetadataFactory> logger, Type type); 411public static partial void MultiplePublicConstructorsFound(ILogger<FormDataMetadataFactory> logger, Type type); 414public static partial void InterfacesNotSupported(ILogger<FormDataMetadataFactory> logger, Type type); 417public static partial void AbstractClassesNotSupported(ILogger<FormDataMetadataFactory> logger, Type type); 420public static partial void NoPublicConstructorFound(ILogger<FormDataMetadataFactory> logger, Type type); 423public static partial void ConstructorParameterTypeNotSupported(ILogger<FormDataMetadataFactory> logger, Type type, string name, Type parameterType); 426public static partial void PropertyTypeNotSupported(ILogger<FormDataMetadataFactory> logger, Type type, string name, Type propertyType);
src\Components\Endpoints\src\FormMapping\Metadata\FormDataParameterMetadata.cs (2)
11public Type Type { get; set; } = parameter.ParameterType; 22public Type Type { get; }
src\Components\Endpoints\src\FormMapping\Metadata\FormDataPropertyMetadata.cs (1)
15public Type Type => property.PropertyType;
src\Components\Endpoints\src\FormMapping\Metadata\FormDataTypeMetadata.cs (2)
8internal class FormDataTypeMetadata(Type type) 12public Type Type { get; set; } = type;
src\Components\Endpoints\src\FormMapping\WellKnownConverters.cs (2)
13public static readonly IReadOnlyDictionary<Type, FormDataConverter> Converters; 19var converters = new Dictionary<Type, FormDataConverter>
src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (16)
19/// Determine whether <paramref name="queryType"/> is or implements a closed generic <see cref="Type"/> 22/// <param name="queryType">The <see cref="Type"/> of interest.</param> 23/// <param name="interfaceType">The open generic <see cref="Type"/> to match. Usually an interface.</param> 25/// The closed generic <see cref="Type"/> created from <paramref name="interfaceType"/> that 26/// <paramref name="queryType"/> is or implements. <c>null</c> if the two <see cref="Type"/>s have no such 34public static Type? ExtractGenericInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 59private static bool IsGenericInstantiation(Type candidate, Type interfaceType) 66private static Type? GetGenericInstantiation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 68Type? bestMatch = null; 70foreach (var @interface in interfaces) 96var baseType = queryType?.BaseType;
src\Shared\EndpointMetadataPopulator.cs (1)
49var returnType = methodInfo.ReturnType;
src\Shared\Json\JsonSerializerExtensions.cs (3)
16public static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType) 19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type) 25public static JsonTypeInfo GetRequiredTypeInfo(this JsonSerializerContext context, Type type)
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (9)
18public Type AwaiterType { get; } 23public Type ResultType { get; } 27Type awaiterType, 32Type resultType, 47Type type, 53var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 61var awaiterType = getAwaiterMethod.ReturnType; 64var isCompletedProperty = awaiterType.GetProperty("IsCompleted", Everything, binder: null, returnType: typeof(bool), types: Type.EmptyTypes, modifiers: null); 92var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\Shared\ObjectMethodExecutor\CoercedAwaitableInfo.cs (5)
15public Type CoercerResultType { get; } 25public CoercedAwaitableInfo(Expression coercerExpression, Type coercerResultType, AwaitableInfo coercedAwaitableInfo) 34[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 42out var nonGenericAwaitableType)) 60out var coercerResultType))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
70public Type? AsyncResultType { get; } 73public Type MethodReturnType { get; internal set; } 235var postCoercionMethodReturnType = coercedAwaitableInfo.CoercerResultType ?? methodInfo.ReturnType;
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (20)
59Type possibleFSharpAsyncType, 61out Type awaitableType) 63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single(); 98TryBuildCoercerFromUnitAwaitableToVoidAwaitable(awaitableType, out var coercerExpression, out var nonGenericAwaitableType) 132Type genericAwaitableType, 134out Type nonGenericAwaitableType) 152static Expression MakeTaskOfUnitToTaskExpression(Type type) 158static Expression MakeValueTaskOfUnitToValueTaskExpression(Type type) 171private static bool IsFSharpAsyncOpenGenericType(Type possibleFSharpAsyncType) => 174private static bool IsFSharpUnit(Type possibleFSharpUnitType) => 177private static bool IsCoerceableFSharpType(Type possibleFSharpType, string coerceableFSharpTypeName) 205private static bool TryPopulateFSharpValueCaches(Type possibleFSharpType) 208var fsharpOptionType = assembly.GetType(FSharpOptionTypeName); 209var fsharpAsyncType = assembly.GetType(FSharpAsyncTypeName); 210var fsharpAsyncGenericType = assembly.GetType(FSharpAsyncGenericTypeName); 218var fsharpOptionOfTaskCreationOptionsType = fsharpOptionType 224var fsharpOptionOfCancellationTokenType = fsharpOptionType 251private static bool TypesHaveSameIdentity(Type type1, Type type2)
src\Shared\ParameterBindingMethodCache.cs (29)
40private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 41private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 42private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new(); 61public bool HasTryParseMethod(Type type) 63var nonNullableParameterType = Nullable.GetUnderlyingType(type) ?? type; 74public Func<ParameterExpression, Expression, Expression>? FindTryParseMethod(Type type) 79Func<ParameterExpression, Expression, Expression>? Finder(Type type) 143Type t when t == typeof(DateTime) => DateTimeStyles.AdjustToUniversal | DateTimeStyles.AllowWhiteSpaces, 144Type t when t == typeof(DateTimeOffset) => DateTimeStyles.AssumeUniversal | DateTimeStyles.AllowWhiteSpaces, 212(Func<ParameterInfo, Expression>?, int) Finder(Type nonNullableParameterType) 234var valueTaskResultType = methodInfo.ReturnType.GetGenericArguments()[0]; 296var nonNullableParameterType = Nullable.GetUnderlyingType(parameter.ParameterType) ?? parameter.ParameterType; 307public (ConstructorInfo?, ConstructorParameter[]) FindConstructor(Type type) 309static (ConstructorInfo? constructor, ConstructorParameter[] parameters) Finder(Type type) 353private static ConstructorInfo? GetConstructor(Type type) 404private static MethodInfo? GetIBindableFromHttpContextMethod(Type type) 407foreach (var i in type.GetInterfaces()) 425private static bool TryGetExplicitIParsableTryParseMethod(Type type, out MethodInfo methodInfo) 436private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType) 450foreach (var implementedInterface in type.GetInterfaces()) 474private static MethodInfo? GetAnyMethodFromHierarchy(Type type, string name) 485foreach (var implementedInterface in type.GetInterfaces()) 507new[] { typeof(Type), typeof(string), typeof(object).MakeByRefType() }); 514new[] { typeof(string), Type.MakeGenericMethodParameter(0).MakeByRefType() }); 526private static bool TryGetDateTimeTryParseMethod(Type type, [NotNullWhen(true)] out MethodInfo? methodInfo) 562private static bool TryGetNumberStylesTryGetMethod(Type type, [NotNullWhen(true)] out MethodInfo? method, [NotNullWhen(true)] out NumberStyles? numberStyles) 703public ParameterLookupKey(string name, Type type) 710public Type Type { get; }
src\Shared\PropertyAsParameterInfo.cs (4)
140public override object[] GetCustomAttributes(Type attributeType, bool inherit) 187public override Type[] GetOptionalCustomModifiers() 190public override Type[] GetRequiredCustomModifiers() 193public override bool IsDefined(Type attributeType, bool inherit)
src\Shared\RouteHandlers\ExecuteHandlerHelper.cs (1)
41var runtimeType = value?.GetType();
src\Shared\TypeNameHelper\TypeNameHelper.cs (9)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 46/// <param name="type">The <see cref="Type"/>.</param> 52public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 59private static void ProcessType(StringBuilder builder, Type type, in DisplayNameOptions options) 93private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 95var innerType = type; 112private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Microsoft.AspNetCore.Http.Extensions.Tests (52)
HttpResponseJsonExtensionsTests.cs (1)
76public override int Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
ParameterBindingMethodCacheTests.cs (29)
27public void FindTryParseStringMethod_ReturnsTheExpectedTryParseMethodWithInvariantCulture(Type type) 67public void FindTryParseStringMethod_ReturnsTheExpectedTryParseMethodWithInvariantCultureDateType(Type type) 99public void FindTryParseStringMethod_ReturnsTheExpectedTryParseMethodWithInvariantCultureCustomType(Type type) 124public void FindTryParseMethod_WithNoFormatProvider(Type type) 170var type = typeof(TodoWithExplicitIParsable); 178var type = typeof(Choice); 198var type = typeof(Choice); 221var type = typeof(BindAsyncRecord); 252var type = typeof(BindAsyncSingleArgStruct); 472public void FindConstructor_FindsParameterlessConstructor_WhenExplicitlyDeclared(Type type) 484public void FindConstructor_FindsDefaultConstructor_WhenNotExplictlyDeclared(Type type) 498public void FindConstructor_FindsParameterizedConstructor_WhenExplictlyDeclared(Type type) 510public void FindConstructor_ReturnNullForStruct_WhenNotExplictlyDeclared(Type type) 522public void FindConstructor_ReturnNullForStruct_WhenMultipleParameterizedConstructorsDeclared(Type type) 531public static TheoryData<Type> InvalidTryParseStringTypesData 535return new TheoryData<Type> 554public void FindTryParseMethod_ThrowsIfInvalidTryParseOnType(Type type) 565public void FindTryParseMethod_DoesNotThrowIfInvalidTryParseOnType_WhenThrowOnInvalidFalse(Type type) 587public void FindTryParseMethod_IgnoresInvalidTryParseIfGoodOneFound(Type type) 593public static TheoryData<Type> InvalidBindAsyncTypesData 597return new TheoryData<Type> 614public void FindBindAsyncMethod_ThrowsIfInvalidBindAsyncOnType(Type type) 629public void FindBindAsyncMethod_DoesNotThrowIfInvalidBindAsyncOnType_WhenThrowOnInvalidFalse(Type type) 658public void FindBindAsyncMethod_IgnoresInvalidBindAsyncIfGoodOneFound(Type type) 680public void FindConstructor_ThrowsIfNoPublicConstructors(Type type) 690public void FindConstructor_ThrowsIfAbstract(Type type) 700public void FindConstructor_ThrowsIfMultipleParameterizedConstructors(Type type) 712public void FindConstructor_ThrowsIfParameterizedConstructorIncludeNoMatchingArguments(Type type) 1520public MockParameterInfo(Type type, string name)
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
253public JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options)
PropertyAsParameterInfoTests.cs (1)
176private static PropertyInfo GetProperty(Type containerType, string propertyName)
RequestDelegateFactoryTests.cs (7)
862mock.Setup(m => m.GetService(It.IsAny<Type>())).Returns<Type>(t => 992static string GetMultipleContructorsError(Type type) 995static string GetAbstractClassError(Type type) 998static string GetNoContructorsError(Type type) 1001static string GetInvalidConstructorError(Type type) 3684public object? GetService(Type serviceType)
RequestDelegateGenerator\CompileTimeCreationTests.AsParameters.cs (4)
41static string GetAbstractTypeError(Type type) 44static string GetMultipleContructorsError(Type type) 47static string GetNoContructorsError(Type type) 50static string GetInvalidConstructorError(Type type)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
453public object GetService(Type serviceType) 463public bool IsService(Type serviceType) =>
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (4)
223mock.Setup(m => m.GetService(It.IsAny<Type>())).Returns<Type>(t => 279mock.Setup(m => m.GetService(It.IsAny<Type>())).Returns<Type>(t =>
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (2)
229public object GetService(Type serviceType) 237public object GetRequiredService(Type serviceType)
RequestDelegateGenerator\SharedTypes.cs (1)
985public override ITodo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Microsoft.AspNetCore.Http.Microbenchmarks (10)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
453public object GetService(Type serviceType) 463public bool IsService(Type serviceType) =>
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
985public override ITodo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Http.Results (5)
HttpResultsHelper.cs (1)
41Type? runtimeType = value.GetType();
Results.cs (1)
219public static IResult Json(object? data, Type type, JsonSerializerContext context, string? contentType = null, int? statusCode = null)
src\Shared\Json\JsonSerializerExtensions.cs (3)
16public static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType) 19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type) 25public static JsonTypeInfo GetRequiredTypeInfo(this JsonSerializerContext context, Type type)
Microsoft.AspNetCore.Http.Results.Tests (50)
EmptyServiceProvider.cs (1)
10public object GetService(Type serviceType) => null;
ResultsOfTTests.cs (1)
104public object GetService(Type serviceType) => null;
ResultsOfTTests.Generated.cs (45)
19public void ResultsOfTResult1TResult2_Result_IsAssignedResult(int input, Type expectedResultType) 103public async Task ResultsOfTResult1TResult2_AcceptsIResult_AsFirstTypeArg(int input, Type expectedResultType) 128public async Task ResultsOfTResult1TResult2_AcceptsIResult_AsSecondTypeArg(int input, Type expectedResultType) 154public async Task ResultsOfTResult1TResult2_AcceptsNestedResultsOfT_AsFirstTypeArg(int input, Type expectedResultType) 181public async Task ResultsOfTResult1TResult2_AcceptsNestedResultsOfT_AsSecondTypeArg(int input, Type expectedResultType) 231public void ResultsOfTResult1TResult2TResult3_Result_IsAssignedResult(int input, Type expectedResultType) 319public async Task ResultsOfTResult1TResult2TResult3_AcceptsIResult_AsFirstTypeArg(int input, Type expectedResultType) 346public async Task ResultsOfTResult1TResult2TResult3_AcceptsIResult_AsSecondTypeArg(int input, Type expectedResultType) 373public async Task ResultsOfTResult1TResult2TResult3_AcceptsIResult_AsThirdTypeArg(int input, Type expectedResultType) 401public async Task ResultsOfTResult1TResult2TResult3_AcceptsNestedResultsOfT_AsFirstTypeArg(int input, Type expectedResultType) 430public async Task ResultsOfTResult1TResult2TResult3_AcceptsNestedResultsOfT_AsSecondTypeArg(int input, Type expectedResultType) 459public async Task ResultsOfTResult1TResult2TResult3_AcceptsNestedResultsOfT_AsThirdTypeArg(int input, Type expectedResultType) 512public void ResultsOfTResult1TResult2TResult3TResult4_Result_IsAssignedResult(int input, Type expectedResultType) 604public async Task ResultsOfTResult1TResult2TResult3TResult4_AcceptsIResult_AsFirstTypeArg(int input, Type expectedResultType) 633public async Task ResultsOfTResult1TResult2TResult3TResult4_AcceptsIResult_AsSecondTypeArg(int input, Type expectedResultType) 662public async Task ResultsOfTResult1TResult2TResult3TResult4_AcceptsIResult_AsThirdTypeArg(int input, Type expectedResultType) 691public async Task ResultsOfTResult1TResult2TResult3TResult4_AcceptsIResult_AsFourthTypeArg(int input, Type expectedResultType) 721public async Task ResultsOfTResult1TResult2TResult3TResult4_AcceptsNestedResultsOfT_AsFirstTypeArg(int input, Type expectedResultType) 752public async Task ResultsOfTResult1TResult2TResult3TResult4_AcceptsNestedResultsOfT_AsSecondTypeArg(int input, Type expectedResultType) 783public async Task ResultsOfTResult1TResult2TResult3TResult4_AcceptsNestedResultsOfT_AsThirdTypeArg(int input, Type expectedResultType) 814public async Task ResultsOfTResult1TResult2TResult3TResult4_AcceptsNestedResultsOfT_AsFourthTypeArg(int input, Type expectedResultType) 870public void ResultsOfTResult1TResult2TResult3TResult4TResult5_Result_IsAssignedResult(int input, Type expectedResultType) 966public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsIResult_AsFirstTypeArg(int input, Type expectedResultType) 997public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsIResult_AsSecondTypeArg(int input, Type expectedResultType) 1028public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsIResult_AsThirdTypeArg(int input, Type expectedResultType) 1059public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsIResult_AsFourthTypeArg(int input, Type expectedResultType) 1090public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsIResult_AsFifthTypeArg(int input, Type expectedResultType) 1122public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsNestedResultsOfT_AsFirstTypeArg(int input, Type expectedResultType) 1155public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsNestedResultsOfT_AsSecondTypeArg(int input, Type expectedResultType) 1188public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsNestedResultsOfT_AsThirdTypeArg(int input, Type expectedResultType) 1221public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsNestedResultsOfT_AsFourthTypeArg(int input, Type expectedResultType) 1254public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5_AcceptsNestedResultsOfT_AsFifthTypeArg(int input, Type expectedResultType) 1313public void ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_Result_IsAssignedResult(int input, Type expectedResultType) 1413public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsIResult_AsFirstTypeArg(int input, Type expectedResultType) 1446public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsIResult_AsSecondTypeArg(int input, Type expectedResultType) 1479public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsIResult_AsThirdTypeArg(int input, Type expectedResultType) 1512public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsIResult_AsFourthTypeArg(int input, Type expectedResultType) 1545public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsIResult_AsFifthTypeArg(int input, Type expectedResultType) 1578public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsIResult_AsSixthTypeArg(int input, Type expectedResultType) 1612public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsNestedResultsOfT_AsFirstTypeArg(int input, Type expectedResultType) 1647public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsNestedResultsOfT_AsSecondTypeArg(int input, Type expectedResultType) 1682public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsNestedResultsOfT_AsThirdTypeArg(int input, Type expectedResultType) 1717public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsNestedResultsOfT_AsFourthTypeArg(int input, Type expectedResultType) 1752public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsNestedResultsOfT_AsFifthTypeArg(int input, Type expectedResultType) 1787public async Task ResultsOfTResult1TResult2TResult3TResult4TResult5TResult6_AcceptsNestedResultsOfT_AsSixthTypeArg(int input, Type expectedResultType)
ResultsTests.cs (3)
1621public void FactoryMethod_ReturnsCorrectResultType(Expression<Func<IResult>> expression, Type expectedReturnType) 1649private static IEnumerable<(Expression<Func<IResult>>, Type)> FactoryMethodsTuples { get; } = new List<(Expression<Func<IResult>>, Type)>
Microsoft.AspNetCore.Http.Tests (3)
DefaultHttpContextTests.cs (3)
335var type = value.GetType(); 363var type = value.GetType(); 521public object GetService(Type serviceType)
Microsoft.AspNetCore.Identity (7)
IdentityBuilderExtensions.cs (7)
30var dataProtectionProviderType = typeof(DataProtectorTokenProvider<>).MakeGenericType(builder.UserType); 31var phoneNumberProviderType = typeof(PhoneNumberTokenProvider<>).MakeGenericType(builder.UserType); 32var emailTokenProviderType = typeof(EmailTokenProvider<>).MakeGenericType(builder.UserType); 33var authenticatorProviderType = typeof(AuthenticatorTokenProvider<>).MakeGenericType(builder.UserType); 58var managerType = typeof(SignInManager<>).MakeGenericType(builder.UserType); 73var managerType = typeof(SignInManager<>).MakeGenericType(builder.UserType); 74var customType = typeof(TSignInManager);
Microsoft.AspNetCore.Identity.EntityFrameworkCore (16)
IdentityEntityFrameworkBuilderExtensions.cs (16)
29private static void AddStores(IServiceCollection services, Type userType, Type? roleType, Type contextType) 31var identityUserType = FindGenericBaseType(userType, typeof(IdentityUser<>)); 37var keyType = identityUserType.GenericTypeArguments[0]; 41var identityRoleType = FindGenericBaseType(roleType, typeof(IdentityRole<>)); 47Type userStoreType; 48Type roleStoreType; 49var identityContext = FindGenericBaseType(contextType, typeof(IdentityDbContext<,,,,,,,>)); 75Type userStoreType; 76var identityContext = FindGenericBaseType(contextType, typeof(IdentityUserContext<,,,,>)); 94private static Type? FindGenericBaseType(Type currentType, Type genericBaseType) 96Type? type = currentType; 99var genericType = type.IsGenericType ? type.GetGenericTypeDefinition() : null;
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (2)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (2)
82protected Type GetBasestTypeInAssembly(Type type)
Microsoft.AspNetCore.Identity.InMemory.Test (2)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (2)
82protected Type GetBasestTypeInAssembly(Type type)
Microsoft.AspNetCore.Identity.Test (2)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (2)
82protected Type GetBasestTypeInAssembly(Type type)
Microsoft.AspNetCore.Identity.UI (4)
IdentityDefaultUIAttribute.cs (2)
9public IdentityDefaultUIAttribute(Type implementationTemplate) 14public Type Template { get; }
IdentityPageModelConvention.cs (2)
20var templateInstance = defaultUIAttribute.Template.MakeGenericType(typeof(TUser)); 24private static void ValidateTemplate(Type template)
Microsoft.AspNetCore.InternalTesting (17)
LoggedTest\LoggedTestBase.cs (1)
64var classType = GetType();
TestContext.cs (2)
22Type testClass, 37public Type TestClass { get; }
TestFileOutputContext.cs (1)
100public static string GetTestClassName(Type type)
TestPlatformHelper.cs (1)
12Type.GetType("Mono.Runtime") != null;
xunit\AspNetTestAssemblyRunner.cs (1)
18private readonly Dictionary<Type, object> _assemblyFixtureMappings = new();
xunit\AspNetTestCaseRunner.cs (1)
28protected override XunitTestRunner CreateTestRunner(ITest test, IMessageBus messageBus, Type testClass, object[] constructorArguments, MethodInfo testMethod, object[] testMethodArguments, string skipReason, IReadOnlyList<BeforeAfterTestAttribute> beforeAfterAttributes, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
xunit\AspNetTestClassRunner.cs (1)
24IDictionary<Type, object> collectionFixtureMappings)
xunit\AspNetTestCollectionRunner.cs (2)
15private readonly IDictionary<Type, object> _assemblyFixtureMappings; 19Dictionary<Type, object> assemblyFixtureMappings,
xunit\AspNetTestInvoker.cs (2)
22Type testClass, 62private static IEnumerable<ITestMethodLifecycle> GetLifecycleHooks(object testClassInstance, Type testClass, MethodInfo testMethod)
xunit\AspNetTestRunner.cs (1)
22Type testClass,
xunit\AspNetTheoryTestCaseRunner.cs (1)
28protected override XunitTestRunner CreateTestRunner(ITest test, IMessageBus messageBus, Type testClass, object[] constructorArguments, MethodInfo testMethod, object[] testMethodArguments, string skipReason, IReadOnlyList<BeforeAfterTestAttribute> beforeAfterAttributes, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
xunit\AssemblyFixtureAttribute.cs (2)
11public AssemblyFixtureAttribute(Type fixtureType) 16public Type FixtureType { get; private set; }
xunit\ConditionalTheoryDiscoverer.cs (1)
54var type = obj.GetType();
Microsoft.AspNetCore.InternalTesting.Tests (5)
TestableAspNetTestAssemblyRunner.cs (2)
31public static TestableAspNetTestAssemblyRunner Create(Type fixtureType, bool failTestCase = false) 87var type = assembly.GetType(TestableAssembly.TestClassName);
TestableAssembly.cs (3)
50public static Assembly Create(Type fixtureType, string logDirectory = null, bool failTestCase = false) 58var fixtureConstructor = typeof(AssemblyFixtureAttribute).GetConstructor(new[] { typeof(Type) }); 77var factConstructor = typeof(FactAttribute).GetConstructor(Array.Empty<Type>());
Microsoft.AspNetCore.JsonPatch (53)
Adapters\AdapterFactory.cs (1)
40var type = typeof(DictionaryAdapter<,>).MakeGenericType(jsonDictionaryContract.DictionaryKeyType, jsonDictionaryContract.DictionaryValueType);
Converters\JsonPatchDocumentConverter.cs (2)
17public override bool CanConvert(Type objectType) 22public override object ReadJson(JsonReader reader, Type objectType, object existingValue,
Converters\TypedJsonPatchDocumentConverter.cs (6)
16Type objectType, 27var genericType = objectType.GenericTypeArguments[0]; 33var genericOperation = typeof(Operation<>); 34var concreteOperationType = genericOperation.MakeGenericType(genericType); 36var genericList = typeof(List<>); 37var concreteList = genericList.MakeGenericType(concreteOperationType);
Internal\ConversionResultProvider.cs (5)
16public static ConversionResult ConvertTo(object value, Type typeToConvertTo) 21internal static ConversionResult ConvertTo(object value, Type typeToConvertTo, IContractResolver contractResolver) 58public static ConversionResult CopyTo(object value, Type typeToConvertTo) 60var targetType = typeToConvertTo; 81private static bool IsNullableType(Type type)
Internal\DynamicObjectAdapter.cs (2)
237protected virtual bool TryConvertValue(object value, Type propertyType, out object convertedValue) 242protected virtual bool TryConvertValue(object value, Type propertyType, IContractResolver contractResolver, out object convertedValue)
Internal\ListAdapter.cs (8)
29if (!TryGetListTypeArgument(list, out var typeArgument, out errorMessage)) 131if (!TryGetListTypeArgument(list, out var typeArgument, out errorMessage)) 168if (!TryGetListTypeArgument(list, out var typeArgument, out errorMessage)) 232Type listTypeArgument, 248Type listTypeArgument, 267protected virtual bool TryGetListTypeArgument(IList list, out Type listTypeArgument, out string errorMessage) 270var listType = list.GetType(); 279var genericList = ClosedGenericMatcher.ExtractGenericInterface(listType, typeof(IList<>));
Internal\PocoAdapter.cs (2)
226protected virtual bool TryConvertValue(object value, Type propertyType, out object convertedValue) 231protected virtual bool TryConvertValue(object value, Type propertyType, IContractResolver contractResolver, out object convertedValue)
src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (16)
19/// Determine whether <paramref name="queryType"/> is or implements a closed generic <see cref="Type"/> 22/// <param name="queryType">The <see cref="Type"/> of interest.</param> 23/// <param name="interfaceType">The open generic <see cref="Type"/> to match. Usually an interface.</param> 25/// The closed generic <see cref="Type"/> created from <paramref name="interfaceType"/> that 26/// <paramref name="queryType"/> is or implements. <c>null</c> if the two <see cref="Type"/>s have no such 34public static Type? ExtractGenericInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 59private static bool IsGenericInstantiation(Type candidate, Type interfaceType) 66private static Type? GetGenericInstantiation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 68Type? bestMatch = null; 70foreach (var @interface in interfaces) 96var baseType = queryType?.BaseType;
src\Shared\TrimmingAttributes.cs (11)
184/// with the specified signature of a member on a <see cref="System.Type"/>. 187/// <param name="type">The <see cref="System.Type"/> containing <paramref name="memberSignature"/>.</param> 188public DynamicDependencyAttribute(string memberSignature, Type type) 210/// with the specified types of members on a <see cref="System.Type"/>. 213/// <param name="type">The <see cref="System.Type"/> containing the specified members.</param> 214public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, Type type) 254/// Gets the <see cref="System.Type"/> containing the specified member. 260public Type? Type { get; } 286/// Indicates that certain members on a specified <see cref="Type"/> are accessed dynamically, 293/// This attribute is valid on members whose type is <see cref="Type"/> or <see cref="string"/>. 299/// can be accessed dynamically on <see cref="Type"/> instances returned from calling
Microsoft.AspNetCore.JsonPatch.Tests (6)
IntegrationTests\HeterogenousCollectionTests.cs (3)
51protected override JsonConverter ResolveContractConverter(Type objectType) 68public override Shape Create(Type objectType) 75Type objectType,
TestObjectModels\HeterogenousCollection.cs (3)
39protected override JsonConverter ResolveContractConverter(Type objectType) 54public override Rectangle Create(Type objectType) 61Type objectType,
Microsoft.AspNetCore.Localization.FunctionalTests (1)
LocalizationTest.cs (1)
96private async Task RunTest(Type startupType, string culture, string expected)
Microsoft.AspNetCore.Mvc (6)
HotReloadService.cs (6)
51private static event Action<Type[]?>? ClearCacheEvent; 52private static event Action<Type[]?>? UpdateApplicationEvent; 54public static void ClearCache(Type[]? changedTypes) 59public static void UpdateApplication(Type[]? changedTypes) 66private void NotifyClearCache(Type[]? changedTypes) 75private void NotifyUpdateApplication(Type[]? changedTypes)
Microsoft.AspNetCore.Mvc.Abstractions (123)
Abstractions\ParameterDescriptor.cs (1)
21public Type ParameterType { get; set; } = default!;
ApiExplorer\ApiParameterDescription.cs (1)
42public Type Type { get; set; } = default!;
ApiExplorer\ApiResponseType.cs (1)
34public Type? Type { get; set; }
Formatters\FormatterCollection.cs (1)
44public void RemoveType(Type formatterType)
Formatters\InputFormatterContext.cs (2)
113/// Gets the requested <see cref="Type"/> of the request body deserialization. 115public Type ModelType { get; }
Formatters\OutputFormatterCanWriteContext.cs (2)
55/// Gets or sets the <see cref="Type"/> of the object to write to the response. 57public virtual Type? ObjectType { get; protected set; }
Formatters\OutputFormatterWriteContext.cs (2)
19/// <param name="objectType">The <see cref="Type"/> of the object to write to the response.</param> 21public OutputFormatterWriteContext(HttpContext httpContext, Func<Stream, Encoding, TextWriter> writerFactory, Type? objectType, object? @object)
ModelBinding\BindingInfo.cs (3)
16private Type? _binderType; 53/// Gets or sets the <see cref="Type"/> of the <see cref="IModelBinder"/> implementation used to bind the 60public Type? BinderType
ModelBinding\IBinderTypeProviderMetadata.cs (3)
7/// Provides a <see cref="Type"/> which implements <see cref="IModelBinder"/>. 12/// A <see cref="Type"/> which implements either <see cref="IModelBinder"/>. 14Type? BinderType { get; }
ModelBinding\IModelMetadataProvider.cs (8)
15/// Supplies metadata describing a <see cref="Type"/>. 17/// <param name="modelType">The <see cref="Type"/>.</param> 18/// <returns>A <see cref="ModelMetadata"/> instance describing the <see cref="Type"/>.</returns> 19ModelMetadata GetMetadataForType(Type modelType); 22/// Supplies metadata describing the properties of a <see cref="Type"/>. 24/// <param name="modelType">The <see cref="Type"/>.</param> 25/// <returns>A set of <see cref="ModelMetadata"/> instances describing properties of the <see cref="Type"/>.</returns> 26IEnumerable<ModelMetadata> GetMetadataForProperties(Type modelType);
ModelBinding\Metadata\ModelMetadataIdentity.cs (15)
14Type modelType, 16Type? containerType = null, 28/// Creates a <see cref="ModelMetadataIdentity"/> for the provided model <see cref="Type"/>. 30/// <param name="modelType">The model <see cref="Type"/>.</param> 32public static ModelMetadataIdentity ForType(Type modelType) 48Type modelType, 50Type containerType) 68Type modelType, 69Type containerType) 93public static ModelMetadataIdentity ForParameter(ParameterInfo parameter, Type modelType) 108public static ModelMetadataIdentity ForConstructor(ConstructorInfo constructor, Type modelType) 117/// Gets the <see cref="Type"/> defining the model property represented by the current 120public Type? ContainerType { get; } 123/// Gets the <see cref="Type"/> represented by the current instance. 125public Type ModelType { get; }
ModelBinding\Metadata\ModelMetadataKind.cs (1)
12/// Used for <see cref="ModelMetadata"/> for a <see cref="System.Type"/>.
ModelBinding\ModelBindingContext.cs (1)
90public virtual Type ModelType => ModelMetadata.ModelType;
ModelBinding\ModelMetadata.cs (17)
54public Type? ContainerType => Identity.ContainerType; 76public Type ModelType => Identity.ModelType; 191/// Gets the <see cref="Type"/> of an <see cref="IModelBinder"/> of a model if specified explicitly using 194public abstract Type? BinderType { get; } 236/// Gets the <see cref="ModelMetadata"/> for elements of <see cref="ModelType"/> if that <see cref="Type"/> 432/// Gets the <see cref="Type"/> for elements of <see cref="ModelType"/> if that <see cref="Type"/> 435public Type? ElementType { get; private set; } 441/// A complex type is defined as a <see cref="Type"/> without a <see cref="TypeConverter"/> that can convert 456/// A collection type is defined as a <see cref="Type"/> which is assignable to <see cref="ICollection{T}"/>. 464/// An enumerable type is defined as a <see cref="Type"/> which is assignable to 481public Type UnderlyingOrModelType { get; private set; } = default!; 546internal static Func<ParameterExpression, Expression, Expression>? FindTryParseMethod(Type modelType) 661var collectionType = ClosedGenericMatcher.ExtractGenericInterface(ModelType, typeof(ICollection<>)); 686var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(ModelType, typeof(IEnumerable<>)); 719public virtual ModelMetadata GetMetadataForType(Type modelType) 725public virtual IEnumerable<ModelMetadata> GetMetadataForProperties(Type modelType)
ModelBinding\ModelMetadataProvider.cs (11)
14/// Supplies metadata describing the properties of a <see cref="Type"/>. 16/// <param name="modelType">The <see cref="Type"/>.</param> 17/// <returns>A set of <see cref="ModelMetadata"/> instances describing properties of the <see cref="Type"/>.</returns> 18public abstract IEnumerable<ModelMetadata> GetMetadataForProperties(Type modelType); 21/// Supplies metadata describing a <see cref="Type"/>. 23/// <param name="modelType">The <see cref="Type"/>.</param> 24/// <returns>A <see cref="ModelMetadata"/> instance describing the <see cref="Type"/>.</returns> 25public abstract ModelMetadata GetMetadataForType(Type modelType); 40public virtual ModelMetadata GetMetadataForParameter(ParameterInfo parameter, Type modelType) 51public virtual ModelMetadata GetMetadataForProperty(PropertyInfo propertyInfo, Type modelType) 62public virtual ModelMetadata GetMetadataForConstructor(ConstructorInfo constructor, Type modelType)
src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (16)
19/// Determine whether <paramref name="queryType"/> is or implements a closed generic <see cref="Type"/> 22/// <param name="queryType">The <see cref="Type"/> of interest.</param> 23/// <param name="interfaceType">The open generic <see cref="Type"/> to match. Usually an interface.</param> 25/// The closed generic <see cref="Type"/> created from <paramref name="interfaceType"/> that 26/// <paramref name="queryType"/> is or implements. <c>null</c> if the two <see cref="Type"/>s have no such 34public static Type? ExtractGenericInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 59private static bool IsGenericInstantiation(Type candidate, Type interfaceType) 66private static Type? GetGenericInstantiation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 68Type? bestMatch = null; 70foreach (var @interface in interfaces) 96var baseType = queryType?.BaseType;
src\Shared\ParameterBindingMethodCache.cs (29)
40private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 41private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 42private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new(); 61public bool HasTryParseMethod(Type type) 63var nonNullableParameterType = Nullable.GetUnderlyingType(type) ?? type; 74public Func<ParameterExpression, Expression, Expression>? FindTryParseMethod(Type type) 79Func<ParameterExpression, Expression, Expression>? Finder(Type type) 143Type t when t == typeof(DateTime) => DateTimeStyles.AdjustToUniversal | DateTimeStyles.AllowWhiteSpaces, 144Type t when t == typeof(DateTimeOffset) => DateTimeStyles.AssumeUniversal | DateTimeStyles.AllowWhiteSpaces, 212(Func<ParameterInfo, Expression>?, int) Finder(Type nonNullableParameterType) 234var valueTaskResultType = methodInfo.ReturnType.GetGenericArguments()[0]; 296var nonNullableParameterType = Nullable.GetUnderlyingType(parameter.ParameterType) ?? parameter.ParameterType; 307public (ConstructorInfo?, ConstructorParameter[]) FindConstructor(Type type) 309static (ConstructorInfo? constructor, ConstructorParameter[] parameters) Finder(Type type) 353private static ConstructorInfo? GetConstructor(Type type) 404private static MethodInfo? GetIBindableFromHttpContextMethod(Type type) 407foreach (var i in type.GetInterfaces()) 425private static bool TryGetExplicitIParsableTryParseMethod(Type type, out MethodInfo methodInfo) 436private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType) 450foreach (var implementedInterface in type.GetInterfaces()) 474private static MethodInfo? GetAnyMethodFromHierarchy(Type type, string name) 485foreach (var implementedInterface in type.GetInterfaces()) 507new[] { typeof(Type), typeof(string), typeof(object).MakeByRefType() }); 514new[] { typeof(string), Type.MakeGenericMethodParameter(0).MakeByRefType() }); 526private static bool TryGetDateTimeTryParseMethod(Type type, [NotNullWhen(true)] out MethodInfo? methodInfo) 562private static bool TryGetNumberStylesTryGetMethod(Type type, [NotNullWhen(true)] out MethodInfo? method, [NotNullWhen(true)] out NumberStyles? numberStyles) 703public ParameterLookupKey(string name, Type type) 710public Type Type { get; }
src\Shared\TypeNameHelper\TypeNameHelper.cs (9)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 46/// <param name="type">The <see cref="Type"/>.</param> 52public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 59private static void ProcessType(StringBuilder builder, Type type, in DisplayNameOptions options) 93private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 95var innerType = type; 112private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Microsoft.AspNetCore.Mvc.Abstractions.Test (33)
ModelBinding\BindingInfoTest.cs (10)
104var modelType = typeof(Guid); 131var modelType = typeof(Guid?); 153var modelType = typeof(Guid); 178var modelType = typeof(Guid); 204var modelType = typeof(Guid); 231var modelType = typeof(Guid); 257var modelType = typeof(Guid?); 279var modelType = typeof(Guid); 300var modelType = typeof(Guid); 322var modelType = typeof(Guid);
ModelBinding\ModelMetadataTest.cs (23)
23public void IsComplexType_ReturnsFalseForSimpleTypes(Type type) 37public void IsComplexType_ReturnsTrueForComplexTypes(Type type) 64public static TheoryData<Type> NonCollectionNonEnumerableData 68return new TheoryData<Type> 78public static TheoryData<Type> CollectionAndEnumerableData 82return new TheoryData<Type> 99public void IsCollectionType_ReturnsFalseForNonCollectionTypes(Type type) 110public void IsCollectionType_ReturnsTrueForCollectionTypes(Type type) 121public void IsEnumerableType_ReturnsFalseForNonEnumerableTypes(Type type) 135public void IsEnumerableType_ReturnsTrueForEnumerableTypes(Type type) 154public void IsNullableValueType_ReturnsExpectedValue(Type modelType, bool expected) 173public void IsReferenceOrNullableType_ReturnsExpectedValue(Type modelType, bool expected) 192public void UnderlyingOrModelType_ReturnsExpectedValue(Type modelType, Type expected) 208public void ElementType_ReturnsNull_ForNonCollections(Type modelType) 214var elementType = metadata.ElementType; 229public void ElementType_ReturnsExpectedMetadata(Type modelType, Type expected) 235var elementType = metadata.ElementType; 413public TestModelMetadata(Type modelType) 423public TestModelMetadata(PropertyInfo propertyInfo, Type modelType, Type containerType) 444public override Type BinderType
Microsoft.AspNetCore.Mvc.ApiExplorer (35)
ApiResponseTypeProvider.cs (14)
34var declaredReturnType = GetDeclaredReturnType(action); 36var runtimeReturnType = GetRuntimeReturnType(declaredReturnType); 47var defaultErrorType = typeof(void); 78Type? type, 79Type defaultErrorType) 136Type? type, 137Type defaultErrorType, 220Type? type, 285var responseType = apiResponse.Type; 334private Type? GetDeclaredReturnType(ControllerActionDescriptor action) 336var declaredReturnType = action.MethodInfo.ReturnType; 345var unwrappedType = declaredReturnType; 366private static Type? GetRuntimeReturnType(Type? declaredReturnType)
DefaultApiDescriptionProvider.cs (3)
414private IReadOnlyList<ApiRequestFormat> GetSupportedFormats(MediaTypeCollection contentTypes, Type type) 664private static Type GetModelType(ModelMetadata metadata) 683public readonly Type ContainerType;
EndpointMetadataApiDescriptionProvider.cs (9)
142var acceptsRequestType = acceptsMetadata.RequestType; 253private (BindingSource, string, bool, Type) GetBindingSourceAndName(ParameterInfo parameter, RoutePattern pattern, bool disableInferredBody) 293var displayType = EndpointModelMetadata.GetDisplayType(parameter.ParameterType); 324Type returnType, 327var responseType = returnType; 345var defaultErrorType = errorMetadata?.Type ?? typeof(void); 402private static ApiResponseType CreateDefaultApiResponseType(Type responseType) 419private static ApiResponseFormat? CreateDefaultApiResponseFormat(Type responseType) 438private static EndpointModelMetadata CreateModelMetadata(Type type) =>
EndpointModelMetadata.cs (4)
20public override Type? BinderType { get; } 55public static Type GetDisplayType(Type type) 57var underlyingType = Nullable.GetUnderlyingType(type) ?? type;
src\Shared\PropertyAsParameterInfo.cs (4)
140public override object[] GetCustomAttributes(Type attributeType, bool inherit) 187public override Type[] GetOptionalCustomModifiers() 190public override Type[] GetRequiredCustomModifiers() 193public override bool IsDefined(Type attributeType, bool inherit)
src\Shared\RoslynUtils\TypeHelper.cs (1)
22internal static bool IsCompilerGeneratedType(Type? type = null)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (28)
ApiResponseTypeProviderTest.cs (4)
328var errorType = typeof(InvalidTimeZoneException); 381var errorType = typeof(ProblemDetails); 423var errorType = typeof(InvalidTimeZoneException); 784private static ControllerActionDescriptor GetControllerActionDescriptor(Type type, string name)
DefaultApiDescriptionProviderTest.cs (17)
171Type constraintType, 217Type constraintType, 656return new TheoryData<Type, string, List<FilterDescriptor>> 685Type controllerType, 733public static TheoryData<Type, string, List<FilterDescriptor>> ReturnsVoidOrTaskWithProducesContentTypeData 756return new TheoryData<Type, string, List<FilterDescriptor>> 795Type controllerType, 2293private ControllerActionDescriptor CreateActionDescriptor(string methodName = null, Type controllerType = null) 2807public List<Type> SupportedTypes { get; } = new List<Type>(); 2816protected override bool CanReadType(Type type) 2835public List<Type> SupportedTypes { get; } = new List<Type>(); 2842protected override bool CanWriteType(Type type) 2875public Type Type { get; set; } 2900public Type RequestType => null; 2907public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
EndpointMetadataApiDescriptionProviderTest.cs (7)
134static void AssertJsonResponse(ApiDescription apiDescription, Type expectedType) 304static void AssertPathParameter(ApiDescription apiDescription, Type expectedTYpe) 325static void AssertPathParameter(ApiDescription apiDescription, Type expectedTYpe) 437static void AssertBodyParameter(ApiDescription apiDescription, string expectedName, Type expectedType) 1142static void AssertFormFileParameter(ApiDescription apiDescription, Type expectedType, string expectedName) 1415public bool IsService(Type serviceType) => serviceType == typeof(IInferredServiceInterface); 1505public object? GetService(Type serviceType)
Microsoft.AspNetCore.Mvc.Core (414)
ApiConventionMethodAttribute.cs (4)
28/// The <see cref="Type"/> of the convention. 37public ApiConventionMethodAttribute(Type conventionType, string methodName) 47private static MethodInfo GetConventionMethod(Type conventionType, string methodName) 68public Type ConventionType { get; }
ApiConventionTypeAttribute.cs (4)
34/// The <see cref="Type"/> of the convention. 42public ApiConventionTypeAttribute(Type conventionType) 51public Type ConventionType { get; } 53internal static void EnsureValid(Type conventionType)
ApiExplorer\ApiConventionMatcher.cs (2)
169internal static bool IsTypeMatch(Type type, Type conventionType, ApiConventionTypeMatchBehavior typeMatchBehavior)
ApiExplorer\IApiRequestFormatMetadataProvider.cs (2)
24/// The <see cref="Type"/> for which the supported content types are desired. 29Type objectType);
ApiExplorer\IApiResponseMetadataProvider.cs (1)
18Type? Type { get; }
ApiExplorer\IApiResponseTypeMetadataProvider.cs (2)
24/// The <see cref="Type"/> for which the supported content types are desired. 29Type objectType);
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (1)
43var defaultErrorType = options.SuppressMapClientErrors ? typeof(void) : typeof(ProblemDetails);
ApplicationModels\ApplicationModelFactory.cs (1)
329var type = method.ReflectedType!;
ApplicationModels\DefaultApplicationModelProvider.cs (2)
218var declaringType = propertyInfo.DeclaringType!; 656var declaringType = baseMethodInfo.DeclaringType;
ApplicationModels\InferParameterBindingInfoConvention.cs (2)
134private bool IsService(Type type) 144type.GetGenericTypeDefinition() is Type genericDefinition &&
ApplicationModels\ParameterModelBase.cs (2)
22Type parameterType, 59public Type ParameterType { get; }
ApplicationParts\ApplicationPartFactory.cs (1)
45var type = provideAttribute.GetFactoryType();
ApplicationParts\ProvideApplicationPartFactoryAttribute.cs (4)
12private readonly Type? _applicationPartFactoryType; 19public ProvideApplicationPartFactoryAttribute(Type factoryType) 39public Type GetFactoryType() 42Type.GetType(_applicationPartFactoryTypeName!, throwOnError: true)!;
BindPropertyAttribute.cs (2)
26private Type? _binderType; 41public Type? BinderType
ConsumesAttribute.cs (3)
62public ConsumesAttribute(Type requestType, string contentType, params string[] otherContentTypes) 97readonly Type? _requestType; 101Type? IAcceptsMetadata.RequestType => _requestType;
ControllerBase.cs (2)
2748Type modelType, 2785Type modelType,
Controllers\ControllerActivatorProvider.cs (2)
44var controllerType = descriptor.ControllerTypeInfo?.AsType(); 58var typeActivator = ActivatorUtilities.CreateFactory(controllerType, Type.EmptyTypes);
Controllers\ControllerBinderDelegateProvider.cs (1)
174var controllerType = actionDescriptor.ControllerTypeInfo.AsType();
Controllers\ControllerFactoryProvider.cs (3)
42var controllerType = descriptor.ControllerTypeInfo?.AsType(); 77var controllerType = descriptor.ControllerTypeInfo?.AsType(); 98var controllerType = descriptor.ControllerTypeInfo?.AsType();
Controllers\DefaultControllerPropertyActivator.cs (5)
13private static readonly Func<Type, PropertyActivator<ControllerContext>[]> _getPropertiesToActivate = 15private readonly ConcurrentDictionary<Type, PropertyActivator<ControllerContext>[]> _activateActions = new(); 19var controllerType = controller.GetType(); 37var controllerType = actionDescriptor.ControllerTypeInfo?.AsType(); 59private static PropertyActivator<ControllerContext>[] GetPropertiesToActivate(Type type)
Controllers\ServiceBasedControllerActivator.cs (1)
19var controllerType = actionContext.ActionDescriptor.ControllerTypeInfo.AsType();
DependencyInjection\ApplicationModelConventionExtensions.cs (1)
32public static void RemoveType(this IList<IApplicationModelConvention> list, Type type)
DependencyInjection\MvcCoreMvcBuilderExtensions.cs (1)
127foreach (var controller in feature.Controllers.Select(c => c.AsType()))
DependencyInjection\MvcCoreMvcCoreBuilderExtensions.cs (1)
144foreach (var controller in feature.Controllers.Select(c => c.AsType()))
Filters\DisableRequestSizeLimitFilter.cs (3)
72public static partial void NotMostEffectiveFilter(ILogger logger, Type overriddenFilter, Type overridingFilter, Type filterPolicy);
Filters\FilterCollection.cs (12)
22/// Use <see cref="AddService(Type)"/> to register a service as a filter. 38/// Use <see cref="AddService(Type)"/> to register a service as a filter. 41public IFilterMetadata Add(Type filterType) 57/// Use <see cref="AddService(Type)"/> to register a service as a filter. 73/// Use <see cref="AddService(Type)"/> to register a service as a filter. 75public IFilterMetadata Add(Type filterType, int order) 99/// <see cref="Add(Type)"/> to register a service that will be created via 115/// <see cref="Add(Type)"/> to register a service that will be created via 119public IFilterMetadata AddService(Type filterType) 134/// <see cref="Add(Type)"/> to register a service that will be created via 150/// <see cref="Add(Type)"/> to register a service that will be created via 153public IFilterMetadata AddService(Type filterType, int order)
Filters\MiddlewareFilterAttribute.cs (2)
20public MiddlewareFilterAttribute(Type configurationType) 30public Type ConfigurationType { get; }
Filters\MiddlewareFilterBuilder.cs (4)
20private readonly ConcurrentDictionary<Type, Lazy<RequestDelegate>> _pipelinesCache 21= new ConcurrentDictionary<Type, Lazy<RequestDelegate>>(); 31public RequestDelegate GetPipeline(Type configurationType) 42private RequestDelegate BuildPipeline(Type middlewarePipelineProviderType)
Filters\MiddlewareFilterConfigurationProvider.cs (6)
18public static Action<IApplicationBuilder> CreateConfigureDelegate(Type configurationType) 33private static ConfigureBuilder GetConfigureDelegateBuilder(Type startupType) 39private static MethodInfo FindMethod(Type startupType, Type returnType) 71private static bool HasParameterlessConstructor(Type modelType) 73return !modelType.IsAbstract && modelType.GetConstructor(Type.EmptyTypes) != null;
Filters\OutputCacheFilter.cs (3)
54public static partial void NotMostEffectiveFilter(ILogger logger, Type overriddenFilter, Type overridingFilter, Type filterPolicy);
Filters\RequestFormLimitsFilter.cs (3)
58public static partial void NotMostEffectiveFilter(ILogger logger, Type overriddenFilter, Type overridingFilter, Type filterPolicy);
Filters\RequestSizeLimitFilter.cs (3)
74public static partial void NotMostEffectiveFilter(ILogger logger, Type overriddenFilter, Type overridingFilter, Type filterPolicy);
Filters\ResponseCacheFilter.cs (3)
106public static partial void NotMostEffectiveFilter(ILogger logger, Type overriddenFilter, Type overridingFilter, Type filterPolicy);
Formatters\InputFormatter.cs (4)
26protected virtual object? GetDefaultValueForType(Type modelType) 84/// <param name="type">The <see cref="Type"/> of object that will be read.</param> 86protected virtual bool CanReadType(Type type) 121public virtual IReadOnlyList<string>? GetSupportedContentTypes(string contentType, Type objectType)
Formatters\OutputFormatter.cs (2)
26protected virtual bool CanWriteType(Type? type) 34Type objectType)
Formatters\SystemTextJsonInputFormatter.cs (1)
148public static void JsonInputSuccess(ILogger logger, Type modelType)
Formatters\SystemTextJsonOutputFormatter.cs (1)
79var runtimeType = context.Object?.GetType();
Infrastructure\ActionMethodExecutor.cs (2)
359var type = executor.AsyncResultType ?? executor.MethodReturnType; 364private static IActionResult ConvertToActionResult(IActionResultTypeMapper mapper, object? returnValue, Type declaredType)
Infrastructure\ActionResultTypeMapper.cs (3)
12public Type GetResultDataType(Type returnType) 25public IActionResult Convert(object? value, Type returnType)
Infrastructure\AsyncEnumerableReader.cs (3)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new(); 52public bool TryGetReader(Type type, [NotNullWhen(true)] out Func<object, CancellationToken, Task<ICollection>>? reader) 65var enumeratedObjectType = enumerableType.GetGenericArguments()[0];
Infrastructure\ClientErrorResultFilter.cs (2)
61public static partial void TransformingClientError(ILogger logger, Type initialActionResultType, Type replacedActionResultType, int? statusCode);
Infrastructure\ControllerActionInvoker.cs (2)
594var controllerType = context.ActionDescriptor.ControllerTypeInfo.AsType(); 609var controllerType = context.ActionDescriptor.ControllerTypeInfo.AsType();
Infrastructure\IActionResultTypeMapper.cs (4)
26/// <returns>A <see cref="Type"/> that represents the response data.</returns> 31Type GetResultDataType(Type returnType); 45IActionResult Convert(object? value, Type returnType);
Infrastructure\ITypeActivatorCache.cs (4)
10/// <see cref="Extensions.DependencyInjection.ActivatorUtilities.CreateFactory(Type, Type[])"/>. 19/// <param name="optionType">The <see cref="Type"/> of the <typeparamref name="TInstance"/> to create.</param> 20TInstance CreateInstance<TInstance>(IServiceProvider serviceProvider, Type optionType);
Infrastructure\MvcCoreMvcOptionsSetup.cs (2)
111modelMetadataDetailsProviders.Add(new ExcludeBindingMetadataProvider(typeof(Type))); 123modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Type)));
Infrastructure\ObjectResultExecutor.cs (2)
72var objectType = result.DeclaredType; 83private Task ExecuteAsyncCore(ActionContext context, ObjectResult result, Type? objectType, object? value)
Infrastructure\ResourceInvoker.Log.cs (3)
50var controllerType = controllerActionDescriptor.ControllerTypeInfo.AsType(); 83private static partial void BeforeExecutingActionResult(ILogger logger, Type actionResult); 91private static partial void AfterExecutingActionResult(ILogger logger, Type actionResult);
Infrastructure\SystemTextJsonResultExecutor.cs (1)
61var objectType = value?.GetType() ?? typeof(object);
Infrastructure\TypeActivatorCache.cs (7)
11/// <see cref="ActivatorUtilities.CreateFactory(Type, Type[])"/>. 15private readonly Func<Type, ObjectFactory> _createFactory = 16(type) => ActivatorUtilities.CreateFactory(type, Type.EmptyTypes); 17private readonly ConcurrentDictionary<Type, ObjectFactory> _typeActivatorCache = 18new ConcurrentDictionary<Type, ObjectFactory>(); 23Type implementationType)
ModelBinderAttribute.cs (4)
30private Type? _binderType; 42/// <param name="binderType">A <see cref="Type"/> which implements <see cref="IModelBinder"/>.</param> 47public ModelBinderAttribute(Type binderType) 59public Type? BinderType
ModelBinderOfTAttribute.cs (1)
9/// <typeparam name="TBinder">A <see cref="Type"/> which implements <see cref="IModelBinder"/>.</typeparam>
ModelBinding\Binders\ArrayModelBinder.cs (3)
86public override bool CanCreateInstance(Type targetType) 92protected override object CreateEmptyCollection(Type targetType) 100protected override object? ConvertToCollectionType(Type targetType, IEnumerable<TElement?> collection)
ModelBinding\Binders\ArrayModelBinderProvider.cs (2)
24var elementType = context.Metadata.ElementMetadata!.ModelType; 25var binderType = typeof(ArrayModelBinder<>).MakeGenericType(elementType);
ModelBinding\Binders\BinderTypeModelBinder.cs (3)
22/// <param name="binderType">The <see cref="Type"/> of the <see cref="IModelBinder"/>.</param> 23public BinderTypeModelBinder(Type binderType) 36_factory = ActivatorUtilities.CreateFactory(binderType, Type.EmptyTypes);
ModelBinding\Binders\BinderTypeModelBinderProvider.cs (1)
19if (context.BindingInfo.BinderType is Type binderType)
ModelBinding\Binders\CollectionModelBinder.cs (7)
191public virtual bool CanCreateInstance(Type targetType) 229/// <param name="targetType"><see cref="Type"/> of the model.</param> 232protected virtual object CreateEmptyCollection(Type targetType) 246/// <param name="targetType"><see cref="Type"/> of the model.</param> 248protected object CreateInstance(Type targetType) 428/// <param name="targetType"><see cref="Type"/> of the model.</param> 440protected virtual object? ConvertToCollectionType(Type targetType, IEnumerable<TElement?> collection)
ModelBinding\Binders\CollectionModelBinderProvider.cs (5)
23var modelType = context.Metadata.ModelType; 44var listType = typeof(List<>).MakeGenericType(enumerableType.GenericTypeArguments); 54private static IModelBinder CreateInstance(ModelBinderProviderContext context, Type collectionType) 56var binderType = typeof(CollectionModelBinder<>).MakeGenericType(collectionType.GenericTypeArguments); 57var elementType = collectionType.GenericTypeArguments[0];
ModelBinding\Binders\ComplexObjectModelBinder.cs (5)
190var modelType = bindingContext.ModelType; 191if (modelType.IsAbstract || modelType.GetConstructor(Type.EmptyTypes) == null) 658internal static bool CanUpdateReadOnlyProperty(Type propertyType) 738public static partial void NoPublicSettableItems(ILogger logger, string modelName, Type modelType); 749private static partial void CannotBindToComplexType(ILogger logger, Type modelType);
ModelBinding\Binders\ComplexTypeModelBinder.cs (5)
428private static bool CanUpdateReadOnlyProperty(Type propertyType) 471var modelType = bindingContext.ModelType; 472if (modelType.IsAbstract || modelType.GetConstructor(Type.EmptyTypes) == null) 578private static partial void NoPublicSettableProperties(ILogger logger, string modelName, Type modelType); 584private static partial void CannotBindToComplexType(ILogger logger, Type modelType);
ModelBinding\Binders\DateTimeModelBinder.cs (1)
54var type = metadata.UnderlyingOrModelType;
ModelBinding\Binders\DateTimeModelBinderProvider.cs (1)
24var modelType = context.Metadata.UnderlyingOrModelType;
ModelBinding\Binders\DecimalModelBinder.cs (1)
56var type = metadata.UnderlyingOrModelType;
ModelBinding\Binders\DictionaryModelBinder.cs (3)
222Type targetType, 240protected override object CreateEmptyCollection(Type targetType) 252public override bool CanCreateInstance(Type targetType)
ModelBinding\Binders\DictionaryModelBinderProvider.cs (2)
23var modelType = context.Metadata.ModelType; 27var binderType = typeof(DictionaryModelBinder<,>).MakeGenericType(dictionaryType.GenericTypeArguments);
ModelBinding\Binders\DoubleModelBinder.cs (1)
56var type = metadata.UnderlyingOrModelType;
ModelBinding\Binders\EnumTypeModelBinder.cs (2)
29Type modelType, 60var modelType = bindingContext.ModelMetadata.UnderlyingOrModelType;
ModelBinding\Binders\FloatingPointTypeModelBinderProvider.cs (1)
27var modelType = context.Metadata.UnderlyingOrModelType;
ModelBinding\Binders\FloatModelBinder.cs (1)
56var type = metadata.UnderlyingOrModelType;
ModelBinding\Binders\FormCollectionModelBinderProvider.cs (1)
23var modelType = context.Metadata.ModelType;
ModelBinding\Binders\FormFileModelBinder.cs (1)
102var modelType = bindingContext.ModelType;
ModelBinding\Binders\FormFileModelBinderProvider.cs (1)
24var modelType = context.Metadata.ModelType;
ModelBinding\Binders\HeaderModelBinderProvider.cs (1)
68public static partial void CannotCreateHeaderModelBinder(ILogger logger, Type modelType);
ModelBinding\Binders\KeyValuePairModelBinderProvider.cs (2)
21var modelType = context.Metadata.ModelType; 33var binderType = typeof(KeyValuePairModelBinder<,>).MakeGenericType(typeArguments);
ModelBinding\Binders\SimpleTypeModelBinder.cs (1)
25public SimpleTypeModelBinder(Type type, ILoggerFactory loggerFactory)
ModelBinding\Binders\TryParseModelBinder.cs (2)
33public TryParseModelBinder(Type modelType, ILoggerFactory loggerFactory) 107private static Func<ValueProviderResult, ModelBindingContext, object?> CreateTryParseOperation(Type modelType)
ModelBinding\DefaultModelBindingContext.cs (1)
288var rootModelType = states[states.Length - 1].ModelMetadata.ModelType;
ModelBinding\ICollectionModelBinder.cs (2)
17/// <param name="targetType"><see cref="Type"/> of the model.</param> 25bool CanCreateInstance(Type targetType);
ModelBinding\Metadata\BindingMetadata.cs (4)
17private Type? _binderType; 33/// Gets or sets the <see cref="Type"/> of the <see cref="IModelBinder"/> implementation used to bind the 40public Type? BinderType 76/// of the property accessor and model <see cref="Type"/>. See <see cref="ModelMetadata.IsReadOnly"/>.
ModelBinding\Metadata\BindingSourceMetadataProvider.cs (2)
23public BindingSourceMetadataProvider(Type type, BindingSource? bindingSource) 35public Type Type { get; }
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (3)
80internal static ConstructorInfo? GetBoundConstructor(Type type) 96private static ConstructorInfo? GetRecordTypeConstructor(Type type, ConstructorInfo[] constructors) 140static bool IsRecordType(Type type)
ModelBinding\Metadata\DefaultModelMetadata.cs (3)
173public override Type? BinderType => BindingMetadata.BinderType; 559public override ModelMetadata GetMetadataForType(Type modelType) 565public override IEnumerable<ModelMetadata> GetMetadataForProperties(Type modelType)
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (22)
72public override IEnumerable<ModelMetadata> GetMetadataForProperties(Type modelType) 103public override ModelMetadata GetMetadataForParameter(ParameterInfo parameter, Type modelType) 114public override ModelMetadata GetMetadataForType(Type modelType) 124public override ModelMetadata GetMetadataForProperty(PropertyInfo propertyInfo, Type modelType) 135public override ModelMetadata GetMetadataForConstructor(ConstructorInfo constructorInfo, Type modelType) 150private ModelMetadataCacheEntry GetCacheEntry(Type modelType) 169private ModelMetadataCacheEntry GetCacheEntry(ParameterInfo parameter, Type modelType) 176private ModelMetadataCacheEntry GetCacheEntry(PropertyInfo property, Type modelType) 183private ModelMetadataCacheEntry GetCacheEntry(ConstructorInfo constructor, Type modelType) 236var parameterTypes = new Type[parameters.Length]; 274var parameterType = constructorParameter.ParameterType; 322/// <see cref="Type"/>. 325/// The <see cref="ModelMetadataIdentity"/> identifying the model <see cref="Type"/>. 327/// <returns>A details object for each property of the model <see cref="Type"/>.</returns> 330/// <see cref="GetMetadataForProperties(Type)"/>. Override this method to provide a different 359var containerType = propertyKey.ContainerType!; 384/// Creates the <see cref="DefaultMetadataDetails"/> entry for a model <see cref="Type"/>. 387/// The <see cref="ModelMetadataIdentity"/> identifying the model <see cref="Type"/>. 389/// <returns>A details object for the model <see cref="Type"/>.</returns> 392/// <see cref="GetMetadataForType(Type)"/>. Override this method to provide a different 403/// Creates the <see cref="DefaultMetadataDetails"/> entry for a parameter <see cref="Type"/>. 406/// The <see cref="ModelMetadataIdentity"/> identifying the parameter <see cref="Type"/>.
ModelBinding\Metadata\ExcludeBindingMetadataProvider.cs (4)
14private readonly Type _type; 20/// The <see cref="Type"/>. All properties with this <see cref="Type"/> will have 23public ExcludeBindingMetadataProvider(Type type)
ModelBinding\Metadata\MetadataDetailsProviderExtensions.cs (1)
30public static void RemoveType(this IList<IMetadataDetailsProvider> list, Type type)
ModelBinding\Metadata\ModelAttributes.cs (22)
12/// Provides access to the combined list of attributes associated with a <see cref="Type"/>, property, or parameter. 31/// If this instance represents a property, the set of attributes for the property's <see cref="Type"/>. 77/// on the property definition are before those on the property's <see cref="Type"/>. If this instance 79/// the parameter's <see cref="Type"/>. 96/// Gets the set of attributes on the <see cref="Type"/>. If this instance represents a property, then 106/// <param name="type">The <see cref="Type"/> in which caller found <paramref name="property"/>. 111/// A <see cref="ModelAttributes"/> instance with the attributes of the property and its <see cref="Type"/>. 113public static ModelAttributes GetAttributesForProperty(Type type, PropertyInfo property) 121/// <param name="containerType">The <see cref="Type"/> in which caller found <paramref name="property"/>. 127/// A <see cref="ModelAttributes"/> instance with the attributes of the property and its <see cref="Type"/>. 129public static ModelAttributes GetAttributesForProperty(Type containerType, PropertyInfo property, Type modelType) 137var metadataType = GetMetadataType(containerType); 153/// <param name="type">The <see cref="Type"/> for which attributes need to be resolved. 155/// <returns>A <see cref="ModelAttributes"/> instance with the attributes of the <see cref="Type"/>.</returns> 156public static ModelAttributes GetAttributesForType(Type type) 162var metadataType = GetMetadataType(type); 178/// A <see cref="ModelAttributes"/> instance with the attributes of the parameter and its <see cref="Type"/>. 199/// A <see cref="ModelAttributes"/> instance with the attributes of the parameter and its <see cref="Type"/>. 201public static ModelAttributes GetAttributesForParameter(ParameterInfo parameterInfo, Type modelType) 215private static Type? GetMetadataType(Type type)
ModelBinding\Metadata\ValidationMetadata.cs (1)
18/// <see cref="ModelMetadata.IsRequired"/> will be computed based on the model <see cref="System.Type"/>.
ModelBinding\ModelBinderProviderExtensions.cs (1)
30public static void RemoveType(this IList<IModelBinderProvider> list, Type type)
ModelBinding\ModelBindingHelper.cs (16)
164Type modelType, 205Type modelType, 360/// <param name="modelType">The <see cref="Type"/> of the model.</param> 365Type modelType, 461var modelType = bindingContext.ModelType; 545var modelType = bindingContext.ModelType; 587/// Converts the provided <paramref name="value"/> to a value of <see cref="Type"/> <typeparamref name="T"/>. 589/// <typeparam name="T">The <see cref="Type"/> for conversion.</typeparam> 603/// Converts the provided <paramref name="value"/> to a value of <see cref="Type"/> <paramref name="type"/>. 606/// <param name="type">The <see cref="Type"/> for conversion.</param> 611public static object? ConvertTo(object? value, Type type, CultureInfo? culture) 630private static object? UnwrapPossibleArrayType(object value, Type destinationType, CultureInfo culture) 636var destinationElementType = destinationType.GetElementType()!; 676private static object? ConvertSimpleType(object? value, Type destinationType, CultureInfo culture) 746private static Type UnwrapNullableType(Type destinationType)
ModelBinding\ModelMetadataProviderExtensions.cs (2)
20/// <param name="containerType">The <see cref="Type"/> for which the property is defined.</param> 25Type containerType,
ModelBinding\ParameterBinder.cs (1)
248var modelType = modelBindingResult.Model.GetType();
ModelBinding\ParameterBinder.Log.cs (13)
56private static partial void AttemptingToBindParameter(ILogger logger, string? parameterName, Type modelType); 59private static partial void AttemptingToBindProperty(ILogger logger, Type? propertyContainerType, string? propertyName, Type modelType); 102private static partial void DoneAttemptingToBindParameter(ILogger logger, string? parameterName, Type modelType); 105private static partial void DoneAttemptingToBindProperty(ILogger logger, Type? propertyContainerType, string? propertyName, Type modelType); 149private static partial void AttemptingToValidateParameter(ILogger logger, string? parameterName, Type modelType); 152private static partial void AttemptingToValidateProperty(ILogger logger, Type? propertyContainerType, string? propertyName, Type modelType); 199private static partial void DoneAttemptingToValidateParameter(ILogger logger, string? parameterName, Type modelType); 202private static partial void DoneAttemptingToValidateProperty(ILogger logger, Type? propertyContainerType, string? propertyName, Type modelType); 248private static partial void ParameterBinderRequestPredicateShortCircuitOfProperty(ILogger logger, Type? propertyContainerType, string? propertyName);
ModelBinding\SuppressChildValidationMetadataProvider.cs (3)
24public SuppressChildValidationMetadataProvider(Type type) 48public Type? Type { get; } 83private bool IsMatchingName(Type? type)
ModelBinding\Validation\DefaultCollectionValidationStrategy.cs (2)
49private readonly ConcurrentDictionary<Type, Func<object, IEnumerator>> _genericGetEnumeratorCache = new ConcurrentDictionary<Type, Func<object, IEnumerator>>();
ModelBinding\Validation\DefaultModelValidatorProvider.cs (1)
39public bool HasValidators(Type modelType, IList<object> validatorMetadata)
ModelBinding\Validation\IMetadataBasedModelValidatorProvider.cs (2)
25/// <param name="modelType">The <see cref="Type"/> of the model.</param> 28bool HasValidators(Type modelType, IList<object> validatorMetadata);
ModelBinding\Validation\ModelValidatorProviderExtensions.cs (1)
30public static void RemoveType(this IList<IModelValidatorProvider> list, Type type)
ModelBinding\Validation\ShortFormDictionaryValidationStrategy.cs (2)
13/// <typeparam name="TKey">The <see cref="Type"/> of the keys of the model dictionary.</typeparam> 14/// <typeparam name="TValue">The <see cref="Type"/> of the values of the model dictionary.</typeparam>
ModelBinding\ValueProviderFactoryExtensions.cs (1)
30public static void RemoveType(this IList<IValueProviderFactory> list, Type type)
ModelMetadataTypeAttribute.cs (2)
16public ModelMetadataTypeAttribute(Type type) 26public Type MetadataType { get; }
MvcCoreLoggerExtensions.cs (13)
150private static partial void FoundNoValueForPropertyInRequest(ILogger logger, string modelName, Type? propertyContainerType, string? modelFieldName, Type modelType); 155private static partial void FoundNoValueForParameterInRequest(ILogger logger, string modelName, string? modelFieldName, Type modelType); 158private static partial void FoundNoValueInRequest(ILogger logger, string modelName, Type modelType); 166private static partial void CannotBindToFilesCollectionDueToUnsupportedContentType(ILogger logger, string modelName, Type modelType); 200private static partial void AttemptingToBindParameterModel(ILogger logger, string? parameterName, Type modelType, string modelName); 203private static partial void AttemptingToBindPropertyModel(ILogger logger, Type? propertyContainerType, string? propertyName, Type modelType, string modelName); 206private static partial void AttemptingToBindModel(ILogger logger, Type modelType, string modelName); 238private static partial void DoneAttemptingToBindPropertyModel(ILogger logger, Type? propertyContainerType, string? propertyName, Type modelType); 241private static partial void DoneAttemptingToBindModel(ILogger logger, Type modelType, string modelName); 244private static partial void DoneAttemptingToBindParameterModel(ILogger logger, string? parameterName, Type modelType);
ObjectResult.cs (1)
52public Type? DeclaredType { get; set; }
ProducesAttribute.cs (3)
14/// A filter that specifies the expected <see cref="System.Type"/> the action will return and the supported 25public ProducesAttribute(Type type) 53public Type? Type { get; set; }
ProducesDefaultResponseTypeAttribute.cs (3)
10/// A filter that specifies the <see cref="System.Type"/> for all HTTP status codes that are not covered by <see cref="ProducesResponseTypeAttribute"/>. 27public ProducesDefaultResponseTypeAttribute(Type type) 35public Type Type { get; }
ProducesErrorResponseTypeAttribute.cs (2)
25public ProducesErrorResponseTypeAttribute(Type type) 33public Type Type { get; }
ProducesOfTAttribute.cs (1)
7/// <typeparam name="T">The <see cref="Type"/> of object that is going to be written in the response.</typeparam>
ProducesResponseTypeAttribute.cs (3)
34public ProducesResponseTypeAttribute(Type type, int statusCode) 48public ProducesResponseTypeAttribute(Type type, int statusCode, string contentType, params string[] additionalContentTypes) 68public Type Type { get; set; }
ProducesResponseTypeOfTAttribute.cs (1)
7/// <typeparam name="T">The <see cref="Type"/> of object that is going to be written in the response.</typeparam>
Routing\ControllerActionEndpointDataSource.cs (1)
134internal void AddDynamicControllerEndpoint(IEndpointRouteBuilder endpoints, string pattern, Type transformerType, object? state, int? order = null)
Routing\DynamicControllerRouteValueTransformerMetadata.cs (2)
10public DynamicControllerRouteValueTransformerMetadata(Type selectorType, object? state) 27public Type SelectorType { get; }
ServiceFilterAttribute.cs (4)
29/// <param name="type">The <see cref="Type"/> of filter to find.</param> 30public ServiceFilterAttribute(Type type) 39/// Gets the <see cref="Type"/> of filter to find. 41public Type ServiceType { get; }
ServiceFilterOfTAttribute.cs (1)
10/// <typeparam name="TFilter">The <see cref="Type"/> of filter to find.</typeparam>
src\Shared\EndpointMetadataPopulator.cs (1)
49var returnType = methodInfo.ReturnType;
src\Shared\Json\JsonSerializerExtensions.cs (3)
16public static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType) 19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type) 25public static JsonTypeInfo GetRequiredTypeInfo(this JsonSerializerContext context, Type type)
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (9)
18public Type AwaiterType { get; } 23public Type ResultType { get; } 27Type awaiterType, 32Type resultType, 47Type type, 53var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 61var awaiterType = getAwaiterMethod.ReturnType; 64var isCompletedProperty = awaiterType.GetProperty("IsCompleted", Everything, binder: null, returnType: typeof(bool), types: Type.EmptyTypes, modifiers: null); 92var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\Shared\ObjectMethodExecutor\CoercedAwaitableInfo.cs (5)
15public Type CoercerResultType { get; } 25public CoercedAwaitableInfo(Expression coercerExpression, Type coercerResultType, AwaitableInfo coercedAwaitableInfo) 34[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 42out var nonGenericAwaitableType)) 60out var coercerResultType))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
70public Type? AsyncResultType { get; } 73public Type MethodReturnType { get; internal set; } 235var postCoercionMethodReturnType = coercedAwaitableInfo.CoercerResultType ?? methodInfo.ReturnType;
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (20)
59Type possibleFSharpAsyncType, 61out Type awaitableType) 63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single(); 98TryBuildCoercerFromUnitAwaitableToVoidAwaitable(awaitableType, out var coercerExpression, out var nonGenericAwaitableType) 132Type genericAwaitableType, 134out Type nonGenericAwaitableType) 152static Expression MakeTaskOfUnitToTaskExpression(Type type) 158static Expression MakeValueTaskOfUnitToValueTaskExpression(Type type) 171private static bool IsFSharpAsyncOpenGenericType(Type possibleFSharpAsyncType) => 174private static bool IsFSharpUnit(Type possibleFSharpUnitType) => 177private static bool IsCoerceableFSharpType(Type possibleFSharpType, string coerceableFSharpTypeName) 205private static bool TryPopulateFSharpValueCaches(Type possibleFSharpType) 208var fsharpOptionType = assembly.GetType(FSharpOptionTypeName); 209var fsharpAsyncType = assembly.GetType(FSharpAsyncTypeName); 210var fsharpAsyncGenericType = assembly.GetType(FSharpAsyncGenericTypeName); 218var fsharpOptionOfTaskCreationOptionsType = fsharpOptionType 224var fsharpOptionOfCancellationTokenType = fsharpOptionType 251private static bool TypesHaveSameIdentity(Type type1, Type type2)
src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (2)
47Type? underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType); 87private static object? CreateValueType(Type t) => RuntimeHelpers.GetUninitializedObject(t);
src\Shared\PropertyActivator\PropertyActivator.cs (7)
38Type type, 39Type activateAttributeType, 50Type type, 51Type activateAttributeType, 64Type type, 81Type type, 82Type activateAttributeType,
src\Shared\PropertyHelper\PropertyHelper.cs (21)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 50/// This constructor does not cache the helper. For caching, use <see cref="GetProperties(Type)"/>. 123[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 144[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 244Type openGenericDelegateType, 248var typeInput = propertyGetMethod.DeclaringType!; 249var typeOutput = propertyGetMethod.ReturnType; 251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 290var typeInput = setMethod.DeclaringType!; 291var parameterType = parameters[0].ParameterType; 412Type type, 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 444var declaringType = propertyHelper.Property.DeclaringType; 457Type? currentType = type; 493Type type, 494ConcurrentDictionary<Type, PropertyHelper[]>? cache) 509foreach (var @interface in type.GetInterfaces()) 523[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 562public static void ClearCache(Type[]? _)
TypeFilterAttribute.cs (5)
33/// <param name="type">The <see cref="Type"/> of filter to create.</param> 34public TypeFilterAttribute(Type type) 49/// Gets the <see cref="Type"/> of filter to create. 51public Type ImplementationType { get; } 67_factory = ActivatorUtilities.CreateFactory(ImplementationType, argumentTypes ?? Type.EmptyTypes);
TypeFilterOfTAttribute.cs (1)
9/// <typeparam name="TFilter">The <see cref="Type"/> of filter to create.</typeparam>
Microsoft.AspNetCore.Mvc.Core.Test (318)
AcceptedAtActionResultTests.cs (1)
290public object GetService(Type serviceType) => new ForwardingUrlHelperFactory();
ApiConventionMethodAttributeTest.cs (12)
16var attribute = typeof(ProducesAttribute); 38var attribute = typeof(ProducesAttribute); 62var type = typeof(ConventionWithNullableContextAttribute); 69var attributeType = a.GetType(); 79var attribute = typeof(ProducesAttribute); 89var attribute = typeof(ProducesAttribute); 90var type = typeof(TestConventions); 106var attribute = typeof(ProducesAttribute); 107var type = typeof(TestConventions); 123var attribute = typeof(ProducesAttribute); 124var type = typeof(TestConventions); 144private static string GetErrorMessage(string methodName, params Type[] attributes)
ApiExplorer\ApiConventionMatcherTest.cs (10)
265public void IsTypeMatch_WithAny_ReturnsTrue(Type type, Type conventionType) 278var type = typeof(Base); 279var conventionType = typeof(Base); 292var type = typeof(Derived); 293var conventionType = typeof(Base); 306var type = typeof(Base); 307var conventionType = typeof(Derived); 320var type = typeof(string); 321var conventionType = typeof(Derived);
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (6)
65var expected = typeof(InvalidFilterCriteriaException); 85var expected = typeof(InvalidEnumArgumentException); 101var expected = typeof(InvalidTimeZoneException); 119var expected = typeof(InvalidTimeZoneException); 138var expected = typeof(void); 150private ApiConventionApplicationModelConvention GetConvention(Type errorType = null)
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (4)
25var controllerType = typeof(AccountController); 43var controllerType = typeof(AnonymousController); 61var controllerType = typeof(AccountController); 206private static ApplicationModelProviderContext CreateProviderContext(Type controllerType)
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (2)
57Type type, 69private static ActionModel GetActionModel(Type controllerType, string actionName)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (2)
981public void ApiExplorer_DoesNotSetExtensionData_WhenNotVisible(Type controllerType) 1092public void ApiExplorer_ThrowsForConventionalRouting(string actionName, Type type)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
1000public void CreateActionModel_RouteAttributeOnController_CreatesAttributeRoute_ForNonAttributedActions(Type controller) 1023public void CreateActionModel_RouteOnController_CreatesOneActionInfoPerRouteTemplateOnAction(Type controller)
ApplicationModels\EndpointMetadataProviderTest.cs (5)
32public void DiscoversEndpointMetadata_FromReturnTypeImplementingIEndpointMetadataProvider(Type controllerType, string actionName) 141public void AllowsRemovalOfMetadata_ByReturnTypeImplementingIEndpointMetadataProvider(Type controllerType, string actionName) 215private Endpoint GetEndpoint(Type controllerType, string actionName) => Assert.Single(GetEndpoints(controllerType, actionName)); 216private List<Endpoint> GetEndpoints(Type controllerType, string actionName) => FilterEndpoints(GetEndpointDataSource(controllerType, actionName).Endpoints); 235private ControllerActionEndpointDataSource GetEndpointDataSource(Type controllerType, string actionName)
ApplicationModels\InferParameterBindingInfoConventionTest.cs (5)
904serviceProviderIsService = serviceProviderIsService ?? Mock.Of<IServiceProviderIsService>(s => s.IsService(It.IsAny<Type>()) == false); 909Type type, 922Type controllerType, 931private static ParameterModel GetParameterModel(Type controllerType, string actionName) 1131public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
ApplicationParts\RelatedAssemblyPartTest.cs (1)
93public override object[] GetCustomAttributes(Type attributeType, bool inherit)
Controllers\ControllerBinderDelegateProviderTest.cs (4)
903public static TheoryData<string, Type, Func<object, object>, object, object> SkippedPropertyData 907return new TheoryData<string, Type, Func<object, object>, object, object> 945Type propertyType, 990var boundPropertyTypes = new Dictionary<string, Type>
Controllers\ControllerFeatureProviderTest.cs (2)
264public void AncestorTypeHasControllerAttribute_IsController(Type type) 370public void IsController_ReturnsFalse_IfTypeOrAncestorHasNonControllerAttribute(Type type)
Controllers\DefaultControllerActivatorTest.cs (1)
19public void Create_CreatesInstancesOfTypes(Type type)
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (1)
17var controllerType = typeof(HelloController);
DependencyInjection\MvcBuilderExtensionsTest.cs (1)
45new[] { typeof(Type) }),
DependencyInjection\MvcCoreBuilderExtensionsTest.cs (1)
42new[] { typeof(Type) }),
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (27)
39var mockType = typeof(Mock<>).MakeGenericType(serviceType.Key); 51foreach (var implementationType in serviceType.Value) 65foreach (var serviceType in SingleRegistrationServiceTypes) 67var mockType = typeof(Mock<>).MakeGenericType(serviceType); 75foreach (var singleRegistrationType in SingleRegistrationServiceTypes) 214private IEnumerable<Type> SingleRegistrationServiceTypes 228private Dictionary<Type, Type[]> MultiRegistrationServiceTypes 232return new Dictionary<Type, Type[]>() 236new Type[] 243new Type[] 250new Type[] 257new Type[] 264new Type[] 271new Type[] 278new Type[] 285new Type[] 292new Type[] 299new Type[] 306new Type[] 314new Type[] 321new Type[] 329new Type[] 340Type serviceType, 354Type serviceType, 355Type implementationType)
Filters\MiddlewareFilterConfigurationProviderTest.cs (3)
18public void CreateConfigureDelegate_ThrowsIfTypeCannotBeInstantiated(Type configurationType) 65var type = typeof(InvalidType_NoConfigure); 81var type = typeof(InvalidType_NoPublic_Configure);
Filters\MiddlewareFilterTest.cs (1)
319private RequestDelegate GetMiddlewarePipeline(Type middlewarePipelineProviderType)
Formatters\InputFormatterTest.cs (3)
442public IList<Type> SupportedTypes { get; } = new List<Type>(); 444protected override bool CanReadType(Type type)
Formatters\JsonInputFormatterTestBase.cs (2)
287protected async Task ReadAsync_ReadsValidArray_AsList(Type requestedType) 649Type modelType,
Formatters\JsonOutputFormatterTestBase.cs (1)
176Type outputType,
Formatters\NoContentFormatterTests.cs (2)
38var type = declaredTypeAsString ? typeof(string) : typeof(object); 62public void CanWriteResult_ReturnsTrue_IfReturnTypeIsVoidOrTask(Type declaredType)
Formatters\OutputFormatterTests.cs (3)
189public List<Type> SupportedTypes { get; } = new List<Type>(); 191protected override bool CanWriteType(Type type)
Formatters\StreamOutputFormatterTest.cs (3)
14public void CanWriteResult_ReturnsTrue_ForStreams(Type type, string contentType) 39public void CanWriteResult_OnlyActsOnStreams_IgnoringContentType(Type type, string contentType) 65public void CanWriteResult_OnlyActsOnStreams(Type type)
Formatters\StringOutputFormatterTests.cs (1)
89var type = useDeclaredTypeAsString ? typeof(string) : typeof(object);
Formatters\SystemTextJsonInputFormatterTest.cs (2)
223public override short Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 236public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Formatters\SystemTextJsonOutputFormatterTest.cs (1)
324public override ThrowingFormatterModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Formatters\TextInputFormatterTest.cs (3)
214public IList<Type> SupportedTypes { get; } = new List<Type>(); 216protected override bool CanReadType(Type type)
Infrastructure\ActionMethodExecutorTest.cs (1)
452var type = typeof(TestController);
Infrastructure\ActionResultTypeMapperTest.cs (4)
81var returnType = typeof(ActionResult<string>); 84var result = mapper.GetResultDataType(returnType); 96var returnType = typeof(string); 99var result = mapper.GetResultDataType(returnType);
Infrastructure\AsyncEnumerableReaderTest.cs (1)
15public void TryGetReader_ReturnsFalse_IfTypeIsNotIAsyncEnumerable(Type type)
Infrastructure\ControllerActionInvokerTest.cs (1)
1356public async Task InvokeAction_WithNullActionResultThrows(string methodName, Type resultType)
Infrastructure\SystemTextJsonResultExecutorTest.cs (1)
49public override ThrowingFormatterModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
ModelBinding\Binders\ArrayModelBinderProviderTest.cs (2)
14public void Create_ForNonArrayTypes_ReturnsNull(Type modelType) 32public void Create_ForArrayTypes_ReturnsBinder(Type modelType)
ModelBinding\Binders\BinderTypeModelBinderTest.cs (2)
68private static DefaultModelBindingContext GetBindingContext(Type modelType, Type binderType = null)
ModelBinding\Binders\BodyModelBinderTests.cs (2)
675Type modelType, 734protected override bool CanReadType(Type type)
ModelBinding\Binders\ByteArrayModelBinderProviderTest.cs (1)
13public void Create_ForNonByteArrayTypes_ReturnsNull(Type modelType)
ModelBinding\Binders\ByteArrayModelBinderTests.cs (1)
103private static DefaultModelBindingContext GetBindingContext(IValueProvider valueProvider, Type modelType)
ModelBinding\Binders\CancellationTokenModelBinderProviderTest.cs (1)
13public void Create_ForNonCancellationTokenTypes_ReturnsNull(Type modelType)
ModelBinding\Binders\CancellationTokenModelBinderTests.cs (1)
26private static DefaultModelBindingContext GetBindingContext(Type modelType)
ModelBinding\Binders\CollectionModelBinderProviderTest.cs (3)
16public void Create_ForNonSupportedTypes_ReturnsNull(Type modelType) 43public void Create_ForSupportedTypes_ReturnsBinder(Type modelType) 50Type elementType = null;
ModelBinding\Binders\CollectionModelBinderTest.cs (3)
422public static TheoryData<Type, bool> CanCreateInstanceData 426return new TheoryData<Type, bool> 440public void CanCreateInstance_ReturnsExpectedValue(Type modelType, bool expectedResult)
ModelBinding\Binders\ComplexObjectModelBinderProviderTest.cs (1)
14public void Create_ForNonComplexType_ReturnsNull(Type modelType)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (7)
153Type modelType, 181Type modelType, 207Type modelType, 244Type modelType, 978var type = model.GetType(); 1122private static ModelMetadata GetMetadataForType(Type type) 1127private static ModelMetadata GetMetadataForProperty(Type type, string propertyName)
ModelBinding\Binders\ComplexTypeModelBinderProviderTest.cs (1)
14public void Create_ForNonComplexType_ReturnsNull(Type modelType)
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (7)
152Type modelType, 180Type modelType, 206Type modelType, 243Type modelType, 1140var type = model.GetType(); 1286private static ModelMetadata GetMetadataForType(Type type) 1291private static ModelMetadata GetMetadataForProperty(Type type, string propertyName)
ModelBinding\Binders\DateTimeModelBinderProviderTest.cs (1)
15public void Create_ForNonDateTime_ReturnsNull(Type modelType)
ModelBinding\Binders\DateTimeModelBinderTest.cs (2)
157public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid(Type type) 207private static DefaultModelBindingContext GetBindingContext(Type modelType = null)
ModelBinding\Binders\DictionaryModelBinderProviderTest.cs (2)
15public void Create_ForNonDictionaryType_ReturnsNull(Type modelType) 32public void Create_ForDictionaryType_ReturnsBinder(Type modelType)
ModelBinding\Binders\DictionaryModelBinderTest.cs (3)
586public static TheoryData<Type, bool> CanCreateInstanceData 590return new TheoryData<Type, bool> 605public void CanCreateInstance_ReturnsExpectedValue(Type modelType, bool expectedResult)
ModelBinding\Binders\EnumTypeModelBinderProviderTest.cs (3)
13public void ReturnsBinder_ForEnumType(Type modelType) 29public void ReturnsBinder_ForFlagsEnumType(Type modelType) 46public void DoesNotReturnBinder_ForNonEnumTypes(Type modelType)
ModelBinding\Binders\EnumTypeModelBinderTest.cs (13)
14public async Task BindModel_SetsModel_ForEmptyValue_AndNullableEnumTypes(Type modelType) 30public async Task BindModel_AddsErrorToModelState_ForEmptyValue_AndNonNullableEnumTypes(Type modelType) 53var modelType = typeof(IntEnum); 75var modelType = typeof(FlagsEnum); 99var modelType = typeof(FlagsEnum?); 133public async Task BindModel_AddsErrorToModelState_ForInvalidEnumValues(Type modelType, string suppliedValue) 161var modelType = typeof(FlagsEnum); 186var modelType = typeof(FlagsEnum?); 214Type modelType, 236Type modelType, 258private static Type GetUnderlyingType(Type modelType) 260var underlyingType = Nullable.GetUnderlyingType(modelType);
ModelBinding\Binders\FloatingPointTypeModelBinderProviderTest.cs (5)
15public void Create_ForCollectionOrComplexTypes_ReturnsNull(Type modelType) 35public void Create_ForUnsupportedSimpleTypes_ReturnsNull(Type modelType) 51public void Create_ForDecimalTypes_ReturnsBinder(Type modelType) 67public void Create_ForDoubleTypes_ReturnsBinder(Type modelType) 83public void Create_ForFloatTypes_ReturnsBinder(Type modelType)
ModelBinding\Binders\FloatingPointTypeModelBinderTestOfT.cs (16)
11public static TheoryData<Type> ConvertibleTypeData 15return new TheoryData<Type> 33public async Task BindModel_ReturnsFailure_IfAttemptedValueCannotBeParsed(Type destinationType) 52public async Task BindModel_CreatesError_IfAttemptedValueCannotBeParsed(Type destinationType) 77public async Task BindModel_CreatesError_IfAttemptedValueCannotBeCompletelyParsed(Type destinationType) 101public async Task BindModel_CreatesError_IfAttemptedValueContainsDisallowedWhitespace(Type destinationType) 125public async Task BindModel_CreatesError_IfAttemptedValueContainsDisallowedDecimal(Type destinationType) 149public async Task BindModel_CreatesError_IfAttemptedValueContainsDisallowedThousandsSeparator(Type destinationType) 173public async Task BindModel_ReturnsFailed_IfValueProviderEmpty(Type destinationType) 237public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_Twelve(Type destinationType) 259public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_TwelvePointFive(Type destinationType) 280public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_FrenchTwelvePointFive(Type destinationType) 301public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_ThirtyTwoThousand(Type destinationType) 322public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_ThirtyTwoThousandPointOne(Type destinationType) 343public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_FrenchThirtyTwoThousandPointOne(Type destinationType) 369private static DefaultModelBindingContext GetBindingContext(Type modelType)
ModelBinding\Binders\FormCollectionModelBinderProviderTest.cs (2)
13public void Create_ThrowsException_ForFormCollectionModelType(Type modelType) 31public void Create_ForNonFormCollectionTypes_ReturnsNull(Type modelType)
ModelBinding\Binders\FormCollectionModelBinderTest.cs (1)
66private static DefaultModelBindingContext GetBindingContext(Type modelType, HttpContext httpContext)
ModelBinding\Binders\FormFileModelBinderProviderTest.cs (2)
16public void Create_ForUnsupportedTypes_ReturnsNull(Type modelType) 35public void Create_ForSupportedTypes_ReturnsBinder(Type modelType)
ModelBinding\Binders\FormFileModelBinderTest.cs (2)
256public async Task FormFileModelBinder_BindsFiles_ForCollectionsItCanCreate(Type destinationType) 445private static DefaultModelBindingContext GetBindingContext(Type modelType, HttpContext httpContext)
ModelBinding\Binders\HeaderModelBinderProviderTest.cs (7)
52public void Create_WhenBindingSourceIsFromHeader_ReturnsBinder_ForSimpleTypes(Type modelType) 75public void Create_WhenBindingSourceIsFromHeader_ReturnsBinder_ForNullableSimpleTypes(Type modelType) 101public void Create_WhenBindingSourceIsFromHeader_ReturnsBinder_ForCollectionOfSimpleTypes(Type modelType) 123public void Create_WhenBindingSourceIsFromHeader_ReturnsNull_ForNonSimpleModelType(Type modelType) 145Type modelType) 178private TestModelBinderProviderContext GetTestModelBinderProviderContext(Type modelType) 215public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
ModelBinding\Binders\HeaderModelBinderTests.cs (14)
21var type = typeof(string[]); 42var type = typeof(string); 68Type destinationType) 92var type = typeof(string[]); 106public static TheoryData<string, Type, object> BinderHeaderToSimpleTypesData 112return new TheoryData<string, Type, object>() 137Type modelType, 160public async Task HeaderBinder_DoesNotSetModel_ForHeaderNotPresentOnRequest(Type modelType) 177public async Task HeaderBinder_DoesNotCreateEmptyCollection_ForNonTopLevelObjects(Type modelType) 200public async Task HeaderBinder_BindsHeaders_ForCollectionsItCanCreate(Type destinationType) 280Type modelType, 303Type modelType, 323private static DefaultModelBindingContext CreateContext(Type modelType) 389private static ModelMetadata GetMetadataForType(Type modelType)
ModelBinding\Binders\KeyValuePairModelBinderProviderTest.cs (1)
15public void Create_ForNonKeyValuePair_ReturnsNull(Type modelType)
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (1)
215Type keyValuePairType)
ModelBinding\Binders\ServicesModelBinderTest.cs (2)
16var type = typeof(IService); 33private static DefaultModelBindingContext GetBindingContext(Type modelType)
ModelBinding\Binders\SimpleTypeModelBinderProviderTest.cs (2)
15public void Create_ForCollectionOrComplexTypes_ReturnsNull(Type modelType) 33public void Create_ForSimpleTypes_ReturnsBinder(Type modelType)
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (8)
65public static TheoryData<Type> ConvertibleTypeData 69var data = new TheoryData<Type> 92public async Task BindModel_ReturnsFailure_IfTypeCanBeConverted_AndConversionFails(Type destinationType) 112public async Task BindModel_CreatesError_WhenTypeConversionIsNull(Type destinationType) 286public static TheoryData<Type> BiggerNumericTypes 291return new TheoryData<Type> 308public async Task BindModel_ThousandsSeparators_LeadToErrors(Type type) 486private static DefaultModelBindingContext GetBindingContext(Type modelType)
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (9)
14public static TheoryData<Type> ConvertibleTypeData 18var data = new TheoryData<Type> 41public async Task BindModel_ReturnsFailure_IfTypeCanBeConverted_AndConversionFails(Type destinationType) 61public async Task BindModel_CreatesError_WhenTypeConversionIsNull(Type destinationType) 213public static TheoryData<Type> BiggerNumericTypes 220return new TheoryData<Type> 234public async Task BindModel_ThousandsSeparators_LeadToErrors(Type type) 491private static DefaultModelBindingContext GetBindingContext(Type modelType) 502private static IModelBinder CreateBinder(Type modelType, ILoggerFactory loggerFactory = null) =>
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (10)
665var type = typeof(DefaultConstructorType); 683var type = typeof(ParameterlessConstructorType); 701var type = typeof(NonPublicParameterlessConstructorType); 720var type = typeof(NonPublicParameterlessConstructorType); 737var type = typeof(RecordTypeWithPrimaryConstructor); 768public void GetBoundConstructor_ReturnsNull_ForRecordTypeWithParameterlessConstructor(Type type) 790var type = typeof(RecordTypeWithMultipleConstructors); 803var type = typeof(Model); 834var type = typeof(RecordTypeWithConformingSynthesizedConstructor); 862var type = typeof(RecordTypeWithNonConformingSynthesizedConstructor);
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (1)
64var modelType = typeof(ModelType);
ModelBinding\Metadata\DefaultModelMetadataTest.cs (29)
230public void ElementMetadata_ReturnsNull_ForNonCollections(Type modelType) 257public void ElementMetadata_ReturnsExpectedMetadata(Type modelType, Type elementType) 291public void IsBindingAllowed_ReturnsTrue_ForTypes(Type modelType) 318public void IsBindingRequired_ReturnsFalse_ForTypes(Type modelType) 351public void IsParseableType_ReturnsTrue_ForParseableTypes(Type modelType) 374public void IsParseableType_ReturnsFalse_ForNonParseableTypes(Type modelType) 395public void IsParseableType_ReturnsFalse_ForByRefTypes(Type modelType) 417public void IsRequired_ReturnsFalse_ForNullableTypes(Type modelType) 438public void IsRequired_ReturnsTrue_ForNonNullableTypes(Type modelType) 813public void ValidateChildren_SimpleTypes(Type modelType) 840public void ValidateChildren_ComplexAndEnumerableTypes(Type modelType) 1069var modelType = typeof(TypeWithProperties); 1094var modelType = typeof(TypeWithProperties); 1121var modelType = typeof(TypeWithProperties); 1145var modelType = typeof(TypeWithProperties); 1172var modelType = typeof(Employee); 1186var unitModel = typeof(BusinessUnit); 1213var modelType = typeof(Employee); 1227var unitModel = typeof(BusinessUnit); 1256var modelType = typeof(Employee); 1285var modelType = typeof(Employee); 1299var unitModel = typeof(BusinessUnit); 1330var modelType = typeof(SimpleRecordType); 1374var modelType = typeof(SimpleRecordType); 1419var modelType = typeof(SimpleRecordTypeWithProperty); 1464var modelType = typeof(SimpleRecordTypeWithProperty); 1509var modelType = typeof(SimpleRecordTypeWithProperty); 1554var modelType = typeof(SimpleRecordTypeWithProperty);
ModelBinding\Metadata\ModelAttributesTest.cs (7)
15var modelType = typeof(BaseViewModel); 33var modelType = typeof(BaseViewModel); 63var modelType = typeof(DerivedViewModel); 81var modelType = typeof(DerivedViewModel); 101var modelType = typeof(DerivedViewModel); 119var modelType = typeof(DerivedViewModel); 294var modelType = typeof(InvalidBaseViewModel);
ModelBinding\ModelBindingHelperTest.cs (11)
1004Type enumType, 1177public void ConvertToThrowsIfConverterThrows(Type destinationType) 1242public void ConvertTo_Throws_IfValueIsNotConvertible(Type destinationType) 1260var destinationType = typeof(MyClassWithoutConverter); 1274public void ConvertTo_ReturnsValue_IfCompatible(Type destinationType) 1289public void ConvertTo_ReusesArrayElements_IfCompatible(Type destinationType) 1343public void CanGetCompatibleCollection_ReturnsTrue(Type destinationType) 1364public void GetCompatibleCollection_ReturnsList(Type destinationType) 1380public void GetCompatibleCollection_ActivatesCollection(Type destinationType) 1481public void CanGetCompatibleCollection_ReturnsFalse(Type destinationType) 1521private static DefaultModelBindingContext GetBindingContext(Type modelType)
ModelBinding\TestModelBinderProviderContext.cs (2)
22public TestModelBinderProviderContext(Type modelType) 27public TestModelBinderProviderContext(Type modelType, BindingInfo bindingInfo)
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (1)
239public override IEnumerable<ModelMetadata> GetMetadataForProperties(Type modelType)
ModelBinding\Validation\DefaultObjectValidatorTests.cs (4)
867public static TheoryData<object, Type> ValidCollectionData 871return new TheoryData<object, Type>() 901public void Validate_IndexedCollectionTypes_Valid(object model, Type type) 1461private static DefaultObjectValidator CreateValidator(Type excludedType)
ProducesAttributeTests.cs (1)
135var personType = typeof(Person);
RequestFormLimitsAttributeTest.cs (1)
83private PropertyInfo[] GetProperties(Type type)
Routing\AttributeRoutingTest.cs (1)
113var controllerType = typeof(HomeController);
TestApplicationPart.cs (2)
27public TestApplicationPart(IEnumerable<Type> types) 32public TestApplicationPart(params Type[] types)
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
TestModelMetadataProvider.cs (2)
104public IMetadataBuilder ForType(Type type) 118public IMetadataBuilder ForProperty(Type containerType, string propertyName)
Microsoft.AspNetCore.Mvc.Cors (1)
CorsLoggerExtensions.cs (1)
11public static partial void NotMostEffectiveFilter(this ILogger logger, Type filterPolicy);
Microsoft.AspNetCore.Mvc.Cors.Test (1)
CorsApplicationModelProviderTest.cs (1)
211private static ApplicationModelProviderContext GetProviderContext(Type controllerType)
Microsoft.AspNetCore.Mvc.DataAnnotations (6)
DataAnnotationsMetadataProvider.cs (2)
96var containerType = context.Key.ContainerType ?? context.Key.ModelType; 159var underlyingType = Nullable.GetUnderlyingType(context.Key.ModelType) ?? context.Key.ModelType;
DataAnnotationsModelValidatorProvider.cs (1)
97public bool HasValidators(Type modelType, IList<object> validatorMetadata)
MvcDataAnnotationsLocalizationOptions.cs (1)
20public Func<Type, IStringLocalizerFactory, IStringLocalizer> DataAnnotationLocalizerProvider = null!;
NumericClientModelValidatorProvider.cs (1)
19var typeToValidate = context.ModelMetadata.UnderlyingOrModelType;
ValidationAttributeAdapterProvider.cs (1)
24var type = attribute.GetType();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (47)
DataAnnotationsMetadataProviderTest.cs (31)
403.Setup(s => s.Create(It.IsAny<Type>())) 438.Setup(s => s.Create(It.IsAny<Type>())) 502.Setup(s => s.Create(It.IsAny<Type>())) 574.Setup(f => f.Create(It.IsAny<Type>())) 631public void CreateDisplayMetadata_IsEnum_ReflectsModelType(Type type, bool expectedIsEnum) 665public void CreateDisplayMetadata_IsFlagsEnum_ReflectsModelType(Type type, bool expectedIsFlagsEnum) 682public static TheoryData<Type, IReadOnlyDictionary<string, string>> EnumNamesData 686return new TheoryData<Type, IReadOnlyDictionary<string, string>> 796Type type, 828var type = typeof(EnumWithDisplayNames); 841.Setup(f => f.Create(It.IsAny<Type>())) 859public static TheoryData<Type, IEnumerable<KeyValuePair<EnumGroupAndName, string>>> EnumDisplayNamesData 863return new TheoryData<Type, IEnumerable<KeyValuePair<EnumGroupAndName, string>>> 974Type type, 1230var modelType = typeof(DerivedTypeWithAllNonNullProperties); 1249var modelType = typeof(DerivedTypeWithAllNonNullProperties_WithNullableProperties); 1268var modelType = typeof(DerivedTypeWithAllNonNullProperties_WithNullableProperties); 1289var modelType = typeof(DerivedTypeWithNullableProperties); 1309var modelType = typeof(DerivedTypeWithNullableProperties_WithNonNullProperties); 1328var modelType = typeof(DerivedTypeWithNullableProperties_ShadowedProperty); 1347var modelType = typeof(TypeImplementIInterfaceWithNonNullProperty); 1366var modelType = typeof(TypeImplementIInterfaceWithNonNullProperty_AsNullable); 1386var type = typeof(NullableReferenceTypes); 1407var type = typeof(NullableReferenceTypes); 1427var modelType = typeof(TypeWithAllNonNullProperties); 1583var type = typeof(NullableReferenceTypes); 1599var type = typeof(KeyValuePair<string, object>); 1616var type = typeof(KeyValuePair<string, object>); 1635var type = typeof(NullableReferenceTypes); 1651var type = typeof(NullableReferenceTypes); 1668var type = typeof(NullableReferenceTypes);
DataTypeClientModelValidatorProviderTest.cs (2)
20public void CreateValidators_GetsNumericValidator_ForNumericType(Type modelType) 68public void CreateValidators_DoesNotGetsNumericValidator_ForUnsupportedTypes(Type modelType)
ModelMetadataProviderTest.cs (11)
21var type = typeof(User); 50var type = typeof(User); 64var type = typeof(ScaffoldColumnModel); 77var type = typeof(ScaffoldColumnModel); 790var type = typeof(ClassWithPrivateGetProperty); 803var type = typeof(BindingBehaviorModel); 818var type = typeof(BindingBehaviorModel); 834var type = typeof(BindingBehaviorModel); 850var type = typeof(BindingBehaviorModel); 866var type = typeof(BindingBehaviorModel); 922public Type BinderType { get; set; }
ValidationAttributeAdapterProviderTest.cs (3)
13public static TheoryData<ValidationAttribute, Type> DataAnnotationAdapters 17return new TheoryData<ValidationAttribute, Type> 55Type expectedAdapterType)
Microsoft.AspNetCore.Mvc.Formatters.Xml (50)
EnumerableWrapperProvider.cs (2)
26Type sourceEnumerableOfT, 55public Type WrappingType
EnumerableWrapperProviderFactory.cs (1)
41var declaredType = context.DeclaredType;
IUnwrappable.cs (1)
16object Unwrap(Type declaredType);
IWrapperProvider.cs (1)
14Type WrappingType { get; }
ModelBinding\DataMemberRequiredBindingMetadataProvider.cs (1)
42var containerType = context.Key.ContainerType;
ProblemDetailsWrapper.cs (1)
172object IUnwrappable.Unwrap(Type declaredType)
ProblemDetailsWrapperProviderFactory.cs (2)
25public WrapperProvider(Type wrappingType, Func<object?, object?> wrapDelegate) 31public Type WrappingType { get; }
SerializableErrorWrapper.cs (1)
107public object Unwrap(Type declaredType)
SerializableErrorWrapperProvider.cs (1)
12public Type WrappingType => typeof(SerializableErrorWrapper);
ValidationProblemDetailsWrapper.cs (1)
109object IUnwrappable.Unwrap(Type declaredType)
WrapperProviderContext.cs (2)
17public WrapperProviderContext(Type declaredType, bool isSerialization) 29public Type DeclaredType { get; }
XmlDataContractSerializerInputFormatter.cs (8)
21private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>(); 143var type = GetSerializableType(context.ModelType); 173protected override bool CanReadType(Type type) 199protected virtual Type GetSerializableType(Type declaredType) 214protected virtual DataContractSerializer? CreateSerializer(Type type) 235protected virtual DataContractSerializer GetCachedSerializer(Type type)
XmlDataContractSerializerOutputFormatter.cs (9)
25private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>(); 119protected virtual Type GetSerializableType(Type type) 131protected override bool CanWriteType(Type? type) 146protected virtual DataContractSerializer? CreateSerializer(Type type) 228var valueType = context.ObjectType; 244var wrappingType = GetSerializableType(valueType); 293protected virtual DataContractSerializer GetCachedSerializer(Type type)
XmlSerializerInputFormatter.cs (10)
21private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>(); 125var type = GetSerializableType(context.ModelType); 169protected override bool CanReadType(Type type) 181protected virtual Type GetSerializableType(Type declaredType) 196/// <param name="type">The <see cref="Type"/> that is to be deserialized.</param> 198protected virtual XmlReader CreateXmlReader(Stream readStream, Encoding encoding, Type type) 221protected virtual XmlSerializer? CreateSerializer(Type type) 240protected virtual XmlSerializer GetCachedSerializer(Type type)
XmlSerializerOutputFormatter.cs (9)
25private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>(); 101protected virtual Type GetSerializableType(Type type) 113protected override bool CanWriteType(Type? type) 128protected virtual XmlSerializer? CreateSerializer(Type type) 207var valueType = context.ObjectType!; 221var wrappingType = GetSerializableType(valueType); 282protected virtual XmlSerializer GetCachedSerializer(Type type)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (42)
EnumerableWrapperProviderFactoryTest.cs (15)
8public static TheoryData<Type, object, Type> EnumerableOfTInterfaceData 15return new TheoryData<Type, object, Type> 44Type declaredType, 46Type expectedWrappingType) 61public static TheoryData<Type, object, Type> QueryableOfTInterfaceData 68return new TheoryData<Type, object, Type> 97Type declaredType, 99Type expectedWrappingType) 114public static TheoryData<Type, object> ConcreteEnumerableOfTData 121return new TheoryData<Type, object> 150Type declaredType,
EnumerableWrapperProviderTest.cs (6)
19public void Gets_DelegatingWrappingType(Type declaredEnumerableOfT, Type expectedType) 27var wrappingType = wrapperProvider.WrappingType; 38var declaredEnumerableOfT = typeof(IEnumerable<int>); 58var declaredEnumerableOfT = typeof(IEnumerable<int>); 77public void ThrowsArgumentExceptionFor_ConcreteEnumerableOfT(Type declaredType)
PersonWrapper.cs (1)
30public object Unwrap(Type declaredType)
PersonWrapperProvider.cs (1)
20public Type WrappingType
XmlDataContractSerializerInputFormatterTest.cs (5)
479var expectedException = typeof(XmlException); 503var expectedException = typeof(XmlException); 716private InputFormatterContext GetInputFormatterContext(byte[] contentBytes, Type modelType) 722private InputFormatterContext GetInputFormatterContext(HttpContext httpContext, Type modelType) 762protected override DataContractSerializer CreateSerializer(Type type)
XmlDataContractSerializerOutputFormatterTest.cs (4)
379public void CanWriteResult_ReturnsExpectedValueForObjectType(object input, Type declaredType, bool expectedOutput) 443public void GetSupportedContentTypes_ReturnsSupportedTypes(Type type, object expectedOutput) 790Type outputType, 817protected override DataContractSerializer CreateSerializer(Type type)
XmlSerializerInputFormatterTest.cs (6)
273public void CanRead_ReturnsFalse_ForAnyUnsupportedModelType(Type modelType, bool expectedCanRead) 497var expectedException = typeof(XmlException); 523var expectedException = typeof(XmlException); 652private InputFormatterContext GetInputFormatterContext(byte[] contentBytes, Type modelType) 658private InputFormatterContext GetInputFormatterContext(HttpContext httpContext, Type modelType) 697protected override XmlSerializer CreateSerializer(Type type)
XmlSerializerOutputFormatterTest.cs (4)
352public void CanWriteResult_ReturnsExpectedValueForObjectType(object input, Type declaredType, bool expectedOutput) 429public void XmlSerializer_GetSupportedContentTypes_Returns_SupportedTypes(Type type, object expectedOutput) 572Type outputType, 599protected override XmlSerializer CreateSerializer(Type type)
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
AntiforgeryMiddlewareTest.cs (3)
271params Type[] controllerTypes) 280params Type[] controllerTypes) => mvcCoreBuilder 284internal class SelectedControllersApplicationParts(Type[] types) : ApplicationPart, IApplicationPartTypeProvider
ApiExplorerTest.cs (2)
933Type formatterType) 1523public async Task ApiAction_ForActionWithVoidResponseType(string path, Type type)
TempDataInCookiesTest.cs (1)
50var type = serializer.ImplementationType;
Microsoft.AspNetCore.Mvc.IntegrationTests (41)
ActionParametersIntegrationTest.cs (6)
390var parameterType = typeof(Class1); 423var parameterType = typeof(ActionParameter_DefaultValueConstructor); 451var parameterType = typeof(Class1); 485var parameterType = typeof(PointStruct); 543var parameterType = typeof(ActionParameter_MultipleConstructorsWithDefaultValues_NoParameterlessConstructorModel); 576var parameterType = typeof(ActionParameter_RecordTypeWithMultipleConstructors);
AuthorizeFilterIntegrationTest.cs (1)
165private static ApplicationModelProviderContext GetProviderContext(Type controllerType)
BodyValidationIntegrationTests.cs (1)
603Type modelType,
CollectionModelBinderIntegrationTest.cs (6)
724public static TheoryData<Type, IDictionary<string, StringValues>, Type> CollectionTypeData 728return new TheoryData<Type, IDictionary<string, StringValues>, Type> 931Type parameterType, 933Type expectedType)
ComplexObjectIntegrationTest.cs (1)
10protected override Type ExpectedModelBinderType => typeof(ComplexObjectModelBinder);
ComplexTypeIntegrationTestBase.cs (1)
26protected abstract Type ExpectedModelBinderType { get; }
ComplexTypeModelBinderIntegrationTest.cs (1)
13protected override Type ExpectedModelBinderType => typeof(ComplexTypeModelBinder);
DictionaryModelBinderIntegrationTest.cs (6)
1082public static TheoryData<Type, string, Type> DictionaryTypeData 1086return new TheoryData<Type, string, Type> 1155Type parameterType, 1157Type expectedType)
ExcludeBindingMetadataProviderIntegrationTest.cs (2)
123public Type Type { get; set; } 135if (context.Metadata.ModelType == typeof(Type))
HeaderModelBinderIntegrationTest.cs (2)
248public async Task BindParameterFromHeader_WithData_WithPrefix_ModelGetsBound(Type modelType, string value) 498public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
SimpleTypeModelBinderIntegrationTest.cs (5)
413var parameterType = typeof(int); 472public async Task BindParameter_WithEmptyData_DoesNotBind(Type parameterType) 514public async Task BindParameter_WithEmptyData_AndPerTypeMessage_AddsGivenMessage(Type parameterType) 569public async Task BindParameter_WithEmptyData_BindsReferenceAndNullableObjects(Type parameterType) 834public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
TestMvcOptions.cs (1)
28.Setup(s => s.Create(It.IsAny<Type>()))
ValidationIntegrationTests.cs (2)
2309var modelType = typeof(Validation_TopLevelPropertyController); 2363var modelType = typeof(Validation_TopLevelProperty_ValidationOnPropertyController);
ValidationWithRecordIntegrationTests.cs (6)
2100var modelType = typeof(Validation_TopLevelPropertyController); 2151var modelType = typeof(Validation_TopLevelProperty_ValidationOnPropertyController); 2305var modelType = typeof(RecordTypeWithValidatorsOnProperties); 2344var modelType = typeof(RecordTypeWithValidatorsOnPropertiesAndParameters); 2385var modelType = typeof(RecordTypeWithValidatorsOnMixOfPropertiesAndParameters); 2422var modelType = typeof(RecordTypeWithPropertiesAndParameters);
Microsoft.AspNetCore.Mvc.Localization (9)
HtmlLocalizerFactory.cs (3)
28/// Creates an <see cref="HtmlLocalizer"/> using the specified <see cref="Type"/>. 30/// <param name="resourceSource">The <see cref="Type"/> to load resources for.</param> 32public virtual IHtmlLocalizer Create(Type resourceSource)
HtmlLocalizerOfT.cs (1)
12/// <typeparam name="TResource">The <see cref="Type"/> to scope the resource names.</typeparam>
IHtmlLocalizerFactory.cs (4)
13/// <see cref="Type.FullName"/> of the specified <see cref="Type"/>. 15/// <param name="resourceSource">The <see cref="Type"/>.</param> 17IHtmlLocalizer Create(Type resourceSource);
IHtmlLocalizerOfT.cs (1)
9/// <typeparam name="TResource">The <see cref="System.Type"/> to scope the resource names.</typeparam>
Microsoft.AspNetCore.Mvc.Localization.Test (8)
MvcLocalizationMvcBuilderExtensionsTest.cs (2)
109var dataAnnotationLocalizerProvider = new Func<Type, IStringLocalizerFactory, IStringLocalizer>((type, factory) => 125private ServiceDescriptor GetService(IServiceCollection services, Type serviceType)
MvcLocalizationMvcCoreBuilderExtensionsTest.cs (2)
109var dataAnnotationLocalizerProvider = new Func<Type, IStringLocalizerFactory, IStringLocalizer>((type, factory) => 125private ServiceDescriptor GetService(IServiceCollection services, Type serviceType)
MvcLocalizationServiceCollectionExtensionsTest.cs (3)
53Type serviceType, 54Type implementationType) 136public IHtmlLocalizer Create(Type resourceSource)
ViewLocalizerTest.cs (1)
343public IHtmlLocalizer Create(Type resourceSource)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (39)
BsonTempDataSerializer.cs (13)
26private static readonly ConcurrentDictionary<Type, Func<JArray, object>> _arrayConverters = 27new ConcurrentDictionary<Type, Func<JArray, object>>(); 28private static readonly ConcurrentDictionary<Type, Func<JObject, object>> _dictionaryConverters = 29new ConcurrentDictionary<Type, Func<JObject, object>>(); 31private static readonly Dictionary<JTokenType, Type> _tokenTypeLookup = new Dictionary<JTokenType, Type>(8) 65if (_tokenTypeLookup.TryGetValue(arrayType, out var returnType)) 92if (_tokenTypeLookup.TryGetValue(jTokenType, out var valueType)) 156var itemType = item.GetType(); 164public override bool CanSerializeType(Type type) => CanSerializeType(type, out _); 166private static bool CanSerializeType(Type typeToSerialize, out string? errorMessage) 172Type? actualType = null; 237private static bool IsSimpleType(Type type)
NewtonsoftJsonInputFormatter.cs (1)
150var type = context.ModelType;
NewtonsoftJsonPatchInputFormatter.cs (1)
85var modelType = context.ModelType;
ProblemDetailsConverter.cs (2)
14public override bool CanConvert(Type objectType) 20public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (4)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new(); 52public bool TryGetReader(Type type, [NotNullWhen(true)] out Func<object, CancellationToken, Task<ICollection>>? reader) 56var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IAsyncEnumerable<>)); 65var enumeratedObjectType = enumerableType.GetGenericArguments()[0];
src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (16)
19/// Determine whether <paramref name="queryType"/> is or implements a closed generic <see cref="Type"/> 22/// <param name="queryType">The <see cref="Type"/> of interest.</param> 23/// <param name="interfaceType">The open generic <see cref="Type"/> to match. Usually an interface.</param> 25/// The closed generic <see cref="Type"/> created from <paramref name="interfaceType"/> that 26/// <paramref name="queryType"/> is or implements. <c>null</c> if the two <see cref="Type"/>s have no such 34public static Type? ExtractGenericInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 59private static bool IsGenericInstantiation(Type candidate, Type interfaceType) 66private static Type? GetGenericInstantiation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 68Type? bestMatch = null; 70foreach (var @interface in interfaces) 96var baseType = queryType?.BaseType;
ValidationProblemDetailsConverter.cs (2)
14public override bool CanConvert(Type objectType) 20public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (16)
BsonTempDataSerializerTest.cs (6)
12public static TheoryData<object, Type> InvalidTypes 16return new TheoryData<object, Type> 29public void EnsureObjectCanBeSerialized_ThrowsException_OnInvalidType(object value, Type type) 41public static TheoryData<object, Type> InvalidDictionaryTypes 45return new TheoryData<object, Type> 57public void EnsureObjectCanBeSerialized_ThrowsException_OnInvalidDictionaryType(object value, Type type)
DependencyInjection\MvcNewtonsoftJsonOptionsExtensionsTest.cs (3)
22var expected = typeof(CamelCaseNamingStrategy); 166var expected = typeof(DefaultNamingStrategy); 265public JsonContract ResolveContract(Type type)
NewtonsoftJsonInputFormatterTest.cs (1)
670public override short ReadJson(JsonReader reader, Type objectType, short existingValue, bool hasExistingValue, JsonSerializer serializer)
NewtonsoftJsonPatchInputFormatterTest.cs (2)
178public void CanRead_ReturnsFalse_NonJsonPatchContentType(Type modelType) 241private InputFormatterContext CreateInputFormatterContext(Type modelType, HttpContext httpContext)
src\Mvc\Mvc.Core\test\Formatters\JsonInputFormatterTestBase.cs (2)
287protected async Task ReadAsync_ReadsValidArray_AsList(Type requestedType) 649Type modelType,
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (1)
176Type outputType,
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (1)
15public void TryGetReader_ReturnsFalse_IfTypeIsNotIAsyncEnumerable(Type type)
Microsoft.AspNetCore.Mvc.Razor (32)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (6)
14private Dictionary<string, Type>? _hotReloadedViews; 40if (_hotReloadedViews is not null && _hotReloadedViews.TryGetValue(item.Identifier, out var hotReloadedType)) 52public void UpdateCache(Type[]? types) 59foreach (var type in types) 76public HotReloadRazorCompiledItem(RazorCompiledItem previous, Type type) 85public override Type Type { get; }
Compilation\CompiledViewDescriptor.cs (1)
98public Type? Type => Item?.Type;
Compilation\DefaultRazorPageFactoryProvider.cs (1)
41var viewType = viewDescriptor.Type;
Compilation\RazorViewAttribute.cs (2)
18public RazorViewAttribute(string path, Type viewType) 32public Type ViewType { get; }
DefaultTagHelperFactory.cs (3)
20private readonly ConcurrentDictionary<Type, PropertyActivator<ViewContext>[]> _injectActions; 21private readonly Func<Type, PropertyActivator<ViewContext>[]> _getPropertiesToActivate; 35_injectActions = new ConcurrentDictionary<Type, PropertyActivator<ViewContext>[]>();
DependencyInjection\TagHelpersAsServices.cs (1)
22foreach (var type in feature.TagHelpers.Select(t => t.AsType()))
IModelTypeProvider.cs (1)
8Type GetModelType();
Infrastructure\DefaultTagHelperActivator.cs (1)
26private static readonly ObjectFactory _objectFactory = ActivatorUtilities.CreateFactory(typeof(TTagHelper), Type.EmptyTypes);
RazorHotReload.cs (1)
57public void ClearCache(Type[]? changedTypes)
RazorPageActivator.cs (7)
69var pageType = page.GetType(); 70Type? providedModelType = null; 86var modelType = providedModelType; 106public CacheKey(Type pageType, Type? providedModelType) 112public Type PageType { get; } 114public Type? ProvidedModelType { get; }
RazorPageBase.cs (1)
179/// <param name="tagHelperTypeName">Full name of the tag helper <see cref="Type"/>.</param>
RazorPagePropertyActivator.cs (4)
21private readonly Type _viewDataDictionaryType; 25Type pageType, 26Type? declaredModelType, 33var viewDataDictionaryModelType = declaredModelType ?? typeof(object);
TagHelpers\TagHelperComponentPropertyActivator.cs (3)
18private readonly ConcurrentDictionary<Type, PropertyActivator<ViewContext>[]> _propertiesToActivate = new(); 19private readonly Func<Type, PropertyActivator<ViewContext>[]> _getPropertiesToActivate = GetPropertiesToActivate; 48private static PropertyActivator<ViewContext>[] GetPropertiesToActivate(Type type)
Microsoft.AspNetCore.Mvc.Razor.Test (15)
ApplicationParts\RazorCompiledItemFeatureProviderTest.cs (1)
169public override object[] GetCustomAttributes(Type attributeType, bool inherit)
RazorHotReloadTest.cs (3)
26hotReload.ClearCache(Type.EmptyTypes); 43hotReload.ClearCache(Type.EmptyTypes); 65hotReload.ClearCache(Type.EmptyTypes);
RazorPageActivatorTest.cs (2)
302public Type ModelType { get; set; } = typeof(Guid); 309public Type GetModelType() => ModelType;
RazorPageCreateModelExpressionTest.cs (4)
74var expectedType = typeof(RecursiveModel); 85var expectedType = typeof(RecursiveModel); 97var expectedType = typeof(object); 105Type expectedType)
RazorPageCreateTagHelperTest.cs (3)
82serviceProvider.Setup(mock => mock.GetService(It.Is<Type>(serviceType => 84.Returns<Type>(serviceType => 86var enumerableType = serviceType.GetGenericArguments().First();
TestApplicationPart.cs (2)
27public TestApplicationPart(IEnumerable<Type> types) 32public TestApplicationPart(params Type[] types)
Microsoft.AspNetCore.Mvc.RazorPages (42)
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (2)
119var declaringType = property.DeclaringType!; 194var declaringType = methodInfo.DeclaringType;
ApplicationModels\PageConventionCollection.cs (1)
237public void RemoveType(Type pageConventionType)
ApplicationModels\TempDataFilterPageApplicationModelProvider.cs (1)
31var handlerType = pageApplicationModel.HandlerType.AsType();
ApplicationModels\ViewDataAttributePageApplicationModelProvider.cs (1)
25var handlerType = context.PageApplicationModel.HandlerType.AsType();
Infrastructure\DefaultPageActivatorProvider.cs (2)
24var pageTypeInfo = actionDescriptor.PageTypeInfo?.AsType(); 65private static Func<PageContext, ViewContext, object> CreatePageFactory(Type pageTypeInfo)
Infrastructure\DefaultPageFactoryProvider.cs (1)
52var declaredModelType = actionDescriptor.DeclaredModelTypeInfo?.AsType() ?? actionDescriptor.PageTypeInfo.AsType();
Infrastructure\DefaultPageModelActivatorProvider.cs (2)
23var modelTypeInfo = actionDescriptor.ModelTypeInfo?.AsType(); 32var factory = ActivatorUtilities.CreateFactory(modelTypeInfo, Type.EmptyTypes);
Infrastructure\DynamicPageRouteValueTransformerMetadata.cs (2)
11public DynamicPageRouteValueTransformerMetadata(Type selectorType, object? state) 30public Type SelectorType { get; }
Infrastructure\ExecutorFactory.cs (1)
27var returnType = method.ReturnType;
Infrastructure\PageActionEndpointDataSource.cs (1)
74internal void AddDynamicPageEndpoint(IEndpointRouteBuilder endpoints, string pattern, Type transformerType, object? state, int? order = null)
Infrastructure\PageBinderFactory.cs (2)
28var handlerType = actionDescriptor.HandlerTypeInfo.AsType(); 94var handlerType = actionDescriptor.HandlerTypeInfo.AsType();
Infrastructure\RazorPageAdapter.cs (3)
18private readonly Type _modelType; 25public RazorPageAdapter(RazorPageBase page, Type modelType) 88Type IModelTypeProvider.GetModelType() => _modelType;
Infrastructure\RazorPageAttribute.cs (1)
20public RazorPageAttribute(string path, Type viewType, string routeTemplate)
Infrastructure\ServiceBasedPageModelActivatorProvider.cs (1)
18var modelType = descriptor.ModelTypeInfo?.AsType();
PageBase.cs (8)
1212/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 1215/// <param name="componentType">The view component <see cref="Type"/>.</param> 1217public virtual ViewComponentResult ViewComponent(Type componentType) 1247/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 1250/// <param name="componentType">The view component <see cref="Type"/>.</param> 1257public virtual ViewComponentResult ViewComponent(Type componentType, object? arguments) 1492Type modelType, 1528Type modelType,
PageLoggerExtensions.cs (5)
29var pageType = context.ActionDescriptor.PageTypeInfo.AsType(); 44var pageType = context.ActionDescriptor.PageTypeInfo.AsType(); 59var pageType = context.ActionDescriptor.PageTypeInfo.AsType(); 74var pageType = context.ActionDescriptor.PageTypeInfo.AsType(); 156public static partial void NotMostEffectiveFilter(this ILogger logger, Type filterPolicy);
PageModel.cs (8)
397Type modelType, 433Type modelType, 1570/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 1573/// <param name="componentType">The view component <see cref="Type"/>.</param> 1575public virtual ViewComponentResult ViewComponent(Type componentType) 1605/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 1608/// <param name="componentType">The view component <see cref="Type"/>.</param> 1615public virtual ViewComponentResult ViewComponent(Type componentType, object? arguments)
Microsoft.AspNetCore.Mvc.RazorPages.Test (33)
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (7)
191var modelType = typeof(ModelWithPageModelAttribute); 331var modelType = typeof(TestPageModel); 373var modelType = typeof(ModelWithBindProperty); 420var modelType = typeof(TestPageModel); 575var modelType = typeof(ModelWithHandler); 673var baseType = typeof(TestSetPageModel); 724var baseType = typeof(TestSetPageModel);
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (7)
18var type = typeof(TestPageModel_NoTempDataProperties); 33var type = typeof(TestPageModel_PrivateSet); 48var type = typeof(TestPageModel_InvalidProperties); 65var type = typeof(TestPageModel_OneTempDataProperty); 81var type = typeof(TestPageModel_OneTempDataProperty); 103var type = typeof(TestPageModel_OneTempDataProperty); 120private static PageApplicationModelProviderContext CreateProviderContext(Type handlerType)
ApplicationModels\ViewDataAttributePageApplicationModelProviderTest.cs (3)
16var type = typeof(TestPageModel_NoViewDataProperties); 31var type = typeof(TestPageModel_ViewDataProperties); 46private static PageApplicationModelProviderContext CreateProviderContext(Type handlerType)
Filters\PageSaveTempDataPropertyFilterTest.cs (2)
95var pageType = typeof(TestPageModel); 197var pageModelType = typeof(TestPageModel);
Filters\PageViewDataAttributeFilterTest.cs (1)
58var type = typeof(TestModel);
Infrastructure\DefaultPageActivatorProviderTest.cs (3)
30public void CreateActivator_ReturnsFactoryForPage(Type type) 69public void CreateReleaser_ReturnsNullForPagesThatDoNotImplementDisposable(Type pageType) 89public void CreateAsyncReleaser_ReturnsNullForPagesThatDoNotImplementDisposable(Type pageType)
Infrastructure\DefaultPageModelActivatorProviderTest.cs (2)
93public void CreateReleaser_ReturnsNullForModelsThatDoNotImplementDisposable(Type pageType) 113public void CreateAsyncReleaser_ReturnsNullForModelsThatDoNotImplementDisposable(Type pageType)
Infrastructure\PageActionInvokerProviderTest.cs (2)
465Type pageType = null, 466Type modelType = null)
Infrastructure\PageBinderFactoryTest.cs (5)
579var type = typeof(PageModelWithExecutors); 622var type = typeof(PageModelWithExecutors); 659var type = typeof(PageModelWithExecutors); 709var type = typeof(PageModelWithExecutors); 754private static CompiledPageActionDescriptor GetActionDescriptorWithHandlerMethod(Type type, string method)
Infrastructure\ServiceBasedPageModelActivatorProviderTest.cs (1)
124public void CreateReleaser_ReturnsNullForPageModels(Type pageType)
Microsoft.AspNetCore.Mvc.TagHelpers (4)
ComponentTagHelper.cs (1)
53public Type ComponentType { get; set; }
InputTagHelper.cs (1)
538var fieldType = modelExplorer.ModelType;
OptionTagHelper.cs (1)
55/// <see cref="SelectTagHelper"/> <see cref="Type"/> entry and that entry is a non-<c>null</c>
SelectTagHelper.cs (1)
98var realModelType = For.ModelExplorer.ModelType;
Microsoft.AspNetCore.Mvc.TagHelpers.Test (24)
InputTagHelperTest.cs (4)
561public static TheoryData<object, Type, object, NameAndId, string> TestDataSet 587return new TheoryData<object, Type, object, NameAndId, string> 619Type containerType, 2389Type containerType,
LabelTagHelperTest.cs (3)
14public static TheoryData<object, Type, Func<object>, string, TagHelperOutputContent> TestDataSet 40return new TheoryData<object, Type, Func<object>, string, TagHelperOutputContent> 154Type containerType,
LinkTagHelperTest.cs (1)
1101public object ToType(Type conversionType, IFormatProvider provider)
SelectTagHelperTest.cs (13)
19public static TheoryData<object, Type, Func<object>, NameAndId, string> GeneratesExpectedDataSet 57return new TheoryData<object, Type, Func<object>, NameAndId, string> 143public static TheoryData<Type, object, bool> RealModelTypeDataSet 147return new TheoryData<Type, object, bool> 166Type containerType, 248entry => (Type)entry.Key == typeof(SelectTagHelper)); 255Type containerType, 347entry => (Type)entry.Key == typeof(SelectTagHelper)); 435Type containerType, 527entry => (Type)entry.Key == typeof(SelectTagHelper)); 621entry => (Type)entry.Key == typeof(SelectTagHelper)); 629Type modelType, 697entry => (Type)entry.Key == typeof(SelectTagHelper));
TextAreaTagHelperTest.cs (3)
15public static TheoryData<object, Type, object, NameAndId, string> TestDataSet 41return new TheoryData<object, Type, object, NameAndId, string> 82Type containerType,
Microsoft.AspNetCore.Mvc.Test (29)
MvcOptionsSetupTest.cs (1)
205Assert.Equal(typeof(Type), excludeFilter.Type);
MvcServiceCollectionExtensionsTest.cs (28)
64var mockType = typeof(Mock<>).MakeGenericType(serviceType.Key); 75foreach (var implementationType in serviceType.Value) 146foreach (var serviceType in SingleRegistrationServiceTypes) 148var mockType = typeof(Mock<>).MakeGenericType(serviceType); 155foreach (var singleRegistrationType in SingleRegistrationServiceTypes) 273var implementationType = service switch 418foreach (var serviceType in services.Select(d => d.ServiceType).Where(t => !t.IsGenericTypeDefinition).Distinct()) 455private IEnumerable<Type> SingleRegistrationServiceTypes 471private Dictionary<Type, Type[]> MultiRegistrationServiceTypes 475return new Dictionary<Type, Type[]>() 479new Type[] 488new Type[] 497new Type[] 504new Type[] 527new Type[] 534new Type[] 542new Type[] 550new Type[] 558new Type[] 565new Type[] 573new Type[] 586new Type[] 616Type serviceType, 631Type serviceType, 632Type implementationType) 648var implementations = new List<Type>();
Microsoft.AspNetCore.Mvc.Testing (4)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.6.24307.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (4)
97var programType = assembly?.EntryPoint?.DeclaringType; 190var hostType = host.GetType(); 352Type? publicHostAbortedExceptionType = Type.GetType("Microsoft.Extensions.Hosting.HostAbortedException, Microsoft.Extensions.Hosting.Abstractions", throwOnError: false);
Microsoft.AspNetCore.Mvc.ViewFeatures (99)
CachedExpressionCompiler.cs (1)
236var type = invokingExpression.Type;
Controller.cs (6)
222/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 225/// <param name="componentType">The view component <see cref="Type"/>.</param> 228public virtual ViewComponentResult ViewComponent(Type componentType) 259/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 262/// <param name="componentType">The view component <see cref="Type"/>.</param> 270public virtual ViewComponentResult ViewComponent(Type componentType, object? arguments)
DefaultHtmlGenerator.cs (5)
909var type = allowMultiple ? typeof(string[]) : typeof(string); 968var innerType = metadata.UnderlyingOrModelType; 989var valueType = value.GetType(); 1064internal static object GetModelStateValue(ViewContext viewContext, string key, Type destinationType) 1383private static Enum ConvertEnumFromInteger(object value, Type targetType)
DependencyInjection\MvcViewFeaturesMvcBuilderExtensions.cs (1)
48foreach (var viewComponent in feature.ViewComponents.Select(vc => vc.AsType()))
ExpressionHelper.cs (1)
244var declaringType = methodExpression.Method.DeclaringType;
ExpressionMetadataProvider.cs (1)
23Type containerType = null;
Filters\LifecycleProperty.cs (1)
20var propertyType = propertyInfo.PropertyType;
Filters\SaveTempDataPropertyFilterBase.cs (1)
84Type type)
Filters\TempDataApplicationModelProvider.cs (1)
34var modelType = controllerModel.ControllerType.AsType();
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
60public static partial void NotMostEffectiveFilter(ILogger logger, Type filterPolicy);
Filters\ViewDataAttributeApplicationModelProvider.cs (1)
26var controllerType = controllerModel.ControllerType.AsType();
Filters\ViewDataAttributePropertyProvider.cs (1)
11public static IReadOnlyList<LifecycleProperty> GetViewDataProperties(Type type)
HtmlAttributePropertyHelper.cs (4)
15private static readonly ConcurrentDictionary<Type, HtmlAttributePropertyHelper[]> ReflectionCache = 16new ConcurrentDictionary<Type, HtmlAttributePropertyHelper[]>(); 29public static void UpdateCache(Type _) 36public static HtmlAttributePropertyHelper[] GetProperties(Type type)
HtmlHelper.cs (2)
368var type = typeof(TEnum); 383public IEnumerable<SelectListItem> GetEnumSelectList(Type enumType)
HtmlHelperOfT.cs (1)
70var runtimeType = viewContext.ViewData.ModelMetadata.ModelType;
Infrastructure\DefaultTempDataSerializer.cs (1)
217public override bool CanSerializeType(Type type)
Infrastructure\TempDataSerializer.cs (3)
29/// Defaults to returning <see langword="true"/> for all <see cref="Type"/> instances. 32/// <param name="type">The <see cref="Type"/>.</param> 34public virtual bool CanSerializeType(Type type) => true;
IViewComponentHelper.cs (2)
31/// <param name="componentType">The view component <see cref="Type"/>.</param> 39Task<IHtmlContent> InvokeAsync(Type componentType, object? arguments);
MemberExpressionCacheKey.cs (3)
11public MemberExpressionCacheKey(Type modelType, MemberExpression memberExpression) 18public MemberExpressionCacheKey(Type modelType, MemberInfo[] members) 41public Type ModelType { get; }
ModelExplorer.cs (11)
142public Type ModelType 301/// Gets a <see cref="ModelExplorer"/> for the provided model value and model <see cref="Type"/>. 303/// <param name="modelType">The model <see cref="Type"/>.</param> 308/// A <see cref="ModelExplorer"/> created by <see cref="GetExplorerForExpression(Type, object)"/> 316public ModelExplorer GetExplorerForExpression(Type modelType, object model) 325/// Gets a <see cref="ModelExplorer"/> for the provided model value and model <see cref="Type"/>. 349/// Gets a <see cref="ModelExplorer"/> for the provided model value and model <see cref="Type"/>. 351/// <param name="modelType">The model <see cref="Type"/>.</param> 357/// <see cref="GetExplorerForExpression(Type, Func{object, object})"/> 365public ModelExplorer GetExplorerForExpression(Type modelType, Func<object, object> modelAccessor) 374/// Gets a <see cref="ModelExplorer"/> for the provided model value and model <see cref="Type"/>.
ModelMetadataProviderExtensions.cs (2)
18/// <param name="modelType">The declared <see cref="Type"/> of the model object.</param> 25Type modelType,
Rendering\HtmlHelperComponentExtensions.cs (1)
51Type componentType,
Rendering\IHtmlHelper.cs (2)
388/// <param name="enumType"><see cref="Type"/> to generate a select list for.</param> 397IEnumerable<SelectListItem> GetEnumSelectList(Type enumType);
Rendering\ViewComponentHelperExtensions.cs (4)
33/// <param name="componentType">The view component <see cref="Type"/>.</param> 36public static Task<IHtmlContent> InvokeAsync(this IViewComponentHelper helper, Type componentType) 48/// <typeparam name="TComponent">The <see cref="Type"/> of the view component.</typeparam> 62/// <typeparam name="TComponent">The <see cref="Type"/> of the view component.</typeparam>
TemplateRenderer.cs (3)
162var fieldType = metadata.UnderlyingOrModelType; 169public static IEnumerable<string> GetTypeNames(ModelMetadata modelMetadata, Type fieldType) 202var type = fieldType;
TryGetValueProvider.cs (3)
15private static readonly Dictionary<Type, TryGetValueDelegate> _tryGetValueDelegateCache = 16new Dictionary<Type, TryGetValueDelegate>(); 28public static TryGetValueDelegate CreateInstance(Type targetType)
ViewComponentResult.cs (1)
36public Type? ViewComponentType { get; set; }
ViewComponentResultExecutor.cs (1)
167public static void ViewComponentResultExecuting(ILogger logger, Type viewComponentType)
ViewComponents\DefaultViewComponentDescriptorProvider.cs (1)
63private static MethodInfo FindMethod(Type componentType)
ViewComponents\DefaultViewComponentFactory.cs (3)
16private readonly Func<Type, PropertyActivator<ViewComponentContext>[]> _getPropertiesToActivate; 17private readonly ConcurrentDictionary<Type, PropertyActivator<ViewComponentContext>[]> _injectActions; 36_injectActions = new ConcurrentDictionary<Type, PropertyActivator<ViewComponentContext>[]>();
ViewComponents\DefaultViewComponentHelper.cs (2)
85public Task<IHtmlContent> InvokeAsync(Type componentType, object? arguments) 93private ViewComponentDescriptor SelectComponent(Type componentType)
ViewComponents\ServiceBasedViewComponentActivator.cs (1)
19var viewComponentType = context.ViewComponentDescriptor.TypeInfo.AsType();
ViewDataDictionary.cs (18)
24private readonly Type _declaredModelType; 51/// <see cref="Type"/> will not change e.g. when copying from a <see cref="ViewDataDictionary{TModel}"/> 85/// <see cref="Type"/> of <see cref="Model"/> values expected. Used to set <see cref="ModelMetadata"/>. 92Type declaredModelType) 106/// <see cref="Type"/> of <see cref="Model"/> values expected. Used to set <see cref="ModelMetadata"/>. 115Type declaredModelType) 136/// <see cref="Type"/> of <see cref="Model"/> values expected. Used to set <see cref="ModelMetadata"/>. 141/// <see cref="Model"/> <see cref="Type"/> is known but <see cref="Model"/> should be copied from the existing 148/// <see cref="ViewDataDictionary(ViewDataDictionary, object, Type)"/> to ignore <c>source.Model</c>. 151protected ViewDataDictionary(ViewDataDictionary source, Type declaredModelType) 164/// <see cref="Type"/> of <see cref="Model"/> values expected. Used to set <see cref="ModelMetadata"/>. 169/// <see cref="Model"/> <see cref="Type"/> and <see cref="Model"/> are known. 177protected ViewDataDictionary(ViewDataDictionary source, object? model, Type declaredModelType) 195var modelType = model?.GetType(); 196var modelOrDeclaredType = modelType ?? declaredModelType; 245Type declaredModelType, 279/// non-<c>null</c>), or the declared <see cref="Type"/>. 442var modelType = value?.GetType();
ViewDataDictionaryControllerPropertyActivator.cs (5)
16private readonly Func<Type, PropertyActivator<ControllerContext>[]> _getPropertiesToActivate; 18private ConcurrentDictionary<Type, PropertyActivator<ControllerContext>[]> _activateActions; 40var controllerType = controller.GetType(); 55var controllerType = actionDescriptor.ControllerTypeInfo?.AsType(); 78private PropertyActivator<ControllerContext>[] GetPropertiesToActivate(Type type)
ViewDataDictionaryFactory.cs (4)
12public static Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> CreateFactory(Type modelType) 16var type = typeof(ViewDataDictionary<>).MakeGenericType(modelType); 33public static Func<ViewDataDictionary, ViewDataDictionary> CreateNestedFactory(Type modelType) 37var type = typeof(ViewDataDictionary<>).MakeGenericType(modelType);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (84)
ControllerTest.cs (3)
386public static TheoryData<object, Type> IncompatibleModelData 391return new TheoryData<object, Type> 405public void ViewDataModelSetter_DoesNotThrow(object model, Type expectedType)
DefaultEditorTemplatesTest.cs (1)
1520public IEnumerable<SelectListItem> GetEnumSelectList(Type enumType)
ExpressionHelperTest.cs (2)
23var modelType = typeof(TestModel); 64(Expression<Func<TestModel, Type>>)(model => modelType),
ExpressionMetadataProviderTest.cs (1)
120Type expectedType)
Filters\AntiforgeryApplicationModelProviderTest.cs (6)
49public void WorksWithAttributesOnController(Type controllerType, Type filterType) 76public void WorksWithAttributesOnDerivedController(Type controllerType, Type filterType) 128public void ThrowsIfMultipleAntiforgeryAttributesAreApplied(Type controllerType) 142private static ApplicationModelProviderContext CreateProviderContext(Type controllerType)
Filters\ControllerSaveTempDataPropertyFilterTest.cs (4)
28var controllerType = controller.GetType(); 73var controllerType = controller.GetType(); 117var controllerType = controller.GetType(); 156var controllerType = controller.GetType();
Filters\ControllerViewDataAttributeFilterTest.cs (1)
53var type = typeof(TestController);
Filters\TempDataApplicationModelProviderTest.cs (6)
18var type = typeof(TestController_NoTempDataProperties); 35var type = typeof(TestController_PrivateSet); 50var type = typeof(TestController_InvalidProperties); 67var type = typeof(TestController_OneTempDataProperty); 90var type = typeof(TestController_OneTempDataProperty); 112private static ApplicationModelProviderContext GetContext(Type type)
Filters\ViewDataAttributeApplicationModelProviderTest.cs (3)
17var type = typeof(TestController_NoViewDataProperties); 33var type = typeof(TestController_NullableNonPrimitiveViewDataProperty); 65private static ApplicationModelProviderContext GetContext(Type type)
Filters\ViewDataAttributePropertyProviderTest.cs (4)
12var type = typeof(TestController_NoViewDataProperties); 25var type = typeof(BaseController); 44var type = typeof(DerivedController); 60var type = typeof(PropertyWithKeyController);
ModelExplorerExtensionsTest.cs (3)
10public static TheoryData<object, Type, string> SimpleDisplayTextData 14return new TheoryData<object, Type, string> 47Type modelType,
ModelExplorerTest.cs (2)
18var modelType = modelExplorer.ModelType; 32var modelType = modelExplorer.ModelType;
Rendering\HtmlHelperSelectTest.cs (4)
1309.Setup(s => s.Create(It.IsAny<Type>())) 1402public static TheoryData<Type, IEnumerable<SelectListItem>> GetEnumSelectListData 1406return new TheoryData<Type, IEnumerable<SelectListItem>> 1490public void GetEnumSelectList_ReturnsExpectedItems(Type type, IEnumerable<SelectListItem> expected)
TemplateRendererTest.cs (3)
12public static TheoryData<Type, string[]> TypeNameData 16return new TheoryData<Type, string[]> 46public void GetTypeNames_ReturnsExpectedResults(Type fieldType, string[] expectedResult)
TestApplicationPart.cs (2)
27public TestApplicationPart(IEnumerable<Type> types) 32public TestApplicationPart(params Type[] types)
ViewComponentResultTest.cs (2)
410var helper = Mock.Of<IViewComponentHelper>(h => h.InvokeAsync(It.IsAny<Type>(), It.IsAny<object>()) == result); 452var helper = Mock.Of<IViewComponentHelper>(h => h.InvokeAsync(It.IsAny<Type>(), It.IsAny<object>()) == result);
ViewComponents\DefaultViewComponentActivatorTests.cs (3)
22.Setup(ta => ta.CreateInstance<object>(It.IsAny<IServiceProvider>(), It.IsAny<Type>())) 46.Setup(ta => ta.CreateInstance<object>(It.IsAny<IServiceProvider>(), It.IsAny<Type>())) 81private static ViewComponentContext CreateContext(Type componentType)
ViewComponents\DefaultViewComponentDescriptorProviderTest.cs (7)
15public void GetViewComponents_ThrowsIfTypeHasNoInvocationMethods(Type type) 30public void GetViewComponents_ThrowsIfTypeHasAmbiguousInvocationMethods(Type type) 46public void GetViewComponents_ThrowsIfInvokeAsyncDoesNotHaveCorrectReturnType(Type type) 60public void GetViewComponents_ThrowsIfInvokeReturnsATask(Type type) 75var type = typeof(VoidReturningInvokeViewComponent); 155private DefaultViewComponentDescriptorProvider CreateProvider(Type componentType) 163public FilteredViewComponentDescriptorProvider(params Type[] allowedTypes)
ViewComponents\DefaultViewComponentHelperTest.cs (3)
155private ViewComponentDescriptor CreateDescriptorForType(Type componentType) 176private DefaultViewComponentDescriptorProvider CreateProvider(Type componentType) 184public FilteredViewComponentDescriptorProvider(params Type[] allowedTypes)
ViewComponents\DefaultViewComponentSelectorTest.cs (2)
245public FilteredViewComponentDescriptorProvider(params Type[] allowedTypes) 250private static ApplicationPartManager GetApplicationPartManager(IEnumerable<Type> types)
ViewComponents\ViewComponentContextTest.cs (3)
60public static TheoryData<object, Type> IncompatibleModelData 65return new TheoryData<object, Type> 81Type expectedType)
ViewComponents\ViewComponentConventionsTest.cs (3)
46public void IsComponent(Type type, bool expected) 65public void GetComponentName(Type type, string expected) 84public void GetComponentFullName(Type type, string expected)
ViewComponents\ViewComponentFeatureProviderTest.cs (1)
49public TestPart(params Type[] types)
ViewDataDictionaryOfTModelTest.cs (4)
183var expectedType = typeof(string); 223public static TheoryData<object, Type> IncompatibleModelData 228return new TheoryData<object, Type> 245Type expectedType)
ViewDataDictionaryTest.cs (11)
115public static TheoryData<object, Type> IncompatibleModelData 120return new TheoryData<object, Type> 135public void SetModel_Throws_IfModelIncompatibleWithDeclaredType(object model, Type expectedType) 214public static TheoryData<Type, object> CopyModelMetadataData 220return new TheoryData<Type, object> 236public void CopyConstructor_CopiesModelMetadata(Type type, object instance) 273Type sourceType, 275Type expectedType) 299public void ModelSetter_PreservesSourceMetadata_IfModelCompatible(Type sourceType, object model) 345public void ModelSetter_DifferentType_UpdatesModelMetadata(Type originalMetadataType) 824public TestViewDataDictionary(IModelMetadataProvider metadataProvider, Type declaredModelType)
Microsoft.AspNetCore.Mvc.Views.TestCommon (4)
TestRazorCompiledItem.cs (4)
16public static RazorCompiledItem CreateForPage(Type type, string identifier, object[] metadata = null) 26public static RazorCompiledItem CreateForView(Type type, string identifier, object[] metadata = null) 31public TestRazorCompiledItem(Type type, string kind, string identifier, object[] metadata) 45public override Type Type { get; }
Microsoft.AspNetCore.OpenApi (126)
Extensions\JsonObjectSchemaExtensions.cs (3)
22private static readonly Dictionary<Type, OpenApiSchema> _simpleTypeToOpenApiSchema = new() 139/// <param name="type">The <see cref="Type"/> associated with the <see paramref="schema"/>.</param> 140internal static void ApplyPrimitiveTypesAndFormats(this JsonObject schema, Type type)
Schemas\JsonSchemaMapper\JsonSchemaGenerationContext.cs (3)
20internal JsonSchemaGenerationContext(JsonTypeInfo typeInfo, Type? declaringType, JsonPropertyInfo? propertyInfo, ParameterInfo? parameterInfo) 36public Type? DeclaringType { get; } 75public IEnumerable<Attribute> GetCustomAttributes(Type type, bool inherit = false)
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (11)
42public static JsonObject GetJsonSchema(this JsonSerializerOptions options, Type type, JsonSchemaMapperConfiguration? configuration = null) 213Type? parentType = null, 223Type? parentPolymorphicType = null, 228Type type = typeInfo.Type; 268if (Nullable.GetUnderlyingType(type) is Type nullableElementType) 493Type elementType = GetElementType(typeInfo); 536Type valueType = GetElementType(typeInfo); 629private readonly Dictionary<(Type, JsonConverter? CustomConverter, bool IsNullableReferenceType, JsonNumberHandling? CustomNumberHandling), string>? _generatedTypePaths; 678public readonly string? GetOrAddSchemaPointer(Type type, JsonConverter? converter, bool isNullableReferenceType, JsonNumberHandling? numberHandling) 707public readonly void HandleGenerationCallback(JsonObject schema, JsonTypeInfo typeInfo, Type? parentType, JsonPropertyInfo? propertyInfo, ParameterInfo? parameterInfo) 891private static readonly Dictionary<Type, SimpleTypeJsonSchema> s_simpleTypeInfo = new()
Schemas\JsonSchemaMapper\JsonSchemaMapper.ReflectionHelpers.cs (13)
25private static Type GetElementType(JsonTypeInfo typeInfo) 43internal static ICustomAttributeProvider? ResolveAttributeProvider(Type? declaringType, JsonPropertyInfo? propertyInfo) 78Type? converterType = converter?.GetType(); 103Type converterType = converter.GetType(); 138private static FieldInfo GetPrivateFieldWithPotentiallyTrimmedMetadata(this Type type, string fieldName) 189public ParameterLookupKey(string name, Type type) 196public Type Type { get; } 209this Type type, 318Type attrType = attr.GetType(); 333Type attrType = attr.GetType(); 370if (member is Type type) 397Type parameterType = parameterInfo.ParameterType; 418if (Nullable.GetUnderlyingType(parameterType) is Type underlyingType && underlyingType.IsEnum)
Schemas\OpenApiJsonSchema.cs (1)
18public override OpenApiJsonSchema? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Services\OpenApiGenerator.cs (8)
103var responseType = method.ReturnType; 115var defaultErrorType = errorMetadata?.Type; 120var eligibileAnnotations = new Dictionary<int, (Type?, MediaTypeCollection)>(); 126var discoveredTypeAnnotation = responseMetadata.Type; 157var discoveredTypeAnnotation = providerMetadata.Type; 222private static void GenerateDefaultContent(MediaTypeCollection discoveredContentTypeAnnotation, Type? discoveredTypeAnnotation) 241private static void GenerateDefaultResponses(Dictionary<int, (Type?, MediaTypeCollection)> eligibleAnnotations, Type responseType)
Services\Schemas\OpenApiSchemaKey.cs (1)
12internal record struct OpenApiSchemaKey(Type Type, ParameterInfo? ParameterInfo);
Services\Schemas\OpenApiSchemaService.cs (3)
38var type = context.TypeInfo.Type; 66internal async Task<OpenApiSchema> GetOrCreateSchemaAsync(Type type, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) 83internal async Task ApplySchemaTransformersAsync(OpenApiSchema schema, Type type, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (9)
18public Type AwaiterType { get; } 23public Type ResultType { get; } 27Type awaiterType, 32Type resultType, 47Type type, 53var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 61var awaiterType = getAwaiterMethod.ReturnType; 64var isCompletedProperty = awaiterType.GetProperty("IsCompleted", Everything, binder: null, returnType: typeof(bool), types: Type.EmptyTypes, modifiers: null); 92var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\Shared\ObjectMethodExecutor\CoercedAwaitableInfo.cs (5)
15public Type CoercerResultType { get; } 25public CoercedAwaitableInfo(Expression coercerExpression, Type coercerResultType, AwaitableInfo coercedAwaitableInfo) 34[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 42out var nonGenericAwaitableType)) 60out var coercerResultType))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
70public Type? AsyncResultType { get; } 73public Type MethodReturnType { get; internal set; } 235var postCoercionMethodReturnType = coercedAwaitableInfo.CoercerResultType ?? methodInfo.ReturnType;
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (20)
59Type possibleFSharpAsyncType, 61out Type awaitableType) 63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single(); 98TryBuildCoercerFromUnitAwaitableToVoidAwaitable(awaitableType, out var coercerExpression, out var nonGenericAwaitableType) 132Type genericAwaitableType, 134out Type nonGenericAwaitableType) 152static Expression MakeTaskOfUnitToTaskExpression(Type type) 158static Expression MakeValueTaskOfUnitToValueTaskExpression(Type type) 171private static bool IsFSharpAsyncOpenGenericType(Type possibleFSharpAsyncType) => 174private static bool IsFSharpUnit(Type possibleFSharpUnitType) => 177private static bool IsCoerceableFSharpType(Type possibleFSharpType, string coerceableFSharpTypeName) 205private static bool TryPopulateFSharpValueCaches(Type possibleFSharpType) 208var fsharpOptionType = assembly.GetType(FSharpOptionTypeName); 209var fsharpAsyncType = assembly.GetType(FSharpAsyncTypeName); 210var fsharpAsyncGenericType = assembly.GetType(FSharpAsyncGenericTypeName); 218var fsharpOptionOfTaskCreationOptionsType = fsharpOptionType 224var fsharpOptionOfCancellationTokenType = fsharpOptionType 251private static bool TypesHaveSameIdentity(Type type1, Type type2)
src\Shared\ParameterBindingMethodCache.cs (29)
40private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 41private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 42private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new(); 61public bool HasTryParseMethod(Type type) 63var nonNullableParameterType = Nullable.GetUnderlyingType(type) ?? type; 74public Func<ParameterExpression, Expression, Expression>? FindTryParseMethod(Type type) 79Func<ParameterExpression, Expression, Expression>? Finder(Type type) 143Type t when t == typeof(DateTime) => DateTimeStyles.AdjustToUniversal | DateTimeStyles.AllowWhiteSpaces, 144Type t when t == typeof(DateTimeOffset) => DateTimeStyles.AssumeUniversal | DateTimeStyles.AllowWhiteSpaces, 212(Func<ParameterInfo, Expression>?, int) Finder(Type nonNullableParameterType) 234var valueTaskResultType = methodInfo.ReturnType.GetGenericArguments()[0]; 296var nonNullableParameterType = Nullable.GetUnderlyingType(parameter.ParameterType) ?? parameter.ParameterType; 307public (ConstructorInfo?, ConstructorParameter[]) FindConstructor(Type type) 309static (ConstructorInfo? constructor, ConstructorParameter[] parameters) Finder(Type type) 353private static ConstructorInfo? GetConstructor(Type type) 404private static MethodInfo? GetIBindableFromHttpContextMethod(Type type) 407foreach (var i in type.GetInterfaces()) 425private static bool TryGetExplicitIParsableTryParseMethod(Type type, out MethodInfo methodInfo) 436private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType) 450foreach (var implementedInterface in type.GetInterfaces()) 474private static MethodInfo? GetAnyMethodFromHierarchy(Type type, string name) 485foreach (var implementedInterface in type.GetInterfaces()) 507new[] { typeof(Type), typeof(string), typeof(object).MakeByRefType() }); 514new[] { typeof(string), Type.MakeGenericMethodParameter(0).MakeByRefType() }); 526private static bool TryGetDateTimeTryParseMethod(Type type, [NotNullWhen(true)] out MethodInfo? methodInfo) 562private static bool TryGetNumberStylesTryGetMethod(Type type, [NotNullWhen(true)] out MethodInfo? method, [NotNullWhen(true)] out NumberStyles? numberStyles) 703public ParameterLookupKey(string name, Type type) 710public Type Type { get; }
src\Shared\PropertyAsParameterInfo.cs (4)
140public override object[] GetCustomAttributes(Type attributeType, bool inherit) 187public override Type[] GetOptionalCustomModifiers() 190public override Type[] GetRequiredCustomModifiers() 193public override bool IsDefined(Type attributeType, bool inherit)
src\Shared\RoslynUtils\TypeHelper.cs (1)
22internal static bool IsCompilerGeneratedType(Type? type = null)
src\Shared\TypeNameHelper\TypeNameHelper.cs (9)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 46/// <param name="type">The <see cref="Type"/>.</param> 52public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 59private static void ProcessType(StringBuilder builder, Type type, in DisplayNameOptions options) 93private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 95var innerType = type; 112private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Transformers\OpenApiSchemaTransformerContext.cs (1)
22public required Type Type { get; init; }
Transformers\TypeBasedOpenApiDocumentTransformer.cs (2)
14private readonly Type _transformerType; 17internal TypeBasedOpenApiDocumentTransformer([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type transformerType)
Microsoft.AspNetCore.OpenApi.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.OpenApi.Tests (5)
Services\OpenApiDocumentServiceTestsBase.cs (4)
155public ControllerActionDescriptor CreateActionDescriptor(string methodName = null, Type controllerType = null) 233public object GetKeyedService(Type serviceType, object serviceKey) 251public object GetRequiredKeyedService(Type serviceType, object serviceKey) 269public object GetService(Type serviceType)
Services\OpenApiGeneratorTests.cs (1)
1025public bool IsService(Type serviceType) => serviceType == typeof(IInferredServiceInterface);
Microsoft.AspNetCore.OutputCaching (3)
OutputCachePolicyBuilder.cs (1)
46public OutputCachePolicyBuilder AddPolicy([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type policyType)
Policies\TypedPolicy.cs (2)
18private readonly Type _policyType; 24public TypedPolicy([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type policyType)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.AspNetCore.Owin (22)
OwinEnvironment.cs (6)
318public FeatureMap(Type featureInterface, Func<object, object> getter) 329public FeatureMap(Type featureInterface, Func<object, object> getter, Func<object> defaultFactory) 340public FeatureMap(Type featureInterface, Func<object, object> getter, Action<object, object> setter) 352public FeatureMap(Type featureInterface, Func<object, object> getter, Func<object> defaultFactory, Action<object, object> setter) 365public FeatureMap(Type featureInterface, Func<object, object> getter, Func<object> defaultFactory, Action<object, object> setter, Func<object> featureFactory) 374private Type FeatureInterface { get; set; }
OwinExtensions.cs (1)
185public object GetService(Type serviceType)
OwinFeatureCollection.cs (15)
337public object this[Type key] 343private bool SupportsInterface(Type key) 365public object Get(Type key) 375public void Set(Type key, object value) 398public IEnumerator<KeyValuePair<Type, object>> GetEnumerator() 400yield return new KeyValuePair<Type, object>(typeof(IHttpRequestFeature), this); 401yield return new KeyValuePair<Type, object>(typeof(IHttpResponseFeature), this); 402yield return new KeyValuePair<Type, object>(typeof(IHttpResponseBodyFeature), this); 403yield return new KeyValuePair<Type, object>(typeof(IHttpConnectionFeature), this); 404yield return new KeyValuePair<Type, object>(typeof(IHttpRequestIdentifierFeature), this); 405yield return new KeyValuePair<Type, object>(typeof(IHttpRequestLifetimeFeature), this); 406yield return new KeyValuePair<Type, object>(typeof(IHttpAuthenticationFeature), this); 407yield return new KeyValuePair<Type, object>(typeof(IOwinEnvironmentFeature), this); 412yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), this); 416yield return new KeyValuePair<Type, object>(typeof(IHttpWebSocketFeature), this);
Microsoft.AspNetCore.Razor.Runtime (5)
Hosting\DefaultRazorCompiledItem.cs (2)
10public DefaultRazorCompiledItem(Type type, string kind, string identifier) 38public override Type Type { get; }
Hosting\RazorCompiledItem.cs (1)
35public abstract Type Type { get; }
Hosting\RazorCompiledItemAttribute.cs (2)
23public RazorCompiledItemAttribute(Type type, string kind, string identifier) 49public Type Type { get; }
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.RequestDecompression.Tests (1)
DefaultRequestDecompressionProviderTests.cs (1)
25Type expectedProviderType)
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.ResponseCompression (4)
CompressionProviderCollection.cs (1)
33public void Add([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type providerType)
CompressionProviderFactory.cs (3)
15public CompressionProviderFactory([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type providerType) 21private Type ProviderType { get; } 27return (ICompressionProvider)ActivatorUtilities.CreateInstance(serviceProvider, ProviderType, Type.EmptyTypes);
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Routing (52)
Builder\EndpointFilterExtensions.cs (1)
45filterFactory = ActivatorUtilities.CreateFactory(typeof(TFilterType), Type.EmptyTypes);
Builder\EndpointRouteBuilderExtensions.cs (1)
471public object? GetService(Type serviceType) => null;
Builder\OpenApiRouteHandlerBuilderExtensions.cs (4)
73Type? responseType = null, 77if (responseType is Type && string.IsNullOrEmpty(contentType)) 210Type requestType, 229Type requestType,
DefaultInlineConstraintResolver.cs (1)
21private readonly IDictionary<string, Type> _inlineConstraintMap;
Matching\ILEmitTrieFactory.cs (3)
666types: new[] { Type.MakeGenericMethodParameter(0).MakeByRefType(), typeof(int), }, 680types: new[] { Type.MakeGenericMethodParameter(0).MakeByRefType(), }, 705types: new[] { typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), },
ParameterPolicyActivator.cs (7)
18IDictionary<string, Type> inlineParameterPolicyMap, 32out var parameterPolicyType)) 70IDictionary<string, Type> inlineParameterPolicyMap, 74[NotNullWhen(true)] out Type? policyType) 97private static IParameterPolicy CreateParameterPolicy(IServiceProvider? serviceProvider, Type parameterPolicyType, string? argumentString) 159private static ConstructorInfo GetLongestConstructor(List<ConstructorInfo> constructors, Type parameterPolicyType) 218var parameterType = parameter.ParameterType;
RegexInlineRouteConstraintSetup.cs (1)
14var existingRegexConstraintType = options.TrimmerSafeConstraintMap["regex"];
RouteGroupContext.cs (1)
43public object? GetService(Type serviceType) => null;
RouteOptions.cs (7)
23private IDictionary<string, Type> _constraintTypeMap = GetDefaultConstraintMap(); 81public IDictionary<string, Type> ConstraintMap 100internal IDictionary<string, Type> TrimmerSafeConstraintMap => _constraintTypeMap; 102private static IDictionary<string, Type> GetDefaultConstraintMap() 104var defaults = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 163public void SetParameterPolicy(string token, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) 173private static void AddConstraint<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TConstraint>(Dictionary<string, Type> constraintMap, string text) where TConstraint : IRouteConstraint
src\Shared\Json\JsonSerializerExtensions.cs (3)
16public static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType) 19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type) 25public static JsonTypeInfo GetRequiredTypeInfo(this JsonSerializerContext context, Type type)
src\Shared\PropertyHelper\PropertyHelper.cs (21)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 50/// This constructor does not cache the helper. For caching, use <see cref="GetProperties(Type)"/>. 123[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 144[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 244Type openGenericDelegateType, 248var typeInput = propertyGetMethod.DeclaringType!; 249var typeOutput = propertyGetMethod.ReturnType; 251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 290var typeInput = setMethod.DeclaringType!; 291var parameterType = parameters[0].ParameterType; 412Type type, 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 444var declaringType = propertyHelper.Property.DeclaringType; 457Type? currentType = type; 493Type type, 494ConcurrentDictionary<Type, PropertyHelper[]>? cache) 509foreach (var @interface in type.GetInterfaces()) 523[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 562public static void ClearCache(Type[]? _)
src\Shared\RoslynUtils\TypeHelper.cs (1)
22internal static bool IsCompilerGeneratedType(Type? type = null)
src\Shared\RouteHandlers\ExecuteHandlerHelper.cs (1)
41var runtimeType = value?.GetType();
Microsoft.AspNetCore.Routing.Abstractions (21)
src\Shared\PropertyHelper\PropertyHelper.cs (21)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 50/// This constructor does not cache the helper. For caching, use <see cref="GetProperties(Type)"/>. 123[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 144[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 244Type openGenericDelegateType, 248var typeInput = propertyGetMethod.DeclaringType!; 249var typeOutput = propertyGetMethod.ReturnType; 251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 290var typeInput = setMethod.DeclaringType!; 291var parameterType = parameters[0].ParameterType; 412Type type, 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 444var declaringType = propertyHelper.Property.DeclaringType; 457Type? currentType = type; 493Type type, 494ConcurrentDictionary<Type, PropertyHelper[]>? cache) 509foreach (var @interface in type.GetInterfaces()) 523[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 562public static void ClearCache(Type[]? _)
Microsoft.AspNetCore.Routing.Microbenchmarks (9)
EndpointMetadataCollectionBenchmark.cs (1)
20var seeds = new Type[]
src\Http\Routing\test\UnitTests\TestObjects\TestServiceProvider.cs (1)
8public object GetService(Type serviceType) => null;
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Routing.Tests (11)
Builder\FallbackEndpointRouteBuilderExtensionsTest.cs (1)
51public object? GetService(Type serviceType) => null;
Builder\GroupTest.cs (1)
400public object? GetService(Type serviceType) => null;
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (1)
596public object? GetService(Type serviceType) => null;
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (4)
1106public TestConsumesAttribute(Type requestType, string contentType, params string[] otherContentTypes) 1125Type? IAcceptsMetadata.RequestType => _requestType; 1129Type? _requestType; 1173public object? GetService(Type serviceType)
EndpointMiddlewareTest.cs (1)
418public object GetService(Type serviceType)
RouterMiddlewareTest.cs (1)
149public object GetService(Type serviceType)
RoutingServiceCollectionExtensionsTests.cs (1)
80var regexRouteConstraintType = options.Value.ConstraintMap["regex"];
TestObjects\TestServiceProvider.cs (1)
8public object GetService(Type serviceType) => null;
Microsoft.AspNetCore.Security.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Server.HttpSys (6)
StandardFeatureCollection.cs (6)
14private static readonly Dictionary<Type, Func<RequestContext, object?>> _featureFuncLookup = new() 70public object? this[Type key] 91return ((IEnumerable<KeyValuePair<Type, object>>)this).GetEnumerator(); 94IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() 101yield return new KeyValuePair<Type, object>(featureFunc.Key, feature);
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Server.IIS (78)
Core\IISHttpContext.FeatureCollection.cs (9)
46private List<KeyValuePair<Type, object>>? MaybeExtra; 55private object? ExtraFeatureGet(Type key) 72private void ExtraFeatureSet(Type key, object? value) 93MaybeExtra = new List<KeyValuePair<Type, object>>(2); 99MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 103MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 310object? IFeatureCollection.this[Type key] 424IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Core\IISHttpContext.Features.cs (55)
8private static readonly Type IHttpRequestFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpRequestFeature); 9private static readonly Type IHttpRequestBodyDetectionFeature = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpRequestBodyDetectionFeature); 10private static readonly Type IHttpResponseFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpResponseFeature); 11private static readonly Type IHttpResponseBodyFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature); 12private static readonly Type IHttpRequestIdentifierFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpRequestIdentifierFeature); 13private static readonly Type IServiceProvidersFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IServiceProvidersFeature); 14private static readonly Type IHttpRequestLifetimeFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpRequestLifetimeFeature); 15private static readonly Type IHttpConnectionFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature); 16private static readonly Type IHttpAuthenticationFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature); 17private static readonly Type IQueryFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IQueryFeature); 18private static readonly Type IFormFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IFormFeature); 19private static readonly Type IHttpUpgradeFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpUpgradeFeature); 20private static readonly Type IResponseCookiesFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IResponseCookiesFeature); 21private static readonly Type IItemsFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IItemsFeature); 22private static readonly Type ITlsConnectionFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.ITlsConnectionFeature); 23private static readonly Type ITlsHandshakeFeatureType = typeof(global::Microsoft.AspNetCore.Connections.Features.ITlsHandshakeFeature); 24private static readonly Type IHttpWebSocketFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpWebSocketFeature); 25private static readonly Type ISessionFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.ISessionFeature); 26private static readonly Type IHttpBodyControlFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpBodyControlFeature); 27private static readonly Type IISHttpContextType = typeof(IISHttpContext); 28private static readonly Type IServerVariablesFeature = typeof(global::Microsoft.AspNetCore.Http.Features.IServerVariablesFeature); 29private static readonly Type IHttpMaxRequestBodySizeFeature = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpMaxRequestBodySizeFeature); 30private static readonly Type IHttpResponseTrailersFeature = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpResponseTrailersFeature); 31private static readonly Type IHttpResetFeature = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpResetFeature); 32private static readonly Type IConnectionLifetimeNotificationFeature = typeof(global::Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeNotificationFeature); 33private static readonly Type IHttpActivityFeature = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpActivityFeature); 34private static readonly Type IHttpSysRequestInfoFeature = typeof(global::Microsoft.AspNetCore.Server.HttpSys.IHttpSysRequestInfoFeature); 35private static readonly Type IHttpSysRequestTimingFeature = typeof(global::Microsoft.AspNetCore.Server.HttpSys.IHttpSysRequestTimingFeature); 90internal object? FastFeatureGet(Type key) 208internal void FastFeatureSet(Type key, object? feature) 353private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 357yield return new KeyValuePair<Type, object>(IHttpRequestFeatureType, _currentIHttpRequestFeature); 361yield return new KeyValuePair<Type, object>(IHttpRequestBodyDetectionFeature, _currentIHttpRequestBodyDetectionFeature); 365yield return new KeyValuePair<Type, object>(IHttpResponseFeatureType, _currentIHttpResponseFeature); 369yield return new KeyValuePair<Type, object>(IHttpResponseBodyFeatureType, _currentIHttpResponseBodyFeature); 373yield return new KeyValuePair<Type, object>(IHttpRequestIdentifierFeatureType, _currentIHttpRequestIdentifierFeature); 377yield return new KeyValuePair<Type, object>(IServiceProvidersFeatureType, _currentIServiceProvidersFeature); 381yield return new KeyValuePair<Type, object>(IHttpRequestLifetimeFeatureType, _currentIHttpRequestLifetimeFeature); 385yield return new KeyValuePair<Type, object>(IHttpConnectionFeatureType, _currentIHttpConnectionFeature); 389yield return new KeyValuePair<Type, object>(IHttpAuthenticationFeatureType, _currentIHttpAuthenticationFeature); 393yield return new KeyValuePair<Type, object>(IQueryFeatureType, _currentIQueryFeature); 397yield return new KeyValuePair<Type, object>(IFormFeatureType, _currentIFormFeature); 401yield return new KeyValuePair<Type, object>(IHttpUpgradeFeatureType, _currentIHttpUpgradeFeature); 405yield return new KeyValuePair<Type, object>(IResponseCookiesFeatureType, _currentIResponseCookiesFeature); 409yield return new KeyValuePair<Type, object>(IItemsFeatureType, _currentIItemsFeature); 413yield return new KeyValuePair<Type, object>(ITlsConnectionFeatureType, _currentITlsConnectionFeature); 417yield return new KeyValuePair<Type, object>(ITlsHandshakeFeatureType, _currentITlsHandshakeFeature); 421yield return new KeyValuePair<Type, object>(IHttpWebSocketFeatureType, _currentIHttpWebSocketFeature); 425yield return new KeyValuePair<Type, object>(ISessionFeatureType, _currentISessionFeature); 429yield return new KeyValuePair<Type, object>(IHttpBodyControlFeatureType, _currentIHttpBodyControlFeature); 433yield return new KeyValuePair<Type, object>(IServerVariablesFeature, _currentIServerVariablesFeature); 437yield return new KeyValuePair<Type, object>(IHttpMaxRequestBodySizeFeature, _currentIHttpMaxRequestBodySizeFeature); 441yield return new KeyValuePair<Type, object>(IHttpResponseTrailersFeature, _currentIHttpResponseTrailersFeature); 445yield return new KeyValuePair<Type, object>(IHttpResponseTrailersFeature, _currentIHttpResetFeature); 449yield return new KeyValuePair<Type, object>(IHttpActivityFeature, _currentIHttpActivityFeature);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (5)
84var type = method.DeclaringType; 116var parameterType = parameter.ParameterType; 161var type = method.DeclaringType; 196private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType) 203var parentType = declaringType.DeclaringType;
src\Shared\TypeNameHelper\TypeNameHelper.cs (9)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 46/// <param name="type">The <see cref="Type"/>.</param> 52public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 59private static void ProcessType(StringBuilder builder, Type type, in DisplayNameOptions options) 93private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 95var innerType = type; 112private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Microsoft.AspNetCore.Server.Kestrel.Core (45)
Internal\Http\HttpProtocol.Generated.cs (45)
81private List<KeyValuePair<Type, object>>? MaybeExtra; 131private object? ExtraFeatureGet(Type key) 148private void ExtraFeatureSet(Type key, object? value) 169MaybeExtra = new List<KeyValuePair<Type, object>>(2); 175MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 179MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 187object? IFeatureCollection.this[Type key] 804private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 808yield return new KeyValuePair<Type, object>(typeof(IHttpRequestFeature), _currentIHttpRequestFeature); 812yield return new KeyValuePair<Type, object>(typeof(IHttpResponseFeature), _currentIHttpResponseFeature); 816yield return new KeyValuePair<Type, object>(typeof(IHttpResponseBodyFeature), _currentIHttpResponseBodyFeature); 820yield return new KeyValuePair<Type, object>(typeof(IRouteValuesFeature), _currentIRouteValuesFeature); 824yield return new KeyValuePair<Type, object>(typeof(IEndpointFeature), _currentIEndpointFeature); 828yield return new KeyValuePair<Type, object>(typeof(IServiceProvidersFeature), _currentIServiceProvidersFeature); 832yield return new KeyValuePair<Type, object>(typeof(IHttpActivityFeature), _currentIHttpActivityFeature); 836yield return new KeyValuePair<Type, object>(typeof(IHttpMetricsTagsFeature), _currentIHttpMetricsTagsFeature); 840yield return new KeyValuePair<Type, object>(typeof(IItemsFeature), _currentIItemsFeature); 844yield return new KeyValuePair<Type, object>(typeof(IQueryFeature), _currentIQueryFeature); 848yield return new KeyValuePair<Type, object>(typeof(IRequestBodyPipeFeature), _currentIRequestBodyPipeFeature); 852yield return new KeyValuePair<Type, object>(typeof(IFormFeature), _currentIFormFeature); 856yield return new KeyValuePair<Type, object>(typeof(IHttpAuthenticationFeature), _currentIHttpAuthenticationFeature); 860yield return new KeyValuePair<Type, object>(typeof(IHttpRequestIdentifierFeature), _currentIHttpRequestIdentifierFeature); 864yield return new KeyValuePair<Type, object>(typeof(IHttpConnectionFeature), _currentIHttpConnectionFeature); 868yield return new KeyValuePair<Type, object>(typeof(ISessionFeature), _currentISessionFeature); 872yield return new KeyValuePair<Type, object>(typeof(IResponseCookiesFeature), _currentIResponseCookiesFeature); 876yield return new KeyValuePair<Type, object>(typeof(IHttpRequestTrailersFeature), _currentIHttpRequestTrailersFeature); 880yield return new KeyValuePair<Type, object>(typeof(IHttpResponseTrailersFeature), _currentIHttpResponseTrailersFeature); 884yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), _currentITlsConnectionFeature); 888yield return new KeyValuePair<Type, object>(typeof(IHttpExtendedConnectFeature), _currentIHttpExtendedConnectFeature); 892yield return new KeyValuePair<Type, object>(typeof(IHttpUpgradeFeature), _currentIHttpUpgradeFeature); 896yield return new KeyValuePair<Type, object>(typeof(IHttpWebSocketFeature), _currentIHttpWebSocketFeature); 900yield return new KeyValuePair<Type, object>(typeof(IHttpWebTransportFeature), _currentIHttpWebTransportFeature); 904yield return new KeyValuePair<Type, object>(typeof(IBadRequestExceptionFeature), _currentIBadRequestExceptionFeature); 908yield return new KeyValuePair<Type, object>(typeof(IHttpRequestTimeoutFeature), _currentIHttpRequestTimeoutFeature); 912yield return new KeyValuePair<Type, object>(typeof(IHttp2StreamIdFeature), _currentIHttp2StreamIdFeature); 916yield return new KeyValuePair<Type, object>(typeof(IHttpRequestLifetimeFeature), _currentIHttpRequestLifetimeFeature); 920yield return new KeyValuePair<Type, object>(typeof(IHttpMaxRequestBodySizeFeature), _currentIHttpMaxRequestBodySizeFeature); 924yield return new KeyValuePair<Type, object>(typeof(IHttpMinRequestBodyDataRateFeature), _currentIHttpMinRequestBodyDataRateFeature); 928yield return new KeyValuePair<Type, object>(typeof(IHttpMinResponseDataRateFeature), _currentIHttpMinResponseDataRateFeature); 932yield return new KeyValuePair<Type, object>(typeof(IHttpBodyControlFeature), _currentIHttpBodyControlFeature); 936yield return new KeyValuePair<Type, object>(typeof(IHttpRequestBodyDetectionFeature), _currentIHttpRequestBodyDetectionFeature); 940yield return new KeyValuePair<Type, object>(typeof(IHttpResetFeature), _currentIHttpResetFeature); 944yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 956IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (8)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (4)
48Type type = featureIter.Key; 72Type type = feature.Key; 209var type = item.Key; 236Type type = feature.Key;
KestrelEventSourceTests.cs (1)
17var esType = typeof(KestrelServer).Assembly.GetType(
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (2)
23public List<Type> IgnoredExceptions { get; } = new List<Type>();
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
32public List<Type> IgnoredCriticalLogExceptions => TestApplicationErrorLogger.IgnoredExceptions;
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (34)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
142internal async Task WaitForConnectionErrorAsync<TException>(bool ignoreNonGoAwayFrames, long? expectedLastStreamId, Http3ErrorCode expectedErrorCode, Action<Type, string[]> matchExpectedErrorMessage = null, params string[] expectedErrorMessage) 175private void AssertConnectionError<TException>(Http3ErrorCode expectedErrorCode, Action<Type, string[]> matchExpectedErrorMessage = null, params string[] expectedErrorMessage) where TException : Exception
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (2)
23public List<Type> IgnoredExceptions { get; } = new List<Type>();
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (23)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 70private object? ExtraFeatureGet(Type key) 87private void ExtraFeatureSet(Type key, object? value) 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 126object? IFeatureCollection.this[Type key] 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature); 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (23)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (23)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 70private object? ExtraFeatureGet(Type key) 87private void ExtraFeatureSet(Type key, object? value) 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 126object? IFeatureCollection.this[Type key] 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature); 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (40)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (23)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 70private object? ExtraFeatureGet(Type key) 87private void ExtraFeatureSet(Type key, object? value) 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 126object? IFeatureCollection.this[Type key] 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature); 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (17)
35private List<KeyValuePair<Type, object>>? MaybeExtra; 57private object? ExtraFeatureGet(Type key) 74private void ExtraFeatureSet(Type key, object? value) 95MaybeExtra = new List<KeyValuePair<Type, object>>(2); 101MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 105MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 113object? IFeatureCollection.this[Type key] 277private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 281yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 285yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 289yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 293yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 297yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 301yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 305yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), _currentITlsConnectionFeature); 317IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (3)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (2)
23public List<Type> IgnoredExceptions { get; } = new List<Type>();
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
32public List<Type> IgnoredCriticalLogExceptions => TestApplicationErrorLogger.IgnoredExceptions;
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (23)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (23)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 70private object? ExtraFeatureGet(Type key) 87private void ExtraFeatureSet(Type key, object? value) 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 126object? IFeatureCollection.this[Type key] 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature); 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Microsoft.AspNetCore.Shared.Tests (144)
ClosedGenericMatcherTest.cs (14)
15public static TheoryData<Type, Type, Type> ExtractGenericInterfaceDataSet 19return new TheoryData<Type, Type, Type> 166Type queryType, 167Type interfaceType, 168Type expectedResult) 171var result = ClosedGenericMatcher.ExtractGenericInterface(queryType, interfaceType); 182var type = typeof(TwoIEnumerableImplementationsInherited); 185var result = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IEnumerable<>)); 196var type = typeof(TwoIEnumerableImplementationsOnSameClass); 199var result = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IEnumerable<>));
PropertyHelperTest.cs (9)
186public void PropertyHelper_WorksForNullablePrimitiveAndEnumTypes(Type nullableType) 199var myType = typeof(MyStruct?); 323var type = typeof(DerivedClassWithNonReadableProperties); 339var type = typeof(string); 354var type = typeof(DerivedHiddenProperty); 371var type = typeof(DerivedHiddenProperty2); 388var type = typeof(string); 403var type = typeof(DerivedHiddenProperty); 420var type = typeof(DerivedHiddenProperty2);
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (3)
26[DynamicallyAccessedMembers(ActivatorAccessibility)] Type instanceType, 92[DynamicallyAccessedMembers(ActivatorAccessibility)] Type type) 116var givenType = givenParameters[givenIndex]?.GetType();
src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (16)
19/// Determine whether <paramref name="queryType"/> is or implements a closed generic <see cref="Type"/> 22/// <param name="queryType">The <see cref="Type"/> of interest.</param> 23/// <param name="interfaceType">The open generic <see cref="Type"/> to match. Usually an interface.</param> 25/// The closed generic <see cref="Type"/> created from <paramref name="interfaceType"/> that 26/// <paramref name="queryType"/> is or implements. <c>null</c> if the two <see cref="Type"/>s have no such 34public static Type? ExtractGenericInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 59private static bool IsGenericInstantiation(Type candidate, Type interfaceType) 66private static Type? GetGenericInstantiation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 68Type? bestMatch = null; 70foreach (var @interface in interfaces) 96var baseType = queryType?.BaseType;
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (9)
18public Type AwaiterType { get; } 23public Type ResultType { get; } 27Type awaiterType, 32Type resultType, 47Type type, 53var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 61var awaiterType = getAwaiterMethod.ReturnType; 64var isCompletedProperty = awaiterType.GetProperty("IsCompleted", Everything, binder: null, returnType: typeof(bool), types: Type.EmptyTypes, modifiers: null); 92var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\Shared\ObjectMethodExecutor\CoercedAwaitableInfo.cs (5)
15public Type CoercerResultType { get; } 25public CoercedAwaitableInfo(Expression coercerExpression, Type coercerResultType, AwaitableInfo coercedAwaitableInfo) 34[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 42out var nonGenericAwaitableType)) 60out var coercerResultType))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
70public Type? AsyncResultType { get; } 73public Type MethodReturnType { get; internal set; } 235var postCoercionMethodReturnType = coercedAwaitableInfo.CoercerResultType ?? methodInfo.ReturnType;
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (20)
59Type possibleFSharpAsyncType, 61out Type awaitableType) 63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single(); 98TryBuildCoercerFromUnitAwaitableToVoidAwaitable(awaitableType, out var coercerExpression, out var nonGenericAwaitableType) 132Type genericAwaitableType, 134out Type nonGenericAwaitableType) 152static Expression MakeTaskOfUnitToTaskExpression(Type type) 158static Expression MakeValueTaskOfUnitToValueTaskExpression(Type type) 171private static bool IsFSharpAsyncOpenGenericType(Type possibleFSharpAsyncType) => 174private static bool IsFSharpUnit(Type possibleFSharpUnitType) => 177private static bool IsCoerceableFSharpType(Type possibleFSharpType, string coerceableFSharpTypeName) 205private static bool TryPopulateFSharpValueCaches(Type possibleFSharpType) 208var fsharpOptionType = assembly.GetType(FSharpOptionTypeName); 209var fsharpAsyncType = assembly.GetType(FSharpAsyncTypeName); 210var fsharpAsyncGenericType = assembly.GetType(FSharpAsyncGenericTypeName); 218var fsharpOptionOfTaskCreationOptionsType = fsharpOptionType 224var fsharpOptionOfCancellationTokenType = fsharpOptionType 251private static bool TypesHaveSameIdentity(Type type1, Type type2)
src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (2)
47Type? underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType); 87private static object? CreateValueType(Type t) => RuntimeHelpers.GetUninitializedObject(t);
src\Shared\PropertyActivator\PropertyActivator.cs (7)
38Type type, 39Type activateAttributeType, 50Type type, 51Type activateAttributeType, 64Type type, 81Type type, 82Type activateAttributeType,
src\Shared\PropertyHelper\PropertyHelper.cs (21)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 50/// This constructor does not cache the helper. For caching, use <see cref="GetProperties(Type)"/>. 123[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 144[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 244Type openGenericDelegateType, 248var typeInput = propertyGetMethod.DeclaringType!; 249var typeOutput = propertyGetMethod.ReturnType; 251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 290var typeInput = setMethod.DeclaringType!; 291var parameterType = parameters[0].ParameterType; 412Type type, 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 444var declaringType = propertyHelper.Property.DeclaringType; 457Type? currentType = type; 493Type type, 494ConcurrentDictionary<Type, PropertyHelper[]>? cache) 509foreach (var @interface in type.GetInterfaces()) 523[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) 562public static void ClearCache(Type[]? _)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (5)
84var type = method.DeclaringType; 116var parameterType = parameter.ParameterType; 161var type = method.DeclaringType; 196private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType) 203var parentType = declaringType.DeclaringType;
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
src\Shared\TypeNameHelper\TypeNameHelper.cs (9)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 46/// <param name="type">The <see cref="Type"/>.</param> 52public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 59private static void ProcessType(StringBuilder builder, Type type, in DisplayNameOptions options) 93private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 95var innerType = type; 112private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
TypeNameHelperTest.cs (20)
45public void Can_pretty_print_CLR_full_name(Type type, string expected) 54var type = typeof(ClassInGlobalNamespace<int>); 80public void Can_pretty_print_CLR_name(Type type, string expected) 102public void Returns_common_name_for_built_in_types(Type type, string expected) 115public void Can_pretty_print_array_name(Type type, bool fullName, string expected) 122var openDictionaryType = typeof(Dictionary<,>); 125var closedDictionaryType = openDictionaryType.MakeGenericType(genArgsDictionary); 127var openLevelType = typeof(Level1<>.Level2<>.Level3<>); 130var closedLevelType = openLevelType.MakeGenericType(genArgsLevel); 132var openInnerType = typeof(OuterGeneric<>.InnerNonGeneric.InnerGeneric<,>.InnerGenericLeafNode<>); 135var closedInnerType = openInnerType.MakeGenericType(genArgsInnerType); 137return new TheoryData<Type, bool, string> 174public void Can_pretty_print_open_generics(Type type, bool fullName, string expected) 180new TheoryData<Type, string> 190public void GetTypeDisplayName_IncludesGenericParameterNamesWhenOptionIsSet(Type type, string expected) 200new TheoryData<Type, string> 210public void GetTypeDisplayName_WithoutFullName_IncludesGenericParameterNamesWhenOptionIsSet(Type type, string expected) 219public static TheoryData<Type, string> FullTypeNameData 223return new TheoryData<Type, string> 251public void Can_PrettyPrint_FullTypeName_WithoutGenericParametersAndNestedTypeDelimiter(Type type, string expectedTypeName)
Microsoft.AspNetCore.SignalR.Client.Core (51)
HubConnection.cs (14)
341public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task<object?>> handler, object state) 374public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task> handler, object state) 420public virtual async Task<ChannelReader<object?>> StreamAsChannelCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default) 442public virtual async Task<object?> InvokeCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default) 687private async Task<ChannelReader<object?>> StreamAsChannelCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken) 840if (ReflectionHelper.TryGetStreamType(reader.GetType(), out var channelGenericType)) 861private void InvokeStreamMethod(MethodInfo methodInfo, Type[] genericTypes, ConnectionState connectionState, string streamId, object reader, CancellationTokenSource tokenSource) 962private async Task<object?> InvokeCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken) 1919public Type[] ParameterTypes { get; } 1924public InvocationHandler(Type[] parameterTypes, Func<object?[], object, Task> callback, object state) 2208Type IInvocationBinder.GetReturnType(string invocationId) 2218Type IInvocationBinder.GetStreamItemType(string invocationId) 2230IReadOnlyList<Type> IInvocationBinder.GetParameterTypes(string methodName) 2235return Type.EmptyTypes;
HubConnectionBuilder.cs (2)
84/// Gets the <see cref="Type"/> of the current instance. 87public new Type GetType()
HubConnectionExtensions.cs (4)
15private static IDisposable On(this HubConnection hubConnection, string methodName, Type[] parameterTypes, Action<object?[]> handler) 36return hubConnection.On(methodName, Type.EmptyTypes, args => handler()); 211public static IDisposable On(this HubConnection hubConnection, string methodName, Type[] parameterTypes, Func<object?[], Task> handler) 231return hubConnection.On(methodName, Type.EmptyTypes, args => handler());
HubConnectionExtensions.OnResult.cs (4)
14private static IDisposable On<TResult>(this HubConnection hubConnection, string methodName, Type[] parameterTypes, Func<object?[], TResult> handler) 33public static IDisposable On<TResult>(this HubConnection hubConnection, string methodName, Type[] parameterTypes, Func<object?[], Task<TResult>> handler) 55return hubConnection.On(methodName, Type.EmptyTypes, args => handler()); 71return hubConnection.On(methodName, Type.EmptyTypes, args => handler());
Internal\InvocationRequest.cs (6)
19public Type ResultType { get; } 24protected InvocationRequest(CancellationToken cancellationToken, Type resultType, string invocationId, ILogger logger, HubConnection hubConnection) 37public static InvocationRequest Invoke(CancellationToken cancellationToken, Type resultType, string invocationId, ILoggerFactory loggerFactory, HubConnection hubConnection, out Task<object?> result) 44public static InvocationRequest Stream(CancellationToken cancellationToken, Type resultType, string invocationId, 72public Streaming(CancellationToken cancellationToken, Type resultType, string invocationId, ILoggerFactory loggerFactory, HubConnection hubConnection) 132public NonStreaming(CancellationToken cancellationToken, Type resultType, string invocationId, ILoggerFactory loggerFactory, HubConnection hubConnection)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type) 54private static void ThrowObjectDisposedException(Type? type)
src\Shared\TrimmingAttributes.cs (11)
184/// with the specified signature of a member on a <see cref="System.Type"/>. 187/// <param name="type">The <see cref="System.Type"/> containing <paramref name="memberSignature"/>.</param> 188public DynamicDependencyAttribute(string memberSignature, Type type) 210/// with the specified types of members on a <see cref="System.Type"/>. 213/// <param name="type">The <see cref="System.Type"/> containing the specified members.</param> 214public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, Type type) 254/// Gets the <see cref="System.Type"/> containing the specified member. 260public Type? Type { get; } 286/// Indicates that certain members on a specified <see cref="Type"/> are accessed dynamically, 293/// This attribute is valid on members whose type is <see cref="Type"/> or <see cref="string"/>. 299/// can be accessed dynamically on <see cref="Type"/> instances returned from calling
src\SignalR\common\Shared\ReflectionHelper.cs (8)
18public static bool IsStreamingType(Type type, bool mustBeDirectType = false) 30public static bool TryGetStreamType(Type streamType, [NotNullWhen(true)] out Type? streamGenericType, bool mustBeDirectType = false) 32Type? nullableType = streamType; 50public static bool IsIAsyncEnumerable(Type type) => GetIAsyncEnumerableInterface(type) is not null; 57public static Type? GetIAsyncEnumerableInterface(Type type) 64foreach (Type typeToCheck in type.GetInterfaces())
Microsoft.AspNetCore.SignalR.Client.Tests (23)
HubClientProxyGeneratorTests.cs (16)
77Array.Empty<Type>(), 85It.Is<Type[]>(t => t.Length == 1 && t[0] == typeof(int)), 93It.Is<Type[]>(t => t.Length == 3 && t[0] == typeof(int) && t[1] == typeof(float) && t[2] == typeof(int?)), 101Array.Empty<Type>(), 128Array.Empty<Type>(), 136It.Is<Type[]>(t => t.Length == 1 && t[0] == typeof(int)), 144It.Is<Type[]>(t => t.Length == 3 && t[0] == typeof(int) && t[1] == typeof(float) && t[2] == typeof(int?)), 152Array.Empty<Type>(), 181Array.Empty<Type>(), 185(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state) => 197It.Is<Type[]>(t => t.Length == 1 && t[0] == typeof(int)), 201(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state) => 213It.Is<Type[]>(t => t.Length == 3 && t[0] == typeof(int) && t[1] == typeof(float) && t[2] == typeof(int?)), 217(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state) => 229Array.Empty<Type>(), 233(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state) =>
HubConnectionTests.cs (7)
850mockConnection.Setup(c => c.On(It.IsAny<string>(), It.IsAny<Type[]>(), It.IsAny<Func<object[], object, Task>>(), It.IsAny<object>())); 852mockConnection.Setup(c => c.StreamAsChannelCoreAsync(It.IsAny<string>(), It.IsAny<Type>(), It.IsAny<object[]>(), It.IsAny<CancellationToken>())) 854mockConnection.Setup(c => c.InvokeCoreAsync(It.IsAny<string>(), It.IsAny<Type>(), It.IsAny<object[]>(), It.IsAny<CancellationToken>())).Returns(() => Task.FromResult(It.IsAny<object>())); 862_ = hubConnection.On("someMethod2", new Type[] { typeof(int) }, (args, obj) => Task.CompletedTask, 2); 871mockConnection.Verify(c => c.On("someMethod", It.IsAny<Type[]>(), It.IsAny<Func<object[], object, Task>>(), It.IsAny<object>()), Times.Once); 872mockConnection.Verify(c => c.On("someMethod2", It.IsAny<Type[]>(), It.IsAny<Func<object[], object, Task>>(), 2), Times.Once); 874mockConnection.Verify(c => c.StreamAsChannelCoreAsync("stream", It.IsAny<Type>(), It.IsAny<object[]>(), It.IsAny<CancellationToken>()), Times.Once);
Microsoft.AspNetCore.SignalR.Common (10)
IInvocationBinder.cs (10)
11/// Class used by <see cref="IHubProtocol"/>s to get the <see cref="Type"/>(s) expected by the hub message being deserialized. 16/// Gets the <see cref="Type"/> the invocation represented by the <paramref name="invocationId"/> is expected to contain. 19/// <returns>The <see cref="Type"/> the invocation is expected to contain.</returns> 20Type GetReturnType(string invocationId); 23/// Gets the list of <see cref="Type"/>s the method represented by <paramref name="methodName"/> takes as arguments. 26/// <returns>A list of <see cref="Type"/>s the method takes as arguments.</returns> 27IReadOnlyList<Type> GetParameterTypes(string methodName); 30/// Gets the <see cref="Type"/> the stream item is expected to contain. 33/// <returns>The <see cref="Type"/> of the item the stream contains.</returns> 34Type GetStreamItemType(string streamId);
Microsoft.AspNetCore.SignalR.Common.Tests (20)
Internal\Protocol\CompositeTestBinder.cs (3)
21public IReadOnlyList<Type> GetParameterTypes(string methodName) 27public Type GetReturnType(string invocationId) 41public Type GetStreamItemType(string streamId)
Internal\Protocol\JsonHubProtocolTests.cs (1)
52var binder = new TestBinder(Array.Empty<Type>(), typeof(object));
Internal\Protocol\JsonHubProtocolTestsBase.cs (4)
194var binder = new TestBinder(Array.Empty<Type>(), typeof(object)); 205var binder = new TestBinder(Array.Empty<Type>(), typeof(object)); 552public Type ResultType { get; } 555public ClientResultTestData(string name, string message, Type resultType, object result)
Internal\Protocol\MessagePackHubProtocolTests.cs (2)
277public Type ResultType { get; } 280public ClientResultTestData(string name, string message, Type resultType, object result)
Internal\Protocol\NewtonsoftJsonHubProtocolTests.cs (1)
50var binder = new TestBinder(Array.Empty<Type>(), typeof(object));
Internal\Protocol\TestBinder.cs (9)
13private readonly Type[] _paramTypes; 14private readonly Type _returnType; 36public TestBinder(Type[] paramTypes) : this(paramTypes, null) { } 37public TestBinder(Type returnType) : this(null, returnType) { } 38public TestBinder(Type[] paramTypes, Type returnType) 44public IReadOnlyList<Type> GetParameterTypes(string methodName) 53public Type GetReturnType(string invocationId) 62public Type GetStreamItemType(string streamId)
Microsoft.AspNetCore.SignalR.Core (130)
DefaultHubLifetimeManager.cs (1)
391public override bool TryGetReturnType(string invocationId, [NotNullWhen(true)] out Type? type)
HubLifetimeManager.cs (1)
169public virtual bool TryGetReturnType(string invocationId, [NotNullWhen(true)] out Type? type)
HubMetadata.cs (3)
14/// <param name="hubType">The <see cref="Type"/> of the <see cref="Hub"/>.</param> 15public HubMetadata(Type hubType) 23public Type HubType { get; }
HubOptionsExtensions.cs (1)
49public static void AddFilter(this HubOptions options, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type filterType)
Internal\DefaultHubActivator.cs (1)
12private static readonly Lazy<ObjectFactory> _objectFactory = new Lazy<ObjectFactory>(() => ActivatorUtilities.CreateFactory(typeof(THub), Type.EmptyTypes));
Internal\DefaultHubDispatcher.cs (3)
719var itemType = descriptor.StreamingParameters![streamPointer]; 736var hubType = typeof(THub); 773public override IReadOnlyList<Type> GetParameterTypes(string methodName)
Internal\DefaultHubDispatcherLog.cs (2)
30var resultType = objectMethodExecutor.AsyncResultType ?? objectMethodExecutor.MethodReturnType; 42var resultType = objectMethodExecutor.AsyncResultType ?? objectMethodExecutor.MethodReturnType;
Internal\DefaultHubProtocolResolver.cs (1)
50public static partial void RegisteredSignalRProtocol(ILogger logger, string protocolName, Type implementationType);
Internal\HubConnectionBinder.cs (4)
19public IReadOnlyList<Type> GetParameterTypes(string methodName) 24public Type GetReturnType(string invocationId) 26if (_hubLifetimeManager.TryGetReturnType(invocationId, out var type)) 34public Type GetStreamItemType(string streamId)
Internal\HubDispatcher.cs (1)
13public abstract IReadOnlyList<Type> GetParameterTypes(string name);
Internal\HubFilterFactory.cs (3)
14private readonly Type _filterType; 16public HubFilterFactory([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type filterType) 18_objectFactory = ActivatorUtilities.CreateFactory(filterType, Array.Empty<Type>());
Internal\HubMethodDescriptor.cs (13)
38foreach (var returnType in NonAsyncReturnType.GetInterfaces().Concat(NonAsyncReturnType.AllBaseTypes())) 45var openReturnType = returnType.GetGenericTypeDefinition(); 75StreamingParameters = new List<Type>(); 161public List<Type>? StreamingParameters { get; private set; } 167public IReadOnlyList<Type> ParameterTypes { get; } 169public IReadOnlyList<Type>? OriginalParameterTypes { get; } 171public Type NonAsyncReturnType { get; } 175public Type? StreamReturnType { get; } 186public object GetService(IServiceProvider serviceProvider, int index, Type parameterType) 217private static Func<object, CancellationToken, IAsyncEnumerator<object>> CompileConvertToEnumerator(MethodInfo adapterMethodInfo, Type streamReturnType) 242private static Type GetServiceType(Type type) 247type.GetGenericTypeDefinition() is Type genericDefinition &&
Internal\HubReflectionHelper.cs (6)
11private static readonly Type[] _excludeInterfaces = new[] { typeof(IDisposable) }; 13public static IEnumerable<MethodInfo> GetHubMethods(Type hubType) 21private static IEnumerable<MethodInfo> GetInterfaceMethods(Type type, Type iface) 33var baseDefinition = methodInfo.GetBaseDefinition().DeclaringType!; 39var baseType = baseDefinition.IsGenericType ? baseDefinition.GetGenericTypeDefinition() : baseDefinition;
Internal\TypeBaseEnumerationExtensions.cs (3)
8public static IEnumerable<Type> AllBaseTypes(this Type type) 10var current = type;
Internal\TypedClientBuilder.cs (11)
21private static readonly Type[] ParameterTypes = new Type[] { typeof(IClientProxy) }; 41var clientType = GenerateInterfaceImplementation(moduleBuilder); 47private static Type GenerateInterfaceImplementation(ModuleBuilder moduleBuilder) 70private static IEnumerable<MethodInfo> GetAllInterfaceMethods(Type interfaceType) 72foreach (var parent in interfaceType.GetInterfaces()) 116var returnType = interfaceMethodInfo.ReturnType; 172var singleClientProxyType = typeof(ISingleClientProxy); 184generator.Emit(OpCodes.Newobj, typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) })!); 242private static void VerifyInterface(Type interfaceType) 264foreach (var parent in interfaceType.GetInterfaces())
src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (16)
19/// Determine whether <paramref name="queryType"/> is or implements a closed generic <see cref="Type"/> 22/// <param name="queryType">The <see cref="Type"/> of interest.</param> 23/// <param name="interfaceType">The open generic <see cref="Type"/> to match. Usually an interface.</param> 25/// The closed generic <see cref="Type"/> created from <paramref name="interfaceType"/> that 26/// <paramref name="queryType"/> is or implements. <c>null</c> if the two <see cref="Type"/>s have no such 34public static Type? ExtractGenericInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 59private static bool IsGenericInstantiation(Type candidate, Type interfaceType) 66private static Type? GetGenericInstantiation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type queryType, Type interfaceType) 68Type? bestMatch = null; 70foreach (var @interface in interfaces) 96var baseType = queryType?.BaseType;
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (9)
18public Type AwaiterType { get; } 23public Type ResultType { get; } 27Type awaiterType, 32Type resultType, 47Type type, 53var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 61var awaiterType = getAwaiterMethod.ReturnType; 64var isCompletedProperty = awaiterType.GetProperty("IsCompleted", Everything, binder: null, returnType: typeof(bool), types: Type.EmptyTypes, modifiers: null); 92var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\Shared\ObjectMethodExecutor\CoercedAwaitableInfo.cs (5)
15public Type CoercerResultType { get; } 25public CoercedAwaitableInfo(Expression coercerExpression, Type coercerResultType, AwaitableInfo coercedAwaitableInfo) 34[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 42out var nonGenericAwaitableType)) 60out var coercerResultType))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
70public Type? AsyncResultType { get; } 73public Type MethodReturnType { get; internal set; } 235var postCoercionMethodReturnType = coercedAwaitableInfo.CoercerResultType ?? methodInfo.ReturnType;
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (20)
59Type possibleFSharpAsyncType, 61out Type awaitableType) 63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single(); 98TryBuildCoercerFromUnitAwaitableToVoidAwaitable(awaitableType, out var coercerExpression, out var nonGenericAwaitableType) 132Type genericAwaitableType, 134out Type nonGenericAwaitableType) 152static Expression MakeTaskOfUnitToTaskExpression(Type type) 158static Expression MakeValueTaskOfUnitToValueTaskExpression(Type type) 171private static bool IsFSharpAsyncOpenGenericType(Type possibleFSharpAsyncType) => 174private static bool IsFSharpUnit(Type possibleFSharpUnitType) => 177private static bool IsCoerceableFSharpType(Type possibleFSharpType, string coerceableFSharpTypeName) 205private static bool TryPopulateFSharpValueCaches(Type possibleFSharpType) 208var fsharpOptionType = assembly.GetType(FSharpOptionTypeName); 209var fsharpAsyncType = assembly.GetType(FSharpAsyncTypeName); 210var fsharpAsyncGenericType = assembly.GetType(FSharpAsyncGenericTypeName); 218var fsharpOptionOfTaskCreationOptionsType = fsharpOptionType 224var fsharpOptionOfCancellationTokenType = fsharpOptionType 251private static bool TypesHaveSameIdentity(Type type1, Type type2)
src\SignalR\common\Shared\ClientResultsManager.cs (8)
16private readonly ConcurrentDictionary<string, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete)> _pendingInvocations = new(); 41public void AddInvocation(string invocationId, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete) invocationInfo) 75public (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Completion)? RemoveInvocation(string invocationId) 81public bool TryGetType(string invocationId, [NotNullWhen(true)] out Type? type) 92public Type GetReturnType(string invocationId) 94if (TryGetType(invocationId, out var type)) 102public IReadOnlyList<Type> GetParameterTypes(string methodName) 108public Type GetStreamItemType(string streamId)
src\SignalR\common\Shared\ReflectionHelper.cs (8)
18public static bool IsStreamingType(Type type, bool mustBeDirectType = false) 30public static bool TryGetStreamType(Type streamType, [NotNullWhen(true)] out Type? streamGenericType, bool mustBeDirectType = false) 32Type? nullableType = streamType; 50public static bool IsIAsyncEnumerable(Type type) => GetIAsyncEnumerableInterface(type) is not null; 57public static Type? GetIAsyncEnumerableInterface(Type type) 64foreach (Type typeToCheck in type.GetInterfaces())
StreamTracker.cs (7)
27public object AddStream(string streamId, Type itemType, Type targetType) 56public Type GetStreamItemType(string streamId) 92Type GetItemType(); 93object GetReaderAsObject(Type type); 107public Type GetItemType() 112public object GetReaderAsObject(Type type)
Microsoft.AspNetCore.SignalR.Microbenchmarks (16)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
TestBinder.cs (9)
10private readonly Type[] _paramTypes; 11private readonly Type _returnType; 33public TestBinder(Type[] paramTypes) : this(paramTypes, null) { } 34public TestBinder(Type returnType) : this(null, returnType) { } 35public TestBinder(Type[] paramTypes, Type returnType) 41public IReadOnlyList<Type> GetParameterTypes(string methodName) 50public Type GetReturnType(string invocationId) 59public Type GetStreamItemType(string streamId)
Microsoft.AspNetCore.SignalR.Protocols.Json (20)
Protocol\JsonHubProtocol.cs (8)
236var returnType = ProtocolHelper.TryGetReturnType(binder, invocationId); 278var itemType = binder.GetStreamItemType(id); 414var returnType = binder.GetStreamItemType(invocationId); 434var returnType = ProtocolHelper.TryGetReturnType(binder, invocationId); 814private object? BindType(ref Utf8JsonReader reader, ReadOnlySequence<byte> input, Type type) 830private object? BindType(ref Utf8JsonReader reader, Type type) => DeserializeObject(ref reader, type); 832private object?[] BindTypes(ref Utf8JsonReader reader, IReadOnlyList<Type> paramTypes) 921private object? DeserializeObject(ref Utf8JsonReader reader, Type type) => JsonSerializer.Deserialize(ref reader, type, _payloadSerializerOptions);
src\Shared\TrimmingAttributes.cs (11)
184/// with the specified signature of a member on a <see cref="System.Type"/>. 187/// <param name="type">The <see cref="System.Type"/> containing <paramref name="memberSignature"/>.</param> 188public DynamicDependencyAttribute(string memberSignature, Type type) 210/// with the specified types of members on a <see cref="System.Type"/>. 213/// <param name="type">The <see cref="System.Type"/> containing the specified members.</param> 214public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, Type type) 254/// Gets the <see cref="System.Type"/> containing the specified member. 260public Type? Type { get; } 286/// Indicates that certain members on a specified <see cref="Type"/> are accessed dynamically, 293/// This attribute is valid on members whose type is <see cref="Type"/> or <see cref="string"/>. 299/// can be accessed dynamically on <see cref="Type"/> instances returned from calling
src\SignalR\common\Shared\TryGetReturnType.cs (1)
10internal static Type? TryGetReturnType(IInvocationBinder binder, string invocationId)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (8)
Protocol\DefaultMessagePackHubProtocolWorker.cs (2)
19protected override object? DeserializeObject(ref MessagePackReader reader, Type type, string field) 31protected override void Serialize(ref MessagePackWriter writer, Type type, object value)
Protocol\MessagePackHubProtocolWorker.cs (5)
148var itemType = binder.GetStreamItemType(invocationId); 178var itemType = ProtocolHelper.TryGetReturnType(binder, invocationId); 296private object?[] BindArguments(ref MessagePackReader reader, IReadOnlyList<Type> parameterTypes) 322protected abstract object? DeserializeObject(ref MessagePackReader reader, Type type, string field); 507protected abstract void Serialize(ref MessagePackWriter writer, Type type, object value);
src\SignalR\common\Shared\TryGetReturnType.cs (1)
10internal static Type? TryGetReturnType(IInvocationBinder binder, string invocationId)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (11)
Protocol\NewtonsoftJsonHubProtocol.cs (9)
214var returnType = ProtocolHelper.TryGetReturnType(binder, invocationId); 266var itemType = binder.GetStreamItemType(id); 404var itemType = binder.GetStreamItemType(invocationId); 424var returnType = ProtocolHelper.TryGetReturnType(binder, invocationId); 805private static bool ReadArgumentAsType(JsonTextReader reader, IReadOnlyList<Type> paramTypes, int paramIndex) 809var paramType = paramTypes[paramIndex]; 817private object?[] BindArguments(JsonTextReader reader, IReadOnlyList<Type> paramTypes) 895private object?[] BindArguments(JArray args, IReadOnlyList<Type> paramTypes) 915var paramType = paramTypes[i];
src\SignalR\common\Shared\JsonUtils.cs (1)
173public static bool ReadForType(JsonTextReader reader, Type type)
src\SignalR\common\Shared\TryGetReturnType.cs (1)
10internal static Type? TryGetReturnType(IInvocationBinder binder, string invocationId)
Microsoft.AspNetCore.SignalR.Specification.Tests (3)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (3)
345public IReadOnlyList<Type> GetParameterTypes(string methodName) 351public Type GetReturnType(string invocationId) 356public Type GetStreamItemType(string streamId)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (12)
RedisHubLifetimeManager.cs (4)
444public override bool TryGetReturnType(string invocationId, [NotNullWhen(true)] out Type? type) 718public IReadOnlyList<Type> GetParameterTypes(string methodName) 723public Type GetReturnType(string invocationId) 728public Type GetStreamItemType(string streamId)
src\SignalR\common\Shared\ClientResultsManager.cs (8)
16private readonly ConcurrentDictionary<string, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete)> _pendingInvocations = new(); 41public void AddInvocation(string invocationId, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete) invocationInfo) 75public (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Completion)? RemoveInvocation(string invocationId) 81public bool TryGetType(string invocationId, [NotNullWhen(true)] out Type? type) 92public Type GetReturnType(string invocationId) 94if (TryGetType(invocationId, out var type)) 102public IReadOnlyList<Type> GetParameterTypes(string methodName) 108public Type GetStreamItemType(string streamId)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
TestConnectionMultiplexer.cs (2)
425var redisSubscriberType = typeof(RedisChannel).Assembly.GetType("StackExchange.Redis.RedisSubscriber"); 428new Type[] { typeof(RedisChannel).MakeByRefType(), redisSubscriberType }, modifiers: null);
Microsoft.AspNetCore.SignalR.Tests (41)
DefaultTransportFactoryTests.cs (2)
52public void DefaultTransportFactoryCreatesRequestedTransportIfAvailable(HttpTransportType requestedTransport, Type expectedTransportType) 87public void DefaultTransportFactoryCreatesRequestedTransportIfAvailable_Win7(HttpTransportType requestedTransport, Type expectedTransportType)
HubConnectionHandlerTests.Activity.cs (1)
347private static void AssertHubMethodActivity<THub>(Activity activity, string methodName, Activity httpActivity, Type exceptionType = null)
HubConnectionHandlerTests.ClientResult.cs (7)
323public IReadOnlyList<Type> GetParameterTypes(string methodName) 325return new Type[] { typeof(int) }; 328public Type GetReturnType(string invocationId) 333public Type GetStreamItemType(string streamId) 521public IReadOnlyList<Type> GetParameterTypes(string methodName) => new[] { typeof(int) }; 522public Type GetReturnType(string invocationId) => typeof(ClientResults); 523public Type GetStreamItemType(string streamId) => throw new NotImplementedException();
HubConnectionHandlerTests.cs (13)
872public async Task HubMethodsAreCaseInsensitive(Type hubType) 1369public async Task BroadcastHubMethodSendsToAllClients(Type hubType) 1445public async Task SendToOthers(Type hubType) 1486public async Task SendToCaller(Type hubType) 1549public async Task SendToAllExcept(Type hubType) 1595public async Task SendToMultipleClients(Type hubType) 1643public async Task SendToMultipleUsers(Type hubType) 1688public async Task HubsCanAddAndSendToGroup(Type hubType) 1732public async Task SendToGroupExcept(Type hubType) 1785public async Task SendToOthersInGroup(Type hubType) 1836public async Task InvokeMultipleGroups(Type hubType) 1902public async Task HubsCanSendToUser(Type hubType) 1936public async Task HubsCanSendToConnection(Type hubType)
HubConnectionHandlerTestUtils\Hubs.cs (4)
963private static readonly IEnumerable<Type> _knownTypes = new List<Type>() 970public void BindToName(Type serializedType, out string assemblyName, out string typeName) 976public Type BindToType(string assemblyName, string typeName) =>
HubConnectionHandlerTestUtils\Utils.cs (7)
16public static Type GetConnectionHandlerType(Type hubType) 18var connectionHandlerType = typeof(HubConnectionHandler<>); 22public static Type GetGenericType(Type genericType, Type hubType) 75public static Connections.ConnectionHandler GetHubConnectionHandler(Type hubType, ILoggerFactory loggerFactory = null, Action<ServiceCollection> addServices = null)
HubReflectionHelperTests.cs (2)
23var hubType = typeof(BaseMethodHub); 35var hubType = typeof(InheritedMethodHub);
Internal\MessageBufferTests.cs (4)
559public IReadOnlyList<Type> GetParameterTypes(string methodName) 561var list = new List<Type> 568public Type GetReturnType(string invocationId) 573public Type GetStreamItemType(string streamId)
Internal\ReflectionHelperTests.cs (1)
17public void IsIAsyncEnumerableTests(Type type, bool expectedOutcome)
Microsoft.AspNetCore.SignalR.Tests.Utils (3)
TestClient.cs (3)
345public IReadOnlyList<Type> GetParameterTypes(string methodName) 351public Type GetReturnType(string invocationId) 356public Type GetStreamItemType(string streamId)
Microsoft.AspNetCore.TestHost (4)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.6.24307.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (4)
97var programType = assembly?.EntryPoint?.DeclaringType; 190var hostType = host.GetType(); 352Type? publicHostAbortedExceptionType = Type.GetType("Microsoft.Extensions.Hosting.HostAbortedException, Microsoft.Extensions.Hosting.Abstractions", throwOnError: false);
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
3194public object GetService(Type serviceType) => _inner.GetService(serviceType);
Microsoft.AspNetCore.WebSockets.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.Bcl.AsyncInterfaces (2)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\LibraryImportAttribute.cs (2)
57/// Gets or sets the <see cref="Type"/> used to control how string arguments to the method are marshalled. 63public Type? StringMarshallingCustomType { get; set; }
Microsoft.Bcl.Numerics (2)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\LibraryImportAttribute.cs (2)
57/// Gets or sets the <see cref="Type"/> used to control how string arguments to the method are marshalled. 63public Type? StringMarshallingCustomType { get; set; }
Microsoft.Build (163)
BackEnd\BuildManager\BuildManager.cs (1)
3047Type configurableLoggerType = typeof(ConfigurableForwardingLogger);
BackEnd\Components\Communications\TranslatorExtensions.cs (6)
23private static Lazy<ConcurrentDictionary<Type, ConstructorInfo>> parameterlessConstructorCache = new Lazy<ConcurrentDictionary<Type, ConstructorInfo>>(() => new ConcurrentDictionary<Type, ConstructorInfo>()); 73var type = Type.GetType(typeName); 87constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic, null, Type.EmptyTypes, null);
BackEnd\Components\ProjectCache\ProjectCacheService.cs (5)
225Type pluginType = GetTypeFromAssemblyPath(pluginAssemblyPath); 338private static ProjectCachePluginBase GetPluginInstanceFromType(Type pluginType) 351private static Type GetTypeFromAssemblyPath(string pluginAssemblyPath) 355var type = GetTypes<ProjectCachePluginBase>(assembly).FirstOrDefault(); 373IEnumerable<Type> GetTypes<T>(Assembly assembly)
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (4)
33Type? initiator, 46Type? initiator, 60Type initiator, 105Type? initiatorType,
BackEnd\Components\RequestBuilder\IntrinsicTasks\IntrinsicTaskFactory.cs (2)
23public IntrinsicTaskFactory(Type intrinsicType) 39public Type TaskType
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
836var type = taskException.GetType();
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (2)
235protected virtual IEnumerable<Type> GetResolverTypes(Assembly assembly) 281foreach (Type type in GetResolverTypes(assembly))
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (7)
705private bool SetValueParameter(TaskPropertyInfo parameter, Type parameterType, string expandedParameterValue) 725private bool SetParameterArray(TaskPropertyInfo parameter, Type parameterType, IList<TaskItem> taskItems, ElementLocation parameterLocation) 1034Type parameterType = null; 1038parameterType = Type.GetType( 1047parameterType = Type.GetType(parameter.PropertyType.AssemblyQualifiedName); 1133Type parameterType, 1257Type parameterType,
BuildCheck\Acquisition\BuildCheckAcquisitionModule.cs (3)
45IList<Type> availableTypes = assembly.GetExportedTypes(); 46IList<Type> analyzerTypes = availableTypes.Where(t => typeof(BuildAnalyzer).IsAssignableFrom(t)).ToArray(); 48foreach (Type analyzerCandidate in analyzerTypes)
BuildCheck\Infrastructure\BuildCheckConnectorLogger.cs (2)
17private readonly Dictionary<Type, Action<BuildEventArgs>> _eventHandlers; 157private Dictionary<Type, Action<BuildEventArgs>> GetBuildEventHandlers() => new()
BuildEnvironmentHelper.cs (1)
399var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
Evaluation\Expander.cs (24)
2254internal static ItemTransformFunction GetItemTransformFunction(IElementLocation elementLocation, string functionName, Type itemType) 3161public Type ReceiverType { get; set; } 3229private Type _receiverType; 3274Type receiverType, 3379var receiverType = GetTypeForStaticMethod(typeName, functionBuilder.Name); 3431var receiverType = propertyValue?.GetType() ?? typeof(string); 3597functionResult = _receiverType.InvokeMember(_methodMethodName, _bindingFlags, Type.DefaultBinder, objectInstance, args, CultureInfo.InvariantCulture); 4470private bool ElementsOfType(object[] args, Type type) 4911private static Type GetTypeForStaticMethod(string typeName, string simpleMethodName) 4913Type receiverType; 4914Tuple<string, Type> cachedTypeInformation; 4942receiverType = Type.GetType(assemblyQualifiedTypeName, false /* do not throw TypeLoadException if not found */, true /* ignore case */); 4950AvailableStaticMethods.TryAdd(typeName, simpleMethodName, new Tuple<string, Type>(assemblyQualifiedTypeName, receiverType)); 4957receiverType = Type.GetType(typeName, false /* do not throw TypeLoadException if not found */, true /* ignore case */); 4991AvailableStaticMethods.TryAdd(typeName, new Tuple<string, Type>(typeName, receiverType)); 5001private static Type GetTypeFromAssemblyUsingNamespace(string typeName) 5019Type foundType = GetTypeFromAssembly(typeName, candidateAssemblyName); 5042private static Type GetTypeFromAssembly(string typeName, string candidateAssemblyName) 5044Type objectType = null; 5257Type enumType = parameters[n].ParameterType; 5369private static bool IsStaticMethodAvailable(Type receiverType, string methodName) 5406Type[] types = new Type[_arguments.Length]; 5536? Type.GetTypeCode(parameters[0].ParameterType)
Instance\ReflectableTaskPropertyInfo.cs (2)
27private Type _taskType; 34internal ReflectableTaskPropertyInfo(TaskPropertyInfo taskPropertyInfo, Type taskType)
Instance\TaskFactories\AssemblyTaskFactory.cs (1)
96public Type TaskType
Instance\TaskRegistry.cs (9)
645private static bool IsTaskFactoryClass(Type type, object unused) 1106private static readonly Func<Type, object, bool> s_taskFactoryTypeFilter = IsTaskFactoryClass; 1696Type paramType; 1703paramType = Type.GetType(expandedType + "," + typeof(ITaskItem).GetTypeInfo().Assembly.FullName, false /* don't throw on error */, true /* case-insensitive */) ?? 1704Type.GetType(expandedType); 1708paramType = Type.GetType(expandedType) ?? 1709Type.GetType(expandedType + "," + typeof(ITaskItem).GetTypeInfo().Assembly.FullName, false /* don't throw on error */, true /* case-insensitive */); 1804Type propertyType = Type.GetType(propertyTypeName);
LoadedType.cs (5)
30internal LoadedType(Type type, AssemblyLoadInfo assemblyLoadInfo, Assembly loadedAssembly, Type iTaskItemType, bool loadedViaMetadataLoadContext = false) 50Type t = type; 95Type pt = props[i].PropertyType; 164internal Type Type { get; private set; }
Logging\LoggerDescription.cs (4)
245private static readonly Func<Type, object, bool> s_forwardingLoggerClassFilter = IsForwardingLoggerClass; 250private static readonly Func<Type, object, bool> s_loggerClassFilter = IsLoggerClass; 257private static bool IsForwardingLoggerClass(Type type, object unused) 269private static bool IsLoggerClass(Type type, object unused)
LogMessagePacketBase.cs (4)
422Type eventDerivedType = _buildEvent.GetType(); 502Type eventDerivedType = _buildEvent.GetType(); 580private static Delegate CreateDelegateRobust(Type type, Object firstArgument, MethodInfo methodInfo) 669Type eventType = eventArg.GetType();
PrintLineDebugger.cs (1)
26var commonWriterType = typeof(ITask).Assembly.GetType("Microsoft.Build.Shared.Debugging.CommonWriter", true, false);
Resources\Constants.cs (44)
176private static ConcurrentDictionary<string, Tuple<string, Type>> s_availableStaticMethods; 199internal static bool TryAdd(string key, Tuple<string, Type> value) 211public static bool TryAdd(string typeFullName, string simpleMethodName, Tuple<string, Type> typeInformation) 219internal static bool TryGetValue(string key, out Tuple<string, Type> value) 227internal static Tuple<string, Type> GetValue(string key) 229Tuple<string, Type> typeInformation; 244internal static Tuple<string, Type> GetTypeInformationFromTypeCache(string typeFullName, string simpleMethodName) 288var availableStaticMethods = new ConcurrentDictionary<string, Tuple<string, Type>>(StringComparer.OrdinalIgnoreCase); 291var environmentType = new Tuple<string, Type>(null, typeof(Environment)); 292var directoryType = new Tuple<string, Type>(null, typeof(Directory)); 293var fileType = new Tuple<string, Type>(null, typeof(File)); 294var runtimeInformationType = new Tuple<string, Type>(null, typeof(RuntimeInformation)); 295var osPlatformType = new Tuple<string, Type>(null, typeof(OSPlatform)); 334availableStaticMethods.TryAdd("System.Globalization.CultureInfo::GetCultureInfo", new Tuple<string, Type>(null, typeof(CultureInfo))); // user request 335availableStaticMethods.TryAdd("System.Globalization.CultureInfo::new", new Tuple<string, Type>(null, typeof(CultureInfo))); // user request 336availableStaticMethods.TryAdd("System.Globalization.CultureInfo::CurrentUICulture", new Tuple<string, Type>(null, typeof(CultureInfo))); // user request 339availableStaticMethods.TryAdd("MSBuild", new Tuple<string, Type>(null, typeof(IntrinsicFunctions))); 340availableStaticMethods.TryAdd("System.Byte", new Tuple<string, Type>(null, typeof(Byte))); 341availableStaticMethods.TryAdd("System.Char", new Tuple<string, Type>(null, typeof(Char))); 342availableStaticMethods.TryAdd("System.Convert", new Tuple<string, Type>(null, typeof(Convert))); 343availableStaticMethods.TryAdd("System.DateTime", new Tuple<string, Type>(null, typeof(DateTime))); 344availableStaticMethods.TryAdd("System.DateTimeOffset", new Tuple<string, Type>(null, typeof(DateTimeOffset))); 345availableStaticMethods.TryAdd("System.Decimal", new Tuple<string, Type>(null, typeof(Decimal))); 346availableStaticMethods.TryAdd("System.Double", new Tuple<string, Type>(null, typeof(Double))); 347availableStaticMethods.TryAdd("System.Enum", new Tuple<string, Type>(null, typeof(Enum))); 348availableStaticMethods.TryAdd("System.Guid", new Tuple<string, Type>(null, typeof(Guid))); 349availableStaticMethods.TryAdd("System.Int16", new Tuple<string, Type>(null, typeof(Int16))); 350availableStaticMethods.TryAdd("System.Int32", new Tuple<string, Type>(null, typeof(Int32))); 351availableStaticMethods.TryAdd("System.Int64", new Tuple<string, Type>(null, typeof(Int64))); 352availableStaticMethods.TryAdd("System.IO.Path", new Tuple<string, Type>(null, typeof(Path))); 353availableStaticMethods.TryAdd("System.Math", new Tuple<string, Type>(null, typeof(Math))); 354availableStaticMethods.TryAdd("System.UInt16", new Tuple<string, Type>(null, typeof(UInt16))); 355availableStaticMethods.TryAdd("System.UInt32", new Tuple<string, Type>(null, typeof(UInt32))); 356availableStaticMethods.TryAdd("System.UInt64", new Tuple<string, Type>(null, typeof(UInt64))); 357availableStaticMethods.TryAdd("System.SByte", new Tuple<string, Type>(null, typeof(SByte))); 358availableStaticMethods.TryAdd("System.Single", new Tuple<string, Type>(null, typeof(Single))); 359availableStaticMethods.TryAdd("System.String", new Tuple<string, Type>(null, typeof(String))); 360availableStaticMethods.TryAdd("System.StringComparer", new Tuple<string, Type>(null, typeof(StringComparer))); 361availableStaticMethods.TryAdd("System.TimeSpan", new Tuple<string, Type>(null, typeof(TimeSpan))); 362availableStaticMethods.TryAdd("System.Text.RegularExpressions.Regex", new Tuple<string, Type>(null, typeof(Regex))); 363availableStaticMethods.TryAdd("System.UriBuilder", new Tuple<string, Type>(null, typeof(UriBuilder))); 364availableStaticMethods.TryAdd("System.Version", new Tuple<string, Type>(null, typeof(Version))); 365availableStaticMethods.TryAdd("Microsoft.Build.Utilities.ToolLocationHelper", new Tuple<string, Type>("Microsoft.Build.Utilities.ToolLocationHelper, Microsoft.Build.Utilities.Core, Version=" + MSBuildConstants.CurrentAssemblyVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", null)); 373var operatingSystemType = new Tuple<string, Type>("Microsoft.Build.Framework.OperatingSystem, Microsoft.Build.Framework, Version=" + MSBuildConstants.CurrentAssemblyVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", null);
TaskLoader.cs (2)
35internal static bool IsTaskClass(Type type, object unused) 138Type taskType = taskInstanceInOtherAppDomain.GetType();
TaskParameter.cs (4)
105Type wrappedParameterType = wrappedParameter.GetType(); 122TypeCode typeCode = Type.GetTypeCode(wrappedParameterType.GetElementType()); 168TypeCode typeCode = Type.GetTypeCode(wrappedParameterType); 635Type elementType = _parameterTypeCode switch
TaskParameterTypeVerifier.cs (6)
23internal static bool IsValidScalarInputParameter(Type parameterType) => 29internal static bool IsValidVectorInputParameter(Type parameterType) 40internal static bool IsAssignableToITask(Type parameterType) 50internal static bool IsValueTypeOutputParameter(Type parameterType) 62internal static bool IsValidInputParameter(Type parameterType) 70internal static bool IsValidOutputParameter(Type parameterType)
TypeLoader.cs (19)
34private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 39private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 44private Func<Type, object, bool> _isDesiredType; 68internal TypeLoader(Func<Type, object, bool> isDesiredType) 241private LoadedType GetLoadedType(ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> cache, string typeName, AssemblyLoadInfo assembly, bool useTaskHost) 273private Func<Type, object, bool> _isDesiredType; 283private ConcurrentDictionary<string, Type> _typeNameToType; 288private Dictionary<string, Type> _publicTypeNameToType; 307internal AssemblyInfoToLoadedTypes(Func<Type, object, bool> typeFilter, AssemblyLoadInfo loadInfo) 315_publicTypeNameToType = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 332Type type = _typeNameToType.GetOrAdd(typeName, (key) => 339Type t2 = Type.GetType(typeName + "," + _assemblyLoadInfo.AssemblyName, false /* don't throw on error */, true /* case-insensitive */); 365foreach (KeyValuePair<string, Type> desiredTypeInAssembly in _publicTypeNameToType) 387foreach (Type publicType in loadedAssembly.GetExportedTypes()) 417Type[] allPublicTypesInAssembly = _loadedAssembly.GetExportedTypes(); 418foreach (Type publicType in allPublicTypesInAssembly)
Utilities\NuGetFrameworkWrapper.cs (4)
66var NuGetFramework = NuGetAssembly.GetType("NuGet.Frameworks.NuGetFramework"); 67var NuGetFrameworkCompatibilityProvider = NuGetAssembly.GetType("NuGet.Frameworks.CompatibilityProvider"); 68var NuGetFrameworkDefaultCompatibilityProvider = NuGetAssembly.GetType("NuGet.Frameworks.DefaultCompatibilityProvider"); 69ParseMethod = NuGetFramework.GetMethod("Parse", new Type[] { typeof(string) });
Microsoft.Build.BuildCheck.UnitTests (2)
EditorConfig_Tests.cs (1)
27var type = typeof(T);
TestAssemblyInfo.cs (1)
40var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
Microsoft.Build.CommandLine.UnitTests (1)
TestAssemblyInfo.cs (1)
40var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
Microsoft.Build.Engine (88)
Caching\CacheEntryCustomSerializer.cs (1)
25Type entryType = entry.GetType();
Engine\BuildTask.cs (1)
305public Type Type
Engine\EngineProxy.cs (4)
89private static Type buildErrorEventArgsType = null; 94private static Type buildWarningEventArgsType = null; 657private static Type BuildErrorEventArgsType 672private static Type BuildWarningEventArgsType
Engine\Expander.cs (22)
586Type valueType = valueToConvert.GetType(); 951private Type objectType; 986public Function(Type objectType, string expression, string expressionRootName, string name, string[] arguments, BindingFlags bindingFlags, string remainder) 1012public Type ObjectType 1026Type objectType = null; 1209functionResult = objectType.InvokeMember(this.name, bindingFlags, Type.DefaultBinder, objectInstance, args, CultureInfo.InvariantCulture); 1346private static Type GetTypeForStaticMethod(string typeName) 1351Type objectType; 1352Tuple<string, Type> functionType; 1373objectType = Type.GetType(typeName, false /* do not throw TypeLoadException if not found */, true /* ignore case */); 1377FunctionConstants.AvailableStaticMethods[typeName] = new Tuple<string, Type>(typeName, objectType); 1384objectType = Type.GetType(typeName, false /* do not throw TypeLoadException if not found */, true /* ignore case */); 1419FunctionConstants.AvailableStaticMethods[typeName] = new Tuple<string, Type>(typeName, objectType); 1429private static Type GetTypeFromAssemblyUsingNamespace(string typeName) 1441Type foundType = GetTypeFromAssembly(typeName, candidateAssemblyName); 1462private static Type GetTypeFromAssembly(string typeName, string candidateAssemblyName) 1464Type objectType = null; 1485private static Function ConstructFunction(string expressionFunction, string expressionRootName, Type objectType, int argumentStartIndex, int methodStartIndex) 1711Type enumType = parameters[n].ParameterType; 1743private bool IsStaticMethodAvailable(Type objectType, string methodName) 1783Type[] types = new Type[arguments.Length];
Engine\NodeLoggingEvent.cs (3)
92Type eventType = eventArg.GetType(); 193Type eventType = e.GetType(); 224Type eventType = e.GetType();
Engine\TaskEngine.cs (5)
506Type taskType = task.GetType(); 920Type type = parameter.PropertyType; 1252Type parameterType = parameter.PropertyType; 1321Type parameterType, 1440Type parameterType,
Engine\TaskRegistry.cs (1)
369private static bool IsTaskClass(Type type, object unused)
Logging\LoggerDescription.cs (2)
270private static bool IsForwardingLoggerClass(Type type, object unused) 282private static bool IsLoggerClass(Type type, object unused)
Resources\Constants.cs (37)
114private static ConcurrentDictionary<string, Tuple<string, Type>> availableStaticMethods; 122internal static IDictionary<string, Tuple<string, Type>> AvailableStaticMethods 153availableStaticMethods = new ConcurrentDictionary<string, Tuple<string, Type>>(StringComparer.OrdinalIgnoreCase); 156Tuple<string, Type> environmentType = new Tuple<string, Type>(null, typeof(System.Environment)); 157Tuple<string, Type> directoryType = new Tuple<string, Type>(null, typeof(System.IO.Directory)); 158Tuple<string, Type> fileType = new Tuple<string, Type>(null, typeof(System.IO.File)); 194availableStaticMethods.TryAdd("System.Globalization.CultureInfo::GetCultureInfo", new Tuple<string, Type>(null, typeof(System.Globalization.CultureInfo))); // user request 195availableStaticMethods.TryAdd("System.Globalization.CultureInfo::CurrentUICulture", new Tuple<string, Type>(null, typeof(System.Globalization.CultureInfo))); // user request 198availableStaticMethods.TryAdd("MSBuild", new Tuple<string, Type>(null, typeof(Microsoft.Build.BuildEngine.IntrinsicFunctions))); 199availableStaticMethods.TryAdd("System.Byte", new Tuple<string, Type>(null, typeof(System.Byte))); 200availableStaticMethods.TryAdd("System.Char", new Tuple<string, Type>(null, typeof(System.Char))); 201availableStaticMethods.TryAdd("System.Convert", new Tuple<string, Type>(null, typeof(System.Convert))); 202availableStaticMethods.TryAdd("System.DateTime", new Tuple<string, Type>(null, typeof(System.DateTime))); 203availableStaticMethods.TryAdd("System.Decimal", new Tuple<string, Type>(null, typeof(System.Decimal))); 204availableStaticMethods.TryAdd("System.Double", new Tuple<string, Type>(null, typeof(System.Double))); 205availableStaticMethods.TryAdd("System.Enum", new Tuple<string, Type>(null, typeof(System.Enum))); 206availableStaticMethods.TryAdd("System.Guid", new Tuple<string, Type>(null, typeof(System.Guid))); 207availableStaticMethods.TryAdd("System.Int16", new Tuple<string, Type>(null, typeof(System.Int16))); 208availableStaticMethods.TryAdd("System.Int32", new Tuple<string, Type>(null, typeof(System.Int32))); 209availableStaticMethods.TryAdd("System.Int64", new Tuple<string, Type>(null, typeof(System.Int64))); 210availableStaticMethods.TryAdd("System.IO.Path", new Tuple<string, Type>(null, typeof(System.IO.Path))); 211availableStaticMethods.TryAdd("System.Math", new Tuple<string, Type>(null, typeof(System.Math))); 212availableStaticMethods.TryAdd("System.UInt16", new Tuple<string, Type>(null, typeof(System.UInt16))); 213availableStaticMethods.TryAdd("System.UInt32", new Tuple<string, Type>(null, typeof(System.UInt32))); 214availableStaticMethods.TryAdd("System.UInt64", new Tuple<string, Type>(null, typeof(System.UInt64))); 215availableStaticMethods.TryAdd("System.SByte", new Tuple<string, Type>(null, typeof(System.SByte))); 216availableStaticMethods.TryAdd("System.Single", new Tuple<string, Type>(null, typeof(System.Single))); 217availableStaticMethods.TryAdd("System.String", new Tuple<string, Type>(null, typeof(System.String))); 218availableStaticMethods.TryAdd("System.StringComparer", new Tuple<string, Type>(null, typeof(System.StringComparer))); 219availableStaticMethods.TryAdd("System.TimeSpan", new Tuple<string, Type>(null, typeof(System.TimeSpan))); 220availableStaticMethods.TryAdd("System.Text.RegularExpressions.Regex", new Tuple<string, Type>(null, typeof(System.Text.RegularExpressions.Regex))); 221availableStaticMethods.TryAdd("System.UriBuilder", new Tuple<string, Type>(null, typeof(System.UriBuilder))); 222availableStaticMethods.TryAdd("System.Version", new Tuple<string, Type>(null, typeof(System.Version))); 223availableStaticMethods.TryAdd("Microsoft.Build.Utilities.ToolLocationHelper", new Tuple<string, Type>("Microsoft.Build.Utilities.ToolLocationHelper, Microsoft.Build.Utilities.Core, Version=" + MSBuildConstants.CurrentAssemblyVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", null));
Shared\LoadedType.cs (3)
30internal LoadedType(Type type, AssemblyLoadInfo assembly) 170internal Type Type 194private Type type;
Shared\TypeLoader.cs (9)
21private Dictionary<AssemblyLoadInfo, List<Type>> cacheOfAllDesiredTypesInAnAssembly = new Dictionary<AssemblyLoadInfo, List<Type>>(); 53Type type = null; 57List<Type> desiredTypesInAssembly; 67type = Type.GetType(typeName + "," + assembly.AssemblyName, false /* don't throw on error */, true /* case-insensitive */); 115Type[] allPublicTypesInAssembly = loadedAssembly.GetExportedTypes(); 116desiredTypesInAssembly = new List<Type>(); 118foreach (Type publicType in allPublicTypesInAssembly) 131foreach (Type desiredTypeInAssembly in desiredTypesInAssembly)
Microsoft.Build.Engine.OM.UnitTests (9)
BuildEnvironmentHelper.cs (1)
399var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\ProjectElemetExportHelper.cs (6)
30public ElementInfo(Type type, Func<ProjectElement, bool> checker, ExporterFactory factory) 44public Type CanonicalType { get; } 84private static Dictionary<Type, ExporterFactory> knownTypes = new Dictionary<Type, ExporterFactory>(); 107var implType = xml.GetType(); 126var newKnown = new Dictionary<Type, ExporterFactory>(knownTypes);
PrintLineDebugger.cs (1)
26var commonWriterType = typeof(ITask).Assembly.GetType("Microsoft.Build.Shared.Debugging.CommonWriter", true, false);
TestAssemblyInfo.cs (1)
40var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
Microsoft.Build.Engine.UnitTests (25)
BackEnd\BinaryTranslator_Tests.cs (1)
259public void TestSerializationOfBuildExceptions(Type exceptionType)
BackEnd\LoggingService_Tests.cs (2)
144Type exceptionType = typeof(LoggerException); 1104private void VerifyShutdownExceptions(ILogger logger, string className, Type expectedExceptionType)
BackEnd\SdkResolverLoader_Tests.cs (2)
459public Func<Assembly, IEnumerable<Type>> GetResolverTypesFunc { get; set; } 473protected override IEnumerable<Type> GetResolverTypes(Assembly assembly)
BackEnd\TaskBuilderTestTask.cs (3)
55public object ToType(Type conversionType, IFormatProvider provider) => Value.ToType(conversionType, provider); 1266private Type _type = typeof(TaskBuilderTestTask); 1288public Type TaskType
BackEnd\TaskExecutionHost_Tests.cs (2)
1057public void TaskExceptionHandlingTest(Type exceptionType, bool isCritical) 1220private static bool IsTaskFactoryClass(Type type, object unused)
BackEnd\TaskHostTaskComplete_Tests.cs (1)
239private void AssertInvalidConstructorThrows(Type expectedExceptionType, TaskCompleteType taskResult, Exception taskException, string taskExceptionMessage, string[] taskExceptionMessageArgs, IDictionary<string, object> taskOutputParameters, IDictionary<string, string> buildProcessEnvironment)
BackEnd\TaskRegistry_Tests.cs (5)
1708Type.GetType( 2113Type paramType = Type.GetType(type); 2118paramType = Type.GetType( 2336public Type TaskType => null;
BackEnd\TaskThatThrows.cs (2)
26Type exceptionType = string.IsNullOrWhiteSpace(ExceptionType) ? typeof(Exception) : Type.GetType(ExceptionType) ?? typeof(Exception);
BackEnd\TranslationHelpers.cs (1)
156internal static bool IsSimpleType(Type type)
Evaluation\Expander_Tests.cs (1)
3950Type expectedType;
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
512Type expectedOriginalElementType)
Evaluation\SimpleVersion_Tests.cs (1)
278public static void Parse_InvalidInput_ThrowsException(string input, Type exceptionType)
TaskParameter_Tests.cs (2)
59public void PrimitiveParameter(Type type, int expectedTypeCodeAsInt, string testValueAsString) 94public void PrimitiveArrayParameter(Type type, int expectedTypeCodeAsInt, string testValueAsString)
TestAssemblyInfo.cs (1)
40var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
Microsoft.Build.Framework (28)
BinaryTranslator.cs (1)
484Type enumType = value.GetType();
BuildException\BuildExceptionSerializationHelper.cs (5)
14public TypeConstructionTuple(Type type, Func<string, Exception?, BuildExceptionBase> factory) 20public Type Type { get; } 29internal static bool IsSupportedExceptionType(Type type) 53Type exceptionType = typeConstructionTuple.Type; 71internal static string GetExceptionSerializationKey(Type exceptionType)
ITaskFactory.cs (1)
25Type TaskType { get; }
TaskPropertyInfo.cs (3)
24public TaskPropertyInfo(string name, Type typeOfParameter, bool output, bool required) 30Type elementType = typeOfParameter.IsArray ? typeOfParameter.GetElementType() : typeOfParameter; 38public Type PropertyType { get; private set; }
ThrowHelper.cs (4)
101internal static void ThrowWrongKeyTypeArgumentException<T>(T key, Type targetType) 108internal static void ThrowWrongValueTypeArgumentException<T>(T value, Type targetType) 203private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 208private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
XamlTypes\ContentType.cs (2)
132public IEnumerable<Type> GetSchemaObjectTypes() 140public IEnumerable<object> GetSchemaObjects(Type type)
XamlTypes\FileExtension.cs (2)
46public IEnumerable<Type> GetSchemaObjectTypes() 54public IEnumerable<object> GetSchemaObjects(Type type)
XamlTypes\IProjectSchemaNode.cs (2)
19IEnumerable<Type> GetSchemaObjectTypes(); 24IEnumerable<object> GetSchemaObjects(Type type);
XamlTypes\ItemType.cs (2)
85public IEnumerable<Type> GetSchemaObjectTypes() 93public IEnumerable<object> GetSchemaObjects(Type type)
XamlTypes\ProjectSchemaDefinitions.cs (2)
43public IEnumerable<Type> GetSchemaObjectTypes() 51public IEnumerable<object> GetSchemaObjects(Type type)
XamlTypes\Rule.cs (2)
538public IEnumerable<Type> GetSchemaObjectTypes() 546public IEnumerable<object> GetSchemaObjects(Type type)
XamlTypes\RuleBag.cs (2)
75public IEnumerable<Type> GetSchemaObjectTypes() 83public IEnumerable<object> GetSchemaObjects(Type type)
Microsoft.Build.Framework.UnitTests (1)
TestAssemblyInfo.cs (1)
40var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
Microsoft.Build.Tasks.Core (36)
BuildEnvironmentHelper.cs (1)
399var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
CodeTaskFactory.cs (1)
1029public Type TaskType { get; } = null;
GenerateApplicationManifest.cs (1)
123protected override Type GetObjectType()
GenerateDeploymentManifest.cs (1)
165protected override Type GetObjectType()
GenerateManifestBase.cs (3)
42protected abstract Type GetObjectType(); 283Type manifestType = GetObjectType(); 423private bool InitializeManifest(Type manifestType)
ManifestUtil\ManifestReader.cs (2)
235Type t = Type.GetType(tn);
ManifestUtil\XmlUtil.cs (1)
139public override Object GetEntity(Uri uri, string role, Type t)
PrintLineDebugger.cs (1)
26var commonWriterType = typeof(ITask).Assembly.GetType("Microsoft.Build.Shared.Debugging.CommonWriter", true, false);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (4)
118/// Gets the <see cref="Type"/> of the compiled task. 120public Type TaskType { get; private set; } 172Type[] exportedTypes = assembly.GetExportedTypes(); 618private static CodeMemberProperty CreateProperty(CodeTypeDeclaration codeTypeDeclaration, string name, Type type, object defaultValue = null)
system.design\stronglytypedresourcebuilder.cs (3)
89internal ResourceData(Type type, String valueAsString) 105internal Type Type { get; } 526if (data.Type is Type type)
WriteCodeFragment.cs (14)
257Lazy<Type> attributeType = new( 258() => Type.GetType(attribute.Name, throwOnError: false) ?? NamespaceImports.Select(x => Type.GetType($"{x}.{attribute.Name}", throwOnError: false)).FirstOrDefault(), 391Lazy<Type> attributeType, 395Type[] constructorParameterTypes = null; 470private Type[] FindPositionalParameterTypes(Type attributeType, IReadOnlyList<AttributeParameter> positionalParameters) 477List<Type[]> candidates = attributeType 523return positionalParameters.Select(x => default(Type)).ToArray(); 532var parameterType = Type.GetType(typeName, throwOnError: false); 560private CodeExpression ConvertParameterValueToInferredType(Type inferredType, string rawValue, string parameterName) 587private CodeExpression ConvertToCodeExpression(string value, Type targetType) 589if (targetType == typeof(Type))
XamlTaskFactory\XamlTaskFactory.cs (1)
247public Type TaskType { get; } = null;
XslTransformation.cs (3)
504private static Type FindType(string assemblyPath, string typeName) 514var types = new List<Type>(); 515foreach (Type type in loadedAssembly.GetTypes())
Microsoft.Build.Tasks.UnitTests (4)
Exec_Tests.cs (1)
539Type execType = typeof(Exec);
TestAssemblyInfo.cs (1)
40var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
XslTransformation_Tests.cs (2)
1190asmBldr.SetCustomAttribute(new CustomAttributeBuilder(typeof(System.Security.SecurityTransparentAttribute).GetConstructor(Type.EmptyTypes), Array.Empty<object>())); 1193asmBldr.SetCustomAttribute(new CustomAttributeBuilder(typeof(GeneratedCodeAttribute).GetConstructor(new Type[] { typeof(string), typeof(string) }), new object[] { "XsltCompiler", "2.0.0.0" }));
Microsoft.Build.Utilities.Core (2)
BuildEnvironmentHelper.cs (1)
399var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
PrintLineDebugger.cs (1)
26var commonWriterType = typeof(ITask).Assembly.GetType("Microsoft.Build.Shared.Debugging.CommonWriter", true, false);
Microsoft.Build.Utilities.UnitTests (2)
StringExtensions_Tests.cs (1)
68public void ReplaceWithStringComparerExceptionCases(string aString, string oldValue, string newValue, StringComparison stringComparison, Type expectedException)
TestAssemblyInfo.cs (1)
40var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
Microsoft.Cci.Extensions (2)
Extensions\CustomAttributeProvider.cs (2)
21|| Type.GetType(type) == typeof(Type); // encountered as serialized to reflection notation
Microsoft.CSharp (245)
Microsoft\CSharp\RuntimeBinder\ArgumentObject.cs (2)
18internal readonly Type Type; 20public ArgumentObject(object value, CSharpArgumentInfo info, Type type)
Microsoft\CSharp\RuntimeBinder\Binder.cs (24)
27/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 34Type? context, 56/// <param name="context">The <see cref="Type"/> that indicates where this operation is used.</param> 61Type type, 62Type? context) 82/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 88Type? context, 101/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 108Type? context, 121/// <param name="context">The <see cref="Type"/> that indicates where this operation is used.</param> 127Type? context, 149/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 156IEnumerable<Type>? typeArguments, 157Type? context, 187/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 193Type? context, 206/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 212Type? context) 223/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 229Type? context, 244/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 251Type? context, 266/// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param> 273Type? context,
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (8)
137typeof(RuntimeBinderException).GetConstructor(new Type[] { typeof(string) }), 282private static Type GetTypeForErrorMetaObject(ICSharpBinder action, DynamicMetaObject[] args) 290Debug.Assert(args[0].Value is Type); 291return args[0].Value as Type; 421internal static int AddArgHashes(int hash, Type[] typeArguments, CSharpArgumentInfo[] argInfos) 423foreach (var typeArg in typeArguments) 446internal static bool CompareArgInfos(Type[] typeArgs, Type[] otherTypeArgs, CSharpArgumentInfo[] argInfos, CSharpArgumentInfo[] otherArgInfos)
Microsoft\CSharp\RuntimeBinder\CSharpArgumentInfoFlags.cs (1)
47/// The argument is a <see cref="System.Type"/> indicating an actual typename used in source. Used only for target objects in static calls.
Microsoft\CSharp\RuntimeBinder\CSharpBinaryOperationBinder.cs (4)
38public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 58private readonly Type _callingContext; 70/// <param name="callingContext">The <see cref="Type"/> that indicates where this operation is defined.</param> 77Type callingContext,
Microsoft\CSharp\RuntimeBinder\CSharpConvertBinder.cs (5)
42public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 57private readonly Type _callingContext; 67/// <param name="callingContext">The <see cref="Type"/> that indicates where this operation is defined.</param> 70Type type, 73Type callingContext) :
Microsoft\CSharp\RuntimeBinder\CSharpGetIndexBinder.cs (4)
31public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 42private readonly Type _callingContext; 47/// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param> 51Type callingContext,
Microsoft\CSharp\RuntimeBinder\CSharpGetMemberBinder.cs (4)
31public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 46private readonly Type _callingContext; 53/// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param> 59Type callingContext,
Microsoft\CSharp\RuntimeBinder\CSharpInvokeBinder.cs (6)
27public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 36Type[] ICSharpInvokeOrInvokeMemberBinder.TypeArguments => Type.EmptyTypes; 50private readonly Type _callingContext; 56/// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param> 61Type callingContext,
Microsoft\CSharp\RuntimeBinder\CSharpInvokeConstructorBinder.cs (5)
22public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 35public Type[] TypeArguments => Type.EmptyTypes; 43private readonly Type _callingContext; 48Type callingContext,
Microsoft\CSharp\RuntimeBinder\CSharpInvokeMemberBinder.cs (6)
28public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 37public Type CallingContext { get; } 39public Type[] TypeArguments { get; } 61/// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param> 68Type callingContext, 69IEnumerable<Type> typeArguments,
Microsoft\CSharp\RuntimeBinder\CSharpIsEventBinder.cs (6)
24public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 25=> SymbolTable.PopulateSymbolTableWithName(Name, null, arguments[0].Info.IsStaticType ? arguments[0].Value as Type : arguments[0].Type); 35private readonly Type _callingContext; 41/// <param name="callingContext">The <see cref="System.Type"/> that indicates where this operation is defined.</param> 45Type callingContext) 79public override Type ReturnType => typeof(bool);
Microsoft\CSharp\RuntimeBinder\CSharpSetIndexBinder.cs (4)
29public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 42private readonly Type _callingContext; 53/// <param name="callingContext">The <see cref="Type"/> that indicates where this operation is defined.</param> 59Type callingContext,
Microsoft\CSharp\RuntimeBinder\CSharpSetMemberBinder.cs (4)
27public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 40private readonly Type _callingContext; 51/// <param name="callingContext">The <see cref="Type"/> that indicates where this operation is defined.</param> 58Type callingContext,
Microsoft\CSharp\RuntimeBinder\CSharpUnaryOperationBinder.cs (4)
39public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments) 50private readonly Type _callingContext; 59/// <param name="callingContext">The <see cref="Type"/> that indicates where this operation is defined.</param> 65Type callingContext,
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (21)
119Type accessibilityContext) 136public static object TryEvalUnaryOperators<T>(T obj, ExpressionType oper, Type accessibilityContext) 157public static K TryEvalCast<T, K>(T obj, Type type, CSharpBinderFlags kind, Type accessibilityContext) 169Type[] argTypes, 171out Type[] delegateSignatureTypes, 177delegateSignatureTypes = new Type[numberOfArguments + 2]; 208private static object CreateDelegateAndInvoke(Type[] delegateSignatureTypes, CallSiteBinder binder, object[] args) 210Type delegateType = Expression.GetDelegateType(delegateSignatureTypes); 236Type[] argTypes, 239Type accessibilityContext, 240Type[] typeArguments) 242Type[] delegateSignatureTypes; 285public static object TryGetMemberValue<T>(T obj, string propName, Type accessibilityContext, bool isResultIndexed) 315Type[] argTypes, 317Type accessibilityContext) 319Type[] delegateSignatureTypes; 352Type accessibilityContext) 381Type[] argTypes, 383Type accessibilityContext) 385Type[] delegateSignatureTypes;
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (2)
319Type t; 428Type t = fieldInfo.FieldType.AssociatedSystemType;
Microsoft\CSharp\RuntimeBinder\ICSharpBinder.cs (2)
21void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] arguments); 30Type ReturnType { get; }
Microsoft\CSharp\RuntimeBinder\ICSharpInvokeOrInvokeMemberBinder.cs (1)
17Type[] TypeArguments { get; }
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (15)
25public RuntimeBinder(Type contextType, bool isChecked = false) 203private Type GetArgumentType(ICSharpBinder p, CSharpArgumentInfo argInfo, Expression param, DynamicMetaObject arg, int index) 205Type t = argInfo.UseCompileTimeType ? param.Type : arg.LimitType; 267ICSharpInvokeOrInvokeMemberBinder callOrInvoke, Type callingType, ArgumentObject[] arguments) 269Type type; 273type = arguments[0].Value as Type; 384private Expr CreateLocal(Type type, bool isOut, LocalVariableSymbol local) 517Type[] typeArguments, 692Type t = arguments[0].Value as Type; 800Type eventType = TypeManager.SubstType(eventCType, swtEvent.Ats).AssociatedSystemType; 1111ExprFactory.CreateClass(SymbolTable.GetCTypeFromType(argument.Value as Type)) : 1136Type type = argument.Type; 1189Type returnType, 1226internal Expr BindExplicitConversion(ArgumentObject[] arguments, Type returnType, LocalVariableSymbol[] locals)
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (18)
14public static bool IsNullableType(this Type type) 114private static bool IsGenericallyEqual(this Type t1, Type t2) 128Type t1def = t1.IsConstructedGenericType ? t1.GetGenericTypeDefinition() : t1; 129Type t2def = t2.IsConstructedGenericType ? t2.GetGenericTypeDefinition() : t2; 139private static bool IsGenericallyEquivalentTo(this Type t1, Type t2, MemberInfo member1, MemberInfo member2) 184Type[] args1 = t1.GetGenericArguments(); 185Type[] args2 = t2.GetGenericArguments(); 221private static bool IsTypeParameterEquivalentToTypeInst(this Type typeParam, Type typeInst, MemberInfo member) 236Type[] args = method.IsGenericMethod ? method.GetGenericArguments() : null; 254Type memberInfo = typeof(MemberInfo); 261types: new Type[] { typeof(MemberInfo) }, 280PropertyInfo property = memberInfo.GetProperty("MetadataToken", typeof(int), Type.EmptyTypes); 320public static string GetIndexerName(this Type type) 326foreach (Type iface in type.GetInterfaces()) 340private static string GetTypeIndexerName(Type type)
Microsoft\CSharp\RuntimeBinder\Semantics\ConstVal.cs (1)
90Type.GetTypeCode(o.GetType()) switch
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\AggregateSymbol.cs (1)
20public Type AssociatedSystemType;
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs (1)
59object objval = System.Type.GetTypeCode(Type.AssociatedSystemType) switch
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprWithType.cs (2)
16protected static bool TypesAreEqual(Type t1, Type t2) => t1 == t2 || t1.IsEquivalentTo(t2);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (4)
36Type type = aggType.AssociatedSystemType; 76Type[] typeArgs = new Type[size]; 107Type type = aggType.AssociatedSystemType;
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (1)
35Type type = aggType.AssociatedSystemType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (9)
24private Type _associatedSystemType; 84Type baseSysType = AssociatedSystemType.BaseType; 163Type sysType = AssociatedSystemType; 166Type genType = sysType.GetGenericTypeDefinition(); 303public override Type AssociatedSystemType 310private Type CalculateAssociatedSystemType() 312Type uninstantiatedType = OwningAggregate.AssociatedSystemType; 317Type[] systemTypeArgs = new Type[typeArgs.Count];
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArrayType.cs (2)
49public override Type AssociatedSystemType 54Type elementType = ElementType.AssociatedSystemType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs (1)
48public override Type AssociatedSystemType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ParameterModifierType.cs (1)
31public override Type AssociatedSystemType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PointerType.cs (1)
22public override Type AssociatedSystemType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (5)
53internal static Type GetAssociatedSystemType(PredefinedType type) => s_types[(int)type].AssociatedSystemType; 109public readonly Type AssociatedSystemType; 111internal PredefinedTypeInfo(PredefinedType type, Type associatedSystemType, string name, FUNDTYPE fundType) 121internal PredefinedTypeInfo(PredefinedType type, Type associatedSystemType, string name) 148new PredefinedTypeInfo(PredefinedType.PT_TYPE, typeof(Type), "System.Type"),
Microsoft\CSharp\RuntimeBinder\Semantics\Types\Type.cs (1)
20public virtual Type AssociatedSystemType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeParameterType.cs (1)
58public override Type AssociatedSystemType
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (68)
20private static readonly HashSet<Type> s_typesWithConversionsLoaded = new HashSet<Type>(); 25internal Type Type { get; } 28public NameHashKey(Type type, string name) 51IEnumerable<Type> typeArguments, 52Type callingType) 81foreach (Type o in typeArguments) 143List<Type> inheritance = CreateInheritanceHierarchyList(key.Type); 152private static void AddNamesInInheritanceHierarchy(string name, List<Type> inheritance) 156Type type = inheritance[i]; 234private static List<Type> CreateInheritanceHierarchyList(Type type) 236List<Type> list; 239Type[] ifaces = type.GetInterfaces(); 241list = new List<Type>(ifaces.Length + 2) 245foreach (Type iface in type.GetInterfaces()) 251Type obj = typeof(object); 257list = new List<Type> { type }; 258for (Type parent = type.BaseType; parent != null; parent = parent.BaseType) 278private static Name GetName(Type type) 303Type[] genericArguments = method.GetGenericArguments(); 307Type t = genericArguments[i]; 314Type t = genericArguments[i]; 327private static TypeArray GetAggregateTypeParameters(Type type, AggregateSymbol agg) 331Type genericDefinition = type.GetGenericTypeDefinition(); 332Type[] genericArguments = genericDefinition.GetGenericArguments(); 351Type t = genericArguments[i]; 385private static TypeParameterType LoadClassTypeParameter(AggregateSymbol parent, Type t) 405private static bool AreTypeParametersEquivalent(Type t1, Type t2) 414Type t1Original = GetOriginalTypeParameterType(t1); 415Type t2Original = GetOriginalTypeParameterType(t2); 455private static Type GetOriginalTypeParameterType(Type t) 461Type parentType = t.DeclaringType; 477Type nextParent = parentType.DeclaringType; 499private static TypeParameterType LoadMethodTypeParameter(MethodSymbol parent, Type t) 521Type t, 581private static CType LoadSymbolsFromType(Type type) 592if (o is Type t) 630return ProcessMethodTypeParameter(m, declarationChain[++i] as Type, current as AggregateSymbol); 646private static TypeParameterType ProcessMethodTypeParameter(MethodInfo methinfo, Type t, AggregateSymbol parent) 666private static CType GetConstructedType(Type type, AggregateSymbol agg) 674foreach (Type argument in type.GetGenericArguments()) 689private static CType ProcessSpecialTypeInChain(NamespaceOrAggregateSymbol parent, Type t) 720private static List<object> BuildDeclarationChain(Type callingType) 740for (Type t = callingType; t != null; t = t.DeclaringType) 780private static AggregateSymbol FindSymForType(Symbol sym, Type t) 809internal static CType[] GetCTypeArrayFromTypes(Type[] types) 822Type t = types[i]; 832internal static CType GetCTypeFromType(Type type) => type.IsByRef 844Type type) 934Type genericDefinition = type.GetGenericTypeDefinition(); 935Type[] genericArguments = genericDefinition.GetGenericArguments(); 940Type t = genericArguments[i]; 970Type t = type.BaseType; 980agg.SetHasPubNoArgCtor(type.GetConstructor(Type.EmptyTypes) != null); 995private static void SetInterfacesOnAggregate(AggregateSymbol aggregate, Type type) 1001Type[] interfaces = type.GetInterfaces(); 1136Type t = aggtype.AssociatedSystemType; 1302Type t = type.getThisType().AssociatedSystemType; 1467PopulateSymbolTableWithName("Value", new Type[] { typeof(Missing) }, typeof(Missing)); // We might need this later 1511Debug.Assert(Type.GetTypeCode(defValue.GetType()) != TypeCode.Decimal); // Handled above 1512switch (Type.GetTypeCode(defValue.GetType())) 1632Type t = p.ParameterType; 1737internal static void AddConversionsForType(Type type) 1743for (Type t = type; t.BaseType != null; t = t.BaseType) 1752private static void AddConversionsForOneType(Type type)
Microsoft.DotNet.AsmDiff (4)
MefHelpers.cs (4)
19public static ContainerConfiguration WithExport(this ContainerConfiguration configuration, object exportedInstance, Type contractType, string contractName = null, IDictionary<string, object> metadata = null) 27readonly Type _contractType; 30protected SinglePartExportDescriptorProvider(Type contractType, string contractName, IDictionary<string, object> metadata) 67public InstanceExportDescriptorProvider(object exportedInstance, Type contractType, string contractName, IDictionary<string, object> metadata)
Microsoft.DotNet.Build.Tasks.Feed (1)
src\Common\Internal\EnumExtensions.cs (1)
16Type type = value.GetType();
Microsoft.DotNet.Build.Tasks.Packaging (6)
PackageIndex.cs (4)
696public override bool CanConvert(Type objectType) 701public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) 794public override bool CanConvert(Type objectType) 799public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
PackageReport.cs (2)
68public override bool CanConvert(Type objectType) 73public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Microsoft.DotNet.Internal.DependencyInjection.Testing (16)
DependencyInjectionValidation.cs (16)
36IEnumerable<Type> additionalScopedTypes = null, 37IEnumerable<Type> additionalSingletonTypes = null) 68foreach (Type scopedType in additionalScopedTypes ?? Enumerable.Empty<Type>()) 76foreach (Type scopedType in additionalSingletonTypes ?? Enumerable.Empty<Type>()) 91Type type, 191private static string GetDisplayName(Type type) 204private static bool IsMatchingServiceRegistration(Type serviceType, Type parameterType) 209Type parameterRoot = parameterType.GetGenericTypeDefinition(); 214Type optionType = parameterType.GenericTypeArguments[0]; 219Type serviceRoot = serviceType.GetGenericTypeDefinition(); 232Type def = parameterType.GetGenericTypeDefinition(); 242private static bool IsOptionsType(Type parameterRoot) 255private static bool IsExemptType(Type type)
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\AssertEx.cs (2)
29var type = typeof(T); 375var type = ex.GetType();
Microsoft.DotNet.RemoteExecutor (3)
Program.cs (1)
41Type t = null;
RemoteExecutor.cs (2)
430Type t = method.DeclaringType; 591Type targetType = d.Target.GetType();
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (17)
HelperFactory.cs (17)
31internal static void RegisterAllForType(IHandlebars hb, Type type, object instance) 48private static List<(string name, HandlebarsBlockHelper helper)> CreateBlockHelpersForType(Type type, object instance) 74private static List<(string name, HandlebarsHelper helper)> CreateHelpersForType(Type type, object instance) 100private static IEnumerable<MethodInfo> GetAllMethods(Type type) 213private static MethodInfo EnumerableSkip(Type member) => 216private static MethodInfo EnumerableToArray(Type member) => 219private static MethodInfo EnumerableSelect(Type input, Type output) => 229new[] {typeof(object), typeof(Type)}); 235public ProvidedParameter(string name, Type type, Expression value) 243public Type Type { get; } 268private static readonly Type UndefinedBindingResultType = 271private static Expression CoerceObjectExpression(Type output, Expression input) 295private static Expression ConvertResultExpression(Type type, Expression input) 310var parameterType = parameter.ParameterType; 320private static Expression GetExpressionForParamArrayParameter(Type parameterType, int index, ParameterExpression argumentsParameter) 328var elementType = parameterType.GetElementType();
Microsoft.DotNet.VersionTools.Tests (10)
BuildManifest\ManifestModelTests.cs (10)
38public void ManifestModelToXmlValidatesFileExtensionSignInfos(Type exceptionType, params string[] infos) 62private static void VerifyToXml(Type expectedExceptionType, SigningInformationModel signInfo) 89public void ManifestModelFromXmlValidatesFileExtensionSignInfos(Type exceptionType, params string[] infos) 111private static void VerifyFromXml(Type expectedExceptionType, StringBuilder builder) 143public void ManifestModelToXmlValidatesFileSignInfos(Type exceptionType, params string[] infos) 219public void ManifestModelFromXmlValidatesFileSignInfos(Type exceptionType, params string[] infos) 254public void ManifestModelToXmlValidatesCertificateSignInfo(Type exceptionType, params string[] infos) 294public void ManifestModelFromXmlValidatesCertificateSignInfo(Type exceptionType, params string[] infos) 331public void ManifestModelToXmlValidatesStrongNameSignInfo(Type exceptionType, params string[] infos) 372public void ManifestModelFromXmlValidatesStrongNameSignInfo(Type exceptionType, params string[] infos)
Microsoft.DotNet.XUnitAssert.Tests (8)
Sdk\ArgumentFormatterTests.cs (8)
201 public static TheoryData<Type, string> TypeValueData = new() 225 public static void TypeValue(Type type, string expected) 471 public Type MyProp2 { get; set; } 513 public static TheoryData<Type, string> ArgumentFormatterFormatTypeNamesData = new() 526 public void ArgumentFormatterFormatTypeNames(Type type, string expectedResult) 535 var parameterType = genericTypeParameters.First(); 544 var parameterTKey = genericTypeParameters.First(); 548 var parameterTValue = genericTypeParameters.Last();
Microsoft.DotNet.XUnitExtensions (24)
Attributes\ActiveIssueAttribute.cs (2)
16public Type CalleeType { get; private set; } 23public ActiveIssueAttribute(string issue, Type calleeType, params string[] conditionMemberNames)
Attributes\ConditionalClassAttribute.cs (2)
15public Type CalleeType { get; private set; } 20Type calleeType,
Attributes\ConditionalFactAttribute.cs (2)
15public Type CalleeType { get; private set; } 20Type calleeType,
Attributes\ConditionalTheoryAttribute.cs (2)
15public Type CalleeType { get; private set; } 20Type calleeType,
Attributes\OuterLoopAttribute.cs (2)
16public Type CalleeType { get; private set; } 25public OuterLoopAttribute(string reason, Type calleeType, params string[] conditionMemberNames)
DiscovererHelpers.cs (5)
15private static readonly Lazy<bool> s_isMonoRuntime = new Lazy<bool>(() => Type.GetType("Mono.RuntimeStructs") != null); 46internal static bool Evaluate(Type calleeType, string[] conditionMemberNames) 72Type calleeType = null; 89else if (arg is Type) 91calleeType = (Type)arg;
Discoverers\ConditionalClassDiscoverer.cs (1)
41Type calleeType = null;
Discoverers\ConditionalTestDiscoverer.cs (7)
22Type calleeType = null; 28Type testMethodDeclaringType = testMethodInfo.DeclaringType; 41Type declaringType; 115internal static string GetFailedLookupString(string name, Type type) 123internal static Func<bool> LookupConditionalMember(Type t, string name) 145internal static bool CheckInputToSkipExecution(object[] conditionArguments, ref Type calleeType, ref string[] conditionMemberNames, ITestMethod testMethod = null) 152calleeType = conditionArguments[0] as Type;
XunitParallelTheoryTestCaseRunner.cs (1)
102Type[] parameterTypes = methodToRun.GetParameters().Select(p => p.ParameterType).ToArray();
Microsoft.Extensions.Caching.Hybrid (6)
Internal\DefaultHybridCache.Serialization.cs (2)
21private readonly ConcurrentDictionary<Type, object> _serializers = new(); 82private static bool IsImmutable(Type type)
Internal\DefaultHybridCache.Stampede.cs (2)
98static void ThrowWrongType(string key, Type existingType, Type newType)
Internal\DefaultHybridCache.StampedeState.cs (1)
79public abstract Type Type { get; }
Internal\DefaultHybridCache.StampedeStateT.cs (1)
28public override Type Type => typeof(T);
Microsoft.Extensions.Caching.Hybrid.Tests (2)
TypeTests.cs (2)
25public void ImmutableTypes(Type type) 41public void MutableTypes(Type type)
Microsoft.Extensions.Caching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.Extensions.Configuration.Binder (42)
ConfigurationBinder.cs (40)
73public static object? Get(this IConfiguration configuration, Type type) 90Type type, 187Type type, 206Type type, string key, 290[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 393Type? interfaceGenericType = type.IsInterface && type.IsConstructedGenericType ? type.GetGenericTypeDefinition() : null; 399Type genericType = typeof(List<>).MakeGenericType(type.GenericTypeArguments); 412Type? dictionaryInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type); 420Type? collectionInterface = FindOpenGenericInterface(typeof(ICollection<>), type); 447Type type, 559Type dictionaryType, 563Type keyType = dictionaryType.GenericTypeArguments[0]; 564Type valueType = dictionaryType.GenericTypeArguments[1]; 593Type kvpType = typeof(KeyValuePair<,>).MakeGenericType(keyType, valueType); 630Type dictionaryType, 636Type keyType = dictionaryType.GenericTypeArguments[0]; 637Type valueType = dictionaryType.GenericTypeArguments[1]; 700Type collectionType, 704Type itemType = collectionType.GenericTypeArguments[0]; 737private static Array BindArray(Type type, IEnumerable? source, IConfiguration config, BinderOptions options) 739Type elementType; 796private static object? BindSet(Type type, IEnumerable? source, IConfiguration config, BinderOptions options) 798Type elementType = type.GetGenericArguments()[0]; 813Type genericType = typeof(HashSet<>).MakeGenericType(elementType); 866Type type, 919Type type, 930private static bool TypeIsADictionaryInterface(Type type) 934Type genericTypeDefinition = type.GetGenericTypeDefinition(); 939private static bool IsImmutableArrayCompatibleInterface(Type type) 943Type genericTypeDefinition = type.GetGenericTypeDefinition(); 949private static bool TypeIsASetInterface(Type type) 953Type genericTypeDefinition = type.GetGenericTypeDefinition(); 961private static Type? FindOpenGenericInterface( 962Type expected, 964Type actual) 972Type[] interfaces = actual.GetInterfaces(); 973foreach (Type interfaceType in interfaces) 984private static List<PropertyInfo> GetAllProperties([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 988Type baseType = type; 1013private static object? BindParameter(ParameterInfo parameter, Type type, IConfiguration config,
src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (2)
42static object? CreateValueType(Type t) => 52Type? underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType);
Microsoft.Extensions.DependencyInjection (112)
DependencyInjectionEventSource.cs (4)
97public void ServiceResolved(ServiceProvider provider, Type serviceType) 106public void CallSiteBuilt(ServiceProvider provider, Type serviceType, ServiceCallSite callSite) 125public void DynamicMethodBuilt(ServiceProvider provider, Type serviceType, int methodSize) 305public static void ExpressionTreeGenerated(this DependencyInjectionEventSource source, ServiceProvider provider, Type serviceType, Expression expression)
ServiceLookup\CallSiteChain.cs (4)
33public void Add(ServiceIdentifier serviceIdentifier, Type? implementationType = null) 57Type? implementationType = pair.Value.ImplementationType; 79public Type? ImplementationType { get; } 81public ChainItemInfo(int order, Type? implementationType)
ServiceLookup\CallSiteFactory.cs (29)
39Type serviceType = descriptor.ServiceType; 42Type? implementationType = descriptor.GetImplementationType(); 57Type[] serviceTypeGenericArguments = serviceType.GetGenericArguments(); 58Type[] implementationTypeGenericArguments = implementationType.GetGenericArguments(); 70else if (descriptor.TryGetImplementationType(out Type? implementationType)) 100Type serviceType, 101Type[] serviceTypeGenericArguments, 102Type implementationType, 103Type[] implementationTypeGenericArguments) 109Type serviceGenericType = serviceTypeGenericArguments[i]; 110Type implementationGenericType = implementationTypeGenericArguments[i]; 129private static DynamicallyAccessedMemberTypes GetDynamicallyAccessedMemberTypes(Type serviceGenericType) 265var serviceType = serviceIdentifier.ServiceType; 273Type itemType = serviceType.GenericTypeArguments[0]; 428Type? implementationType = descriptor.GetImplementationType(); 431Type closedType; 434Type[] genericTypeArguments = serviceIdentifier.ServiceType.GenericTypeArguments; 461[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType, 498HashSet<Type>? bestConstructorParameterTypes = null; 524bestConstructorParameterTypes = new HashSet<Type>(); 567Type implementationType, 577Type parameterType = parameters[index].ParameterType; 631private static void VerifyOpenGenericAotCompatibility(Type serviceType, Type[] genericTypeArguments) 633foreach (Type typeArg in genericTypeArguments) 647public bool IsService(Type serviceType) => IsService(new ServiceIdentifier(null, serviceType)); 649public bool IsKeyedService(Type serviceType, object? key) => IsService(new ServiceIdentifier(key, serviceType)); 653var serviceType = serviceIdentifier.ServiceType; 676if (serviceType.IsConstructedGenericType && serviceType.GetGenericTypeDefinition() is Type genericDefinition)
ServiceLookup\CallSiteRuntimeResolver.cs (1)
178static Array CreateArray(Type elementType, int length)
ServiceLookup\CallSiteValidator.cs (18)
10internal sealed class CallSiteValidator : CallSiteVisitor<CallSiteValidator.CallSiteValidatorState, Type?> 13private readonly ConcurrentDictionary<ServiceCacheKey, Type?> _scopedServices = new ConcurrentDictionary<ServiceCacheKey, Type?>(); 20&& _scopedServices.TryGetValue(callSite.Cache.Key, out Type? scopedService) 23Type serviceType = callSite.ServiceType; 39protected override Type? VisitCallSite(ServiceCallSite callSite, CallSiteValidatorState argument) 44if (!_scopedServices.TryGetValue(callSite.Cache.Key, out Type? firstScopedServiceInCallSiteTree)) 67protected override Type? VisitConstructor(ConstructorCallSite constructorCallSite, CallSiteValidatorState state) 69Type? result = null; 72Type? scoped = VisitCallSite(parameterCallSite, state); 78protected override Type? VisitIEnumerable(IEnumerableCallSite enumerableCallSite, 81Type? result = null; 84Type? scoped = VisitCallSite(serviceCallSite, state); 90protected override Type? VisitRootCache(ServiceCallSite singletonCallSite, CallSiteValidatorState state) 96protected override Type? VisitScopeCache(ServiceCallSite scopedCallSite, CallSiteValidatorState state) 108protected override Type? VisitConstant(ConstantCallSite constantCallSite, CallSiteValidatorState state) => null; 110protected override Type? VisitServiceProvider(ServiceProviderCallSite serviceProviderCallSite, CallSiteValidatorState state) => null; 112protected override Type? VisitFactory(FactoryCallSite factoryCallSite, CallSiteValidatorState state) => null;
ServiceLookup\ConstantCallSite.cs (4)
10private readonly Type _serviceType; 13public ConstantCallSite(Type serviceType, object? defaultValue) : base(ResultCache.None(serviceType)) 24public override Type ServiceType => _serviceType; 25public override Type ImplementationType => DefaultValue?.GetType() ?? _serviceType;
ServiceLookup\ConstructorCallSite.cs (4)
14public ConstructorCallSite(ResultCache cache, Type serviceType, ConstructorInfo constructorInfo) : this(cache, serviceType, constructorInfo, Array.Empty<ServiceCallSite>()) 18public ConstructorCallSite(ResultCache cache, Type serviceType, ConstructorInfo constructorInfo, ServiceCallSite[] parameterCallSites) : base(cache) 30public override Type ServiceType { get; } 32public override Type? ImplementationType => ConstructorInfo.DeclaringType;
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (3)
119static MethodInfo GetArrayEmptyMethodInfo(Type elementType) 128static NewArrayExpression NewArrayInit(Type elementType, IEnumerable<Expression> expr) 194private static Expression Convert(Expression expression, Type type, bool forceValueTypeConversion = false)
ServiceLookup\FactoryCallSite.cs (4)
12public FactoryCallSite(ResultCache cache, Type serviceType, Func<IServiceProvider, object> factory) : base(cache) 18public FactoryCallSite(ResultCache cache, Type serviceType, object serviceKey, Func<IServiceProvider, object, object> factory) : base(cache) 24public override Type ServiceType { get; } 25public override Type? ImplementationType => null;
ServiceLookup\IEnumerableCallSite.cs (4)
13internal Type ItemType { get; } 16public IEnumerableCallSite(ResultCache cache, Type itemType, ServiceCallSite[] serviceCallSites) : base(cache) 27public override Type ServiceType => typeof(IEnumerable<>).MakeGenericType(ItemType); 32public override Type ImplementationType => ItemType.MakeArrayType();
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (2)
35private static readonly MethodInfo GetTypeFromHandleMethod = typeof(Type).GetMethod(nameof(Type.GetTypeFromHandle))!;
ServiceLookup\ResultCache.cs (1)
11public static ResultCache None(Type serviceType)
ServiceLookup\ServiceCacheKey.cs (1)
29public ServiceCacheKey(object key, Type type, int slot)
ServiceLookup\ServiceCallSite.cs (2)
18public abstract Type ServiceType { get; } 19public abstract Type? ImplementationType { get; }
ServiceLookup\ServiceDescriptorExtensions.cs (2)
32public static Type? GetImplementationType(this ServiceDescriptor serviceDescriptor) 39public static bool TryGetImplementationType(this ServiceDescriptor serviceDescriptor, out Type? type)
ServiceLookup\ServiceIdentifier.cs (4)
13public Type ServiceType { get; } 15public ServiceIdentifier(Type serviceType) 20public ServiceIdentifier(object? serviceKey, Type serviceType) 29public static ServiceIdentifier FromServiceType(Type type) => new ServiceIdentifier(null, type);
ServiceLookup\ServiceLookupHelpers.cs (3)
33.GetMethod(nameof(Monitor.Enter), BindingFlags.Public | BindingFlags.Static, null, new Type[] { typeof(object), typeof(bool).MakeByRefType() }, null)!; 35.GetMethod(nameof(Monitor.Exit), BindingFlags.Public | BindingFlags.Static, null, new Type[] { typeof(object) }, null)!; 40internal static MethodInfo GetArrayEmptyMethodInfo(Type itemType) =>
ServiceLookup\ServiceProviderCallSite.cs (2)
14public override Type ServiceType { get; } = typeof(IServiceProvider); 15public override Type ImplementationType { get; } = typeof(ServiceProvider);
ServiceLookup\ServiceProviderEngineScope.cs (3)
43public object? GetService(Type serviceType) 53public object? GetKeyedService(Type serviceType, object? serviceKey) 63public object GetRequiredKeyedService(Type serviceType, object? serviceKey)
ServiceProvider.cs (5)
101public object? GetService(Type serviceType) => GetService(ServiceIdentifier.FromServiceType(serviceType), Root); 109public object? GetKeyedService(Type serviceType, object? serviceKey) 112internal object? GetKeyedService(Type serviceType, object? serviceKey, ServiceProviderEngineScope serviceProviderEngineScope) 122public object GetRequiredKeyedService(Type serviceType, object? serviceKey) 125internal object GetRequiredKeyedService(Type serviceType, object? serviceKey, ServiceProviderEngineScope serviceProviderEngineScope)
src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (2)
42static object? CreateValueType(Type t) => 52Type? underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType);
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (10)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 44/// <param name="type">The <see cref="Type"/>.</param> 50public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 57private static string? ProcessType(ref StringBuilder? builder, Type type, in DisplayNameOptions options) 61Type[] genericArguments = type.GetGenericArguments(); 109private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 111Type innerType = type; 128private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Microsoft.Extensions.DependencyInjection.Abstractions (170)
ActivatorUtilities.cs (43)
28private static readonly ConcurrentDictionary<Type, ConstructorInfoEx[]> s_constructorInfos = new(); 31private static readonly Lazy<ConditionalWeakTable<Type, ConstructorInfoEx[]>> s_collectibleConstructorInfos = new(); 38new Func<IServiceProvider, Type, Type, bool, object?, object?>(GetService).Method; 49[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type instanceType, 172Type?[] argumentTypes; 175argumentTypes = Type.EmptyTypes; 179argumentTypes = new Type[parameters.Length]; 227[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) 252[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) 277[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type instanceType, 278Type[] argumentTypes) 315Type[] argumentTypes) 334private static void CreateFactoryInternal([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type instanceType, Type[] argumentTypes, out ParameterExpression provider, out ParameterExpression argumentArray, out Expression factoryExpressionBody) 374[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) 379private static object? GetService(IServiceProvider sp, Type type, Type requiredBy, bool hasDefaultValue, object? key) 390private static void ThrowHelperUnableToResolveService(Type type, Type requiredBy) 407Type? parameterType = constructorParameter.ParameterType; 418Expression.Constant(parameterType, typeof(Type)), 419Expression.Constant(constructor.DeclaringType, typeof(Type)), 448[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type instanceType, 449Type?[] argumentTypes) 452Type declaringType = constructor.DeclaringType!; 549public FactoryParameterContext(Type parameterType, bool hasDefaultValue, object? defaultValue, int argumentIndex, object? serviceKey) 558public Type ParameterType { get; } 566[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type instanceType, 567Type?[] argumentTypes, 602[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type instanceType, 603Type?[] argumentTypes, 635[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type instanceType, 636Type?[] argumentTypes, 688private static bool TryCreateParameterMap(ParameterInfo[] constructorParameters, Type?[] argumentTypes, out int?[] parameterMap) 695Type? givenParameter = argumentTypes[i]; 822Type? givenType = givenParameters[givenIndex]?.GetType(); 929Type declaringType, 969Type declaringType, 987Type declaringType, 1123Type declaringType, 1203public static void ClearCache(Type[]? _) 1222private static object? GetKeyedService(IServiceProvider provider, Type type, object? serviceKey)
Extensions\ServiceCollectionDescriptorExtensions.cs (14)
107[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type service) 126Type service, 127[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 147Type service, 213[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type service) 232Type service, 233[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 253Type service, 319[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type service) 338Type service, 339[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 359Type service, 459Type? implementationType = descriptor.GetImplementationType(); 562public static IServiceCollection RemoveAll(this IServiceCollection collection, Type serviceType)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (13)
21[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type service, 42Type service, 44[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 65Type service, 137[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type service, 158Type service, 160[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 181Type service, 253[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type service, 274Type service, 276[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 297Type service, 397public static IServiceCollection RemoveAllKeyed(this IServiceCollection collection, Type serviceType, object? serviceKey)
IKeyedServiceProvider.cs (2)
20object? GetKeyedService(Type serviceType, object? serviceKey); 30object GetRequiredKeyedService(Type serviceType, object? serviceKey);
IServiceProviderIsKeyedService.cs (1)
21bool IsKeyedService(Type serviceType, object? serviceKey);
IServiceProviderIsService.cs (1)
18bool IsService(Type serviceType);
ISupportRequiredService.cs (1)
21object GetRequiredService(Type serviceType);
ObjectFactory.cs (2)
9/// The result of <see cref="ActivatorUtilities.CreateFactory(Type, Type[])"/>.
ServiceCollectionServiceExtensions.cs (16)
26Type serviceType, 27[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 48Type serviceType, 87[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type serviceType) 168Type serviceType, 169[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 190Type serviceType, 229[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type serviceType) 311Type serviceType, 312[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 333Type serviceType, 372[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type serviceType) 453Type serviceType, 487Type serviceType, 488[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType, 498Type serviceType,
ServiceCollectionServiceExtensions.Keyed.cs (16)
27Type serviceType, 29[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 51Type serviceType, 95[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type serviceType, 185Type serviceType, 187[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 209Type serviceType, 253[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type serviceType, 343Type serviceType, 345[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 367Type serviceType, 411[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type serviceType, 501Type serviceType, 538Type serviceType, 540[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType, 550Type serviceType,
ServiceDescriptor.cs (53)
19/// <param name="serviceType">The <see cref="Type"/> of the service.</param> 20/// <param name="implementationType">The <see cref="Type"/> implementing the service.</param> 23Type serviceType, 24[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType, 33/// <param name="serviceType">The <see cref="Type"/> of the service.</param> 35/// <param name="implementationType">The <see cref="Type"/> implementing the service.</param> 38Type serviceType, 40[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType, 54/// <param name="serviceType">The <see cref="Type"/> of the service.</param> 57Type serviceType, 67/// <param name="serviceType">The <see cref="Type"/> of the service.</param> 71Type serviceType, 85/// <param name="serviceType">The <see cref="Type"/> of the service.</param> 89Type serviceType, 103/// <param name="serviceType">The <see cref="Type"/> of the service.</param> 108Type serviceType, 129private ServiceDescriptor(Type serviceType, object? serviceKey, ServiceLifetime lifetime) 147/// Gets the <see cref="Type"/> of the service. 149public Type ServiceType { get; } 152private Type? _implementationType; 155/// Gets the <see cref="Type"/> that implements the service. 158public Type? ImplementationType 171/// Gets the <see cref="Type"/> that implements the service. 174public Type? KeyedImplementationType 292internal Type GetImplementationType() 306Type[]? typeArguments = ImplementationFactory.GetType().GenericTypeArguments; 325Type[]? typeArguments = KeyedImplementationFactory.GetType().GenericTypeArguments; 377Type service, 378[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 396Type service, 398[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 489public static ServiceDescriptor Transient(Type service, Func<IServiceProvider, object> implementationFactory) 506public static ServiceDescriptor KeyedTransient(Type service, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory) 554Type service, 555[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 570Type service, 572[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 660public static ServiceDescriptor Scoped(Type service, Func<IServiceProvider, object> implementationFactory) 677public static ServiceDescriptor KeyedScoped(Type service, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory) 726Type service, 727[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 745Type service, 747[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType) 841Type serviceType, 860Type serviceType, 914Type serviceType, 933Type serviceType, 966Type serviceType, 967[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType, 984Type serviceType, 986[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementationType, 1001public static ServiceDescriptor Describe(Type serviceType, Func<IServiceProvider, object> implementationFactory, ServiceLifetime lifetime) 1016public static ServiceDescriptor DescribeKeyed(Type serviceType, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory, ServiceLifetime lifetime)
ServiceProviderKeyedServiceExtensions.cs (3)
42public static object GetRequiredKeyedService(this IServiceProvider provider, Type serviceType, object? serviceKey) 92public static IEnumerable<object?> GetKeyedServices(this IServiceProvider provider, Type serviceType, object? serviceKey) 97Type? genericEnumerable = typeof(IEnumerable<>).MakeGenericType(serviceType);
ServiceProviderServiceExtensions.cs (3)
35public static object GetRequiredService(this IServiceProvider provider, Type serviceType) 88public static IEnumerable<object?> GetServices(this IServiceProvider provider, Type serviceType) 93Type? genericEnumerable = typeof(IEnumerable<>).MakeGenericType(serviceType);
src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (2)
42static object? CreateValueType(Type t) => 52Type? underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType);
Microsoft.Extensions.Diagnostics.Abstractions (10)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (10)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 44/// <param name="type">The <see cref="Type"/>.</param> 50public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 57private static string? ProcessType(ref StringBuilder? builder, Type type, in DisplayNameOptions options) 61Type[] genericArguments = type.GetGenericArguments(); 109private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 111Type innerType = type; 128private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Microsoft.Extensions.Features (13)
FeatureCollection.cs (10)
23private IDictionary<Type, object>? _features; 64public object? this[Type key] 87_features = new Dictionary<Type, object>(_initialCapacity); 100public IEnumerator<KeyValuePair<Type, object>> GetEnumerator() 146private sealed class KeyComparer : IEqualityComparer<KeyValuePair<Type, object>> 148public bool Equals(KeyValuePair<Type, object> x, KeyValuePair<Type, object> y) 153public int GetHashCode(KeyValuePair<Type, object> obj) 164public DictionaryItemDebugView<Type, object>[] Items => _features.Select(pair => new DictionaryItemDebugView<Type, object>(pair)).ToArray();
FeatureCollectionExtensions.cs (1)
36public static object GetRequiredFeature(this IFeatureCollection featureCollection, Type key)
IFeatureCollection.cs (2)
12public interface IFeatureCollection : IEnumerable<KeyValuePair<Type, object>> 29object? this[Type key] { get; set; }
Microsoft.Extensions.Http (37)
DefaultTypedHttpClientFactory.cs (1)
38private static readonly Func<ObjectFactory> _createActivator = () => ActivatorUtilities.CreateFactory(typeof(TClient), new Type[] { typeof(HttpClient), });
DependencyInjection\HttpClientBuilderExtensions.cs (6)
346/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 412/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 472/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 518/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 654private static void ReserveClient(IHttpClientBuilder builder, Type type, string name, bool validateSingleType) 660if (registry.NamedClientRegistrations.TryGetValue(name, out Type? otherType) &&
DependencyInjection\HttpClientFactoryServiceCollectionExtensions.cs (16)
196/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 236/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 273/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 316/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 357/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 396/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 439/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 483/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 523/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 565/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 611/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 658/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 703/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 740/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 782/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing 819/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
DependencyInjection\HttpClientMappingRegistry.cs (2)
16public Dictionary<string, Type> NamedClientRegistrations { get; } = new Dictionary<string, Type>();
ITypedHttpClientFactory.cs (2)
21/// should rarely be used directly in application code, use <see cref="IServiceProvider.GetService(Type)"/> instead 33/// <see cref="ActivatorUtilities.CreateInstance(IServiceProvider, Type, object[])" /> for details.
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (10)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 44/// <param name="type">The <see cref="Type"/>.</param> 50public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 57private static string? ProcessType(ref StringBuilder? builder, Type type, in DisplayNameOptions options) 61Type[] genericArguments = type.GetGenericArguments(); 109private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 111Type innerType = type; 128private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Microsoft.Extensions.Http.Polly.Tests (3)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (3)
527public void AddPolicyRegistry_AddsOnlyMissingRegistrations(Type missingType) 532var policyTypes = new List<Type> 540foreach (var policyType in policyTypes.Where(x => x != missingType))
Microsoft.Extensions.Identity.Core (39)
IdentityBuilder.cs (19)
21/// <param name="user">The <see cref="Type"/> to use for the users.</param> 23public IdentityBuilder(Type user, IServiceCollection services) 37/// <param name="user">The <see cref="Type"/> to use for the users.</param> 38/// <param name="role">The <see cref="Type"/> to use for the roles.</param> 40public IdentityBuilder(Type user, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type role, IServiceCollection services) : this(user, services) 51/// Gets the <see cref="Type"/> used for users. 54/// The <see cref="Type"/> used for users. 56public Type UserType { get; } 59/// Gets the <see cref="Type"/> used for roles. 62/// The <see cref="Type"/> used for roles. 65public Type? RoleType { get; private set; } 75private IdentityBuilder AddScoped(Type serviceType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type concreteType) 144public virtual IdentityBuilder AddTokenProvider(string providerName, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type provider) 176var userManagerType = typeof(UserManager<>).MakeGenericType(UserType); 177var customType = typeof(TUserManager); 262var managerType = typeof(RoleManager<>).MakeGenericType(RoleType); 263var customType = typeof(TRoleManager);
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type) 54private static void ThrowObjectDisposedException(Type? type)
src\Shared\TrimmingAttributes.cs (11)
184/// with the specified signature of a member on a <see cref="System.Type"/>. 187/// <param name="type">The <see cref="System.Type"/> containing <paramref name="memberSignature"/>.</param> 188public DynamicDependencyAttribute(string memberSignature, Type type) 210/// with the specified types of members on a <see cref="System.Type"/>. 213/// <param name="type">The <see cref="System.Type"/> containing the specified members.</param> 214public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, Type type) 254/// Gets the <see cref="System.Type"/> containing the specified member. 260public Type? Type { get; } 286/// Indicates that certain members on a specified <see cref="Type"/> are accessed dynamically, 293/// This attribute is valid on members whose type is <see cref="Type"/> or <see cref="string"/>. 299/// can be accessed dynamically on <see cref="Type"/> instances returned from calling
TokenProviderDescriptor.cs (6)
16private readonly Stack<Type> _providerTypes = new(1); 22public TokenProviderDescriptor(Type type) 30public Type ProviderType => _providerTypes.Peek(); 37internal void AddProviderType(Type type) => _providerTypes.Push(type); 39internal Type? GetProviderType<T>() 41foreach (var providerType in _providerTypes)
UserManager.cs (1)
110if (provider == null && description.GetProviderType<IUserTwoFactorTokenProvider<TUser>>() is Type providerType)
Microsoft.Extensions.Identity.Stores (13)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type) 54private static void ThrowObjectDisposedException(Type? type)
src\Shared\TrimmingAttributes.cs (11)
184/// with the specified signature of a member on a <see cref="System.Type"/>. 187/// <param name="type">The <see cref="System.Type"/> containing <paramref name="memberSignature"/>.</param> 188public DynamicDependencyAttribute(string memberSignature, Type type) 210/// with the specified types of members on a <see cref="System.Type"/>. 213/// <param name="type">The <see cref="System.Type"/> containing the specified members.</param> 214public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, Type type) 254/// Gets the <see cref="System.Type"/> containing the specified member. 260public Type? Type { get; } 286/// Indicates that certain members on a specified <see cref="Type"/> are accessed dynamically, 293/// This attribute is valid on members whose type is <see cref="Type"/> or <see cref="string"/>. 299/// can be accessed dynamically on <see cref="Type"/> instances returned from calling
Microsoft.Extensions.Localization (4)
ResourceManagerStringLocalizerFactory.cs (4)
118/// <see cref="Type.FullName"/> of the specified <see cref="Type"/>. 120/// <param name="resourceSource">The <see cref="Type"/>.</param> 122public IStringLocalizer Create(Type resourceSource)
Microsoft.Extensions.Localization.Abstractions (6)
IStringLocalizerFactory.cs (4)
15/// <see cref="Type.FullName"/> of the specified <see cref="Type"/>. 17/// <param name="resourceSource">The <see cref="Type"/>.</param> 19IStringLocalizer Create(Type resourceSource);
IStringLocalizerOfT.cs (1)
9/// <typeparam name="T">The <see cref="System.Type"/> to provide strings for.</typeparam>
StringLocalizerOfT.cs (1)
13/// <typeparam name="TResourceSource">The <see cref="Type"/> to provide strings for.</typeparam>
Microsoft.Extensions.Localization.Tests (6)
LocalizationServiceCollectionExtensionsTest.cs (2)
44Type serviceType, 45Type implementationType)
ResourceManagerStringLocalizerFactoryTest.cs (3)
79var type = typeof(ResourceManagerStringLocalizerFactoryTest); 146var type = typeof(Model); 175var type = typeof(Model);
ResourceManagerStringLocalizerTest.cs (1)
288public TestAssemblyWrapper(Type type)
Microsoft.Extensions.Logging (3)
LoggerInformation.cs (1)
86public Type ProviderType { get; }
LoggerRuleSelector.cs (1)
10public static void Select(LoggerFilterOptions options, Type providerType, string category, out LogLevel? minLevel, out Func<string?, string?, LogLevel, bool>? filter)
src\libraries\Common\src\Extensions\ProviderAliasUtilities\ProviderAliasUtilities.cs (1)
15internal static string? GetAlias(Type providerType)
Microsoft.Extensions.Logging.Abstractions (11)
LoggerFactoryExtensions.cs (1)
32public static ILogger CreateLogger(this ILoggerFactory factory, Type type)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (10)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string> 44/// <param name="type">The <see cref="Type"/>.</param> 50public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter) 57private static string? ProcessType(ref StringBuilder? builder, Type type, in DisplayNameOptions options) 61Type[] genericArguments = type.GetGenericArguments(); 109private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) 111Type innerType = type; 128private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options)
Microsoft.Extensions.Logging.AzureAppServices (2)
ConfigurationBasedLevelSwitcher.cs (2)
13private readonly Type _provider; 16public ConfigurationBasedLevelSwitcher(IConfiguration configuration, Type provider, string levelKey)
Microsoft.Extensions.Logging.Configuration (3)
ILoggerProviderConfigurationFactory.cs (1)
19IConfiguration GetConfiguration(Type providerType);
LoggerProviderConfigurationFactory.cs (1)
19public IConfiguration GetConfiguration(Type providerType)
src\libraries\Common\src\Extensions\ProviderAliasUtilities\ProviderAliasUtilities.cs (1)
15internal static string? GetAlias(Type providerType)
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
88public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, Type type) =>
Microsoft.Extensions.ObjectPool.Microbenchmark (7)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (6)
18public AspNetCoreBenchmarkAttribute(Type configType) 23public AspNetCoreBenchmarkAttribute(Type configType, Type validationConfigType) 25ConfigTypes = new Dictionary<string, Type>() 49if (!ConfigTypes.TryGetValue(ConfigName ?? NamedConfiguration.Default, out var configType)) 60public Dictionary<string, Type> ConfigTypes { get; }
src\Shared\BenchmarkRunner\ParameterizedJobConfigAttribute.cs (1)
11public ParameterizedJobConfigAttribute(Type configType) : base(configType)
Microsoft.Extensions.Options (19)
OptionsServiceCollectionExtensions.cs (11)
171private static IEnumerable<Type> FindConfigurationServices(Type type) 173foreach (Type t in GetInterfacesOnType(type)) 177Type gtd = t.GetGenericTypeDefinition(); 194static Type[] GetInterfacesOnType(Type t) 198private static void ThrowNoConfigServices(Type type) => 214[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type configureType) 219foreach (Type serviceType in FindConfigurationServices(configureType)) 244Type configureType = configureInstance.GetType(); 247foreach (Type serviceType in FindConfigurationServices(configureType))
OptionsValidationException.cs (2)
20public OptionsValidationException(string optionsName, Type optionsType, IEnumerable<string>? failureMessages) 38public Type OptionsType { get; }
StartupValidatorOptions.cs (2)
12public Dictionary<(Type, string), Action> _validators { get; } = new Dictionary<(Type, string), Action>();
ValidateEnumeratedItemsAttribute.cs (2)
35public ValidateEnumeratedItemsAttribute(Type validator) 43public Type? Validator { get; }
ValidateObjectMembersAttribute.cs (2)
34public ValidateObjectMembersAttribute(Type validator) 42public Type? Validator { get; }
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
88public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, Type type) =>
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
88public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, Type type) =>
Microsoft.Interop.LibraryImportGenerator (4)
LibraryImportGenerator.cs (3)
394$"{nameof(TypeNames.LibraryImportAttribute)}{Type.Delimiter}{nameof(StringMarshalling)}", 395$"{nameof(StringMarshalling)}{Type.Delimiter}{pinvokeData.StringMarshalling}"); 408$"{nameof(TypeNames.LibraryImportAttribute)}{Type.Delimiter}{nameof(InteropAttributeMember.StringMarshallingCustomType)}");
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
88public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, Type type) =>
Microsoft.Interop.SourceGeneration (5)
GeneratorDiagnosticsBag.cs (2)
20private readonly Type _resourceSource; 32public GeneratorDiagnosticsBag(IDiagnosticDescriptorProvider descriptorProvider, ISignatureDiagnosticLocations locations, ResourceManager resourceManager, Type resourceSource)
MarshalAsParser.cs (2)
179_diagnostics.ReportConfigurationNotSupported(attributeData, $"{attributeData.AttributeClass!.Name}{Type.Delimiter}{namedArg.Key}"); 184_diagnostics.ReportConfigurationNotSupported(attributeData, $"{attributeData.AttributeClass!.Name}{Type.Delimiter}{namedArg.Key}");
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
88public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, Type type) =>
Microsoft.JSInterop (46)
Infrastructure\ByteArrayJsonConverter.cs (1)
23public override byte[]? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Infrastructure\DotNetDispatcher.cs (23)
29private static readonly ConcurrentDictionary<AssemblyKey, IReadOnlyDictionary<string, (MethodInfo, Type[])>> _cachedMethodsByAssembly = new(); 31private static readonly ConcurrentDictionary<Type, IReadOnlyDictionary<string, (MethodInfo, Type[])>> _cachedMethodsByType = new(); 33private static readonly ConcurrentDictionary<Type, Func<object, Task>> _cachedConvertToTaskByType = new(); 163Type[] parameterTypes; 215internal static object?[] ParseArguments(JSRuntime jsRuntime, string methodIdentifier, string arguments, Type[] parameterTypes) 240var parameterType = parameterTypes[index]; 265static bool IsIncorrectDotNetObjectRefUse(Type parameterType, Utf8JsonReader jsonReader) 351private static (MethodInfo, Type[]) GetCachedMethodInfo(AssemblyKey assemblyKey, string methodIdentifier) 371private static Task GetTaskByType(Type type, object obj) 373var converterDelegate = _cachedConvertToTaskByType.GetOrAdd(type, (Type t, MethodInfo taskConverterMethodInfo) => 381private static (MethodInfo methodInfo, Type[] parameterTypes) GetCachedMethodInfo(IDotNetObjectReference objectReference, string methodIdentifier) 383var type = objectReference.Value.GetType(); 399static Dictionary<string, (MethodInfo, Type[])> ScanTypeForCallableMethods([DynamicallyAccessedMembers(JSInvokable)] Type type) 401var result = new Dictionary<string, (MethodInfo, Type[])>(StringComparer.Ordinal); 431private static Dictionary<string, (MethodInfo, Type[])> ScanAssemblyForCallableMethods(AssemblyKey assemblyKey) 435var result = new Dictionary<string, (MethodInfo, Type[])>(StringComparer.Ordinal); 437foreach (var type in exportedTypes) 464private static Type[] GetParameterTypes(MethodInfo method) 469return Type.EmptyTypes; 472var parameterTypes = new Type[parameters.Length]; 509public static void ClearCache(Type[]? _)
Infrastructure\DotNetObjectReferenceJsonConverter.cs (1)
22public override DotNetObjectReference<TValue> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Infrastructure\DotNetObjectReferenceJsonConverterFactory.cs (4)
19public override bool CanConvert(Type typeToConvert) 25public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) 28var instanceType = typeToConvert.GetGenericArguments()[0]; 29var converterType = typeof(DotNetObjectReferenceJsonConverter<>).MakeGenericType(instanceType);
Infrastructure\DotNetStreamReferenceJsonConverter.cs (1)
20public override DotNetStreamReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Infrastructure\JSObjectReferenceJsonConverter.cs (2)
19public override bool CanConvert(Type typeToConvert) 22public override IJSObjectReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Infrastructure\JSStreamReferenceJsonConverter.cs (2)
21public override bool CanConvert(Type typeToConvert) 24public override IJSStreamReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Infrastructure\TaskGenericsUtil.cs (11)
11private static readonly ConcurrentDictionary<Type, ITaskResultGetter> _cachedResultGetters 12= new ConcurrentDictionary<Type, ITaskResultGetter>(); 14private static readonly ConcurrentDictionary<Type, ITcsResultSetter> _cachedResultSetters 15= new ConcurrentDictionary<Type, ITcsResultSetter>(); 23public static Type GetTaskCompletionSourceResultType(object taskCompletionSource) 30var resultType = GetTaskResultType(taskInstanceType); 39private static Type? GetTaskResultType(Type taskType) 57Type ResultType { get; } 83public Type ResultType => typeof(T); 108var resultType = tcsType.GetGenericArguments()[0];
JSRuntime.cs (1)
245var resultType = TaskGenericsUtil.GetTaskCompletionSourceResultType(tcs);
Microsoft.JSInterop.WebAssembly (2)
WebAssemblyJSObjectReferenceJsonConverter.cs (2)
19public override bool CanConvert(Type typeToConvert) 26public override IJSObjectReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Microsoft.NET.WebAssembly.Webcil (2)
WebcilReader.Reflection.cs (2)
42var types = new Type[] { typeof(Guid), typeof(int), typeof(string) }; 55var types = new Type[] { typeof(string), typeof(ImmutableArray<byte>) };
Microsoft.VisualBasic.Core (331)
Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (29)
139Dim Type1 As Type = MapTypeCodeToType(tc1) 140Dim Type2 As Type = MapTypeCodeToType(tc2) 300For Each interfaceConstraint As Type In GetInterfaceConstraints(sourceType) 313Dim classConstraint As Type = GetClassConstraint(sourceType) 335Dim classConstraint As Type = GetClassConstraint(targetType) 393Dim sourceElementType As Type = sourceArrayType.GetElementType 398Dim rawTargetInterface As Type = targetInterface.GetGenericTypeDefinition() 414GetType(System.Collections.Generic.IList(Of )).MakeGenericType(New Type() {sourceElementType})) 594Dim candidate As Type = types.Item(index) 621Dim candidate As Type = types.Item(index) 638ByVal targetType As Type, 639ByVal sourceType As Type, 759Dim sourceBases As List(Of Type) = New List(Of Type)(operatorSet.Count) 760Dim targetDeriveds As List(Of Type) = New List(Of Type)(operatorSet.Count) 761Dim sourceDeriveds As List(Of Type) = Nothing 762Dim targetBases As List(Of Type) = Nothing 765sourceDeriveds = New List(Of Type)(operatorSet.Count) 766targetBases = New List(Of Type)(operatorSet.Count) 1022Friend TargetType As Type 1023Friend SourceType As Type 1078ByVal targetType As Type, 1079ByVal sourceType As Type, 1099ByVal targetType As Type, 1100ByVal sourceType As Type, 1128Friend Type As Type 1180Friend Sub Insert(ByVal type As Type) 1194Friend Function Lookup(ByVal type As Type) As Boolean
Microsoft\VisualBasic\CompilerServices\Conversions.vb (19)
2332Dim ReflectedType As Type = GetType(T) 2371Private Shared Function CastSByteEnum(ByVal Expression As SByte, ByVal TargetType As Type) As Object 2376Private Shared Function CastByteEnum(ByVal Expression As Byte, ByVal TargetType As Type) As Object 2381Private Shared Function CastInt16Enum(ByVal Expression As Int16, ByVal TargetType As Type) As Object 2386Private Shared Function CastUInt16Enum(ByVal Expression As UInt16, ByVal TargetType As Type) As Object 2391Private Shared Function CastInt32Enum(ByVal Expression As Int32, ByVal TargetType As Type) As Object 2396Private Shared Function CastUInt32Enum(ByVal Expression As UInt32, ByVal TargetType As Type) As Object 2401Private Shared Function CastInt64Enum(ByVal Expression As Int64, ByVal TargetType As Type) As Object 2406Private Shared Function CastUInt64Enum(ByVal Expression As UInt64, ByVal TargetType As Type) As Object 2411Friend Shared Function ForceValueCopy(ByVal Expression As Object, ByVal TargetType As Type) As Object 2453Private Shared Function ChangeIntrinsicType(ByVal Expression As Object, ByVal TargetType As Type) As Object 2491ByVal TargetType As Type) As Object 2499ByVal TargetType As Type, 2516Dim SourceType As Type = Expression.GetType 2568ByVal TargetType As Type) As Object 2579ByVal TargetType As Type) As Object 2581Dim SourceType As Type = Expression.GetType 2674Friend Shared Function CanUserDefinedConvert(ByVal Expression As Object, ByVal TargetType As Type) As Boolean 2676Dim SourceType As Type = Expression.GetType
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (9)
821Public Sub New(ByVal t As Type) 1365Dim ObjectType As Type = GetType(Object) 1366Dim ObjectRefType As Type = ObjectType.MakeByRefType() 1367Dim CallSiteBinderType As Type = GetType(CallSiteBinder) 1370Dim CallSiteSignature(ArgLength + 2) As Type 1379Dim CallSiteDelegate As Type = Expression.GetDelegateType(CallSiteSignature) 1380Dim CallSiteType As Type = GetType(CallSite(Of )).MakeGenericType(CallSiteDelegate) 1450Dim delegateArgTypes(arguments.Length + 2) As Type 1477Dim delegateArgTypes(2) As Type
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (13)
57ByVal objType As Type, 218ByVal objType As Type, 244ByVal objType As Type, 257ByRef objType As Type, 480Private Shared Sub CheckForClassExtendingCOMClass(ByVal objType As Type) 497Dim objType As Type 658ByVal typ As Type, 734Dim objType As Type 763Dim elemType As Type 924ByVal objType As Type, 938ByVal objType As Type, 1069ByVal objType As Type, 1200ByVal objType As Type) As <DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)> IReflect
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (15)
368ByVal TypeArguments As Type(), 418ByVal typeArguments As Type(), 823ByVal Type As Type, 827ByVal TypeArguments() As Type, 862ByVal type As Type, 866ByVal typeArguments() As Type, 878ByVal Type As Type, 882ByVal TypeArguments As Type()) 909ByVal type As Type, 913ByVal typeArguments As Type()) 925ByVal Type As Type, 929ByVal TypeArguments As Type(), 1270Dim customModifierTypes As Type() = method?.ReturnParameter.GetRequiredCustomModifiers() 1272For Each customModifierType As Type In customModifierTypes 1288ByVal typeArguments As Type(),
Microsoft\VisualBasic\CompilerServices\ObjectFlowControl.vb (13)
39Private _enumType As Type 40Private _widestType As Type 52Private Shared Function GetWidestType(ByVal type1 As System.Type, ByVal type2 As System.Type) As Type 78Private Shared Function GetWidestType(ByVal type1 As System.Type, ByVal type2 As System.Type, ByVal type3 As System.Type) As Type 86ByVal sourceType As Type, 88ByVal targetType As Type) As Object 102ByVal forLoopArgumentType As Type) As Method 155Dim startType As Type = Start.GetType() 156Dim limitType As Type = Limit.GetType() 157Dim stepType As Type = StepValue.GetType() 159Dim widestType As Type = GetWidestType(stepType, startType, limitType) 185Dim currentEnumType As Type = Nothing 275Dim widestType As Type = GetWidestType(MapTypeCodeToType(counterTypeCode), loopFor._widestType)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (14)
232Friend Shared Function TypeFromTypeCode(ByVal vartyp As TypeCode) As Type 297Friend Shared Function IsWiderNumeric(ByVal Type1 As Type, ByVal Type2 As Type) As Boolean 327Friend Shared Function IsWideningConversion(ByVal FromType As Type, ByVal ToType As Type) As Boolean 1123Dim Type1 As Type 1210Dim Type1 As Type = Nothing 1211Dim Type2 As Type = Nothing 1307Dim Type1 As Type = Nothing 1308Dim Type2 As Type = Nothing 1404Dim Type1 As Type = Nothing 1405Dim Type2 As Type = Nothing 3516Friend Overloads Shared Function CTypeHelper(ByVal obj As Object, ByVal toType As Type) As Object 3550Dim toTypeCode As TypeCode = Type.GetTypeCode(toType)
Microsoft\VisualBasic\CompilerServices\Operators.Resolution.vb (3)
61Dim commonAncestor As Type = type1 133Dim leftType As Type 134Dim rightType As Type = Nothing
Microsoft\VisualBasic\CompilerServices\Operators.vb (34)
54Private Shared Function GetEnumResult(ByVal left As Object, ByVal right As Object) As Type 68Dim leftType As Type = left.GetType 1192Private Shared Function NotSByte(ByVal operand As SByte, ByVal operandType As Type) As Object 1201Private Shared Function NotByte(ByVal operand As Byte, ByVal operandType As Type) As Object 1210Private Shared Function NotInt16(ByVal operand As Int16, ByVal operandType As Type) As Object 1219Private Shared Function NotUInt16(ByVal operand As UInt16, ByVal operandType As Type) As Object 1228Private Shared Function NotInt32(ByVal operand As Int32, ByVal operandType As Type) As Object 1237Private Shared Function NotUInt32(ByVal operand As UInt32, ByVal operandType As Type) As Object 1250Private Shared Function NotInt64(ByVal operand As Int64, ByVal operandType As Type) As Object 1259Private Shared Function NotUInt64(ByVal operand As UInt64, ByVal operandType As Type) As Object 1592Private Shared Function AndSByte(ByVal left As SByte, ByVal right As SByte, Optional ByVal enumType As Type = Nothing) As Object 1599Private Shared Function AndByte(ByVal left As Byte, ByVal right As Byte, Optional ByVal enumType As Type = Nothing) As Object 1606Private Shared Function AndInt16(ByVal left As Int16, ByVal right As Int16, Optional ByVal enumType As Type = Nothing) As Object 1613Private Shared Function AndUInt16(ByVal left As UInt16, ByVal right As UInt16, Optional ByVal enumType As Type = Nothing) As Object 1620Private Shared Function AndInt32(ByVal left As Int32, ByVal right As Int32, Optional ByVal enumType As Type = Nothing) As Object 1627Private Shared Function AndUInt32(ByVal left As UInt32, ByVal right As UInt32, Optional ByVal enumType As Type = Nothing) As Object 1634Private Shared Function AndInt64(ByVal left As Int64, ByVal right As Int64, Optional ByVal enumType As Type = Nothing) As Object 1641Private Shared Function AndUInt64(ByVal left As UInt64, ByVal right As UInt64, Optional ByVal enumType As Type = Nothing) As Object 1964Private Shared Function OrSByte(ByVal left As SByte, ByVal right As SByte, Optional ByVal enumType As Type = Nothing) As Object 1971Private Shared Function OrByte(ByVal left As Byte, ByVal right As Byte, Optional ByVal enumType As Type = Nothing) As Object 1978Private Shared Function OrInt16(ByVal left As Int16, ByVal right As Int16, Optional ByVal enumType As Type = Nothing) As Object 1985Private Shared Function OrUInt16(ByVal left As UInt16, ByVal right As UInt16, Optional ByVal enumType As Type = Nothing) As Object 1992Private Shared Function OrInt32(ByVal left As Int32, ByVal right As Int32, Optional ByVal enumType As Type = Nothing) As Object 1999Private Shared Function OrUInt32(ByVal left As UInt32, ByVal right As UInt32, Optional ByVal enumType As Type = Nothing) As Object 2006Private Shared Function OrInt64(ByVal left As Int64, ByVal right As Int64, Optional ByVal enumType As Type = Nothing) As Object 2013Private Shared Function OrUInt64(ByVal left As UInt64, ByVal right As UInt64, Optional ByVal enumType As Type = Nothing) As Object 2357Private Shared Function XorSByte(ByVal left As SByte, ByVal right As SByte, Optional ByVal enumType As Type = Nothing) As Object 2364Private Shared Function XorByte(ByVal left As Byte, ByVal right As Byte, Optional ByVal enumType As Type = Nothing) As Object 2371Private Shared Function XorInt16(ByVal left As Int16, ByVal right As Int16, Optional ByVal enumType As Type = Nothing) As Object 2378Private Shared Function XorUInt16(ByVal left As UInt16, ByVal right As UInt16, Optional ByVal enumType As Type = Nothing) As Object 2385Private Shared Function XorInt32(ByVal left As Int32, ByVal right As Int32, Optional ByVal enumType As Type = Nothing) As Object 2392Private Shared Function XorUInt32(ByVal left As UInt32, ByVal right As UInt32, Optional ByVal enumType As Type = Nothing) As Object 2399Private Shared Function XorInt64(ByVal left As Int64, ByVal right As Int64, Optional ByVal enumType As Type = Nothing) As Object 2406Private Shared Function XorUInt64(ByVal left As UInt64, ByVal right As UInt64, Optional ByVal enumType As Type = Nothing) As Object
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (65)
67Dim type1 As Type = shorterSignature(i).ParameterType 68Dim type2 As Type = longerSignature(i).ParameterType 90ByVal leftType As Type, 91ByVal rightType As Type, 121ByVal argumentType As Type, 134Dim leftType As Type = leftParameter.ParameterType 135Dim rightType As Type = rightParameter.ParameterType 235Dim leftType As Type = leftParameter.ParameterType 236Dim rightType As Type = rightParameter.ParameterType 240Dim rawLeftType As Type = rawLeftParameter.ParameterType 241Dim rawRightType As Type = rawRightParameter.ParameterType 303Dim leftType As Type = leftParameter.ParameterType 304Dim rightType As Type = rightParameter.ParameterType 308Dim rawLeftType As Type = rawLeftParameter.ParameterType 309Dim rawRightType As Type = rawRightParameter.ParameterType 342Dim leftDeclaringType As Type = leftMember.RawDeclaringType 343Dim rightDeclaringType As Type = rightMember.RawDeclaringType 486ByVal typeArguments As Type(), 718ByVal typeArguments As Type(), 745Dim currentScope As Type = members(index).DeclaringType 927ByVal targetType As Type, 928ByVal sourceType As Type, 985ByVal argumentType As Type, 986ByVal parameterType As Type, 987ByVal typeInferenceArguments As Type(), 1014Dim rawGenericParameterType As Type = parameterType.GetGenericTypeDefinition 1031GetType(System.Collections.Generic.IList(Of )).MakeGenericType(New Type() {argumentType.GetElementType}) 1057Dim base As Type = argumentType.BaseType 1073Dim implementedMatch As Type = Nothing 1074For Each implemented As Type In argumentType.GetInterfaces 1110ByVal argumentType As Type, 1111ByVal parameterType As Type, 1112ByVal typeInferenceArguments As Type(), 1145Dim bestMatchType As Type = Nothing 1153For Each possibleGenericType As Type In argumentType.GetInterfaces 1168Dim parameterTypeParameters As Type() = GetTypeArguments(parameterType) 1169Dim argumentTypeArguments As Type() = GetTypeArguments(bestMatchType) 1224Dim parameterType As Type = parameter.ParameterType 1225Dim argumentType As Type = GetArgumentType(argument) 1244Dim parameterType As Type = parameter.ParameterType 1250Dim argumentType As Type = GetArgumentType(argument) 1312Dim parameterType As Type = parameter.ParameterType 1318Dim argumentType As Type = GetArgumentType(argument) 1341ByVal parameterType As Type) As Object 1371Dim argumentType As Type = GetArgumentType(argument) 1412ByVal typeArguments As Type(), 1433typeArguments = New Type(targetProcedure.TypeParameters.Length - 1) {} 1668ByVal typeArguments As Type(), 1850ByVal typeArguments As Type(), 2059ByVal typeArguments As Type(), 2111ByVal typeArguments As Type()) 2131Private Shared Function GetArgumentType(ByVal argument As Object) As Type 2169Dim argumentType As Type = GetArgumentType(arguments(argIndex)) 2240Dim argumentType As Type = GetArgumentType(arguments(argIndex)) 2459ByVal substitution2 As Type, 2460ByVal substitution3 As Type) 2507ByVal typeArguments As Type(), 2517ByVal typeArguments As Type(), 2586ByVal typeArguments As Type(), 2608ByVal typeArguments As Type(), 2628ByVal typeArguments As Type(), 2650ByVal typeArguments As Type(), 2669ByVal typeArguments As Type(), 2703ByVal typeArguments As Type(), 2803ByVal typeArguments As Type(),
Microsoft\VisualBasic\CompilerServices\StructUtils.vb (1)
181Select Case Type.GetTypeCode(FieldType)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (45)
60Friend Shared ReadOnly NoTypeArguments As Type() = Array.Empty(Of Type)() 61Friend Shared ReadOnly NoTypeParameters As Type() = Array.Empty(Of Type)() 205Friend Shared Function MapTypeCodeToType(ByVal typeCode As TypeCode) As <DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)> Type 434For Each implemented As Type In implementor.GetInterfaces 459For Each typeConstraint As Type In derived.GetGenericParameterConstraints 467For Each baseInterface As Type In derived.GetInterfaces 481Friend Shared Function IsGeneric(ByVal type As Type) As Boolean 485Friend Shared Function IsInstantiatedGeneric(ByVal type As Type) As Boolean 510Friend Shared Function GetTypeParameters(ByVal member As MemberInfo) As Type() 516Friend Shared Function GetTypeArguments(ByVal type As Type) As Type() 521Friend Shared Function GetInterfaceConstraints(<DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)> ByVal genericParameter As Type) As Type() 527Friend Shared Function GetClassConstraint(ByVal genericParameter As Type) As Type 533Dim classConstraint As Type = genericParameter.BaseType 538Friend Shared Function IndexIn(ByVal possibleGenericParameter As Type, ByVal genericMethodDef As MethodBase) As Integer 552Friend Shared Function RefersToGenericParameter(ByVal referringType As Type, ByVal method As MethodBase) As Boolean 571For Each param As Type In GetTypeArguments(referringType) 592Friend Shared Function RefersToGenericParameterCLRSemantics(ByVal referringType As Type, ByVal typ As Type) As Boolean 609For Each param As Type In GetTypeArguments(referringType) 677Friend Shared Function GetElementType(ByVal type As System.Type) As Type 684ByVal returnType As Type) As Boolean 757Dim leftType As Type = left.DeclaringType 758Dim rightType As Type = right.DeclaringType 778Private ReadOnly _type As Type 793ByVal type As Type) 809Dim curType As Type = _type 870Dim returnType As Type = Nothing 941For Each implemented As Type In _type.GetInterfaces() 968Dim classConstraint As Type = GetClassConstraint(_type) 1005For Each implemented As Type In _type.GetInterfaces() 1018Private Function LookupDefaultMembers(ByRef defaultMemberName As String, ByVal searchType As Type) As MemberInfo() 1027Dim current As Type = searchType 1212Dim elementType As Type = _type.GetElementType 1309Private _rawDeclaringType As Type 'The uninstantiated type containing this method. 1321Friend TypeArguments As Type() 'Set of type arguments either supplied or inferred for this method. 1404Friend ReadOnly Property DeclaringType() As Type 1410Friend ReadOnly Property RawDeclaringType() As Type 1460Friend ReadOnly Property TypeParameters() As Type() 1555Friend ReadOnly Type As Type 1557Friend Sub New(ByVal type As Type)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (7)
49Private Shared ReadOnly s_voidType As Type = System.Type.GetType("System.Void") 441Private Shared Function GetArraySuffixAndElementType(ByRef typ As Type) As String 465Private Shared Function GetGenericArgsSuffix(ByVal typ As Type) As String 471Dim typeArgs As Type() = typ.GetGenericArguments 503Dim parameterType As Type = parameter.ParameterType 594For Each t As Type In GetTypeParameters(method) 637Dim propertyType As Type
Microsoft\VisualBasic\CompilerServices\Utils.vb (15)
124Public Function GetTypeCode(type As Type) As TypeCode 125Return Type.GetTypeCode(type) 236Private Function IsGenericallyEqual(t1 As Type, t2 As Type) As Boolean 247Dim t1def As Type = If(t1.IsConstructedGenericType, t1.GetGenericTypeDefinition(), t1) 248Dim t2def As Type = If(t2.IsConstructedGenericType, t2.GetGenericTypeDefinition(), t2) 259Private Function IsGenericallyEquivalentTo(t1 As Type, t2 As Type, member1 As MemberInfo, member2 As MemberInfo) As Boolean 295Dim args1 As Type() = t1.GetGenericArguments() 296Dim args2 As Type() = t2.GetGenericArguments() 321Private Function IsTypeParameterEquivalentToTypeInst(typeParam As Type, typeInst As Type, member As MemberInfo) As Boolean 334Dim args As Type() = If(method.IsGenericMethod, method.GetGenericArguments(), Nothing) 350Dim MemberInfo As Type = GetType(MethodBase) 351Dim [property] As PropertyInfo = MemberInfo.GetProperty("MetadataToken", GetType(Integer), Array.Empty(Of Type)())
Microsoft\VisualBasic\CompilerServices\VB6File.vb (8)
151Select Case Type.GetTypeCode(FieldType) 266Select Case Type.GetTypeCode(FieldType) 901Select Case Type.GetTypeCode(typ) 2137Dim typ As Type 2171Select Case Type.GetTypeCode(typ) 2233Dim SpcInfoType As Type = GetType(SpcInfo) 2234Dim CurrentType As Type = SpcInfoType 2264Select Case Type.GetTypeCode(CurrentType)
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (4)
208Select Case Type.GetTypeCode(typ) 307Dim typ As Type = Value.GetType().GetElementType 435Dim typ As Type 456Select Case Type.GetTypeCode(typ)
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (21)
156Dim ArgTypes() As Type 157Dim ArgType As Type = Nothing 158Dim ParmType As Type = Nothing 159Dim ParamArrayElementType As Type = Nothing 524ArgTypes = New Type(args.Length - 1) {} 609If (ArgType Is Type.Missing) AndAlso Parameters(ParmIndex).IsOptional Then 826If (ArgType Is Type.Missing) AndAlso Parameters(ParmIndex).IsOptional Then 1260Dim Type0, Type1 As Type 1265Dim ParamArrayElementType0 As Type = Nothing 1266Dim ParamArrayElementType1 As Type = Nothing 1480Dim paramType0, paramType1 As Type 1526Dim paramType1, paramType2 As Type 1593Public Overrides Function SelectMethod(ByVal bindingAttr As BindingFlags, ByVal match() As MethodBase, ByVal types() As Type, ByVal modifiers() As ParameterModifier) As MethodBase 1600Public Overrides Function SelectProperty(ByVal bindingAttr As BindingFlags, ByVal match() As PropertyInfo, ByVal returnType As Type, ByVal indexes() As Type, ByVal modifiers() As ParameterModifier) As PropertyInfo 1608Dim Type0, Type1 As Type 1756Public Overrides Function ChangeType(ByVal value As Object, ByVal typ As Type, ByVal culture As CultureInfo) As Object 1769Private Function BindingScore(ByVal Parameters() As ParameterInfo, ByVal paramOrder() As Integer, ByVal ArgTypes() As Type, ByVal IsPropertySet As Boolean, ByVal ParamArrayIndex As Integer) As BindScore 1772Dim ArgType, ParmType As Type 2036Private Function GetDefaultMemberName(ByVal typ As Type) As String 2255Friend Shared Sub SecurityCheckForLateboundCalls(ByVal member As MemberInfo, ByVal objType As Type, ByVal objIReflect As IReflect)
Microsoft\VisualBasic\ErrObject.vb (1)
370Dim typ As Type = e.GetType()
Microsoft\VisualBasic\FileIO\SpecialDirectories.vb (2)
165Dim type As Type = Type.GetType($"{typeName}, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError:=False)
Microsoft\VisualBasic\Information.vb (2)
285Select Case Type.GetTypeCode(typ) 450tc = Type.GetTypeCode(typ)
Microsoft\VisualBasic\Interaction.vb (7)
138Dim type As Type = Type.GetType("Microsoft.VisualBasic._Interaction, Microsoft.VisualBasic.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError:=False) 506Dim t As Type 523t = Type.GetTypeFromProgID(ProgId) 525t = Type.GetTypeFromProgID(ProgId, ServerName, True) 564Dim t As Type = Type.GetTypeFromProgID([Class])
Microsoft\VisualBasic\Strings.vb (4)
25Private Function GetFormat(ByVal service As Type) As Object Implements IFormatProvider.GetFormat 1347Dim typ As Type 1430Dim typ As Type 1792Dim typ As Type
Microsoft.Win32.Registry (3)
artifacts\obj\Microsoft.Win32.Registry\Debug\net9.0\Microsoft.Win32.Registry.notsupported.cs (3)
161public override System.Type AccessRightType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Registry); } } 162public override System.Type AccessRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Registry); } } 163public override System.Type AuditRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Registry); } }
MockHostTypes (1)
ServiceProvider.cs (1)
10public object GetService(Type serviceType) => null;
MonoTargetsTasks (4)
JsonToItemsTaskFactory\JsonToItemsTaskFactory.cs (3)
68public Type TaskType => typeof(JsonToItemsTask); 346public override Dictionary<string, string> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 360public override JsonModelItem Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
RuntimeConfigParser\RuntimeConfigParser.cs (1)
161public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
MSBuild (46)
BuildEnvironmentHelper.cs (1)
399var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
LoadedType.cs (5)
30internal LoadedType(Type type, AssemblyLoadInfo assemblyLoadInfo, Assembly loadedAssembly, Type iTaskItemType, bool loadedViaMetadataLoadContext = false) 50Type t = type; 95Type pt = props[i].PropertyType; 164internal Type Type { get; private set; }
LogMessagePacketBase.cs (4)
422Type eventDerivedType = _buildEvent.GetType(); 502Type eventDerivedType = _buildEvent.GetType(); 580private static Delegate CreateDelegateRobust(Type type, Object firstArgument, MethodInfo methodInfo) 669Type eventType = eventArg.GetType();
PrintLineDebugger.cs (1)
26var commonWriterType = typeof(ITask).Assembly.GetType("Microsoft.Build.Shared.Debugging.CommonWriter", true, false);
ReflectableTaskPropertyInfo.cs (2)
27private Type _taskType; 34internal ReflectableTaskPropertyInfo(TaskPropertyInfo taskPropertyInfo, Type taskType)
TaskLoader.cs (2)
35internal static bool IsTaskClass(Type type, object unused) 138Type taskType = taskInstanceInOtherAppDomain.GetType();
TaskParameter.cs (4)
105Type wrappedParameterType = wrappedParameter.GetType(); 122TypeCode typeCode = Type.GetTypeCode(wrappedParameterType.GetElementType()); 168TypeCode typeCode = Type.GetTypeCode(wrappedParameterType); 635Type elementType = _parameterTypeCode switch
TaskParameterTypeVerifier.cs (6)
23internal static bool IsValidScalarInputParameter(Type parameterType) => 29internal static bool IsValidVectorInputParameter(Type parameterType) 40internal static bool IsAssignableToITask(Type parameterType) 50internal static bool IsValueTypeOutputParameter(Type parameterType) 62internal static bool IsValidInputParameter(Type parameterType) 70internal static bool IsValidOutputParameter(Type parameterType)
TypeLoader.cs (19)
34private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 39private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 44private Func<Type, object, bool> _isDesiredType; 68internal TypeLoader(Func<Type, object, bool> isDesiredType) 241private LoadedType GetLoadedType(ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> cache, string typeName, AssemblyLoadInfo assembly, bool useTaskHost) 273private Func<Type, object, bool> _isDesiredType; 283private ConcurrentDictionary<string, Type> _typeNameToType; 288private Dictionary<string, Type> _publicTypeNameToType; 307internal AssemblyInfoToLoadedTypes(Func<Type, object, bool> typeFilter, AssemblyLoadInfo loadInfo) 315_publicTypeNameToType = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 332Type type = _typeNameToType.GetOrAdd(typeName, (key) => 339Type t2 = Type.GetType(typeName + "," + _assemblyLoadInfo.AssemblyName, false /* don't throw on error */, true /* case-insensitive */); 365foreach (KeyValuePair<string, Type> desiredTypeInAssembly in _publicTypeNameToType) 387foreach (Type publicType in loadedAssembly.GetExportedTypes()) 417Type[] allPublicTypesInAssembly = _loadedAssembly.GetExportedTypes(); 418foreach (Type publicType in allPublicTypesInAssembly)
XMake.cs (2)
1327Type t1 = loggers[0].GetType(); 1328Type t2 = typeof(ConsoleLogger);
MSBuildTaskHost (40)
AssemblyUtilities.cs (2)
69public static Type GetTypeInfo(this Type t)
BinaryTranslator.cs (1)
484Type enumType = value.GetType();
BuildEnvironmentHelper.cs (1)
399var testInfoType = frameworkAssembly.GetType("Microsoft.Build.Framework.TestInfo");
BuildExceptionSerializationHelper.cs (5)
14public TypeConstructionTuple(Type type, Func<string, Exception?, BuildExceptionBase> factory) 20public Type Type { get; } 29internal static bool IsSupportedExceptionType(Type type) 53Type exceptionType = typeConstructionTuple.Type; 71internal static string GetExceptionSerializationKey(Type exceptionType)
Concurrent\ConcurrentDictionary.cs (2)
66Type valueType = typeof(TValue); 72switch (Type.GetTypeCode(valueType))
LoadedType.cs (3)
30internal LoadedType(Type type, AssemblyLoadInfo assemblyLoadInfo, Assembly loadedAssembly, Type iTaskItemType, bool loadedViaMetadataLoadContext = false) 164internal Type Type { get; private set; }
LogMessagePacketBase.cs (4)
422Type eventDerivedType = _buildEvent.GetType(); 502Type eventDerivedType = _buildEvent.GetType(); 580private static Delegate CreateDelegateRobust(Type type, Object firstArgument, MethodInfo methodInfo) 669Type eventType = eventArg.GetType();
TaskLoader.cs (2)
35internal static bool IsTaskClass(Type type, object unused) 138Type taskType = taskInstanceInOtherAppDomain.GetType();
TaskParameter.cs (4)
105Type wrappedParameterType = wrappedParameter.GetType(); 122TypeCode typeCode = Type.GetTypeCode(wrappedParameterType.GetElementType()); 168TypeCode typeCode = Type.GetTypeCode(wrappedParameterType); 635Type elementType = _parameterTypeCode switch
TaskParameterTypeVerifier.cs (6)
23internal static bool IsValidScalarInputParameter(Type parameterType) => 29internal static bool IsValidVectorInputParameter(Type parameterType) 40internal static bool IsAssignableToITask(Type parameterType) 50internal static bool IsValueTypeOutputParameter(Type parameterType) 62internal static bool IsValidInputParameter(Type parameterType) 70internal static bool IsValidOutputParameter(Type parameterType)
TypeLoader.cs (10)
199private Concurrent.ConcurrentDictionary<string, Type> _typeNameToType; 204private Dictionary<string, Type> _publicTypeNameToType; 228_typeNameToType = new Concurrent.ConcurrentDictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 229_publicTypeNameToType = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 241Type type = _typeNameToType.GetOrAdd(typeName, (key) => 248Type t2 = Type.GetType(typeName + "," + _assemblyLoadInfo.AssemblyName, false /* don't throw on error */, true /* case-insensitive */); 274foreach (KeyValuePair<string, Type> desiredTypeInAssembly in _publicTypeNameToType) 316Type[] allPublicTypesInAssembly = _loadedAssembly.GetExportedTypes(); 317foreach (Type publicType in allPublicTypesInAssembly)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1208[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Type))]
Mvc.Api.Analyzers.Test (11)
ActualApiResponseMetadataFactoryTest.cs (1)
441var controllerType = variant switch
MvcFactsTest.cs (5)
14private static readonly Type TestIsControllerActionType = typeof(TestIsControllerAction); 63private async Task IsControllerReturnsFalse(Type type) 77private async Task IsControllerReturnsTrue(Type type) 147private async Task IsActionReturnsFalse(Type type, string methodName) 194private async Task IsActionReturnsTrue(Type type, string methodName)
SymbolApiConventionMatcherTest.cs (2)
270public async Task IsTypeMatch_WithAny_ReturnsTrue(Type type, Type conventionType)
SymbolApiResponseMetadataProviderTest.cs (2)
293var type = typeof(GetDeclaredResponseMetadata_ApiConventionTypeAttributeOnType); 315var type = typeof(GetDeclaredResponseMetadata_ApiConventionTypeAttributeOnBaseType);
TestFiles\SymbolApiResponseMetadataProviderTest\GetResponseMetadataTests.cs (1)
59public Type Type { get; set; }
Mvc.RoutingWebSite (3)
ControllerRouteTokenTransformerConvention.cs (2)
10private readonly Type _controllerType; 12public ControllerRouteTokenTransformerConvention(Type controllerType, IOutboundParameterTransformer parameterTransformer)
RemoveControllerActionDescriptorProvider.cs (1)
45public Type ControllerType { get; set; }
netstandard (1)
netstandard.cs (1)
2209[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Type))]
PresentationBuildTasks (405)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (28)
1045Type eventTarget; 1783private CodeExpression GetPropertyValueExpression(ITypeDescriptorContext ctx, Type typeToConvertTo, Object value, string attributeValue) 1893private Type GetEventHandlerType(MemberInfo memberInfo) 1895Type eventHandlerType = null; 1928Type eventTarget = cc != null ? cc.ElementType : miEvent.DeclaringType; 1936Type eventHandlerType = GetEventHandlerType(miEvent); 1973private CodeStatement AddCLREvent(Type eventTarget, CodeContext cc, CodeExpression ce, MarkupEventInfo mei) 2036Type eventHandlerType = GetEventHandlerType(mei.mi); 2181Type resourceDictionary = KnownTypes.Types[(int)KnownElements.ResourceDictionary]; 2182Type iNameScope = KnownTypes.Types[(int)KnownElements.INameScope]; 2186Type t = ((CodeContext)contexts[i]).ElementType; 2256Type currTypeArg = parserContext.XamlTypeMapper.GetTypeArgsType(_typeArgsList[i].Trim(), 2298private static CodeTypeReference GenerateConstructedTypeReference(Type t, string [] typeArgsList, string genericName) 2343private static CodeTypeReference GenerateConstructedTypeReference(Type t, string [] typeArgsList, Type refType, string refTypeFullName, string eventName) 2350Type[] refTypeParams = null; 2352Type[] typeParams = t.GetGenericArguments(); 2369foreach (Type typeParam in typeParams) 2450private CodeTypeDeclaration GenerateClass(string className, ref string modifier, Type baseClass, string baseClassFullName) 2494private CodeContext GenerateSubClass(ref string className, ref string modifier, Type baseClass, string baseClassFullName) 2569CodeParameterDeclarationExpression param1 = new CodeParameterDeclarationExpression(typeof(Type), DELEGATETYPE); 2762CodeParameterDeclarationExpression param1 = new CodeParameterDeclarationExpression(typeof(Type), TYPE); 2861param1 = new CodeParameterDeclarationExpression(typeof(Type), DELEGATETYPE); 2966internal string StartElement(ref string className, string subClassFullName, ref string modifier, Type elementType, string baseClassFullName) 3337internal CodeContext(Type elementType, string [] typeArgsList, string localElementFullName) 3344internal Type ElementType 3386private Type _elementType = null; 3396Type elementType,
MS\Internal\MarkupCompiler\ParserExtension.cs (4)
102Type rootType = isRootPublic ? xamlObjectNode.ElementType : typeof(ParserExtension); 288Type ownerTagType = typeAndSerializer.ObjectType; 398ref Type baseType, 399ref Type serializerType)
src\Microsoft.DotNet.Wpf\src\Common\src\System\AppContextDefaultValues.cs (2)
81Type tAppDomainSetup = Type.GetType("System.AppDomainSetup");
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\AttributeData.cs (8)
71Type targetType, 73Type declaringType, 76Type serializerType, 97internal Type SerializerType; // Type of serializer (if any) 128Type targetType, 130Type declaringType, 149internal Type TargetType; // Target type 150internal Type DeclaringType; // Type where Attribute is declared
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlMapTable.cs (28)
102internal static Type GetKnownTypeFromId(short id) 131Type probeType = KnownTypes.Types[probe]; 166internal static short GetKnownTypeIdFromType(Type type) 288internal Type GetKnownConverterTypeFromType(Type type) 309if (type == typeof(System.Type)) 334private static Type GetKnownConverterTypeFromPropName( 335Type propOwnerType, 961internal short GetAttributeOrTypeId(BinaryWriter binaryWriter, Type declaringType, string memberName, out short typeId) 1215Type elementType, 1299Type owningType, // Actual type of the object the owns or declares this attribute 1301Type attributeType, // Type of the attribute or property itself; not its owner type 1312Type owningType, // Actual type of the object the owns or declares this attribute 1314Type attributeType, // Type of the attribute or property itself; not its owner type 1326Type serializerType = XamlTypeMapper.GetXamlSerializerForType(owningType); 1377Type ownerType, // Type of object that owns or declares this attribute 1378Type attributeType, // Type of the attribute or property itself; not its owner type 1382out Type converterOrSerializerType) 1493Type defaultTargetType) 1496Type targetType = null; 1542Type declaringType, // Type of object that owns or declares this attribute 1543Type attributeType) // Type of the attribute or property itself; not its owner type 1561private Type GetCustomConverter( 1563Type ownerType, // Type of object that owns or declares this attribute 1565Type attributeType) // Type of the attribute or property itself; not its owner type 1568Type converterType = GetKnownConverterTypeFromPropName(ownerType, fieldName); 1602private Type GetCustomSerializer( 1603Type type,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (6)
473static internal bool TreatAsIAddChild(Type parentObjectType) 478static internal BamlRecordType GetPropertyStartRecordType(Type propertyType, bool propertyCanWrite) 2655internal Type ValueType 2670internal Type SerializerType 2684Type _valueType; 2687Type _serializerType;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (3)
983Type converterOrSerializerType; 1019Type ownerType = _xamlTypeMapper.GetDependencyPropertyOwnerAndName(xamlProperty.Value, 1084Type typeValue = _xamlTypeMapper.GetTypeFromBaseString(xamlPropertyNode.Value,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\KnownTypes.cs (2)
4776private Type InitializeOneType(KnownElements knownElement) 4778Type t = null;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\KnownTypesHelper.cs (4)
50_typeTable =new Type[size]; 53public System.Type this[int index] 57Type t = _typeTable[index]; 78private Type[] _typeTable;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (25)
43ref Type baseType, 44ref Type serializerType); 71Type declaringType, // Type where propIdName is declared 96Type declaringType, 156private KnownElements GetKnownExtensionFromType(Type extensionType, out string propName) 196Type extensionType, 233Type extensionType, 307Type targetType) 451Type declaringType, // Type where attribute is declared 462Type targetType; 463Type serializerType; 485Type declaringType, // Type where propIdName is declared 498Type targetType; 499Type serializerType; 559out Type targetType, 560out Type serializerType) 646Type propertyType; 919Type extensionType) 1205private ParameterInfo[] FindLongestConstructor(Type extensionType, out int maxConstructorArguments) 1383Type declaringType; 1499Type parentType, 1517Type declaringType; 1552Type typeValue = _parserContext.XamlTypeMapper.GetTypeFromBaseString(value, 1652Type elementBaseType, 1659out Type declaringType, // type of the object that the field is on
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (11)
199internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(Type type) 239_targetType = (Type) _langSpaceStack.Pop(); 314internal Type TargetType 701internal Dictionary<Type, Dictionary<string, SpecialBracketCharacters>> MasterBracketCharacterCache 707_masterBracketCharacterCache = new Dictionary<Type, Dictionary<string, SpecialBracketCharacters>>(); 828private Type _targetType; 829private Dictionary<Type, Dictionary<string, SpecialBracketCharacters>> _masterBracketCharacterCache; 849private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(Type extensionType) 853Type constructorArgumentType = null; 854Type markupExtensionBracketCharacterType = null; 864Type attributeType = attributeData.AttributeType;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleXamlParser.cs (4)
298Type ownerTagType = typeAndSerializer.ObjectType; 411Type targetType = null; 555Type propertyType = XamlTypeMapper.GetPropertyType(_setterOrTriggerPropertyInfo); 1586Type _styleTargetTypeType;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (17)
334Type ownerTagType = typeAndSerializer.ObjectType; 459Type targetType = null; 470targetType = _IDTypes[_setterTargetNameOrConditionSourceName] as Type; 577Type propertyType = XamlTypeMapper.GetPropertyType(_setterOrTriggerPropertyMemberInfo); 833private void CommonElementStartProcessing (XamlNode xamlNode, Type elementType, ref StyleMode mode) 927private Type TargetType 1366xamlClrEventNode.ListenerType = (Type) _elementTypeStack.Peek(); 1494_IDTypes[xamlPropertyNode.Value] = _elementTypeStack.Peek() as Type; 1543Type t = (Type)_elementTypeStack.Peek(); 1770private Type ItemContainerTemplateType 1782private Type ItemContainerTemplateKeyType 1822Type _templateTargetTypeType; 1825Type _defaultTargetType; 1860Type _templateKeyType; 1863private static Type _itemContainerTemplateType; 1866private static Type _itemContainerTemplateKeyType;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TypeContext.cs (1)
69virtual public object GetService(Type serviceType)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlNodes.cs (40)
374Type converterType) 392internal Type ConverterType 407Type _converterType = null; 483internal Type PropDeclaringType 500internal Type PropValidType 527Type _validType; 528Type _declaringType; 665internal Type DefaultTargetType 675Type _defaultTargetType; 763internal Type ValueDeclaringType 805internal Type ValuePropertyType 870internal Type DefaultTargetType 907Type _valueDeclaringType; 909Type _valuePropertyType; 914Type _defaultTargetType; 936Type valueElementType, // Actual type of the valueTypeFullname. 975internal Type ValueElementType 1000Type _valueElementType; 1093Type elementType, 1094Type serializerType) 1116Type elementType, 1117Type serializerType, 1154internal Type ElementType 1165internal Type SerializerType 1214Type _elementType; 1215Type _serializerType; 1271Type valueElementType) // Actual type of the valueTypeFullname. 1299internal Type ValueElementType 1306Type _valueElementType; 1692internal Type ListenerType 1769private Type _listenerType; 2075Type valueType) // Actual Type, if known. 2093internal Type ValueType 2099Type _valueType; 2160Type elementType, 2161Type serializerType) 2254internal Type PropDeclaringType 2271internal Type PropValidType 2285Type _declaringType; 2286Type _validType;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParseException.cs (1)
424Type objectType
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (2)
1073ref Type baseType, 1074ref Type serializerType)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (117)
181ref Type baseType, 182ref Type serializerType) 236private static bool IsACollection(Type type) 255Type contentPropertyType = XamlTypeMapper.GetPropertyType(context.ContentPropertyInfo); 278Type t = ((Type)context.ContextData); 475ref Type baseType, 476ref Type serializerType) 625Type elementType, 626Type serializerType, 635ReflectionHelper.GetMscorlibType(typeof(IDictionary)).IsAssignableFrom(ParentContext.ContextData as Type)); 673Type elementType = (Type) CurrentContext.ContextDataType; 681Type propertyDeclaringType; 698Type converterType, 800Type typeValue = XamlTypeMapper.GetTypeFromBaseString(value, 850Type valueElementType, // Actual type of the valueTypeFullname. 870Type declaringType, // Type that corresponds to declaringTypeFullName (where the property is declared) 878Type propType = XamlTypeMapper.GetPropertyType(propertyMember); 1081Type valueElementType) 1147ref Type baseType, // Type of the dynamicObject - PropertyInfo, MethodInfo or DependencyProperty 1149ref Type declaringType) // Actual type corresponding to typeFullName 1342bool GetTrimSurroundingWhitespace(Type type) 1438delegate bool ContentValidator(Type type); 1472public Type ContextDataType 1479return _contextData as Type; 1536internal Type ChildPropertyType 1647Type _childPropertyType; 1692Type elementBaseType, 1699out Type declaringType, // type of the object that the field is on 1769Type elementBaseType, 1777ref Type declaringType, // type of the object that the field is on 1885static string GetContentPropertyName(Type type) 1914Type baseType = type; 1915Type attrType = KnownTypes.Types[(int)KnownElements.ContentPropertyAttribute]; 1916Type DOType = KnownTypes.Types[(int)KnownElements.DependencyObject]; 1917Type FEType = KnownTypes.Types[(int)KnownElements.FrameworkElement]; 1918Type FCEType = KnownTypes.Types[(int)KnownElements.FrameworkContentElement]; 2194Type elementType, 2292Type dependencyObjectType = KnownTypes.Types[(int)KnownElements.DependencyObject]; 2757Type parentType, // Type of parent, if known 2822Type declaringType = null; 2978Type parentType, 3014parentType.GetConstructor(Type.EmptyTypes) == null || 3068Type valueElementType = null; 3069Type valueSerializerType = null; 3120Type pType = ParentContext.ContextData as Type; 3170Type parentType, 3180Type declaringType, 3242Type propType; 3293parentType.GetConstructor(Type.EmptyTypes) == null || 3302if (propType == ReflectionHelper.GetMscorlibType(typeof(Type))) 3336Type parentType = XamlTypeMapper.GetType(parentTypeNamespace, parentTypeName); 3342private string GetRuntimeNamePropertyName(Type objectType) 3416Type baseType = objectType; 3417Type attrType = KnownTypes.Types[(int)KnownElements.RuntimeNamePropertyAttribute]; 3418Type TimelineType = KnownTypes.Types[(int)KnownElements.Timeline]; 3419Type FEType = KnownTypes.Types[(int)KnownElements.FrameworkElement]; 3420Type FCEType = KnownTypes.Types[(int)KnownElements.FrameworkContentElement]; 3421Type BSBType = KnownTypes.Types[(int)KnownElements.BeginStoryboard]; 3487Type parentType, 3514private bool PropertyIsWriteable(object propertyMember, Type declaringType) 3576Type elementBaseType = null; 3580Type serializerType = null; 3677Type declaringType = null; 3700Type propertyType = XamlTypeMapper.GetPropertyType(dynamicObject); 3936Type propertyType, // Type of the property 3937Type serializerType, // Type of serializer for the property 3943Type declaringType, // Actual type that corresponds to typeFullName 4169Type propertyType, // Type of the property 4189Type propertyType, // Type of the property 4190Type serializerType, 4229Type propertyType, // Type of the property 4230Type serializerType, // Type of serializer for the property 4269Type propertyType, // Type of the property 4325Type serializerType, 4339Type currentObjectType = CurrentContext.ContextDataType; 4357FirstTagName = $"{((Type)GrandParentContext.ContextData).Name}.{GrandParentContext.ChildTagLocalName}"; 4416ParentContext.ContextDataType.GetConstructor(Type.EmptyTypes) == null)) 4498Type parentElementType = CurrentContext.ContextDataType; 4522private void LoadContentPropertyInfo(Type elementType) 4538Type propertyDeclaringType; 4560Type elementType, 4564out Type propertyDeclaringType) 4572Type propertyBaseType = null; 4630Type propertyDeclaringType = XamlTypeMapper.GetDeclaringType(contentPropertyInfo); 4651Type parentType = ParentContext.ContextDataType; 4674Type arrayType = ParentContext.ContextDataType; 4675Type objectType = CurrentContext.ContextDataType; 4706Type elementType = CurrentContext.ContextDataType; 4721Type contentPropertyType = XamlTypeMapper.GetPropertyType(CurrentContext.ContentPropertyInfo); 4780Type converterType = XamlTypeMapper.GetTypeConverterType(elementType); 4798Type converterType = XamlTypeMapper.GetTypeConverterType(elementType); 4819internal static bool CanCollectionTypeAcceptStrings( Type collectionType ) 4839internal static bool CanCollectionTypeAcceptStringsHelper( Type propertyType ) 4846Type collectionItemType = GetCollectionItemType(propertyType); 4882internal static Type GetCollectionItemType( Type collectionType ) 4886Type iCollectionT = collectionType.GetInterface("System.Collections.Generic.ICollection`1"); 4926internal static bool CanWrapStringAsItemType( Type collectionType, Type collectionItemType ) 4928Type contentWrapper = null; //e.g. Run 4955contentWrapper = attributes[i].ConstructorArguments[0].Value as Type; 5701private bool IsWhitespaceSignificantAttributePresent(Type collectionType) 5714Type baseType = collectionType; 5715Type attrType = KnownTypes.Types[(int)KnownElements.WhitespaceSignificantCollectionAttribute]; 5743Type propertyType) 5748internal Type PropertyType 5775private Type _propertyType; 6462Type typeRightTag = elementNode.ElementType; 6777private bool IsAssignableToIXmlSerializable(Type type) 6837Type _definitionScopeType; 6852private Type _typeIXmlSerializable; 6860Type _ownerType; 6863public XamlPropertyFullName(Type ownerType, string name) 6870public Type OwnerType { get { return _ownerType; } }
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (57)
116public Type GetType( 731Type propType, 786Type owner, 949Type owner, 973static private bool IsAllowedEventDelegateType(Type delegateType) 1224Type owner, 1254Type owner, 1284Type objectType = typeAndSerializer.ObjectType; 1305Type dependencyObjectType = KnownTypes.Types[(int)KnownElements.DependencyObject]; 1439Type baseType = owner; 1464Type dependencyObjectType = KnownTypes.Types[(int)KnownElements.DependencyObject]; 1856Type typeValue = null; 1913Type ownerType, 2031internal static Type GetPropertyType(object propertyMember) 2033Type propertyType; 2048out Type propertyType, 2127internal static Type GetDeclaringType(object propertyMember) 2129Type validType = null; 2252internal Type GetTargetTypeAndMember(string valueParam, 2267Type targetType = null; 2303internal Type GetDependencyPropertyOwnerAndName(string memberValue, 2305Type defaultTargetType, 2308Type targetType = GetTargetTypeAndMember(memberValue, context, false, out memberName); 2335internal MemberInfo GetStaticMemberInfo(Type targetType, string memberName, bool fieldInfoOnly) 2375private MemberInfo GetStaticMemberInfo(Type targetType, string memberName, bool fieldInfoOnly, bool tryInternal) 2497private static bool IsInternalAllowedOnType(Type type) 2548Type objectType = GetObjectType(namespaceMap, localName, knownTypesOnly); 2598private Type GetObjectType( 2606Type type = null; 2674internal int GetCustomBamlSerializerIdForType(Type objectType) 2715internal Type GetXamlSerializerForType(Type objectType) 2856internal Type GetTypeFromBaseString( 2862Type keyObject = null; 2931internal Type GetTypeArgsType( 2937Type t = null; 2993private TypeInformationCacheData GetCachedInformationForType(Type type) 3113internal object CreateInstance(Type t) 3449internal Type GetTypeConverterType(Type type) 3453Type converterType = null; 3524internal Type GetPropertyConverterType(Type propType, object dpOrPiOrMi) 3527Type converterType = null; 3538converterType = (Type)ret; 3735internal bool GetCachedTrimSurroundingWhitespace(Type t) 3753private bool GetTrimSurroundingWhitespace(Type type) 3935internal TypeInformationCacheData(Type baseType) 3972internal Type TypeConverterType 4018Type ownerType, 4064Type converter) 4072Type _baseType; 4080Type _typeConverterType; 4090Type ot, 4103public Type OwnerType; 4211public Type ObjectType = null; 4212public Type SerializerType = null;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\SystemResourceKey.cs (1)
362internal static short GetBamlIdBasedOnSystemResourceKeyId(Type targetType, string memberName)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (32)
86internal static Type GetQualifiedType(string typeName) 95return Type.GetType(nameFrags[0]); 125internal static bool IsNullableType(Type type) 130internal static bool IsInternalType(Type type) 132Type origType = type; 152internal static bool IsPublicType(Type type) 169internal static Type GetFrameworkType(string assemblyName, Type type) 187internal static Type GetMscorlibType(Type type) 193internal static Type GetSystemType(Type type) 219internal static string GetTypeConverterAttributeData(Type type, out Type converterType) 225internal static string GetTypeConverterAttributeData(MemberInfo mi, out Type converterType) 233private static string GetCustomAttributeData(MemberInfo mi, Type attrType, out Type typeValue) 244internal static string GetCustomAttributeData(Type t, Type attrType, bool allowZeroArgs) 246Type typeValue = null; 256private static string GetCustomAttributeData(IList<CustomAttributeData> list, Type attrType, out Type typeValue, bool allowTypeAlso, bool allowZeroArgs) 277internal static string GetCustomAttributeData(Type t, 278Type attrType, 281out Type typeValue) 285Type currentType = t; 320Type attrType, 321out Type typeValue, 342if (attrValue == null && allowTypeAlso && tca.ArgumentType == GetMscorlibType(typeof(Type))) 347typeValue = tca.Value as Type; 490Type typeValue = null; 509internal static bool IsInternalAllowedOnType(Type type)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (11)
101internal static Type GetConverterType(MemberInfo memberInfo) 105Type converterType = null; 118internal static Type? GetConverterType(Type type) 123string? converterName = ReflectionHelper.GetTypeConverterAttributeData(type, out Type? converterType); 130private static Type? GetConverterTypeFromName(string? converterName) 132Type? converterType = null; 159internal static Type GetCoreConverterTypeFromCustomType(Type type) 161Type converterType = null; 237else if (typeof(Type).IsAssignableFrom(type))
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlWrappingReader.cs (1)
56public override System.Type ValueType { get { return _reader.ValueType; } }
PresentationCore (420)
MS\Internal\IListConverters.cs (9)
38public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 46public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 74public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 91internal abstract object ConvertToCore(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); 117internal override object ConvertToCore(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 159internal override object ConvertToCore(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 200internal override object ConvertToCore(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 242internal override object ConvertToCore(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 280internal override object ConvertToCore(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
MS\Internal\Ink\ExtendedProperty.cs (6)
60Type type1 = this.Value.GetType(); 61Type type2 = that.Value.GetType(); 65Type elementType1 = type1.GetElementType(); 66Type elementType2 = type2.GetElementType(); 186Type type = _value.GetType(); 201Type elementType = type.GetElementType();
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (2)
818Type valueType = value.GetType(); 836Type t = value.GetType();
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (3)
697public static readonly Type StylusTip = typeof(Int32); 698public static readonly Type IsHollow = typeof(bool); 699public static readonly Type StylusTipTransform = typeof(string);
MS\Internal\Ink\InkSerializedFormat\SerializationHelper.cs (1)
214public static VarEnum ConvertToVarEnum(Type type, bool throwOnError)
MS\Internal\TextFormatting\FullTextLine.cs (3)
417Type t = caughtException.GetType(); 424new Type[] { typeof(Exception) } 435new Type[] { typeof(string), typeof(Exception) }
src\Microsoft.DotNet.Wpf\src\Common\src\System\AppContextDefaultValues.cs (2)
81Type tAppDomainSetup = Type.GetType("System.AppDomainSetup");
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Commands\CommandLibraryHelper.cs (1)
29internal static RoutedUICommand CreateUICommand(string name, Type ownerType, byte commandId)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\HashHelper.cs (2)
38Type[] types = new Type[] {
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (18)
59public static TResult ReflectionStaticCall<TResult>(this Type type, string methodName) 64method = type.GetMethod(methodName, Type.EmptyTypes); 92public static TResult ReflectionStaticCall<TResult, TArg>(this Type type, string methodName, TArg arg) 97method = type.GetMethod(methodName, new Type[] { typeof(TArg) }); 147method = obj.GetType().GetMethod(methodName, Type.EmptyTypes); 179method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1) }); 233method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1), typeof(TArg2) }); 308public static object ReflectionNew(this Type type) 310ConstructorInfo constructor = type.GetConstructor(Type.EmptyTypes); 333public static object ReflectionNew<TArg1>(this Type type, TArg1 arg1) 335ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(TArg1) }); 360public static object ReflectionNew<TArg1, TArg2>(this Type type, TArg1 arg1, TArg2 arg2) 362ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(TArg1), typeof(TArg2) }); 381/// <exception cref="AmbiguousMatchException">More than one property is found with the specified name. See <see cref="Type.GetProperty(string)"/></exception> 388Type type = obj.GetType(); 406/// <exception cref="AmbiguousMatchException">More than one property is found with the specified name. See <see cref="Type.GetProperty(string)"/></exception> 422/// <exception cref="AmbiguousMatchException">More than one property is found with the specified name. See <see cref="Type.GetProperty(string)"/></exception> 426public static TResult ReflectionStaticGetProperty<TResult>(this Type type, string propertyName)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\PerfService.cs (1)
49Type type = key.GetType();
System\Windows\CultureInfoConverter.cs (4)
51public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 65public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 121Type destinationType) 138new Type[] { typeof(string) },
System\Windows\dataobject.cs (11)
117public DataObject(Type format, object data) 211public object GetData(Type format) 222public bool GetDataPresent(Type format) 320public void SetData(Type format, object data) 2426public Object GetData(Type format) 2441public bool GetDataPresent(Type format) 2538public void SetData(Type format, Object data) 3275public override Type BindToType(string assemblyName, string typeName) 3326public Object GetData(Type format) 3341public bool GetDataPresent(Type format) 3457public void SetData(Type format, Object data)
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (1)
78Type type = typeof(System.Xaml.XamlObjectEventArgs);
System\Windows\DurationConverter.cs (4)
26public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 45public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 105Type destinationType) 117mi = typeof(Duration).GetConstructor(new Type[] { typeof(TimeSpan) });
System\Windows\EventManager.cs (6)
59Type handlerType, 60Type ownerType) 95Type classType, 151Type classType, 221public static RoutedEvent[] GetRoutedEventsForOwner(Type ownerType) 254internal static RoutedEvent GetRoutedEventFromName(string name, Type ownerType)
System\Windows\FontStretchConverter.cs (4)
35public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 53public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 103public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 109MethodInfo mi = typeof(FontStretch).GetMethod("FromOpenTypeStretch", new Type[]{typeof(int)});
System\Windows\FontStyleConverter.cs (4)
35public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 53public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 103public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 109ConstructorInfo ci = typeof(FontStyle).GetConstructor(new Type[]{typeof(int)});
System\Windows\FontWeightConverter.cs (4)
35public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 53public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 103public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 109MethodInfo mi = typeof(FontWeight).GetMethod("FromOpenTypeWeight", new Type[]{typeof(int)});
System\Windows\Generated\ContentElement.cs (1)
30static private readonly Type _typeofThis = typeof(ContentElement);
System\Windows\Generated\TextDecoration.cs (1)
286Type typeofThis = typeof(TextDecoration);
System\Windows\Generated\UIElement.cs (2)
30static private readonly Type _typeofThis = typeof(UIElement); 740internal static void RegisterEvents(Type type)
System\Windows\Generated\UIElement3D.cs (1)
30static private readonly Type _typeofThis = typeof(UIElement3D);
System\Windows\GlobalEventManager.cs (6)
23Type handlerType, 24Type ownerType) 54Type classType, 151internal static void AddOwner(RoutedEvent routedEvent, Type ownerType) 215internal static RoutedEvent[] GetRoutedEventsForOwner(Type ownerType) 248Type ownerType,
System\Windows\IDataObject.cs (3)
36object GetData(Type format); 60bool GetDataPresent(Type format); 110void SetData(Type format, object data);
System\Windows\Ink\DrawingAttributes.cs (1)
717Type t = propertyData.GetType();
System\Windows\Ink\StrokeCollectionConverter.cs (4)
45public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 61public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 125public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 147ConstructorInfo ci = typeof(StrokeCollection).GetConstructor(new Type[] { typeof(Stream) });
System\Windows\Input\Command\CanExecuteChangedEventManager.cs (1)
168Type managerType = typeof(CanExecuteChangedEventManager);
System\Windows\Input\Command\CommandManager.cs (12)
193public static void RegisterClassInputBinding(Type type, InputBinding inputBinding) 222public static void RegisterClassCommandBinding(Type type, CommandBinding commandBinding) 329Type classType = targetElement.GetType(); 378Type classType = targetElement.GetType(); 555Type senderType = sender.GetType(); 561ValueTuple<Type, CommandBinding>? tuple = default; // zero or one binding 562List<ValueTuple<Type, CommandBinding>> list = default; // more than one 567Type classType = senderType; 587list ??= new List<ValueTuple<Type, CommandBinding>>(8) 592list.Add(new ValueTuple<Type, CommandBinding>(classType, commandBinding)); 613Type classType = list[i].Item1; 912Type managerType = typeof(RequerySuggestedEventManager);
System\Windows\Input\Command\KeyGestureConverter.cs (3)
36public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 56public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 142public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Input\Command\MouseActionConverter.cs (3)
36public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 56public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 112public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Input\Command\MouseGestureConverter.cs (3)
37public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 119public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 146public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Input\Command\RoutedCommand.cs (5)
46public RoutedCommand(string name, Type ownerType) : this(name, ownerType, null) 56public RoutedCommand(string name, Type ownerType, InputGestureCollection inputGestures) 78internal RoutedCommand(string name, Type ownerType, byte commandId) : this(name, ownerType, null) 203public Type OwnerType 474private Type _ownerType;
System\Windows\Input\Command\RoutedUICommand.cs (3)
38public RoutedUICommand(string text, string name, Type ownerType) 50public RoutedUICommand(string text, string name, Type ownerType, InputGestureCollection inputGestures) 63internal RoutedUICommand(string name, Type ownerType, byte commandId):base(name, ownerType, commandId)
System\Windows\Input\Command\SecureUICommand.cs (1)
35internal SecureUICommand(string name, Type ownerType, byte commandId)
System\Windows\Input\CursorConverter.cs (3)
31public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 46public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 218public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Input\InputScopeConverter.cs (3)
42public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 66public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 152public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Input\InputScopeNameConverter.cs (3)
42public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 66public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 134public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (2)
107Type managerType = typeof(DispatcherShutdownStartedEventManager); 201bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs args)
System\Windows\InterOp\HwndMouseInputProvider.cs (2)
1110Type windowChromeWorker = presentationFramework.GetType("System.Windows.Shell.WindowChromeWorker"); 1134Type type = rootVisual?.GetType();
System\Windows\InterOp\HwndSource.cs (1)
410internal override IInputProvider GetInputProvider(Type inputDevice)
System\Windows\Markup\XmlLanguageConverter.cs (4)
44public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 58public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 114Type destinationType) 131new Type[] { typeof(string) },
System\Windows\Media\Animation\Animatable.cs (2)
123Type propertyType, 124Type ownerType,
System\Windows\Media\Animation\AnimationStorage.cs (1)
1120private static IndependentAnimationStorage CreateIndependentAnimationStorageForType(Type type)
System\Windows\Media\Animation\AnimationTimeline.cs (1)
144public abstract Type TargetPropertyType { get; }
System\Windows\Media\Animation\Generated\BooleanAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\ByteAnimation.cs (2)
58Type typeofProp = typeof(Byte?); 59Type typeofThis = typeof(ByteAnimation);
System\Windows\Media\Animation\Generated\ByteAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\CharAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\ColorAnimation.cs (2)
58Type typeofProp = typeof(Color?); 59Type typeofThis = typeof(ColorAnimation);
System\Windows\Media\Animation\Generated\ColorAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\DecimalAnimation.cs (2)
58Type typeofProp = typeof(Decimal?); 59Type typeofThis = typeof(DecimalAnimation);
System\Windows\Media\Animation\Generated\DecimalAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\DoubleAnimation.cs (2)
58Type typeofProp = typeof(Double?); 59Type typeofThis = typeof(DoubleAnimation);
System\Windows\Media\Animation\Generated\DoubleAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\Int16Animation.cs (2)
58Type typeofProp = typeof(Int16?); 59Type typeofThis = typeof(Int16Animation);
System\Windows\Media\Animation\Generated\Int16AnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\Int32Animation.cs (2)
58Type typeofProp = typeof(Int32?); 59Type typeofThis = typeof(Int32Animation);
System\Windows\Media\Animation\Generated\Int32AnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\Int64Animation.cs (2)
58Type typeofProp = typeof(Int64?); 59Type typeofThis = typeof(Int64Animation);
System\Windows\Media\Animation\Generated\Int64AnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\MatrixAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\ObjectAnimationBase.cs (1)
124public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\Point3DAnimation.cs (2)
58Type typeofProp = typeof(Point3D?); 59Type typeofThis = typeof(Point3DAnimation);
System\Windows\Media\Animation\Generated\Point3DAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\PointAnimation.cs (2)
58Type typeofProp = typeof(Point?); 59Type typeofThis = typeof(PointAnimation);
System\Windows\Media\Animation\Generated\PointAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\QuaternionAnimation.cs (2)
58Type typeofProp = typeof(Quaternion?); 59Type typeofThis = typeof(QuaternionAnimation);
System\Windows\Media\Animation\Generated\QuaternionAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\RectAnimation.cs (2)
58Type typeofProp = typeof(Rect?); 59Type typeofThis = typeof(RectAnimation);
System\Windows\Media\Animation\Generated\RectAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\Rotation3DAnimation.cs (2)
58Type typeofProp = typeof(Rotation3D); 59Type typeofThis = typeof(Rotation3DAnimation);
System\Windows\Media\Animation\Generated\Rotation3DAnimationBase.cs (1)
98public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\SingleAnimation.cs (2)
58Type typeofProp = typeof(Single?); 59Type typeofThis = typeof(SingleAnimation);
System\Windows\Media\Animation\Generated\SingleAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\SizeAnimation.cs (2)
58Type typeofProp = typeof(Size?); 59Type typeofThis = typeof(SizeAnimation);
System\Windows\Media\Animation\Generated\SizeAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\StringAnimationBase.cs (1)
98public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\TimelineGroup.cs (1)
204Type typeofThis = typeof(TimelineGroup);
System\Windows\Media\Animation\Generated\Vector3DAnimation.cs (2)
58Type typeofProp = typeof(Vector3D?); 59Type typeofThis = typeof(Vector3DAnimation);
System\Windows\Media\Animation\Generated\Vector3DAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\Generated\VectorAnimation.cs (2)
58Type typeofProp = typeof(Vector?); 59Type typeofThis = typeof(VectorAnimation);
System\Windows\Media\Animation\Generated\VectorAnimationBase.cs (1)
101public override sealed Type TargetPropertyType
System\Windows\Media\Animation\KeySplineConverter.cs (4)
33public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptor, Type destinationType) 52public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 102Type destinationType) 110ConstructorInfo ci = typeof(KeySpline).GetConstructor(new Type[]
System\Windows\Media\Animation\KeyTimeConverter.cs (5)
28Type type) 48Type type) 133Type destinationType) 148mi = typeof(KeyTime).GetMethod("FromPercent", new Type[] { typeof(double) }); 154mi = typeof(KeyTime).GetMethod("FromTimeSpan", new Type[] { typeof(TimeSpan) });
System\Windows\Media\Animation\RepeatBehaviorConverter.cs (5)
32public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 51public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 115Type destinationType) 134mi = typeof(RepeatBehavior).GetConstructor(new Type[] { typeof(double) }); 140mi = typeof(RepeatBehavior).GetConstructor(new Type[] { typeof(TimeSpan) });
System\Windows\Media\BitmapCacheBrush.cs (1)
391private static void StaticInitialize(Type typeofThis)
System\Windows\Media\CharacterMetricsDictionary.cs (1)
217Type elementType = array.GetType().GetElementType();
System\Windows\Media\ColorConverter.cs (4)
32public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 50public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 109public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 115MethodInfo mi = typeof(Color).GetMethod("FromArgb", new Type[]{typeof(byte), typeof(byte), typeof(byte), typeof(byte)});
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
183Type elementType = array.GetType().GetElementType();
System\Windows\Media\Effects\Generated\BevelBitmapEffect.cs (1)
315Type typeofThis = typeof(BevelBitmapEffect);
System\Windows\Media\Effects\Generated\BitmapEffectGroup.cs (1)
222Type typeofThis = typeof(BitmapEffectGroup);
System\Windows\Media\Effects\Generated\BitmapEffectInput.cs (1)
255Type typeofThis = typeof(BitmapEffectInput);
System\Windows\Media\Effects\Generated\BlurBitmapEffect.cs (1)
233Type typeofThis = typeof(BlurBitmapEffect);
System\Windows\Media\Effects\Generated\BlurEffect.cs (1)
330Type typeofThis = typeof(BlurEffect);
System\Windows\Media\Effects\Generated\DropShadowBitmapEffect.cs (1)
349Type typeofThis = typeof(DropShadowBitmapEffect);
System\Windows\Media\Effects\Generated\DropShadowEffect.cs (1)
435Type typeofThis = typeof(DropShadowEffect);
System\Windows\Media\Effects\Generated\EmbossBitmapEffect.cs (1)
241Type typeofThis = typeof(EmbossBitmapEffect);
System\Windows\Media\Effects\Generated\OuterGlowBitmapEffect.cs (1)
295Type typeofThis = typeof(OuterGlowBitmapEffect);
System\Windows\Media\Effects\Generated\PixelShader.cs (1)
302Type typeofThis = typeof(PixelShader);
System\Windows\Media\Effects\Generated\ShaderEffect.cs (1)
300Type typeofThis = typeof(ShaderEffect);
System\Windows\Media\Effects\ShaderEffect.cs (8)
326Type ownerType, 337Type ownerType, 357Type t = DetermineShaderConstantType(dp.PropertyType, PixelShader); 841internal static Type DetermineShaderConstantType(Type type, PixelShader pixelShader) 843Type result = null; 886Type t = value.GetType(); 968Type t = value.GetType();
System\Windows\Media\FamilyMapCollection.cs (1)
106Type elementType = array.GetType().GetElementType();
System\Windows\Media\FamilyTypefaceCollection.cs (1)
385Type elementType = array.GetType().GetElementType();
System\Windows\Media\FontFamilyConverter.cs (3)
40public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 54public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 135public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\ArcSegment.cs (1)
290Type typeofThis = typeof(ArcSegment);
System\Windows\Media\Generated\BezierSegment.cs (1)
265Type typeofThis = typeof(BezierSegment);
System\Windows\Media\Generated\BitmapCache.cs (1)
333Type typeofThis = typeof(BitmapCache);
System\Windows\Media\Generated\BitmapCacheBrush.cs (1)
538Type typeofThis = typeof(BitmapCacheBrush);
System\Windows\Media\Generated\Brush.cs (1)
457Type typeofThis = typeof(Brush);
System\Windows\Media\Generated\BrushConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 142public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\CacheModeConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 142public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\CombinedGeometry.cs (1)
456Type typeofThis = typeof(CombinedGeometry);
System\Windows\Media\Generated\DashStyle.cs (1)
351Type typeofThis = typeof(DashStyle);
System\Windows\Media\Generated\DoubleCollectionConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 128public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\DrawingBrush.cs (1)
395Type typeofThis = typeof(DrawingBrush);
System\Windows\Media\Generated\DrawingGroup.cs (1)
870Type typeofThis = typeof(DrawingGroup);
System\Windows\Media\Generated\DrawingImage.cs (1)
332Type typeofThis = typeof(DrawingImage);
System\Windows\Media\Generated\EllipseGeometry.cs (1)
380Type typeofThis = typeof(EllipseGeometry);
System\Windows\Media\Generated\GeneralTransformGroup.cs (1)
212Type typeofThis = typeof(GeneralTransformGroup);
System\Windows\Media\Generated\Geometry.cs (1)
377Type typeofThis = typeof(Geometry);
System\Windows\Media\Generated\GeometryConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 142public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\GeometryDrawing.cs (1)
459Type typeofThis = typeof(GeometryDrawing);
System\Windows\Media\Generated\GeometryGroup.cs (1)
509Type typeofThis = typeof(GeometryGroup);
System\Windows\Media\Generated\GlyphRunDrawing.cs (1)
374Type typeofThis = typeof(GlyphRunDrawing);
System\Windows\Media\Generated\GradientBrush.cs (1)
304Type typeofThis = typeof(GradientBrush);
System\Windows\Media\Generated\GuidelineSet.cs (1)
376Type typeofThis = typeof(GuidelineSet);
System\Windows\Media\Generated\ImageBrush.cs (1)
395Type typeofThis = typeof(ImageBrush);
System\Windows\Media\Generated\ImageDrawing.cs (1)
353Type typeofThis = typeof(ImageDrawing);
System\Windows\Media\Generated\Int32CollectionConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 128public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\LinearGradientBrush.cs (1)
303Type typeofThis = typeof(LinearGradientBrush);
System\Windows\Media\Generated\LineGeometry.cs (1)
333Type typeofThis = typeof(LineGeometry);
System\Windows\Media\Generated\LineSegment.cs (1)
223Type typeofThis = typeof(LineSegment);
System\Windows\Media\Generated\MatrixTransform.cs (1)
290Type typeofThis = typeof(MatrixTransform);
System\Windows\Media\Generated\MediaTimeline.cs (1)
223Type typeofThis = typeof(MediaTimeline);
System\Windows\Media\Generated\PathFigure.cs (1)
287Type typeofThis = typeof(PathFigure);
System\Windows\Media\Generated\PathFigureCollectionConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 142public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\PathGeometry.cs (1)
304Type typeofThis = typeof(PathGeometry);
System\Windows\Media\Generated\PathSegment.cs (1)
223Type typeofThis = typeof(PathSegment);
System\Windows\Media\Generated\Pen.cs (1)
577Type typeofThis = typeof(Pen);
System\Windows\Media\Generated\PointCollectionConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 128public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\PolyBezierSegment.cs (1)
225Type typeofThis = typeof(PolyBezierSegment);
System\Windows\Media\Generated\PolyLineSegment.cs (1)
225Type typeofThis = typeof(PolyLineSegment);
System\Windows\Media\Generated\PolyQuadraticBezierSegment.cs (1)
225Type typeofThis = typeof(PolyQuadraticBezierSegment);
System\Windows\Media\Generated\QuadraticBezierSegment.cs (1)
230Type typeofThis = typeof(QuadraticBezierSegment);
System\Windows\Media\Generated\RadialGradientBrush.cs (1)
355Type typeofThis = typeof(RadialGradientBrush);
System\Windows\Media\Generated\RectangleGeometry.cs (1)
379Type typeofThis = typeof(RectangleGeometry);
System\Windows\Media\Generated\RotateTransform.cs (1)
343Type typeofThis = typeof(RotateTransform);
System\Windows\Media\Generated\ScaleTransform.cs (1)
376Type typeofThis = typeof(ScaleTransform);
System\Windows\Media\Generated\SkewTransform.cs (1)
376Type typeofThis = typeof(SkewTransform);
System\Windows\Media\Generated\SolidColorBrush.cs (1)
336Type typeofThis = typeof(SolidColorBrush);
System\Windows\Media\Generated\StreamGeometry.cs (1)
216Type typeofThis = typeof(StreamGeometry);
System\Windows\Media\Generated\TextEffect.cs (1)
309Type typeofThis = typeof(TextEffect);
System\Windows\Media\Generated\TileBrush.cs (1)
435Type typeofThis = typeof(TileBrush);
System\Windows\Media\Generated\TransformConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 142public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\TransformGroup.cs (1)
460Type typeofThis = typeof(TransformGroup);
System\Windows\Media\Generated\TranslateTransform.cs (1)
310Type typeofThis = typeof(TranslateTransform);
System\Windows\Media\Generated\VectorCollectionConverter.cs (3)
56public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 74public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 128public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Generated\VideoDrawing.cs (1)
338Type typeofThis = typeof(VideoDrawing);
System\Windows\Media\Generated\VisualBrush.cs (1)
433Type typeofThis = typeof(VisualBrush);
System\Windows\Media\ImageSourceConverter.cs (3)
44public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 62public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 206public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media\Imaging\Generated\BitmapImage.cs (1)
509Type typeofThis = typeof(BitmapImage);
System\Windows\Media\Imaging\Generated\ColorConvertedBitmap.cs (1)
381Type typeofThis = typeof(ColorConvertedBitmap);
System\Windows\Media\Imaging\Generated\CroppedBitmap.cs (1)
324Type typeofThis = typeof(CroppedBitmap);
System\Windows\Media\Imaging\Generated\FormatConvertedBitmap.cs (1)
382Type typeofThis = typeof(FormatConvertedBitmap);
System\Windows\Media\Imaging\Generated\TransformedBitmap.cs (1)
346Type typeofThis = typeof(TransformedBitmap);
System\Windows\Media\Imaging\PropVariant.cs (4)
139internal void InitVector(Array array, Type type, VarEnum varEnum) 144internal void Init(Array array, Type type, VarEnum vt) 255Type type = value.GetType(); 342Type type = value.GetType();
System\Windows\Media\Imaging\WriteableBitmap.cs (3)
403Type elementType; 507Type elementType; 1076out Type elementType)
System\Windows\Media\PixelFormatConverter.cs (4)
38public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 56public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 101public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 114ConstructorInfo ci = typeof(PixelFormat).GetConstructor(new Type[]{typeof(string)});
System\Windows\Media\RequestCachePolicyConverter.cs (5)
33public override bool CanConvertFrom(ITypeDescriptorContext td, Type t) 53public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 114Type destinationType) 127ConstructorInfo ci = typeof(HttpRequestCachePolicy).GetConstructor(new Type[] { typeof(HttpRequestCachePolicy) }); 142ConstructorInfo ci = typeof(RequestCachePolicy).GetConstructor(new Type[] { typeof(RequestCachePolicy) });
System\Windows\Media\VisualTreeHelper.cs (1)
233internal static bool IsAncestorOf(DependencyObject ancestor, DependencyObject descendant, Type stopType)
System\Windows\Media3D\Generated\AxisAngleRotation3D.cs (1)
310Type typeofThis = typeof(AxisAngleRotation3D);
System\Windows\Media3D\Generated\Camera.cs (1)
356Type typeofThis = typeof(Camera);
System\Windows\Media3D\Generated\DiffuseMaterial.cs (1)
386Type typeofThis = typeof(DiffuseMaterial);
System\Windows\Media3D\Generated\DirectionalLight.cs (1)
302Type typeofThis = typeof(DirectionalLight);
System\Windows\Media3D\Generated\EmissiveMaterial.cs (1)
358Type typeofThis = typeof(EmissiveMaterial);
System\Windows\Media3D\Generated\GeneralTransform3DGroup.cs (1)
208Type typeofThis = typeof(GeneralTransform3DGroup);
System\Windows\Media3D\Generated\GeometryModel3D.cs (1)
482Type typeofThis = typeof(GeometryModel3D);
System\Windows\Media3D\Generated\Light.cs (1)
218Type typeofThis = typeof(Light);
System\Windows\Media3D\Generated\MaterialGroup.cs (1)
456Type typeofThis = typeof(MaterialGroup);
System\Windows\Media3D\Generated\Matrix3DConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media3D\Generated\MatrixCamera.cs (1)
317Type typeofThis = typeof(MatrixCamera);
System\Windows\Media3D\Generated\MatrixTransform3D.cs (1)
279Type typeofThis = typeof(MatrixTransform3D);
System\Windows\Media3D\Generated\MeshGeometry3D.cs (1)
439Type typeofThis = typeof(MeshGeometry3D);
System\Windows\Media3D\Generated\Model3D.cs (1)
356Type typeofThis = typeof(Model3D);
System\Windows\Media3D\Generated\Model3DGroup.cs (1)
477Type typeofThis = typeof(Model3DGroup);
System\Windows\Media3D\Generated\OrthographicCamera.cs (1)
326Type typeofThis = typeof(OrthographicCamera);
System\Windows\Media3D\Generated\PerspectiveCamera.cs (1)
326Type typeofThis = typeof(PerspectiveCamera);
System\Windows\Media3D\Generated\Point3DCollectionConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media3D\Generated\Point3DConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media3D\Generated\Point4DConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media3D\Generated\PointLightBase.cs (1)
313Type typeofThis = typeof(PointLightBase);
System\Windows\Media3D\Generated\ProjectionCamera.cs (1)
313Type typeofThis = typeof(ProjectionCamera);
System\Windows\Media3D\Generated\QuaternionConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media3D\Generated\QuaternionRotation3D.cs (1)
289Type typeofThis = typeof(QuaternionRotation3D);
System\Windows\Media3D\Generated\Rect3DConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media3D\Generated\RotateTransform3D.cs (1)
433Type typeofThis = typeof(RotateTransform3D);
System\Windows\Media3D\Generated\ScaleTransform3D.cs (1)
461Type typeofThis = typeof(ScaleTransform3D);
System\Windows\Media3D\Generated\Size3DConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media3D\Generated\SpecularMaterial.cs (1)
386Type typeofThis = typeof(SpecularMaterial);
System\Windows\Media3D\Generated\SpotLight.cs (1)
398Type typeofThis = typeof(SpotLight);
System\Windows\Media3D\Generated\Transform3DGroup.cs (1)
456Type typeofThis = typeof(Transform3DGroup);
System\Windows\Media3D\Generated\TranslateTransform3D.cs (1)
350Type typeofThis = typeof(TranslateTransform3D);
System\Windows\Media3D\Generated\Vector3DCollectionConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Media3D\Generated\Vector3DConverter.cs (3)
52public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 70public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 124public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\PresentationSource.cs (1)
69internal virtual IInputProvider GetInputProvider(Type inputDevice)
System\Windows\RoutedEvent.cs (8)
41public RoutedEvent AddOwner(Type ownerType) 78public Type HandlerType 89Type handlerType = handler.GetType(); 102public Type OwnerType 125Type handlerType, 126Type ownerType) 149private Type _handlerType; 150private Type _ownerType;
System\Windows\TextDecorationCollectionConverter.cs (4)
36public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 55public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 180public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 185new Type[]{typeof(IEnumerable<TextDecoration>)}
PresentationFramework (1707)
MarshalLocal.cs (1)
9public static bool IsTypeVisibleFromCom(Type type)
Microsoft\Win32\OpenFileDialog.cs (1)
237return (IFileDialog)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(CLSID.FileOpenDialog)));
Microsoft\Win32\OpenFolderDialog.cs (1)
264return (IFileDialog)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(CLSID.FileOpenDialog)));
Microsoft\Win32\SaveFileDialog.cs (1)
253return (IFileDialog)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(CLSID.FileSaveDialog)));
MS\Internal\Annotations\Anchoring\LocatorManager.cs (2)
198public void RegisterSelectionProcessor(SelectionProcessor processor, Type selectionType) 231public SelectionProcessor GetSelectionProcessor(Type selectionType)
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (2)
105internal static void SetTypeZLevel(Type type, int level) 516Type type = component.GetType();
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (4)
307internal override Type OwnerType 577internal override Type OwnerType 1001Type elementType = cursor.GetElementType(LogicalDirection.Forward); 1025Type elementType = cursor.ParentType;
MS\Internal\Annotations\Serializer.cs (2)
44public Serializer(Type type) 60_ctor = type.GetConstructor(Array.Empty<Type>());
MS\Internal\AppModel\Journaling.cs (2)
682Type pfType = Type.GetType(this._typeName.Value);
MS\Internal\AppModel\ReturnEventSaver.cs (1)
131Type.GetType(_returnList[i]._delegateTypeName),
MS\Internal\Commands\CommandHelpers.cs (13)
21internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler) 26internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 32internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 38internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 44internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 50internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 56internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 62internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 68internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 76internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, Key key, ModifierKeys modifierKeys, 82internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 89internal static void RegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler, 97private static void PrivateRegisterCommandHandler(Type controlType, RoutedCommand command, ExecutedRoutedEventHandler executedRoutedEventHandler,
MS\Internal\Controls\ConnectionPointCookie.cs (1)
26internal ConnectionPointCookie(object source, object sink, Type eventInterface)
MS\Internal\Data\AccessorTable.cs (6)
31internal AccessorInfo(object accessor, Type propertyType, object[] args) 39internal Type PropertyType { get { return _propertyType; } } 45private readonly Type _propertyType; // type of the property 58internal AccessorInfo this[SourceValueType sourceValueType, Type type, string name] 187public AccessorTableKey(SourceValueType sourceValueType, Type type, string name) 210private readonly Type _type;
MS\Internal\Data\BindingWorker.cs (2)
48internal virtual Type SourcePropertyType { get { return null; } } 51internal Type TargetPropertyType { get { return TargetProperty.PropertyType; } }
MS\Internal\Data\ClrBindingWorker.cs (5)
67Type targetType = targetDP.PropertyType; 122internal override Type SourcePropertyType 386internal void SetupDefaultValueConverter(Type type) 489Type type = PW.GetType(k); 504Type type = PW.GetType(k);
MS\Internal\Data\DataBindEngine.cs (6)
338internal ViewRecord GetViewRecord(object collection, CollectionViewSource key, Type collectionViewType, bool createView, Func<object, object> GetSourceItem) 367internal IValueConverter GetDefaultValueConverter(Type sourceType, 368Type targetType, 663private readonly Type _sourceType, _targetType; 666public ValueConverterTableKey(Type sourceType, Type targetType, bool targetToSource)
MS\Internal\Data\DefaultValueConverter.cs (51)
38protected DefaultValueConverter(TypeConverter typeConverter, Type sourceType, Type targetType, 60internal static IValueConverter Create(Type sourceType, 61Type targetType, 66Type innerType; 180internal static TypeConverter GetConverter(Type type) 199internal static object TryParse(object o, Type targetType, CultureInfo culture) 213new Type[] { StringType, typeof(System.Globalization.NumberStyles), typeof(System.IFormatProvider) }, 222new Type[] { StringType, typeof(System.IFormatProvider) }, 231new Type[] { StringType }, 254protected object ConvertFrom(object o, Type destinationType, DependencyObject targetElement, CultureInfo culture) 259protected object ConvertTo(object o, Type destinationType, DependencyObject targetElement, CultureInfo culture) 265protected void EnsureConverter(Type type) 279private object ConvertHelper(object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, bool isForward) 365protected Type _sourceType; 366protected Type _targetType; 373static Type StringType = typeof(String); 388public SourceDefaultValueConverter(TypeConverter typeConverter, Type sourceType, Type targetType, 401public object Convert(object o, Type type, object parameter, CultureInfo culture) 406public object ConvertBack(object o, Type type, object parameter, CultureInfo culture) 424public TargetDefaultValueConverter(TypeConverter typeConverter, Type sourceType, Type targetType, 436public object Convert(object o, Type type, object parameter, CultureInfo culture) 441public object ConvertBack(object o, Type type, object parameter, CultureInfo culture) 453public SystemConvertConverter(Type sourceType, Type targetType) 459public object Convert(object o, Type type, object parameter, CultureInfo culture) 464public object ConvertBack(object o, Type type, object parameter, CultureInfo culture) 473public static bool CanConvert(Type sourceType, Type targetType) 517private static bool CanConvertChar(Type type) 527Type _sourceType, _targetType; 530static readonly Type[] SupportedTypes = { 539static readonly Type[] CharSupportedTypes = { 561public ObjectTargetConverter(Type sourceType, DataBindEngine engine) : 573public object Convert(object o, Type type, object parameter, CultureInfo culture) 579public object ConvertBack(object o, Type type, object parameter, CultureInfo culture) 608public ObjectSourceConverter(Type targetType, DataBindEngine engine) : 620public object Convert(object o, Type type, object parameter, CultureInfo culture) 637public object ConvertBack(object o, Type type, object parameter, CultureInfo culture) 663public object Convert(object o, Type type, object parameter, CultureInfo culture) 676public object ConvertBack(object o, Type type, object parameter, CultureInfo culture) 694internal InterfaceConverter(Type sourceType, Type targetType) 706public object Convert(object o, Type type, object parameter, CultureInfo culture) 711public object ConvertBack(object o, Type type, object parameter, CultureInfo culture) 716private object ConvertTo(object o, Type type) 721Type _sourceType; 722Type _targetType; 732virtual public object GetService(Type serviceType)
MS\Internal\Data\DynamicObjectAccessor.cs (6)
18protected DynamicObjectAccessor(Type ownerType, string propertyName) 24public Type OwnerType { get { return _ownerType; } } 27public Type PropertyType { get { return typeof(object); } } 34Type _ownerType; 44protected DynamicPropertyAccessor(Type ownerType, string propertyName) 60protected DynamicIndexerAccessor(Type ownerType, string propertyName)
MS\Internal\Data\DynamicValueConverter.cs (11)
32internal DynamicValueConverter(bool targetToSourceNeeded, Type sourceType, Type targetType) 38internal object Convert(object value, Type targetType) 43public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 49Type sourceType = value.GetType(); 68public object ConvertBack(object value, Type sourceType, object parameter, CultureInfo culture) 74Type targetType = value.GetType(); 94private void EnsureConverter(Type sourceType, Type targetType) 125private Type _sourceType; 126private Type _targetType;
MS\Internal\Data\IndexedEnumerable.cs (4)
491Type srcType = collection.GetType(); 493MethodInfo mi = srcType.GetMethod("IndexOf", new Type[] { typeof(object) }); 674bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 682protected virtual bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
MS\Internal\Data\IndexerPropertyInfo.cs (5)
72public override Type PropertyType 82public override Type DeclaringType 87public override object[] GetCustomAttributes(Type attributeType, bool inherit) 97public override bool IsDefined(Type attributeType, bool inherit) 107public override Type ReflectedType
MS\Internal\Data\ObjectRef.cs (1)
550private DependencyObject FindAncestorOfType(Type type, int level, DependencyObject d, bool isTracing)
MS\Internal\Data\PropertyPathWorker.cs (13)
193internal Type GetType(int level) 706Type declaringType = (oldPI != null) ? oldPI.DeclaringType 878Type declaringType = (newPI != null) ? newPI.DeclaringType 1040Type oldType = ReflectionHelper.GetReflectionType(oldItem); 1041Type newType = ReflectionHelper.GetReflectionType(item); 1042Type sourceType = null; 1324private MemberInfo[] GetIndexers(Type type, int k) 1368Type paramType = (aryPI != null) ? aryPI[i].ParameterType : typeof(Object); 1466Type type = pi.DeclaringType; 1733bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 1857public Type type; // Type of the value (useful for Arrays) 1871static readonly IList<Type> IListIndexerAllowlist = new Type[]
MS\Internal\Data\StaticPropertyChangedEventManager.cs (10)
47public static void AddHandler(Type type, EventHandler<PropertyChangedEventArgs> handler, string propertyName) 58public static void RemoveHandler(Type type, EventHandler<PropertyChangedEventArgs> handler, string propertyName) 128Type managerType = typeof(StaticPropertyChangedEventManager); 155private void PrivateAddHandler(Type type, EventHandler<PropertyChangedEventArgs> handler, string propertyName) 180private void PrivateRemoveHandler(Type type, EventHandler<PropertyChangedEventArgs> handler, string propertyName) 257public TypeRecord(Type type, StaticPropertyChangedEventManager manager) 264public Type Type { get { return _type; } } 569Type _type; // the type whose static property-changes we're listening to 605public void StartListening(Type type) 616public void StopListening(Type type)
MS\Internal\Data\ValueChangedEventManager.cs (1)
276Type managerType = typeof(ValueChangedEventManager);
MS\Internal\Data\ValueTable.cs (1)
200bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
MS\Internal\Data\ViewManager.cs (4)
499internal ViewRecord GetViewRecord(object collection, CollectionViewSource cvs, Type collectionViewType, bool createView, Func<object, object> GetSourceItem) 689private ViewRecord GetExistingView(object collection, CollectionViewSource cvs, Type collectionViewType, Func<object, object> GetSourceItem) 835private void ValidateViewType(CollectionView cv, Type collectionViewType) 843Type cachedViewType = (cvp == null) ? cv.GetType() : cvp.ProxiedView.GetType();
MS\Internal\Data\XmlBindingWorker.cs (1)
409bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs args)
MS\Internal\Data\XmlNodeChangedEventManager.cs (1)
134Type managerType = typeof(XmlNodeChangedEventManager);
MS\Internal\Documents\FixedDocumentPaginator.cs (1)
199object IServiceProvider.GetService(Type serviceType)
MS\Internal\Documents\FixedDocumentSequencePaginator.cs (1)
199object IServiceProvider.GetService(Type serviceType)
MS\Internal\Documents\FlowDocumentPaginator.cs (1)
1071object IServiceProvider.GetService(Type serviceType)
MS\Internal\Documents\FlowDocumentView.cs (1)
741object IServiceProvider.GetService(Type serviceType)
MS\Internal\Documents\TextBoxView.cs (1)
61object IServiceProvider.GetService(Type serviceType)
MS\Internal\Globalization\BamlTreeUpdater.cs (1)
833Type type = assm.GetType(fullTypeName);
MS\Internal\Helper.cs (5)
593Type targetType = targetObject.GetType(); 653Type memberType; 729static EventHandler<System.Windows.Markup.XamlSetMarkupExtensionEventArgs> LookupSetMarkupExtensionHandler(Type type) 1533static readonly Type NullableType = Type.GetType("System.Nullable`1");
MS\Internal\Interop\InternalDispatchObject.cs (4)
92MethodInfo IReflect.GetMethod(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) 108PropertyInfo IReflect.GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) 135Type IReflect.UnderlyingSystemType
MS\Internal\IO\Packaging\PackageFilter.cs (2)
284Type filterType = Type.GetTypeFromCLSID(clsid);
MS\Internal\LayoutDump.cs (9)
154internal static void AddUIElementDumpHandler(Type type, DumpCustomUIElement dumper) 162internal static void AddDocumentPageDumpHandler(Type type, DumpCustomDocumentPage dumper) 267Type t = element.GetType(); 316Type t = page.GetType(); 903Type paragraphResultType = paragraph.GetType(); 906Type paraClientType = paraClient.GetType(); 931Type type = typeof(Table); 948Type paragraphResultType = paragraph.GetType(); 963Type typeOfCell = cell.GetType();
MS\Internal\PtsHost\FlowDocumentPage.cs (1)
1155object IServiceProvider.GetService(Type serviceType)
MS\Internal\SystemCoreHelper.cs (1)
23internal static object NewDynamicPropertyAccessor(Type ownerType, string propertyName)
MS\Internal\SystemDataHelper.cs (2)
40internal static bool IsSqlNullableType(Type type) 70internal static object NullValueForSqlNullableType(Type type)
MS\Internal\TraceData.cs (2)
254Type type = o.GetType(); 270static public string IdentifyWeakEvent(Type type)
MS\Internal\WeakHashtable.cs (1)
236public static IWeakHashtable FromKeyType(Type tKey)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (7)
73Type type = o.GetType(); 115foreach (var iface in interfaces) 119var ifaceAbiType = iface.FindHelperType(); 128&& Projections.TryGetCompatibleWindowsRuntimeTypeForVariantType(iface, out var compatibleIface)) 130var compatibleIfaceAbiType = compatibleIface.FindHelperType(); 165Type type = obj.GetType(); 183public InspectableInfo(Type type, Guid[] iids)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (1)
51public static IntPtr AllocateVtableMemory(Type vtableType, int size) => RuntimeHelpers.AllocateTypeAssociatedMemory(vtableType, size);
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (7)
14public static Guid GetGUID(Type type) 19public static Guid GetIID(Type type) 29public static string GetSignature(Type type) 31var helperType = type.FindHelperType(); 37return (string)sigMethod.Invoke(null, new Type[] { }); 91if (Projections.TryGetDefaultInterfaceTypeForRuntimeClassType(type, out Type iface)) 131public static Guid CreateIID(Type type)
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (11)
352protected static readonly Type HelperType = typeof(T).GetHelperType(); 353protected static readonly Type AbiType = typeof(T).GetAbiType(); 354protected static readonly Type MarshalerType = typeof(T).GetMarshalerType(); 790private static readonly Type HelperType = typeof(T).GetHelperType(); 902var helperType = typeof(T).GetHelperType(); 907typeof(IObjectReference).GetMethod("As", Type.EmptyTypes).MakeGenericMethod(helperType.FindVftblType()) 943else if (Projections.TryGetMarshalerTypeForProjectedRuntimeClass(objRef, out Type type)) 992Type type = typeof(T); 1029else if (type.IsValueType || type == typeof(Type)) 1112public static readonly Type AbiType; 1113public static readonly Type RefAbiType;
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (39)
19private static readonly Dictionary<Type, Type> CustomTypeToHelperTypeMappings = new Dictionary<Type, Type>(); 20private static readonly Dictionary<Type, Type> CustomAbiTypeToTypeMappings = new Dictionary<Type, Type>(); 21private static readonly Dictionary<string, Type> CustomAbiTypeNameToTypeMappings = new Dictionary<string, Type>(); 22private static readonly Dictionary<Type, string> CustomTypeToAbiTypeNameMappings = new Dictionary<Type, string>(); 32private static void RegisterCustomAbiTypeMappingNoLock(Type publicType, Type abiType, string winrtTypeName, bool isRuntimeClass = false) 44public static Type FindCustomHelperTypeMapping(Type publicType) 51return CustomTypeToHelperTypeMappings.TryGetValue(publicType.GetGenericTypeDefinition(), out Type abiTypeDefinition) 55return CustomTypeToHelperTypeMappings.TryGetValue(publicType, out Type abiType) ? abiType : null; 63public static Type FindCustomPublicTypeForAbiType(Type abiType) 70return CustomAbiTypeToTypeMappings.TryGetValue(abiType.GetGenericTypeDefinition(), out Type publicTypeDefinition) 74return CustomAbiTypeToTypeMappings.TryGetValue(abiType, out Type publicType) ? publicType : null; 82public static Type FindCustomTypeForAbiTypeName(string abiTypeName) 87return CustomAbiTypeNameToTypeMappings.TryGetValue(abiTypeName, out Type type) ? type : null; 95public static string FindCustomAbiTypeNameForType(Type type) 108public static bool IsTypeWindowsRuntimeType(Type type) 110Type typeToTest = type; 118private static bool IsTypeWindowsRuntimeTypeNoArray(Type type) 124foreach (var arg in type.GetGenericArguments()) 143public static bool TryGetCompatibleWindowsRuntimeTypeForVariantType(Type type, out Type compatibleType) 151var definition = type.GetGenericTypeDefinition(); 160var newArguments = new Type[genericArguments.Length]; 184internal static bool TryGetDefaultInterfaceTypeForRuntimeClassType(Type runtimeClass, out Type defaultInterface) 197internal static Type GetDefaultInterfaceTypeForRuntimeClassType(Type runtimeClass) 199if (!TryGetDefaultInterfaceTypeForRuntimeClassType(runtimeClass, out Type defaultInterface)) 206internal static bool TryGetMarshalerTypeForProjectedRuntimeClass(IObjectReference objectReference, out Type type)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (2)
429private static readonly Type get_Current_0_Type = Expression.GetDelegateType(new Type[] { typeof(void*), Marshaler<T>.AbiType.MakeByRefType(), typeof(int) });
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (4)
219private static readonly Type GetAt_0_Type = Expression.GetDelegateType(new Type[] { typeof(void*), typeof(uint), Marshaler<T>.AbiType.MakeByRefType(), typeof(int) }); 220private static readonly Type IndexOf_2_Type = Expression.GetDelegateType(new Type[] { typeof(void*), Marshaler<T>.AbiType, typeof(uint).MakeByRefType(), typeof(byte).MakeByRefType(), typeof(int) });
MS\Internal\WindowsRuntime\Generated\WinRT\TypeExtensions.cs (18)
15public static Type FindHelperType(this Type type) 21Type customMapping = Projections.FindCustomHelperTypeMapping(type); 32return Type.GetType(helper) ?? Type.GetType(helperTypeName2); 35public static Type GetHelperType(this Type type) 37var helperType = type.FindHelperType(); 43public static Type GetGuidType(this Type type) 48public static Type FindVftblType(this Type helperType) 50Type vftblType = helperType.GetNestedType("Vftbl"); 62public static Type GetAbiType(this Type type) 67public static Type GetMarshalerType(this Type type) 72public static bool IsDelegate(this Type type)
src\Microsoft.DotNet.Wpf\src\Common\src\System\AppContextDefaultValues.cs (2)
81Type tAppDomainSetup = Type.GetType("System.AppDomainSetup");
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\HashHelper.cs (2)
38Type[] types = new Type[] {
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (18)
59public static TResult ReflectionStaticCall<TResult>(this Type type, string methodName) 64method = type.GetMethod(methodName, Type.EmptyTypes); 92public static TResult ReflectionStaticCall<TResult, TArg>(this Type type, string methodName, TArg arg) 97method = type.GetMethod(methodName, new Type[] { typeof(TArg) }); 147method = obj.GetType().GetMethod(methodName, Type.EmptyTypes); 179method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1) }); 233method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1), typeof(TArg2) }); 308public static object ReflectionNew(this Type type) 310ConstructorInfo constructor = type.GetConstructor(Type.EmptyTypes); 333public static object ReflectionNew<TArg1>(this Type type, TArg1 arg1) 335ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(TArg1) }); 360public static object ReflectionNew<TArg1, TArg2>(this Type type, TArg1 arg1, TArg2 arg2) 362ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(TArg1), typeof(TArg2) }); 381/// <exception cref="AmbiguousMatchException">More than one property is found with the specified name. See <see cref="Type.GetProperty(string)"/></exception> 388Type type = obj.GetType(); 406/// <exception cref="AmbiguousMatchException">More than one property is found with the specified name. See <see cref="Type.GetProperty(string)"/></exception> 422/// <exception cref="AmbiguousMatchException">More than one property is found with the specified name. See <see cref="Type.GetProperty(string)"/></exception> 426public static TResult ReflectionStaticGetProperty<TResult>(this Type type, string propertyName)
System\Windows\Application.cs (1)
229internal object GetService(Type serviceType)
System\Windows\AttachedPropertyBrowsableForChildrenAttribute.cs (1)
106Type ownerType = dp.OwnerType;
System\Windows\Automation\Peers\GridViewAutomationPeer.cs (1)
300internal static Visual FindVisualByType(Visual parent, Type type)
System\Windows\ComponentResourceKey.cs (3)
30public ComponentResourceKey(Type typeInTargetAssembly, object resourceId) 45public Type TypeInTargetAssembly 130private Type _typeInTargetAssembly;
System\Windows\ComponentResourceKeyConverter.cs (3)
33public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 52public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 98public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Controls\AlternationConverter.cs (2)
37public object Convert (object o, Type targetType, object parameter, CultureInfo culture) 54public object ConvertBack(object o, Type targetType, object parameter, CultureInfo culture)
System\Windows\Controls\BooleanToSelectiveScrollingOrientationConverter.cs (2)
26public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 45public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
System\Windows\Controls\BooleanToVisibilityConverter.cs (2)
33public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 56public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
System\Windows\Controls\BorderGapMaskConverter.cs (2)
34public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 134public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
System\Windows\Controls\ContentPresenter.cs (3)
213Type type; // unused 632internal static object DataTypeForItem(object item, DependencyObject target, out Type type) 1147object IServiceProvider.GetService(Type serviceType) { return null; }
System\Windows\Controls\DataGrid.cs (1)
41Type ownerType = typeof(DataGrid);
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (4)
28public DataGridAutoGeneratingColumnEventArgs(string propertyName, Type propertyType, DataGridColumn column) : 41Type propertyType, 84public Type PropertyType 141private Type _propertyType;
System\Windows\Controls\DataGridColumn.cs (1)
1161Type propertyType = itemProperty.PropertyType;
System\Windows\Controls\DataGridHeadersVisibilityToVisibilityConverter.cs (2)
27public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 65public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
System\Windows\Controls\DataGridLengthConverter.cs (5)
26public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 29TypeCode tc = Type.GetTypeCode(sourceType); 53public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 131Type destinationType) 146ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(DataGridLengthUnitType) });
System\Windows\Controls\DeferredRunTextReference.cs (1)
48internal override Type GetValueType()
System\Windows\Controls\DeferredSelectedIndexReference.cs (1)
48internal override Type GetValueType()
System\Windows\Controls\DeferredTextReference.cs (1)
56internal override Type GetValueType()
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1888object IServiceProvider.GetService(Type serviceType)
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1180Type headerType = (srcHeader != null ? srcHeader.GetType() : typeof(GridViewColumnHeader));
System\Windows\Controls\GridViewRowPresenter.cs (3)
93Type oldType = (e.OldValue != null) ? e.OldValue.GetType() : null; 94Type newType = (e.NewValue != null) ? e.NewValue.GetType() : null; 699private Type _oldContentType;
System\Windows\Controls\Image.cs (3)
613Type managerType = typeof(DownloadCompletedEventManager); 737Type managerType = typeof(DownloadFailedEventManager); 861Type managerType = typeof(DecodeFailedEventManager);
System\Windows\Controls\InkCanvas.cs (4)
59Type ownerType = typeof(InkCanvas); 2464Type ownerType = typeof(InkCanvas); 3013public object Convert(object o, Type type, object parameter, System.Globalization.CultureInfo culture) 3028public object ConvertBack(object o, Type type, object parameter, System.Globalization.CultureInfo culture)
System\Windows\Controls\ItemCollection.cs (1)
1940bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
System\Windows\Controls\ItemContainerGenerator.cs (3)
1114Type sourceType = source.GetType(); 2358bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 2804private Type _containerType; // type of containers on the recycle queue
System\Windows\Controls\ItemsPanelTemplate.cs (3)
70internal override Type TargetTypeInternal 77internal override void SetTargetTypeInternal(Type targetType) 83static internal Type DefaultTargetType
System\Windows\Controls\ItemsPresenter.cs (1)
309Type type = null;
System\Windows\Controls\MenuScrollingVisibilityConverter.cs (2)
43public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 113public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
System\Windows\Controls\PasswordTextNavigator.cs (2)
247Type ITextPointer.GetElementType(LogicalDirection direction) 606Type ITextPointer.ParentType
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (1)
38Type ownerType = typeof(DataGridColumnHeadersPresenter);
System\Windows\Controls\Primitives\DocumentPageView.cs (2)
509protected object GetService(Type serviceType) 1027object IServiceProvider.GetService(Type serviceType)
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1772object IServiceProvider.GetService(Type serviceType)
System\Windows\Controls\Primitives\GridViewRowPresenterBase.cs (2)
325bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs args) 471Type managerType = typeof(InternalCollectionChangedEventManager);
System\Windows\Controls\Primitives\Selector.cs (3)
610Type selectedType = (value != null) ? value.GetType() : null; 632private bool VerifyEqual(object knownValue, Type knownType, object itemValue, DynamicValueConverter converter) 638Type itemType = itemValue.GetType();
System\Windows\Controls\StickyNote.cs (5)
96Type owner = typeof(StickyNoteControl); 1914public object Convert(object o, Type type, object parameter, CultureInfo culture) 1930public object ConvertBack(object o, Type type, object parameter, CultureInfo culture) 1940public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 1958public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
System\Windows\Controls\TextBlock.cs (3)
145Type parentType = _complexContent.TextContainer.Parent.GetType(); 147Type valueType = value.GetType(); 278object IServiceProvider.GetService(Type serviceType)
System\Windows\Controls\ToolBar.cs (1)
476Type feType = fe.GetType();
System\Windows\Controls\VirtualizationCacheLengthConverter.cs (5)
40public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 43TypeCode tc = Type.GetTypeCode(sourceType); 71public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 136public override object ConvertTo(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value, Type destinationType) 152ConstructorInfo ci = typeof(VirtualizationCacheLength).GetConstructor(new Type[] { typeof(double), typeof(VirtualizationCacheLengthUnit) });
System\Windows\Controls\VirtualizingStackPanel.cs (1)
12257for (Type t = o.GetType(); !isWPFControl && t != null; t = t.BaseType)
System\Windows\Controls\WebBrowser.cs (2)
437Type t = value.GetType(); 1045return Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(CLSID.WebBrowser)));
System\Windows\ControlTemplate.cs (7)
46public ControlTemplate(Type targetType) 89public Type TargetType 132private void ValidateTargetType(Type targetType, string argName) 154internal override Type TargetTypeInternal 169internal override void SetTargetTypeInternal(Type targetType) 187private Type _targetType; 191internal static readonly Type DefaultTargetType = typeof(Control);
System\Windows\CornerRadiusConverter.cs (5)
42public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 45TypeCode tc = Type.GetTypeCode(sourceType); 73public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 133public override object ConvertTo(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value, Type destinationType) 149ConstructorInfo ci = typeof(CornerRadius).GetConstructor(new Type[] { typeof(double), typeof(double), typeof(double), typeof(double) });
System\Windows\Data\Binding.cs (1)
685internal override ValidationRule LookupValidationRule(Type type)
System\Windows\Data\BindingBase.cs (3)
429internal ValidationRule GetValidationRule(Type type) 443internal virtual ValidationRule LookupValidationRule(Type type) 448internal static ValidationRule LookupValidationRule(Type type, Collection<ValidationRule> collection)
System\Windows\Data\BindingExpression.cs (9)
359internal Type ConverterSourceType 425internal void SetupDefaultValueConverter(Type type) 1274Type targetType = GetEffectiveTargetType(); 1633private object ConvertHelper(IValueConverter converter, object value, Type targetType, object parameter, CultureInfo culture) 1704Type sourceType, 1861Type sourceType = Worker.SourcePropertyType; 2197private bool IsValidValueForUpdate(object value, Type sourceType) 2561bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 2759Type _sourceType;
System\Windows\Data\BindingExpressionBase.cs (9)
143Type type = parent.GetType(); 500bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 1611internal object NullValueForType(Type type) 1629internal ValidationRule LookupValidationRule(Type type) 1928internal virtual bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 2571internal Type GetEffectiveTargetType() 2573Type targetType = TargetProperty.PropertyType; 2594Type targetType = TargetProperty.PropertyType; 2672Type targetType = TargetProperty.PropertyType;
System\Windows\Data\BindingListCollectionView.cs (1)
2201Type itemType;
System\Windows\Data\CollectionContainer.cs (2)
282bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 290protected virtual bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
System\Windows\Data\CollectionView.cs (7)
1457Type itemType; 1513internal Type GetItemType(bool useRepresentativeItem) 1515Type collectionType = SourceCollection.GetType(); 1516Type[] interfaces = collectionType.GetInterfaces(); 1524Type interfaceType = interfaces[i]; 1529Type[] typeParameters = interfaceType.GetGenericArguments(); 1532Type type = typeParameters[0];
System\Windows\Data\CollectionViewSource.cs (15)
159typeof(Type), 162(Type)null, 172public Type CollectionViewType 174get { return (Type) GetValue(CollectionViewTypeProperty); } 182Type oldCollectionViewType = (Type) e.OldValue; 183Type newCollectionViewType = (Type) e.NewValue; 197protected virtual void OnCollectionViewTypeChanged(Type oldCollectionViewType, Type newCollectionViewType) 203Type type = (Type)o; 731bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 739protected virtual bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 913void EnsureView(object source, Type collectionViewType)
System\Windows\Data\CompositeCollection.cs (2)
425bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 433protected virtual bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
System\Windows\Data\DataChangedEventManager.cs (1)
130Type managerType = typeof(DataChangedEventManager);
System\Windows\Data\IMultiValueConverter.cs (2)
55object Convert(object[] values, Type targetType, object parameter, CultureInfo culture); 95object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture);
System\Windows\Data\IValueConverter.cs (2)
65object Convert(object value, Type targetType, object parameter, CultureInfo culture); 92object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture);
System\Windows\Data\ListCollectionView.cs (2)
696Type itemType = GetItemType(true); 699_itemConstructor = itemType.GetConstructor(Type.EmptyTypes);
System\Windows\Data\MultiBinding.cs (1)
357internal override ValidationRule LookupValidationRule(Type type)
System\Windows\Data\MultiBindingExpression.cs (3)
53_tempTypes = new Type[count]; 1091internal override bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e) 1445Type[] _tempTypes;
System\Windows\Data\ObjectDataProvider.cs (3)
96public Type ObjectType 369private bool SetObjectType(Type newType) 676Type _objectType;
System\Windows\Data\RelativeSource.cs (3)
67public RelativeSource(RelativeSourceMode mode, Type ancestorType, int ancestorLevel) 165public Type AncestorType 299private Type _ancestorType;
System\Windows\Data\ValueConversionAttribute.cs (8)
52public ValueConversionAttribute(Type sourceType, Type targetType) 63public Type SourceType 71public Type TargetType 79public Type ParameterType 114private Type _sourceType; 115private Type _targetType; 116private Type _parameterType;
System\Windows\DataTemplate.cs (3)
134internal override Type TargetTypeInternal 141internal override void SetTargetTypeInternal(Type targetType) 165static internal Type DefaultTargetType
System\Windows\DeferrableContentConverter.cs (1)
33public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
System\Windows\DialogResultConverter.cs (3)
37public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 49public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 73Type destinationType)
System\Windows\Documents\DocumentSequence.cs (2)
70object IServiceProvider.GetService(Type serviceType) 1090object IServiceProvider.GetService(Type serviceType)
System\Windows\Documents\DocumentSequenceHighlightLayer.cs (2)
100internal override Type OwnerType 161internal override Type OwnerType
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
880internal override object GetHighlightValue(StaticTextPointer textPosition, LogicalDirection direction, Type highlightLayerOwnerType)
System\Windows\Documents\DocumentSequenceTextPointer.cs (4)
130Type ITextPointer.GetElementType(LogicalDirection direction) 331Type ITextPointer.ParentType 701public static Type GetElementType(DocumentSequenceTextPointer thisTp, LogicalDirection direction) 713public static Type GetElementType(DocumentSequenceTextPointer thisTp)
System\Windows\Documents\DPTypeDescriptorContext.cs (1)
182object IServiceProvider.GetService(Type serviceType)
System\Windows\Documents\FixedDocument.cs (2)
102object IServiceProvider.GetService(Type serviceType) 1386object IServiceProvider.GetService(Type serviceType)
System\Windows\Documents\FixedElement.cs (1)
368internal Type Type
System\Windows\Documents\FixedTextPointer.cs (2)
165Type ITextPointer.GetElementType(LogicalDirection direction) 535Type ITextPointer.ParentType
System\Windows\Documents\FlowDocument.cs (2)
66static private readonly Type _typeofThis = typeof(FlowDocument); 1696object IServiceProvider.GetService(Type serviceType)
System\Windows\Documents\HighlightChangedEventArgs.cs (1)
27internal abstract Type OwnerType { get; }
System\Windows\Documents\HighlightLayer.cs (1)
80internal abstract Type OwnerType { get; }
System\Windows\Documents\Highlights.cs (5)
61internal virtual object GetHighlightValue(StaticTextPointer textPosition, LogicalDirection direction, Type highlightLayerOwnerType) 262internal HighlightLayer GetLayer(Type highlightLayerType) 410internal LayerHighlightChangedEventArgs(ReadOnlyCollection<TextSegment> ranges, Type ownerType) 426internal override Type OwnerType 438private readonly Type _ownerType;
System\Windows\Documents\ITextPointer.cs (2)
125Type GetElementType(LogicalDirection direction); 178Type ParentType { get; }
System\Windows\Documents\MsSpellCheckLib\SpellChecker\SpellChecker.cs (4)
646private static readonly Dictionary<bool, List<Type>> SuppressedExceptions = new Dictionary<bool, List<Type>> 648{false, new List<Type>{ /*empty*/ }}, 649{true, new List<Type> { typeof(COMException), typeof(UnauthorizedAccessException)}}
System\Windows\Documents\MsSpellCheckLib\SpellCheckerFactory\SpellCheckerFactory.cs (4)
57private static Dictionary<bool, List<Type>> SuppressedExceptions = new Dictionary<bool, List<Type>> 59{false, new List<Type> { /* empty */ } }, 60{true, new List<Type> { typeof(COMException), typeof(UnauthorizedAccessException)} }
System\Windows\Documents\MsSpellCheckLib\Utils\RetryHelper.cs (8)
54List<Type> ignoredExceptions, 110List<Type> ignoredExceptions, 170List<Type> ignoredExceptions, 232List<Type> ignoredExceptions, 285private static bool MatchException(Exception exception, List<Type> exceptions) 290Type exceptionType = exception.GetType(); 292Type match = exceptions.Find((e) => e.IsAssignableFrom(exceptionType)); 300private static void ValidateExceptionTypeList(List<Type> exceptions)
System\Windows\Documents\NullTextNavigator.cs (2)
122Type ITextPointer.GetElementType(LogicalDirection direction) 411Type ITextPointer.ParentType
System\Windows\Documents\Serialization\SerializerDescriptor.cs (1)
97Type factoryType = factoryInstance.GetType();
System\Windows\Documents\SpellerHighlightLayer.cs (2)
105internal override Type OwnerType 222internal override Type OwnerType
System\windows\Documents\TextEditor.cs (4)
327internal static void RegisterCommandHandlers(Type controlType, bool acceptsRichContent, bool readOnly, bool registerEventListeners) 336if (((Type)_registeredEditingTypes[i]).IsAssignableFrom(controlType)) 344if (controlType.IsAssignableFrom((Type)_registeredEditingTypes[i])) 347SR.Format(SR.TextEditorCanNotRegisterCommandHandler, ((Type)_registeredEditingTypes[i]).Name, controlType.Name));
System\windows\Documents\TextEditorCharacters.cs (1)
45internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners)
System\windows\Documents\TextEditorContextMenu.cs (1)
35internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners)
System\windows\Documents\TextEditorCopyPaste.cs (1)
48internal static void _RegisterClassHandlers(Type controlType, bool acceptsRichContent, bool readOnly, bool registerEventListeners)
System\windows\Documents\TextEditorDragDrop.cs (1)
53internal static void _RegisterClassHandlers(Type controlType, bool readOnly, bool registerEventListeners)
System\windows\Documents\TextEditorLists.cs (1)
44internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners)
System\windows\Documents\TextEditorMouse.cs (1)
46internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners)
System\windows\Documents\TextEditorParagraphs.cs (1)
45internal static void _RegisterClassHandlers(Type controlType, bool acceptsRichContent, bool registerEventListeners)
System\windows\Documents\TextEditorSelection.cs (1)
47internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners)
System\windows\Documents\TextEditorSpelling.cs (1)
30internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners)
System\windows\Documents\TextEditorTables.cs (1)
45internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners)
System\windows\Documents\TextEditorTyping.cs (2)
60internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners) 827Type parentType = position.ParentType;
System\Windows\Documents\TextElement.cs (1)
805Type valueType = value.GetType();
System\Windows\Documents\TextElementCollection.cs (1)
602Type elementType = array.GetType().GetElementType();
System\Windows\Documents\TextPointer.cs (3)
1425Type containerType = this.TextContainer.Parent.GetType(); 2414Type ITextPointer.GetElementType(LogicalDirection direction) 3614Type ITextPointer.ParentType
System\Windows\Documents\TextPointerBase.cs (10)
184Type forwardType = forwardPosition.GetElementType(LogicalDirection.Forward); 185Type backwardType = backwardPosition.GetElementType(LogicalDirection.Backward); 229Type parentType = position.ParentType; 282private static bool IsInAncestorScope(ITextPointer position, Type allowedParentType, Type limitingType) 285Type parentType = navigator.ParentType; 319Type elementType; 596Type elementType = position.GetElementType(direction); 1518private static bool IsNextToRichBreak(ITextPointer thisPosition, LogicalDirection direction, Type lineBreakType) 1526Type neighbor = thisPosition.GetElementType(direction);
System\Windows\Documents\TextRangeBase.cs (1)
679Type elementType;
System\Windows\Documents\TextRangeSerialization.cs (16)
543Type elementType = textReader.ParentType; 545Type elementTypeStandardized = TextSchema.GetStandardElementType(elementType, reduceElement); 652Type rootType; 663Type contextType = context.ParentType; 770private static void WriteInheritableProperties(Type elementTypeStandardized, ITextPointer context, XmlWriter xmlWriter, bool onlyAffected, DependencyObject complexProperties) 835private static void WriteNoninheritableProperties(Type elementTypeStandardized, ITextPointer context, XmlWriter xmlWriter, bool onlyAffected, DependencyObject complexProperties) 845Type propertyOwnerType = context.ParentType; 914private static void WriteNoninheritableProperty(XmlWriter xmlWriter, DependencyProperty property, object propertyValue, Type propertyOwnerType, bool onlyAffected, DependencyObject complexProperties, object localValue) 954private static void WriteLocallySetProperties(Type elementTypeStandardized, ITextPointer context, XmlWriter xmlWriter, DependencyObject complexProperties) 1064private static void WriteComplexProperties(XmlWriter xmlWriter, DependencyObject complexProperties, Type elementType) 1093private static string GetPropertyNameForElement(DependencyProperty property, Type elementType, bool forceComplexName) 1121Type elementTypeStandardized = TextSchema.GetStandardElementType(element.GetType(), reduceElement); 1168Type elementTypeStandardized = typeof(Image); 1513private static void ValidateMergingPositions(Type itemType, TextPointer start, TextPointer end) 1604private static void ApplyContextualProperty(Type targetType, TextPointer start, TextPointer end, DependencyProperty property, object value) 1941private static string FilterNaNStringValueForDoublePropertyType(string stringValue, Type propertyType)
System\Windows\Documents\TextSchema.cs (25)
121internal static bool IsValidChild(TextElement parent, Type childType) 126internal static bool ValidateChild(TextElement parent, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 152internal static bool IsValidChild(TextPointer position, Type childType) 157internal static bool ValidateChild(TextPointer position, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 184internal static bool IsValidSibling(Type siblingType, Type newType) 217internal static bool IsValidChild(ITextPointer position, Type childType) 233internal static bool IsValidChildOfContainer(Type parentType, Type childType) 258internal static bool IsFormattingType(Type elementType) 269internal static bool IsKnownType(Type elementType) 275internal static bool IsNonFormattingInline(Type elementType) 280internal static bool IsMergeableInline(Type elementType) 285internal static bool IsNonMergeableInline(Type elementType) 304internal static bool AllowsParagraphMerging(Type elementType) 324internal static bool IsParagraphOrBlockUIContainer(Type elementType) 332internal static bool IsBlock(Type type) 338internal static bool IsBreak(Type type) 362internal static Type GetStandardElementType(Type type, bool reduceElement) 455internal static DependencyProperty[] GetInheritableProperties(Type type) 476internal static DependencyProperty[] GetNoninheritableProperties(Type type) 759Type propertyType = property.PropertyType; 805private static bool IsValidChild(Type parentType, Type childType)
System\windows\Documents\TextSelectionHighlightLayer.cs (2)
265internal override Type OwnerType 365internal override Type OwnerType
System\Windows\Documents\TextStore.cs (1)
4854for (Type t = o.GetType(); !isWPFControl && t != null; t = t.BaseType)
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
407internal ElementContentContainer(Type elementType, PropertyRecord[] localValues, ResourceDictionary resources, ContentContainer childContainer) 448private readonly Type _elementType;
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (1)
98private readonly Type _type;
System\Windows\Documents\Typography.cs (2)
33static private readonly Type _typeofThis = typeof(Typography); 34static private readonly Type _typeofBool = typeof(bool);
System\Windows\Documents\XPSS0ValidatingLoader.cs (2)
63List<Type> safeTypes = new List<Type> { typeof(System.Windows.ResourceDictionary) };
System\Windows\Documents\ZoomPercentageConverter.cs (2)
65public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 129public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
System\Windows\DynamicResourceExtensionConverter.cs (3)
31public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 43public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) 54return new InstanceDescriptor(typeof(DynamicResourceExtension).GetConstructor(new Type[] { typeof(object) }),
System\Windows\EventSetterHandlerConverter.cs (4)
21static Type s_ServiceProviderContextType; 26public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 42public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 93Type destinationType)
System\Windows\FigureLengthConverter.cs (5)
52Type sourceType) 55TypeCode tc = Type.GetTypeCode(sourceType); 86Type destinationType) 148Type destinationType) 164ConstructorInfo ci = typeof(FigureLength).GetConstructor(new Type[] { typeof(double), typeof(FigureUnitType) });
System\Windows\FontSizeConverter.cs (3)
42public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 56public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 110public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\FrameworkElement.cs (3)
114static private readonly Type _typeofThis = typeof(FrameworkElement); 1419internal static object FindTemplateResourceInternal(DependencyObject target, object item, Type templateType) 1427Type type;
System\Windows\FrameworkElementFactory.cs (7)
47public FrameworkElementFactory(Type type) : this(type, null) 66public FrameworkElementFactory(Type type, string name) 76public Type Type 1110internal static void AddNodeToLogicalTree( DependencyObject parent, Type type, 1184Type targetType = _frameworkTemplate.TargetTypeInternal; 1227Type targetType = _frameworkTemplate.TargetTypeInternal; 1278private Type _type;
System\Windows\FrameworkPropertyMetadata.cs (1)
637protected override void OnApply(DependencyProperty dp, Type targetType)
System\Windows\FrameworkTemplate.cs (5)
1325internal virtual Type TargetTypeInternal 1332internal abstract void SetTargetTypeInternal(Type targetType); 1495internal Dictionary<int, Type> ChildTypeFromChildIndex 1533private Dictionary<int, Type> _childTypeFromChildIndex = new Dictionary<int, Type>();
System\Windows\GridLengthConverter.cs (5)
54Type sourceType) 57TypeCode tc = Type.GetTypeCode(sourceType); 88Type destinationType) 167Type destinationType) 183ConstructorInfo ci = typeof(GridLength).GetConstructor(new Type[] { typeof(double), typeof(GridUnitType) });
System\Windows\Input\Command\CommandConverter.cs (10)
49public override bool CanConvertFrom( ITypeDescriptorContext context, Type sourceType ) 68public override bool CanConvertTo( ITypeDescriptorContext context, Type destinationType ) 108Type ownerType = GetTypeFromContext(context, typeName); 128internal static ICommand ConvertFromHelper(Type ownerType, string localName ) 173public override object ConvertTo( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) 200internal static bool IsKnownType( Type commandType ) 214private Type GetTypeFromContext( ITypeDescriptorContext context, string typeName ) 243private static RoutedUICommand GetKnownCommand( string localName, Type ownerType ) 762internal static object GetKnownControlCommand(Type ownerType, string commandName) 809static void VerifyCommandDoesntExist( Type type, string name )
System\Windows\Input\Command\CommandValueSerializer.cs (8)
22if (context == null || context.GetValueSerializerFor(typeof(Type)) == null) 40Type ownerType = command.OwnerType; 84typeSerializer = context.GetValueSerializerFor(typeof(Type)); 100public override IEnumerable<Type> TypeReferences(object value, IValueSerializerContext context) 109return new Type[] { command.OwnerType }; 122Type declaringType = null; 141ValueSerializer typeSerializer = context.GetValueSerializerFor(typeof(Type)); 149declaringType = typeSerializer.ConvertFromString(typeName, context) as Type;
System\Windows\Interop\ActiveXHost.cs (1)
283return Activator.CreateInstance(Type.GetTypeFromCLSID(clsid));
System\Windows\Interop\DynamicScriptObject.cs (2)
351Type argType = args[i].GetType(); 616Type type = value.GetType();
System\Windows\LengthConverter.cs (5)
49public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 52TypeCode tc = Type.GetTypeCode(sourceType); 79public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 142Type destinationType) 159ConstructorInfo ci = typeof(double).GetConstructor(new Type[] { typeof(double) });
System\Windows\LostFocusEventManager.cs (1)
143Type managerType = typeof(LostFocusEventManager);
System\Windows\Markup\AttributeData.cs (8)
71Type targetType, 73Type declaringType, 76Type serializerType, 97internal Type SerializerType; // Type of serializer (if any) 128Type targetType, 130Type declaringType, 149internal Type TargetType; // Target type 150internal Type DeclaringType; // Type where Attribute is declared
System\Windows\Markup\Baml2006\Baml2006KeyRecord.cs (3)
17public KeyRecord(bool shared, bool sharedSet, int valuePosition, Type keyType) : 82public Type KeyType 84get { return _data as Type; }
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (4)
32private delegate Type LazyTypeOf(); 54public static Type GetAttachableTargetType(Int16 propertyId) 90public static Type GetKnownType(Int16 typeId) 2063public static Type GetTypeConverterForKnownProperty(Int16 propertyId)
System\Windows\Markup\Baml2006\Baml2006Reader.cs (15)
38private Dictionary<Type, TypeConverter> _enumTypeConverterMap = new Dictionary<Type, TypeConverter>(); 391internal Type GetTypeOfFirstStartObject(KeyRecord record) 887Type memberType; 993Type type = Baml2006SchemaContext.KnownTypes.GetKnownType(typeId); 1135Type rootType = _root.GetType(); 1375Type currentType = eventProperty.DeclaringType.UnderlyingType; 1547Type type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16()).UnderlyingType; 1587Type propertyType = property.Type.UnderlyingType; 1644Type typeExtensionType = null; 1645Type memberType = null; 1661Type ownerType = null; 1756Type ownerType = null; 1911Type memberType = null; 2617private string GetStaticExtensionValue(short valueId, out Type memberType, out object providedValue)
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (4)
65public override XamlType GetXamlType(Type type) 156internal Type GetClrType(Int16 typeId) 538private Type ResolveBamlTypeToType(BamlType bamlType) 555Type type = ResolveBamlTypeToType(bamlType);
System\Windows\Markup\Baml2006\Baml6ConstructorInfo.cs (3)
13public Baml6ConstructorInfo(List<Type> types, Func<Object[], object> ctor) 19List<Type> _types; 22public List<Type> Types { get { return _types; } }
System\Windows\Markup\Baml2006\DeferredBinaryDeserializerExtension.cs (1)
68object IServiceProvider.GetService(Type serviceType)
System\Windows\Markup\Baml2006\TypeConverterMarkupExtension.cs (1)
35object IServiceProvider.GetService(Type serviceType)
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (405)
1720Type type = typeof(System.Windows.Controls.AccessText); 1737Type type = typeof(System.Windows.Media.Animation.BeginStoryboard); 1753Type type = typeof(System.Windows.Media.Effects.BitmapEffectGroup); 1769Type type = typeof(System.Windows.Controls.Border); 1786Type type = typeof(System.Windows.Controls.Border); 1803Type type = typeof(System.Windows.Controls.Border); 1820Type type = typeof(System.Windows.Controls.Primitives.ButtonBase); 1837Type type = typeof(System.Windows.Controls.Primitives.ButtonBase); 1855Type type = typeof(System.Windows.Controls.Primitives.ButtonBase); 1871Type type = typeof(System.Windows.Controls.Primitives.ButtonBase); 1889Type type = typeof(System.Windows.Controls.ColumnDefinition); 1906Type type = typeof(System.Windows.Controls.ColumnDefinition); 1923Type type = typeof(System.Windows.Controls.ColumnDefinition); 1940Type type = typeof(System.Windows.Controls.ContentControl); 1958Type type = typeof(System.Windows.Controls.ContentControl); 1974Type type = typeof(System.Windows.Controls.ContentControl); 1990Type type = typeof(System.Windows.Controls.ContentControl); 2008Type type = typeof(System.Windows.ContentElement); 2025Type type = typeof(System.Windows.Controls.ContentPresenter); 2043Type type = typeof(System.Windows.Controls.ContentPresenter); 2060Type type = typeof(System.Windows.Controls.ContentPresenter); 2076Type type = typeof(System.Windows.Controls.ContentPresenter); 2092Type type = typeof(System.Windows.Controls.ContentPresenter); 2109Type type = typeof(System.Windows.Controls.Control); 2126Type type = typeof(System.Windows.Controls.Control); 2143Type type = typeof(System.Windows.Controls.Control); 2160Type type = typeof(System.Windows.Controls.Control); 2177Type type = typeof(System.Windows.Controls.Control); 2194Type type = typeof(System.Windows.Controls.Control); 2211Type type = typeof(System.Windows.Controls.Control); 2228Type type = typeof(System.Windows.Controls.Control); 2245Type type = typeof(System.Windows.Controls.Control); 2262Type type = typeof(System.Windows.Controls.Control); 2279Type type = typeof(System.Windows.Controls.Control); 2296Type type = typeof(System.Windows.Controls.Control); 2313Type type = typeof(System.Windows.Controls.Control); 2330Type type = typeof(System.Windows.Controls.Control); 2346Type type = typeof(System.Windows.Controls.Control); 2363Type type = typeof(System.Windows.Controls.DockPanel); 2380Type type = typeof(System.Windows.Controls.DockPanel); 2397Type type = typeof(System.Windows.Controls.Primitives.DocumentViewerBase); 2413Type type = typeof(System.Windows.Media.DrawingGroup); 2429Type type = typeof(System.Windows.Controls.FlowDocumentReader); 2445Type type = typeof(System.Windows.Controls.FlowDocumentScrollViewer); 2461Type type = typeof(System.Windows.FrameworkContentElement); 2477Type type = typeof(System.Windows.FrameworkElement); 2494Type type = typeof(System.Windows.FrameworkElement); 2511Type type = typeof(System.Windows.FrameworkElement); 2528Type type = typeof(System.Windows.FrameworkElement); 2545Type type = typeof(System.Windows.FrameworkElement); 2562Type type = typeof(System.Windows.FrameworkElement); 2579Type type = typeof(System.Windows.FrameworkElement); 2596Type type = typeof(System.Windows.FrameworkElement); 2613Type type = typeof(System.Windows.FrameworkElement); 2630Type type = typeof(System.Windows.FrameworkElement); 2646Type type = typeof(System.Windows.FrameworkElement); 2663Type type = typeof(System.Windows.FrameworkElement); 2680Type type = typeof(System.Windows.Media.GeneralTransformGroup); 2696Type type = typeof(System.Windows.Media.GeometryGroup); 2712Type type = typeof(System.Windows.Media.GradientBrush); 2728Type type = typeof(System.Windows.Controls.Grid); 2745Type type = typeof(System.Windows.Controls.Grid); 2762Type type = typeof(System.Windows.Controls.Grid); 2779Type type = typeof(System.Windows.Controls.Grid); 2796Type type = typeof(System.Windows.Controls.GridViewColumn); 2814Type type = typeof(System.Windows.Controls.HeaderedContentControl); 2832Type type = typeof(System.Windows.Controls.HeaderedContentControl); 2850Type type = typeof(System.Windows.Controls.HeaderedContentControl); 2866Type type = typeof(System.Windows.Controls.HeaderedContentControl); 2882Type type = typeof(System.Windows.Controls.HeaderedItemsControl); 2900Type type = typeof(System.Windows.Controls.HeaderedItemsControl); 2918Type type = typeof(System.Windows.Controls.HeaderedItemsControl); 2934Type type = typeof(System.Windows.Controls.HeaderedItemsControl); 2950Type type = typeof(System.Windows.Documents.Hyperlink); 2967Type type = typeof(System.Windows.Controls.Image); 2984Type type = typeof(System.Windows.Controls.Image); 3001Type type = typeof(System.Windows.Controls.ItemsControl); 3017Type type = typeof(System.Windows.Controls.ItemsControl); 3033Type type = typeof(System.Windows.Controls.ItemsControl); 3049Type type = typeof(System.Windows.Controls.ItemsControl); 3065Type type = typeof(System.Windows.Controls.ItemsControl); 3081Type type = typeof(System.Windows.Controls.ItemsControl); 3097Type type = typeof(System.Windows.Media.Media3D.MaterialGroup); 3113Type type = typeof(System.Windows.Media.Media3D.Model3DGroup); 3129Type type = typeof(System.Windows.Controls.Page); 3147Type type = typeof(System.Windows.Controls.Panel); 3164Type type = typeof(System.Windows.Shapes.Path); 3181Type type = typeof(System.Windows.Media.PathFigure); 3197Type type = typeof(System.Windows.Media.PathGeometry); 3214Type type = typeof(System.Windows.Controls.Primitives.Popup); 3230Type type = typeof(System.Windows.Controls.Primitives.Popup); 3247Type type = typeof(System.Windows.Controls.Primitives.Popup); 3264Type type = typeof(System.Windows.Controls.Primitives.Popup); 3281Type type = typeof(System.Windows.Controls.RowDefinition); 3298Type type = typeof(System.Windows.Controls.RowDefinition); 3315Type type = typeof(System.Windows.Controls.RowDefinition); 3332Type type = typeof(System.Windows.Controls.ScrollViewer); 3349Type type = typeof(System.Windows.Controls.ScrollViewer); 3366Type type = typeof(System.Windows.Controls.ScrollViewer); 3383Type type = typeof(System.Windows.Shapes.Shape); 3400Type type = typeof(System.Windows.Shapes.Shape); 3417Type type = typeof(System.Windows.Shapes.Shape); 3434Type type = typeof(System.Windows.Controls.TextBlock); 3451Type type = typeof(System.Windows.Controls.TextBlock); 3468Type type = typeof(System.Windows.Controls.TextBlock); 3485Type type = typeof(System.Windows.Controls.TextBlock); 3502Type type = typeof(System.Windows.Controls.TextBlock); 3519Type type = typeof(System.Windows.Controls.TextBlock); 3536Type type = typeof(System.Windows.Controls.TextBlock); 3553Type type = typeof(System.Windows.Controls.TextBlock); 3570Type type = typeof(System.Windows.Controls.TextBlock); 3587Type type = typeof(System.Windows.Controls.TextBlock); 3604Type type = typeof(System.Windows.Controls.TextBlock); 3621Type type = typeof(System.Windows.Controls.TextBox); 3638Type type = typeof(System.Windows.Controls.TextBox); 3655Type type = typeof(System.Windows.Documents.TextElement); 3672Type type = typeof(System.Windows.Documents.TextElement); 3689Type type = typeof(System.Windows.Documents.TextElement); 3706Type type = typeof(System.Windows.Documents.TextElement); 3723Type type = typeof(System.Windows.Documents.TextElement); 3740Type type = typeof(System.Windows.Documents.TextElement); 3757Type type = typeof(System.Windows.Documents.TextElement); 3774Type type = typeof(System.Windows.Media.Animation.TimelineGroup); 3790Type type = typeof(System.Windows.Controls.Primitives.Track); 3807Type type = typeof(System.Windows.Controls.Primitives.Track); 3824Type type = typeof(System.Windows.Controls.Primitives.Track); 3841Type type = typeof(System.Windows.Controls.Primitives.Track); 3858Type type = typeof(System.Windows.Controls.Primitives.Track); 3875Type type = typeof(System.Windows.Controls.Primitives.Track); 3892Type type = typeof(System.Windows.Media.Media3D.Transform3DGroup); 3908Type type = typeof(System.Windows.Media.TransformGroup); 3924Type type = typeof(System.Windows.UIElement); 3941Type type = typeof(System.Windows.UIElement); 3958Type type = typeof(System.Windows.UIElement); 3975Type type = typeof(System.Windows.UIElement); 3992Type type = typeof(System.Windows.UIElement); 4009Type type = typeof(System.Windows.Controls.Viewport3D); 4026Type type = typeof(System.Windows.Controls.AdornedElementPlaceholder); 4043Type type = typeof(System.Windows.Documents.AdornerDecorator); 4060Type type = typeof(System.Windows.Documents.AnchoredBlock); 4077Type type = typeof(System.Windows.Markup.ArrayExtension); 4094Type type = typeof(System.Windows.Documents.BlockUIContainer); 4111Type type = typeof(System.Windows.Documents.Bold); 4128Type type = typeof(System.Windows.Media.Animation.BooleanAnimationUsingKeyFrames); 4145Type type = typeof(System.Windows.Controls.Border); 4162Type type = typeof(System.Windows.Controls.Primitives.BulletDecorator); 4179Type type = typeof(System.Windows.Controls.Button); 4197Type type = typeof(System.Windows.Controls.Primitives.ButtonBase); 4215Type type = typeof(System.Windows.Media.Animation.ByteAnimationUsingKeyFrames); 4232Type type = typeof(System.Windows.Controls.Canvas); 4249Type type = typeof(System.Windows.Media.Animation.CharAnimationUsingKeyFrames); 4266Type type = typeof(System.Windows.Controls.CheckBox); 4284Type type = typeof(System.Windows.Media.Animation.ColorAnimationUsingKeyFrames); 4301Type type = typeof(System.Windows.Controls.ComboBox); 4318Type type = typeof(System.Windows.Controls.ComboBoxItem); 4336Type type = typeof(System.Windows.Controls.ContextMenu); 4353Type type = typeof(System.Windows.Controls.ControlTemplate); 4370Type type = typeof(System.Windows.DataTemplate); 4387Type type = typeof(System.Windows.DataTrigger); 4404Type type = typeof(System.Windows.Media.Animation.DecimalAnimationUsingKeyFrames); 4421Type type = typeof(System.Windows.Controls.Decorator); 4438Type type = typeof(System.Windows.Controls.DockPanel); 4455Type type = typeof(System.Windows.Controls.DocumentViewer); 4471Type type = typeof(System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames); 4488Type type = typeof(System.Windows.EventTrigger); 4505Type type = typeof(System.Windows.Controls.Expander); 4523Type type = typeof(System.Windows.Documents.Figure); 4540Type type = typeof(System.Windows.Documents.FixedDocument); 4557Type type = typeof(System.Windows.Documents.FixedDocumentSequence); 4574Type type = typeof(System.Windows.Documents.FixedPage); 4591Type type = typeof(System.Windows.Documents.Floater); 4608Type type = typeof(System.Windows.Documents.FlowDocument); 4625Type type = typeof(System.Windows.Controls.FlowDocumentPageViewer); 4641Type type = typeof(System.Windows.FrameworkTemplate); 4658Type type = typeof(System.Windows.Controls.Grid); 4675Type type = typeof(System.Windows.Controls.GridView); 4692Type type = typeof(System.Windows.Controls.GridViewColumnHeader); 4710Type type = typeof(System.Windows.Controls.GroupBox); 4728Type type = typeof(System.Windows.Controls.GroupItem); 4746Type type = typeof(System.Windows.Controls.HeaderedContentControl); 4764Type type = typeof(System.Windows.Controls.HeaderedItemsControl); 4781Type type = typeof(System.Windows.HierarchicalDataTemplate); 4798Type type = typeof(System.Windows.Documents.Hyperlink); 4815Type type = typeof(System.Windows.Controls.InkCanvas); 4832Type type = typeof(System.Windows.Controls.InkPresenter); 4849Type type = typeof(System.Windows.Documents.InlineUIContainer); 4866Type type = typeof(System.Windows.Input.InputScopeName); 4884Type type = typeof(System.Windows.Media.Animation.Int16AnimationUsingKeyFrames); 4901Type type = typeof(System.Windows.Media.Animation.Int32AnimationUsingKeyFrames); 4918Type type = typeof(System.Windows.Media.Animation.Int64AnimationUsingKeyFrames); 4935Type type = typeof(System.Windows.Documents.Italic); 4952Type type = typeof(System.Windows.Controls.ItemsControl); 4969Type type = typeof(System.Windows.Controls.ItemsPanelTemplate); 4986Type type = typeof(System.Windows.Controls.Label); 5004Type type = typeof(System.Windows.Media.LinearGradientBrush); 5020Type type = typeof(System.Windows.Documents.List); 5037Type type = typeof(System.Windows.Controls.ListBox); 5054Type type = typeof(System.Windows.Controls.ListBoxItem); 5072Type type = typeof(System.Windows.Documents.ListItem); 5089Type type = typeof(System.Windows.Controls.ListView); 5106Type type = typeof(System.Windows.Controls.ListViewItem); 5124Type type = typeof(System.Windows.Media.Animation.MatrixAnimationUsingKeyFrames); 5141Type type = typeof(System.Windows.Controls.Menu); 5158Type type = typeof(System.Windows.Controls.Primitives.MenuBase); 5175Type type = typeof(System.Windows.Controls.MenuItem); 5192Type type = typeof(System.Windows.Media.Media3D.ModelVisual3D); 5209Type type = typeof(System.Windows.Data.MultiBinding); 5226Type type = typeof(System.Windows.MultiDataTrigger); 5243Type type = typeof(System.Windows.MultiTrigger); 5260Type type = typeof(System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames); 5277Type type = typeof(System.Windows.Documents.PageContent); 5294Type type = typeof(System.Windows.Navigation.PageFunctionBase); 5312Type type = typeof(System.Windows.Controls.Panel); 5329Type type = typeof(System.Windows.Documents.Paragraph); 5346Type type = typeof(System.Windows.Media.Animation.ParallelTimeline); 5362Type type = typeof(System.Windows.Media.Animation.Point3DAnimationUsingKeyFrames); 5379Type type = typeof(System.Windows.Media.Animation.PointAnimationUsingKeyFrames); 5396Type type = typeof(System.Windows.Data.PriorityBinding); 5413Type type = typeof(System.Windows.Media.Animation.QuaternionAnimationUsingKeyFrames); 5430Type type = typeof(System.Windows.Media.RadialGradientBrush); 5446Type type = typeof(System.Windows.Controls.RadioButton); 5464Type type = typeof(System.Windows.Media.Animation.RectAnimationUsingKeyFrames); 5481Type type = typeof(System.Windows.Controls.Primitives.RepeatButton); 5499Type type = typeof(System.Windows.Controls.RichTextBox); 5516Type type = typeof(System.Windows.Controls.RichTextBox); 5533Type type = typeof(System.Windows.Media.Animation.Rotation3DAnimationUsingKeyFrames); 5550Type type = typeof(System.Windows.Documents.Run); 5567Type type = typeof(System.Windows.Controls.ScrollViewer); 5585Type type = typeof(System.Windows.Documents.Section); 5602Type type = typeof(System.Windows.Controls.Primitives.Selector); 5619Type type = typeof(System.Windows.Media.Animation.SingleAnimationUsingKeyFrames); 5636Type type = typeof(System.Windows.Media.Animation.SizeAnimationUsingKeyFrames); 5653Type type = typeof(System.Windows.Documents.Span); 5670Type type = typeof(System.Windows.Controls.StackPanel); 5687Type type = typeof(System.Windows.Controls.Primitives.StatusBar); 5704Type type = typeof(System.Windows.Controls.Primitives.StatusBarItem); 5722Type type = typeof(System.Windows.Media.Animation.Storyboard); 5738Type type = typeof(System.Windows.Media.Animation.StringAnimationUsingKeyFrames); 5755Type type = typeof(System.Windows.Style); 5772Type type = typeof(System.Windows.Controls.TabControl); 5789Type type = typeof(System.Windows.Controls.TabItem); 5807Type type = typeof(System.Windows.Controls.Primitives.TabPanel); 5824Type type = typeof(System.Windows.Documents.Table); 5841Type type = typeof(System.Windows.Documents.TableCell); 5858Type type = typeof(System.Windows.Documents.TableRow); 5875Type type = typeof(System.Windows.Documents.TableRowGroup); 5892Type type = typeof(System.Windows.Controls.TextBlock); 5909Type type = typeof(System.Windows.Media.Animation.ThicknessAnimationUsingKeyFrames); 5926Type type = typeof(System.Windows.Controls.Primitives.ToggleButton); 5944Type type = typeof(System.Windows.Controls.ToolBar); 5961Type type = typeof(System.Windows.Controls.Primitives.ToolBarOverflowPanel); 5978Type type = typeof(System.Windows.Controls.Primitives.ToolBarPanel); 5995Type type = typeof(System.Windows.Controls.ToolBarTray); 6012Type type = typeof(System.Windows.Controls.ToolTip); 6030Type type = typeof(System.Windows.Controls.TreeView); 6047Type type = typeof(System.Windows.Controls.TreeViewItem); 6064Type type = typeof(System.Windows.Trigger); 6081Type type = typeof(System.Windows.Documents.Underline); 6098Type type = typeof(System.Windows.Controls.Primitives.UniformGrid); 6115Type type = typeof(System.Windows.Controls.UserControl); 6133Type type = typeof(System.Windows.Media.Animation.Vector3DAnimationUsingKeyFrames); 6150Type type = typeof(System.Windows.Media.Animation.VectorAnimationUsingKeyFrames); 6167Type type = typeof(System.Windows.Controls.Viewbox); 6184Type type = typeof(System.Windows.Media.Media3D.Viewport3DVisual); 6201Type type = typeof(System.Windows.Controls.VirtualizingPanel); 6218Type type = typeof(System.Windows.Controls.VirtualizingStackPanel); 6235Type type = typeof(System.Windows.Window); 6253Type type = typeof(System.Windows.Controls.WrapPanel); 6270Type type = typeof(System.Windows.Data.XmlDataProvider); 6287Type type = typeof(System.Windows.Controls.ControlTemplate); 6304Type type = typeof(System.Windows.DataTemplate); 6321Type type = typeof(System.Windows.DataTemplate); 6340Type type = typeof(System.Windows.Controls.ControlTemplate); 6344typeof(System.Type), // type 6349bamlMember.TypeConverterType = typeof(System.Type); 6351bamlMember.SetDelegate = delegate(object target, object value) { ((System.Windows.Controls.ControlTemplate)target).TargetType = (System.Type)value; }; 6360Type type = typeof(System.Windows.FrameworkElement); 6378Type type = typeof(System.Windows.FrameworkTemplate); 6397Type type = typeof(System.Windows.Controls.Grid); 6414Type type = typeof(System.Windows.Controls.Grid); 6431Type type = typeof(System.Windows.MultiTrigger); 6448Type type = typeof(System.Windows.NameScope); 6464Type type = typeof(System.Windows.Style); 6468typeof(System.Type), // type 6473bamlMember.TypeConverterType = typeof(System.Type); 6475bamlMember.SetDelegate = delegate(object target, object value) { ((System.Windows.Style)target).TargetType = (System.Type)value; }; 6484Type type = typeof(System.Windows.Style); 6501Type type = typeof(System.Windows.Setter); 6519Type type = typeof(System.Windows.Setter); 6538Type type = typeof(System.Windows.Data.Binding); 6556Type type = typeof(System.Windows.ComponentResourceKey); 6575Type type = typeof(System.Windows.ComponentResourceKey); 6579typeof(System.Type), // type 6584bamlMember.TypeConverterType = typeof(System.Type); 6585bamlMember.SetDelegate = delegate(object target, object value) { ((System.Windows.ComponentResourceKey)target).TypeInTargetAssembly = (System.Type)value; }; 6594Type type = typeof(System.Windows.Data.Binding); 6611Type type = typeof(System.Windows.Data.Binding); 6630Type type = typeof(System.Windows.Data.Binding); 6647Type type = typeof(System.Windows.Data.Binding); 6665Type type = typeof(System.Windows.Media.Animation.Timeline); 6682Type type = typeof(System.Windows.Style); 6700Type type = typeof(System.Windows.Data.Binding); 6718Type type = typeof(System.Windows.Data.Binding); 6736Type type = typeof(System.Windows.ResourceDictionary); 6754Type type = typeof(System.Windows.Trigger); 6772Type type = typeof(System.Windows.Trigger); 6791Type type = typeof(System.Windows.Data.RelativeSource); 6795typeof(System.Type), // type 6800bamlMember.TypeConverterType = typeof(System.Type); 6801bamlMember.SetDelegate = delegate(object target, object value) { ((System.Windows.Data.RelativeSource)target).AncestorType = (System.Type)value; }; 6810Type type = typeof(System.Windows.UIElement); 6827Type type = typeof(System.Windows.FrameworkContentElement); 6844Type type = typeof(System.Windows.FrameworkContentElement); 6862Type type = typeof(System.Windows.Style); 6880Type type = typeof(System.Windows.FrameworkTemplate); 6898Type type = typeof(System.Windows.Application); 6916Type type = typeof(System.Windows.Data.MultiBinding); 6933Type type = typeof(System.Windows.Data.MultiBinding); 6952Type type = typeof(System.Windows.Media.LinearGradientBrush); 6969Type type = typeof(System.Windows.Media.LinearGradientBrush); 6986Type type = typeof(System.Windows.Input.CommandBinding); 7004Type type = typeof(System.Windows.Condition); 7023Type type = typeof(System.Windows.Condition); 7041Type type = typeof(System.Windows.Condition); 7058Type type = typeof(System.Windows.Data.BindingBase); 7077Type type = typeof(System.Windows.Window); 7094Type type = typeof(System.Windows.Window); 7111Type type = typeof(System.Windows.Window); 7128Type type = typeof(System.Windows.Shapes.Shape); 7145Type type = typeof(System.Windows.Shapes.Shape); 7162Type type = typeof(System.Windows.Shapes.Shape); 7179Type type = typeof(System.Windows.Media.TileBrush); 7196Type type = typeof(System.Windows.Media.TileBrush); 7213Type type = typeof(System.Windows.Media.TileBrush); 7230Type type = typeof(System.Windows.Media.GeometryDrawing); 7246Type type = typeof(System.Windows.Controls.TextBox); 7263Type type = typeof(System.Windows.Controls.StackPanel); 7280Type type = typeof(System.Windows.Controls.Primitives.Track); 7297Type type = typeof(System.Windows.Controls.Primitives.Track); 7314Type type = typeof(System.Windows.Controls.Primitives.Track); 7331Type type = typeof(System.Windows.EventTrigger); 7349Type type = typeof(System.Windows.Input.InputBinding); 7366Type type = typeof(System.Windows.Input.KeyBinding); 7384Type type = typeof(System.Windows.Controls.TextBox); 7401Type type = typeof(System.Windows.Controls.TextBlock); 7418Type type = typeof(System.Windows.Navigation.JournalEntryUnifiedViewConverter); 7435Type type = typeof(System.Windows.Media.GradientBrush); 7452Type type = typeof(System.Windows.Controls.MenuItem); 7470Type type = typeof(System.Windows.DataTrigger); 7489Type type = typeof(System.Windows.DataTrigger); 7506Type type = typeof(System.Windows.Setter); 7525Type type = typeof(System.Windows.ResourceDictionary); 7543Type type = typeof(System.Windows.Media.Animation.BeginStoryboard); 7561Type type = typeof(System.Windows.ResourceDictionary); 7578Type type = typeof(System.Windows.Input.KeyboardNavigation); 7595Type type = typeof(System.Windows.Input.KeyboardNavigation); 7612Type type = typeof(System.Windows.Controls.Primitives.ScrollBar); 7629Type type = typeof(System.Windows.Trigger); 7648Type type = typeof(System.Windows.EventTrigger); 7666Type type = typeof(System.Windows.Controls.DefinitionBase); 7683Type type = typeof(System.Windows.Controls.ToolTipService); 7701Type type = typeof(System.Windows.Media.PathFigure); 7718Type type = typeof(System.Windows.Media.PathFigure); 7735Type type = typeof(System.Windows.Controls.Primitives.ButtonBase); 7752Type type = typeof(System.Windows.Documents.Block); 7769Type type = typeof(System.Windows.UIElement); 7786Type type = typeof(System.Windows.Media.Pen); 7803Type type = typeof(System.Windows.Controls.Primitives.BulletDecorator); 7820Type type = typeof(System.Windows.UIElement); 7837Type type = typeof(System.Windows.UIElement); 7854Type type = typeof(System.Windows.UIElement); 7871Type type = typeof(System.Windows.Media.SolidColorBrush); 7888Type type = typeof(System.Windows.Media.Brush); 7905Type type = typeof(System.Windows.Controls.Primitives.TextBoxBase); 7922Type type = typeof(System.Windows.Media.PathSegment); 7939Type type = typeof(System.Windows.Controls.VirtualizingPanel); 7956Type type = typeof(System.Windows.Shapes.Shape); 7973Type type = typeof(System.Windows.Controls.Frame); 7990Type type = typeof(System.Windows.Controls.Frame); 8007Type type = typeof(System.Windows.Media.Animation.Storyboard); 8024Type type = typeof(System.Windows.Data.XmlDataProvider); 8042Type type = typeof(System.Windows.Controls.Primitives.Selector); 8059Type type = typeof(System.Windows.DataTemplate); 8079Type type = typeof(System.Windows.Shapes.Shape); 8096Type type = typeof(System.Windows.UIElement); 8113Type type = typeof(System.Windows.Controls.MenuItem); 8130Type type = typeof(System.Windows.Controls.Panel); 8147Type type = typeof(System.Windows.Data.Binding); 8165Type type = typeof(System.Windows.Window); 8182Type type = typeof(System.Windows.Data.ObjectDataProvider); 8186typeof(System.Type), // type 8191bamlMember.TypeConverterType = typeof(System.Type); 8192bamlMember.SetDelegate = delegate(object target, object value) { ((System.Windows.Data.ObjectDataProvider)target).ObjectType = (System.Type)value; }; 8201Type type = typeof(System.Windows.Controls.ToolBar); 8219Type type = typeof(System.Windows.Controls.Primitives.TextBoxBase); 8236Type type = typeof(System.Windows.Controls.Primitives.TextBoxBase); 8253Type type = typeof(System.Windows.FrameworkElement); 8270Type type = typeof(System.Windows.MultiDataTrigger); 8287Type type = typeof(System.Windows.Input.KeyBinding); 8304Type type = typeof(System.Windows.Data.Binding); 8323Type type = typeof(System.Windows.Controls.Canvas); 8340Type type = typeof(System.Windows.Controls.Canvas); 8357Type type = typeof(System.Windows.Controls.Canvas); 8374Type type = typeof(System.Windows.Controls.Canvas); 8391Type type = typeof(System.Windows.Media.Animation.Storyboard);
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (22)
1776new List<Type>() { typeof(System.Type) }, 1780(System.Type)arguments[0]); 1856new List<Type>() { typeof(System.String) }, 2699new List<Type>() { typeof(System.Object) }, 2829new List<Type>() { typeof(System.Type), typeof(System.Object) }, 2833(System.Type)arguments[0], 3169new List<Type>() { typeof(System.Object) }, 4037new List<Type>() { typeof(System.Object) }, 8298new List<Type>() { typeof(System.Windows.Data.RelativeSourceMode) }, 8305new List<Type>() { typeof(System.Windows.Data.RelativeSourceMode), typeof(System.Type), typeof(System.Int32) }, 8310(System.Type)arguments[1], 9428new List<Type>() { typeof(System.String) }, 9447new List<Type>() { typeof(System.Object) }, 9879new List<Type>() { typeof(System.Windows.DependencyProperty) }, 10093new List<Type>() { typeof(System.String) }, 10655new List<Type>() { typeof(System.Type) }, 10659(System.Type)arguments[0]); 11834new List<Type>() { typeof(System.Object) },
System\Windows\Markup\Baml2006\WpfKnownMember.cs (6)
31Type _deferringLoader; 32Type _typeConverterType; 33Type _type; 83Type type, 141public Type TypeConverterType 168public Type DeferringLoaderType
System\Windows\Markup\Baml2006\WpfKnownMemberInvoker.cs (3)
53Type declaringType = _member.UnderlyingMember.DeclaringType; 56Type[] args = new Type[] { typeof(DependencyObject) }; ;
System\Windows\Markup\Baml2006\WpfKnownType.cs (11)
33Type _underlyingType; 40Type _deferringLoader; 41Type _typeConverterType; 70Type underlyingType) 78Type underlyingType, 234public Type TypeConverterType 244public Type DeferringLoaderType 340foreach (Type type in info.Types) 366object[] ICustomAttributeProvider.GetCustomAttributes(Type attributeType, bool inherit) 388private bool TryGetCustomAttribute(Type attributeType, out Attribute result) 419bool ICustomAttributeProvider.IsDefined(Type attributeType, bool inherit)
System\Windows\Markup\Baml2006\WpfMemberInvoker.cs (3)
73Type declaringType = _member.UnderlyingMember.DeclaringType; 76Type[] args = new Type[] { typeof(DependencyObject) }; ;
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (9)
39private Dictionary<Type, XamlType> _masterTypeTable; 62_masterTypeTable = new Dictionary<Type, XamlType>(256); 181public override XamlType GetXamlType(Type type) 194private XamlType GetUnknownXamlType(Type type) 210internal XamlType GetKnownXamlType(Type type) 252internal XamlValueConverter<XamlDeferringLoader> GetDeferringLoader(Type loaderType) 257internal XamlValueConverter<TypeConverter> GetTypeConverter(Type converterType) 279internal Type ResolvePrefixedNameWithAdditionalWpfSemantics(string prefixedName, DependencyObject element) 304Type result = System.Windows.Markup.XamlTypeMapper.GetTypeFromName(prefixedName, element);
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (5)
22public override XamlType GetXamlType(Type type) 45internal static void RequireRuntimeType(Type type) 50Type runtimeType = typeof(object).GetType(); 63private Dictionary<Type, XamlType> _masterTypeTable = new Dictionary<Type, XamlType>();
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
78public WpfXamlType(Type type, XamlSchemaContext schema, bool isBamlScenario, bool useV3Rules)
System\Windows\Markup\BamlCollectionHolder.cs (1)
78internal Type PropertyType
System\Windows\Markup\BamlMapTable.cs (47)
102internal static Type GetKnownTypeFromId(short id) 131Type probeType = KnownTypes.Types[probe]; 166internal static short GetKnownTypeIdFromType(Type type) 204internal static KnownElements GetKnownTypeConverterIdFromType(Type type) 211else if (type == typeof(System.Type)) 234internal TypeConverter GetKnownConverterFromType(Type type) 254internal static TypeConverter GetKnownConverterFromType_NoCache(Type type) 288internal Type GetKnownConverterTypeFromType(Type type) 309if (type == typeof(System.Type)) 334private static Type GetKnownConverterTypeFromPropName( 335Type propOwnerType, 409internal Type GetTypeFromId(short id) 411Type type = null; 519private short GetAssemblyIdForType(Type t) 539Type propType, 586Type t = GetTypeFromId(typeId); 650Type ownerType = record.OwnerType; 764internal Type GetTypeFromTypeInfo(BamlTypeInfoRecord typeInfo) 784Type type = assembly.GetType(typeInfo.TypeFullName); 797private Type GetAttributeOwnerType(BamlAttributeInfoRecord bamlAttributeInfoRecord) 819internal Type GetCLRPropertyTypeAndNameFromId(short attributeId, out string propName) 822Type propType = null; 855internal DependencyProperty GetDependencyPropertyValueFromId(short memberId, string memberName, out Type declaringType) 902Type declaringType = GetTypeFromId(ownerTypeId); 948Type ownerType = GetAttributeOwnerType(bamlAttributeInfoRecord); 961internal short GetAttributeOrTypeId(BinaryWriter binaryWriter, Type declaringType, string memberName, out short typeId) 1215Type elementType, 1299Type owningType, // Actual type of the object the owns or declares this attribute 1301Type attributeType, // Type of the attribute or property itself; not its owner type 1312Type owningType, // Actual type of the object the owns or declares this attribute 1314Type attributeType, // Type of the attribute or property itself; not its owner type 1326Type serializerType = XamlTypeMapper.GetXamlSerializerForType(owningType); 1377Type ownerType, // Type of object that owns or declares this attribute 1378Type attributeType, // Type of the attribute or property itself; not its owner type 1382out Type converterOrSerializerType) 1493Type defaultTargetType) 1496Type targetType = null; 1542Type declaringType, // Type of object that owns or declares this attribute 1543Type attributeType) // Type of the attribute or property itself; not its owner type 1561private Type GetCustomConverter( 1563Type ownerType, // Type of object that owns or declares this attribute 1565Type attributeType) // Type of the attribute or property itself; not its owner type 1568Type converterType = GetKnownConverterTypeFromPropName(ownerType, fieldName); 1602private Type GetCustomSerializer( 1603Type type, 1717private TypeConverter GetConverterFromCache(Type type)
System\Windows\Markup\BamlReader.cs (3)
1041Type propertyType = attrInfo.GetPropertyType(); 1050Type declaringType = null; 2193Type converter = MapTable.GetTypeFromId(converterTypeId);
System\Windows\Markup\BamlRecordReader.cs (37)
848out Type delayCreatedType, 852Type elementType = MapTable.GetTypeFromId(typeId); 890protected ReaderFlags GetFlagsFromType(Type elementType) 1009Type delayCreatedType = null; 1256Type elementType = MapTable.GetTypeFromId(bamlElementRecord.TypeId); 1399Type elementType = ParentContext.ExpectedType; 1428Type t = param as Type; 1477Type ownerType = ParserContext.TargetType; 2103Type declaringType = null; 2108out Type declaringType) 2147internal object GetCustomValue(BamlPropertyCustomRecord bamlPropertyRecord, Type propertyType, string propertyName) 2653Type valueType = MapTable.GetTypeFromId(bamlPropertyRecord.TypeId); 3036Type expectedType = holder.PropertyType; 3363Type keyType = MapTable.GetTypeFromId(bamlDefAttributeRecord.TypeId); 3680Type propertyType = null; 3754static private Type NullableType = typeof(Nullable<>); 3756static internal bool IsNullable(Type t) 3763internal object OptionallyMakeNullable(Type propertyType, object o, string propName) 3770((Type)propertyType.GetGenericArguments()[0]).Name, 3781static internal bool TryOptionallyMakeNullable( Type propertyType, string propName, ref object o ) 3787Type genericType = (Type)propertyType.GetGenericArguments()[0]; 3963Type propertyType, 4005Type propertyType) 4014if (propertyType == typeof(Type)) 4037object GetObjectFromString(Type type, string s, short converterTypeId) 4291Type expectedType, 4301Type expectedType, 4775Type parentType = GetParentType(); 4793Type parentType = GetParentType(); 4808private Type GetParentType() 4864Type elementType; 5115Type currentParentType; 5221Type type, 5772Type currentParentType = currentParent.GetType(); 5831public Type PropertyType
System\Windows\Markup\BamlRecords.cs (15)
473static internal bool TreatAsIAddChild(Type parentObjectType) 478static internal BamlRecordType GetPropertyStartRecordType(Type propertyType, bool propertyCanWrite) 2655internal Type ValueType 2670internal Type SerializerType 2684Type _valueType; 2687Type _serializerType; 2727internal object GetCustomValue(BinaryReader reader, Type propertyType, short serializerId, BamlRecordReader bamlRecordReader) 4385internal Type Type 4469Type _type; 4541internal Type SerializerType 4566Type _serializerType; 4666internal Type GetPropertyType() 4668Type validType = null; 4810internal Type OwnerType 4953Type _ownerType = null;
System\Windows\Markup\BamlRecordWriter.cs (3)
983Type converterOrSerializerType; 1019Type ownerType = _xamlTypeMapper.GetDependencyPropertyOwnerAndName(xamlProperty.Value, 1084Type typeValue = _xamlTypeMapper.GetTypeFromBaseString(xamlPropertyNode.Value,
System\Windows\Markup\BamlWriter.cs (26)
97ref Type baseType, 98ref Type serializerType) 222Type elementType = GetType(assemblyName, typeFullName); 223Type serializerType = _xamlTypeMapper.GetXamlSerializerForType(elementType); 322Type declaringType; 350Type propType = XamlTypeMapper.GetPropertyType(dpOrPi); 353Type ownerType = null; 394Type typeValue = _xamlTypeMapper.GetTypeFromBaseString(data.Args, 450Type declaringType; 552Type valueElementType = null; 553Type valueSerializerType = null; 639Type ownerType; 640Type propertyType = null; 871Type typeConverter=null; 1102private Type GetType( 1110Type objectType = assembly.GetType(typeFullName); 1128Type ownerType, 1195out Type ownerType) 1212private MethodInfo GetMi(Type ownerType, string propName) 1244out Type ownerType) 1276private void Push(BamlRecordType recordType, Type elementType) 1299private Type PeekElementType() 1346Type elementType) : this(recordType) 1362public Type ElementType 1369Type _elementType; 1429sealed protected override bool AllowInternalType(Type type)
System\Windows\Markup\DependencyPropertyConverter.cs (7)
41public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 60public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 97public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 107Type type = null; 220if (firstAmbientValue.Value is Type) 222type = (Type)firstAmbientValue.Value; 250private static Type GetTypeFromName(XamlSchemaContext schemaContext,
System\Windows\Markup\KnownTypes.cs (2)
5550private Type InitializeOneType(KnownElements knownElement) 5552Type t = null;
System\Windows\Markup\KnownTypesHelper.cs (4)
50_typeTable =new Type[size]; 53public System.Type this[int index] 57Type t = _typeTable[index]; 78private Type[] _typeTable;
System\Windows\Markup\MarkupExtensionParser.cs (25)
43ref Type baseType, 44ref Type serializerType); 71Type declaringType, // Type where propIdName is declared 96Type declaringType, 156private KnownElements GetKnownExtensionFromType(Type extensionType, out string propName) 196Type extensionType, 233Type extensionType, 307Type targetType) 451Type declaringType, // Type where attribute is declared 462Type targetType; 463Type serializerType; 485Type declaringType, // Type where propIdName is declared 498Type targetType; 499Type serializerType; 559out Type targetType, 560out Type serializerType) 646Type propertyType; 919Type extensionType) 1205private ParameterInfo[] FindLongestConstructor(Type extensionType, out int maxConstructorArguments) 1383Type declaringType; 1499Type parentType, 1517Type declaringType; 1552Type typeValue = _parserContext.XamlTypeMapper.GetTypeFromBaseString(value, 1652Type elementBaseType, 1659out Type declaringType, // type of the object that the field is on
System\Windows\Markup\ParserContext.cs (11)
199internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(Type type) 239_targetType = (Type) _langSpaceStack.Pop(); 314internal Type TargetType 701internal Dictionary<Type, Dictionary<string, SpecialBracketCharacters>> MasterBracketCharacterCache 707_masterBracketCharacterCache = new Dictionary<Type, Dictionary<string, SpecialBracketCharacters>>(); 828private Type _targetType; 829private Dictionary<Type, Dictionary<string, SpecialBracketCharacters>> _masterBracketCharacterCache; 849private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(Type extensionType) 853Type constructorArgumentType = null; 854Type markupExtensionBracketCharacterType = null; 864Type attributeType = attributeData.AttributeType;
System\Windows\Markup\Primitives\ElementMarkupObject.cs (47)
58public override Type ObjectType 221Type ownerType = dpd.DependencyProperty.OwnerType; 248Type instanceType = instance.GetType(); 297public ShouldSerializeKey(Type type, string propertyName) 332private Type _type; 411private static Type[] _shouldSerializeArgsObject = new Type[] { typeof(DependencyObject) }; 412private static Type[] _shouldSerializeArgsManager = new Type[] { typeof(XamlDesignerSerializationManager) }; 413private static Type[] _shouldSerializeArgsMode = new Type[] { typeof(XamlWriterMode) }; 414private static Type[] _shouldSerializeArgsObjectManager = new Type[] { typeof(DependencyObject), typeof(XamlDesignerSerializationManager) }; 507Type keyType = GetDictionaryKeyType(dictionary); 628static readonly List<Type> EmptyTypes = new List<Type>(); 630public override IEnumerable<Type> TypeReferences 656protected abstract Type GetObjectType(); 692private static Dictionary<Type, Type> _keyTypeMap; 694private static Type GetDictionaryKeyType(IDictionary value) 696Type type = value.GetType(); 697Type result; 700_keyTypeMap = new Dictionary<Type, Type>(); 703foreach (Type interfaceType in type.GetInterfaces()) 707Type genericTypeDefinition = interfaceType.GetGenericTypeDefinition(); 737protected override Type GetObjectType() 761public override Type PropertyType 896Type propertyType, 921Type type = value as Type; 927if( propertyType == typeof(Type) ) 942ValueSerializer typeSerializer = context.GetValueSerializerFor(typeof(Type)); 983public override Type PropertyType 1023public override IEnumerable<Type> TypeReferences 1042internal ElementPseudoPropertyBase(object value, Type type, ElementMarkupObject obj) : base(obj) 1048public override Type PropertyType 1063public override IEnumerable<Type> TypeReferences 1065get { return Array.Empty<Type>(); } 1069private Type _type; 1077internal ElementKey(object value, Type type, ElementMarkupObject obj) : base(value, type, obj) { } 1095internal ElementConstructorArgument(object value, Type type, ElementMarkupObject obj) : base(value, type, obj) { } 1113internal ElementItemsPseudoProperty(IEnumerable value, Type type, ElementMarkupObject obj) : base(value, type, obj) 1152internal ElementDictionaryItemsPseudoProperty(IDictionary value, Type type, ElementMarkupObject obj) : base(value, type, obj) 1205public ValueSerializer GetValueSerializerFor(Type type) 1260public object GetService(Type serviceType)
System\Windows\Markup\Primitives\ExtensionSimplifierMarkupObject.cs (4)
41public override Type ObjectType 93public override Type PropertyType 103public override IEnumerable<Type> TypeReferences 319ValueSerializer typeSerializer = _context.GetValueSerializerFor(typeof(Type));
System\Windows\Markup\Primitives\FrameworkElementFactoryMarkupObject.cs (7)
48public override Type ObjectType 180public override Type PropertyType 212protected override Type GetObjectType() 270protected override Type GetObjectType() 280public override Type PropertyType 339protected override Type GetObjectType() 349public override Type PropertyType
System\Windows\Markup\Primitives\MarkupWriter.cs (27)
143internal static void VerifyTypeIsSerializable(Type type) 750List<Type> wrapperTypes = GetWrapperTypes(contentProperty.PropertyType); 1038Type tagType = property.Value.GetType(); 1086private List<Type> GetWrapperTypes(Type type) 1093List<Type> wrapperTypes = new List<Type>(); 1104private MarkupProperty GetWrappedProperty(List<Type> wrapperTypes, MarkupObject item) 1124private bool IsInTypes(Type type, List<Type> types) 1126foreach (Type t in types) 1152private bool IsCollectionType(Type type) 1179List<Type> wrapperTypes = GetWrapperTypes(contentProperty.PropertyType); 1402public void MakeAddressable(IEnumerable<Type> types) 1405foreach (Type type in types) 1409public string MakeAddressable(Type type) 1465if (descriptor.PropertyType == typeof(Type)) 1471public ValueSerializer GetValueSerializerFor(Type type) 1473if (type == typeof(Type)) 1503public object GetService(Type serviceType) 1529Type type = value as Type; 1540public override IEnumerable<Type> TypeReferences(object value, IValueSerializerContext context) 1542Type type = value as Type; 1544return new Type[] { type }; 1611public static string GetNamespaceUriFor(Type type)
System\Windows\Markup\ProvideValueServiceProvider.cs (2)
55Type IXamlTypeResolver.Resolve(string qualifiedTypeName) // E.g. foo:Class 101public object GetService(Type service)
System\Windows\Markup\ReaderContextStackData.cs (2)
30Type _expectedType; 87internal Type ExpectedType
System\Windows\Markup\RestrictiveXamlXmlReader.cs (6)
24private static readonly Type DependencyObjectType = typeof(System.Windows.DependencyObject); 80internal RestrictiveXamlXmlReader(XmlReader xmlReader, XamlSchemaContext schemaContext, XamlXmlReaderSettings settings, List<Type> safeTypes) : base(xmlReader, schemaContext, settings) 84foreach (Type safeType in safeTypes) 183private bool IsAllowedType(Type type) 215HashSet<Type> _safeTypesSet = new HashSet<Type>() {
System\Windows\Markup\RoutedEventConverter.cs (6)
23public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 39public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 62Type type = null; 101type = firstAmbientValue.Value as Type; 112Type currentType = type; 141Type destinationType)
System\Windows\Markup\RoutedEventValueSerializer.cs (11)
19return ValueSerializer.GetSerializerFor(typeof(Type), context) != null; 24return ValueSerializer.GetSerializerFor(typeof(Type), context) != null; 32ValueSerializer typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), context); 41static Dictionary<Type, Type> initializedTypes = new Dictionary<Type, Type>(); 43static void ForceTypeConstructors(Type currentType) 56ValueSerializer typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), context); 62Type type = typeSerializer.ConvertFromString(value.Substring(0, index), context) as Type;
System\Windows\Markup\SetterTriggerConditionValueConverter.cs (3)
40public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 59public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 85public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Markup\TemplateKeyConverter.cs (3)
37public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 48public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 73public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Markup\TypeContext.cs (1)
69virtual public object GetService(Type serviceType)
System\Windows\Markup\XamlNodes.cs (35)
374Type converterType) 392internal Type ConverterType 407Type _converterType = null; 483internal Type PropDeclaringType 500internal Type PropValidType 527Type _validType; 528Type _declaringType; 665internal Type DefaultTargetType 675Type _defaultTargetType; 763internal Type ValueDeclaringType 805internal Type ValuePropertyType 870internal Type DefaultTargetType 907Type _valueDeclaringType; 909Type _valuePropertyType; 914Type _defaultTargetType; 936Type valueElementType, // Actual type of the valueTypeFullname. 975internal Type ValueElementType 1000Type _valueElementType; 1093Type elementType, 1094Type serializerType) 1116Type elementType, 1117Type serializerType, 1154internal Type ElementType 1165internal Type SerializerType 1214Type _elementType; 1215Type _serializerType; 2075Type valueType) // Actual Type, if known. 2093internal Type ValueType 2099Type _valueType; 2160Type elementType, 2161Type serializerType) 2254internal Type PropDeclaringType 2271internal Type PropValidType 2285Type _declaringType; 2286Type _validType;
System\Windows\Markup\XamlParseException.cs (2)
321Type objectType) 424Type objectType
System\Windows\Markup\XamlReader.cs (2)
844List<Type> safeTypes) 1074Type internalTypeHelper = null;
System\Windows\Markup\XamlStyleSerializer.cs (1)
91Type styleTargetType = Style.DefaultTargetType;
System\Windows\Markup\XamlTypeMapper.cs (83)
116public Type GetType( 457Type owner, 461Type baseType = null; 513Type propType, 731Type propType, 786Type owner, 811Type ownerType, 832Type currentParentType, 874Type propertyOwnerType = attributeInfo.OwnerType; 949Type owner, 1192protected virtual bool AllowInternalType(Type type) 1197private bool IsInternalTypeAllowedInFullTrust(Type type) 1224Type owner, 1254Type owner, 1284Type objectType = typeAndSerializer.ObjectType; 1305Type dependencyObjectType = KnownTypes.Types[(int)KnownElements.DependencyObject]; 1439Type baseType = owner; 1464Type dependencyObjectType = KnownTypes.Types[(int)KnownElements.DependencyObject]; 1599Type owner, 1641Type owner, 1644ref Type baseType, 1776ref Type ownerType) 1913Type ownerType, 2005Type ownerType) 2008Type currentType = ownerType; 2031internal static Type GetPropertyType(object propertyMember) 2033Type propertyType; 2048out Type propertyType, 2127internal static Type GetDeclaringType(object propertyMember) 2129Type validType = null; 2166internal static Type GetTypeFromName(string typeName, DependencyObject element) 2218Type t = assy.GetType(fullTypeName); 2238Type t = assy.GetType(fullTypeName); 2252internal Type GetTargetTypeAndMember(string valueParam, 2267Type targetType = null; 2303internal Type GetDependencyPropertyOwnerAndName(string memberValue, 2305Type defaultTargetType, 2308Type targetType = GetTargetTypeAndMember(memberValue, context, false, out memberName); 2335internal MemberInfo GetStaticMemberInfo(Type targetType, string memberName, bool fieldInfoOnly) 2375private MemberInfo GetStaticMemberInfo(Type targetType, string memberName, bool fieldInfoOnly, bool tryInternal) 2548Type objectType = GetObjectType(namespaceMap, localName, knownTypesOnly); 2598private Type GetObjectType( 2606Type type = null; 2674internal int GetCustomBamlSerializerIdForType(Type objectType) 2715internal Type GetXamlSerializerForType(Type objectType) 2731internal static Type GetInternalTypeHelperTypeFromAssembly(ParserContext pc) 2739Type ithType = a.GetType($"{GeneratedNamespace}.{GeneratedInternalTypeHelperClassName}"); 2759Type ithType = GetInternalTypeHelperTypeFromAssembly(pc); 2767internal static object CreateInternalInstance(ParserContext pc, Type type) 2811internal static Delegate CreateDelegate(ParserContext pc, Type delegateType, object target, string handler) 2856internal Type GetTypeFromBaseString( 2862Type keyObject = null; 2993private TypeInformationCacheData GetCachedInformationForType(Type type) 3014private Type GetCachedBaseType(Type t) 3070ref Type ownerType) 3093Type ownerType) 3113internal object CreateInstance(Type t) 3408private string GetCachedNamespace(Type t) 3449internal Type GetTypeConverterType(Type type) 3453Type converterType = null; 3480internal TypeConverter GetTypeConverter(Type type) 3500Type converterType = TypeConverterHelper.GetConverterType(type); 3524internal Type GetPropertyConverterType(Type propType, object dpOrPiOrMi) 3527Type converterType = null; 3568internal TypeConverter GetPropertyConverter(Type propType, object dpOrPiOrMi) 3591Type converterType = TypeConverterHelper.GetConverterType(memberInfo); 3646internal ConstructorData GetConstructors(Type type) 3735internal bool GetCachedTrimSurroundingWhitespace(Type t) 3753private bool GetTrimSurroundingWhitespace(Type type) 3935internal TypeInformationCacheData(Type baseType) 3956internal Type BaseType 3972internal Type TypeConverterType 4018Type ownerType, 4072Type _baseType; 4080Type _typeConverterType; 4090Type ot, 4103public Type OwnerType; 4211public Type ObjectType = null; 4212public Type SerializerType = null;
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (5)
30Dictionary<Type, XamlType> _allowedInternalTypes; 96public override XamlType GetXamlType(Type type) 309private XamlType GetInternalType(Type type, XamlType sharedSchemaXamlType) 315_allowedInternalTypes = new Dictionary<Type, XamlType>(); 417public VisibilityMaskingXamlType(Type underlyingType, XamlSchemaContext schemaContext)
System\Windows\Markup\XmlnsCache.cs (1)
281private Attribute[] GetAttributes(Assembly asm, Type attrType)
System\Windows\Media\Animation\Generated\ThicknessAnimation.cs (2)
57Type typeofProp = typeof(Thickness?); 58Type typeofThis = typeof(ThicknessAnimation);
System\Windows\Media\Animation\Generated\ThicknessAnimationBase.cs (1)
100public override sealed Type TargetPropertyType
System\Windows\Navigation\JournalEntryListConverter.cs (4)
37public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 47public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 114public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) 136public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
System\Windows\Navigation\NavigationService.cs (1)
3292Type type = ccs.GetType();
System\Windows\PropertyPath.cs (9)
60public Type type; // user-specified type 308internal object ResolvePropertyName(int level, object item, Type ownerType, object context) 550object ResolvePropertyName(string name, object item, Type ownerType, object context, bool throwOnError) 655private PropertyInfo GetPropertyHelper(Type ownerType, string propertyName) 780object GetTypedParamValue(string param, Type type, bool throwOnError) 835Type GetTypeFromName(string name, object context) 884ValueSerializer typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), serializerContext); 886return typeSerializer.ConvertFromString(name, serializerContext) as Type; 908Type type = wpfSharedSchemaContext.ResolvePrefixedNameWithAdditionalWpfSemantics(name, hostElement);
System\Windows\PropertyPathConverter.cs (5)
50public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 71public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 136Type destinationType) 172typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), serializerContext); 209Type type; // the accessor's ownerType, or type of indexer parameter
System\Windows\ResourceDictionary.cs (5)
537internal Type GetValueType(object key, out bool found) 540Type valueType = null; 1368private Type GetTypeOfFirstObject(KeyRecord keyRecord) 1370Type rootType = _reader.GetTypeOfFirstStartObject(keyRecord); 2358HasImplicitStyles = ((key as Type) != null);
System\Windows\ResourceReferenceExpressionConverter.cs (3)
39public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 66public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 116public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Shell\JumpList.cs (3)
478var destinationList = (ICustomDestinationList)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(CLSID.DestinationList))); 814var shellObjectCollection = (IObjectCollection)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(CLSID.EnumerableObjectCollection))); 902var link = (IShellLinkW)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(CLSID.ShellLink)));
System\Windows\Standard\ComGuids.cs (1)
70return (T)System.Activator.CreateInstance(System.Type.GetTypeFromCLSID(new System.Guid(clsid)));
System\Windows\Standard\Verify.cs (4)
268public static void TypeSupportsInterface(Type type, Type interfaceType, string parameterName) 293internal static void ImplementsInterface(object parameter, Type interfaceType, string parameterName) 300foreach (var ifaceType in parameter.GetType().GetInterfaces())
System\Windows\Style.cs (6)
60public Style(Type targetType) 72public Style(Type targetType, Style basedOn) 161public Type TargetType 487Type elementType = element.GetType(); 960internal static readonly Type DefaultTargetType = typeof(IFrameworkInputElement); 964private Type _targetType = DefaultTargetType;
System\Windows\StyleHelper.cs (8)
252Type themeStyleTypeKey = themeStyleKey as Type; 679Type valueType = deferredReference.GetValueType(); 2691Type sourceNodeType; 5895Type stateType = (state != null) ? state.GetType() : null; 5906Type cachedType = bindingValueCache.BindingValueType; 5987internal BindingValueCache(Type bindingValueType, object valueAsBindingValueType) 5993internal readonly Type BindingValueType;
System\Windows\StyleTypedPropertyAttribute.cs (2)
36public Type StyleTargetType 43private Type _styleTargetType;
System\Windows\SystemKeyConverter.cs (6)
40public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 59public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 110public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 140Type keyType = SystemKeyConverter.GetSystemClassType(keyId); 147ValueSerializer typeSerializer = valueSerializerContext.GetValueSerializerFor(typeof(Type)); 164internal static Type GetSystemClassType(SystemResourceKeyID id)
System\Windows\SystemResourceKey.cs (1)
362internal static short GetBamlIdBasedOnSystemResourceKeyId(Type targetType, string memberName)
System\Windows\SystemResources.cs (9)
120Type typeKey = null; 126typeKey = key as Type; 354Type typeKey, 819Type knownTypeHelper = assembly.GetType("Microsoft.Windows.Themes.KnownTypeHelper"); 1786internal override Type GetValueType() 1894internal override Type GetValueType() 1950if ((key is Type || key is ResourceKey) && _canCacheAsThemeResource && canCache) 1963internal override Type GetValueType() 2007internal override Type GetValueType()
System\Windows\TemplateBindingExpressionConverter.cs (2)
31public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 43public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
System\Windows\TemplateBindingExtensionConverter.cs (3)
34public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 46public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 57return new InstanceDescriptor(typeof(TemplateBindingExtension).GetConstructor(new Type[] { typeof(DependencyProperty) }),
System\Windows\TemplateContent.cs (9)
849Type typeofValue = xamlReader.Value.GetType(); 898Type typeofValue = xamlReader.Type.UnderlyingType; 1022private static bool CheckSpecialCasesShareable(Type typeofValue, DependencyProperty property) 1161private bool IsTypeShareable(Type type) 1167type == typeof(string) || type == typeof(Uri) || type == typeof(Type) 1213Type targetType, 1322Type targetType, 1429object IServiceProvider.GetService(Type serviceType) 1449Type IXamlTypeResolver.Resolve(string qualifiedTypeName)
System\Windows\TemplateKey.cs (5)
120Type type = DataType as Type; 133Type type = _dataType as Type; 164else if (!(dataType is Type) && !(dataType is String))
System\Windows\TemplatePartAttribute.cs (2)
38public Type Type 45private Type _type;
System\Windows\ThicknessConverter.cs (5)
42public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) 45TypeCode tc = Type.GetTypeCode(sourceType); 73public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) 131public override object ConvertTo(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value, Type destinationType) 146ConstructorInfo ci = typeof(Thickness).GetConstructor(new Type[] { typeof(double), typeof(double), typeof(double), typeof(double) });
System\Windows\Window.cs (1)
6365taskbarList = (ITaskbarList)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(CLSID.TaskbarList)));
PresentationFramework.Aero (4)
Microsoft\Windows\Themes\ProgressBarHighlightConverter.cs (2)
30public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 119public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (2)
134Type type = typeof(Microsoft.Windows.Themes.ScrollChrome); 216public ThemesKnownType(XamlSchemaContext xsc, int bamlNumber, string name, Type type) :
PresentationFramework.Aero2 (4)
Microsoft\Windows\Themes\ProgressBarHighlightConverter.cs (2)
30public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 119public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (2)
134Type type = typeof(Microsoft.Windows.Themes.ScrollChrome); 216public ThemesKnownType(XamlSchemaContext xsc, int bamlNumber, string name, Type type) :
PresentationFramework.AeroLite (4)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (2)
134Type type = typeof(Microsoft.Windows.Themes.ScrollChrome); 216public ThemesKnownType(XamlSchemaContext xsc, int bamlNumber, string name, Type type) :
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (2)
30public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 184public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
PresentationFramework.Classic (4)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (2)
52Type type = typeof(Microsoft.Windows.Themes.ClassicBorderDecorator); 216public ThemesKnownType(XamlSchemaContext xsc, int bamlNumber, string name, Type type) :
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (2)
30public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 184public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
PresentationFramework.Fluent (4)
Controls\AnimationFactorToValueConverter.cs (2)
13public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 33public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
Controls\FallbackBrushConverter.cs (2)
14public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 30public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
PresentationFramework.Luna (4)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (2)
134Type type = typeof(Microsoft.Windows.Themes.ScrollChrome); 216public ThemesKnownType(XamlSchemaContext xsc, int bamlNumber, string name, Type type) :
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (2)
30public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 184public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
PresentationFramework.Royale (4)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (2)
134Type type = typeof(Microsoft.Windows.Themes.ScrollChrome); 216public ThemesKnownType(XamlSchemaContext xsc, int bamlNumber, string name, Type type) :
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (2)
30public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 184public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
PresentationFramework-SystemCore (12)
DynamicAccessorImpl.cs (11)
20internal DynamicPropertyAccessorImpl(Type ownerType, string propertyName) 63Type delegateType, callsiteType; 66Type[] typeArgs; 70typeArgs = new Type[rank+3]; 79callsiteType = typeof(CallSite<>).MakeGenericType(new Type[]{ delegateType }); 80createMethod = callsiteType.GetMethod("Create", new Type[]{ typeof(CallSiteBinder) }); 89typeArgs = new Type[rank+4]; 99callsiteType = typeof(CallSite<>).MakeGenericType(new Type[]{ delegateType }); 100createMethod = callsiteType.GetMethod("Create", new Type[]{ typeof(CallSiteBinder) }); 232public static DynamicMetaObject ThrowExpression(string message, Type returnType) 237typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) }),
SystemCoreExtension.cs (1)
24internal override object NewDynamicPropertyAccessor(Type ownerType, string propertyName)
PresentationFramework-SystemData (4)
SystemDataExtension.cs (4)
39internal override bool IsSqlNullableType(Type type) 77Type pdType = pd.GetType(); 240static Type s_DataTablePropertyDescriptorType; 241static Type s_DataRelationPropertyDescriptorType;
PresentationFramework-SystemXmlLinq (6)
SystemXmlLinqExtension.cs (6)
48Type pdType = pd.GetType(); 62Type pdType = pd.GetType(); 67private static Type s_XElementElementsPropertyDescriptorType; 68private static Type s_XElementDescendantsPropertyDescriptorType; 69private static Type s_XElementAttributePropertyDescriptorType; 70private static Type s_XElementElementPropertyDescriptorType;
PresentationUI (4)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
1221Type t = typeof(CryptographicException);
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
121Type commonQueryType = Type.GetTypeFromCLSID(UnsafeNativeMethods.CLSID_CommonQuery);
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
313string name, string text, Type valueType, int minWidth)
ReachFramework (146)
AlphaFlattener\Utility.cs (1)
938Type typ = segment.GetType();
Packaging\XpsFixedPageReaderWriter.cs (3)
228Type resourceType, 782Type resourceType, 1811Type resourceType,
Packaging\XpsInterleavingPolicy.cs (4)
234Type classType 643Type classType 674public Type ClassType 687private Type _classType;
Packaging\XpsResourcePolicy.cs (5)
82Type serviceType 154Type serviceType 173Type serviceType 313Dictionary<Type, object> _objDict = new Dictionary<Type, object>();
Serialization\ColorTypeConverter.cs (4)
56Type sourceType 81Type destinationType 147Type destinationType 252Type type
Serialization\FontTypeConverter.cs (4)
53Type sourceType 78Type destinationType 144Type destinationType 240Type type
Serialization\ImageSourceTypeConverter.cs (4)
62Type sourceType 87Type destinationType 154Type destinationType 326Type type
Serialization\Manager\MetroSerializationManager.cs (20)
106Type objectType 138Type 140Type objectType 143Type serializerType = null; 176Type serializedObjectType 193Type writerType 207Type writerType 223Type resourceType 243Type resourceType, 260Type resourceType 280Type resourceType, 521Type serializerType = cacheItem.SerializerType; 707Type type = serializableObject.GetType(); 717Type serializerType = _serializationManager.GetSerializerType(type); 766Type type = serializableObject.GetType(); 811Type serializerTypeForProperty = null; 816Type propertyType = dependencyProperty.PropertyType; 948Type serializableObjectType 961Type serializerType = _serializationManager.GetSerializerType(serializableObjectType); 1073CreateReachSerializer(Type serializerType)
Serialization\Manager\NGCSerializationManager.cs (12)
194Type objectType 225Type 227Type objectType 230Type serializerType = null; 286Type writerType 296Type writerType 306Type resourceType 316Type resourceType, 327Type resourceType 337Type resourceType, 669Type serializedObjectType = serializedObject.GetType(); 702Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\NGCSerializationManagerAsync.cs (12)
433Type objectType 464Type 466Type objectType 469Type serializerType = null; 525Type writerType 535Type writerType 545Type resourceType 555Type resourceType, 566Type resourceType 576Type resourceType, 939Type serializedObjectType = serializedObject.GetType(); 1000Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\ReachDocumentSequenceSerializer.cs (1)
191if (propertyValue is Type)
Serialization\Manager\ReachDocumentSequenceSerializerAsync.cs (1)
229if (propertyValue is Type)
Serialization\Manager\ReachFixedDocumentSerializer.cs (1)
271if (propertyValue is Type)
Serialization\Manager\ReachFixedDocumentSerializerAsync.cs (1)
311if (propertyValue is Type)
Serialization\Manager\ReachFixedPageSerializer.cs (1)
344if (propertyValue is Type)
Serialization\Manager\ReachFixedPageSerializerAsync.cs (1)
316if (propertyValue is Type)
Serialization\Manager\ReachNamespaceInfo.cs (4)
34Type type, 117this[Type type] 137Type type 146Type type,
Serialization\Manager\ReachSerializableProperties.cs (4)
439Type valueType = Value.GetType(); 571Type 576Type type = null; 784Type valueType = Value.GetType();
Serialization\Manager\ReachSerializationCacheItems.cs (16)
27Type type, 44Type objectType; 55Type type 67Type type, 68Type serializerType 80Type type, 116Type serializerTypeForProperty = null; 172Type 197out Type serializerTypeForProperty, 269Type type; 272Type serializerType; 308Type serializerTypeForProperty, 341Type 434Type serializerTypeForProperty; 455Type serializerTypeForProperty, 480out Type serializerTypeForProperty,
Serialization\Manager\XpsOMFixedPageSerializer.cs (1)
302if (propertyValue is Type)
Serialization\Manager\XpsOMSerializationManager.cs (13)
145Type 147Type objectType 150Type serializerType = null; 248Type serializedObjectType 299Type objectType 305internal override Xml.XmlWriter AcquireXmlWriter(Type writerType) 326Type writerType 375Type writerType 404Type resourceType 414Type resourceType, 451Type resourceType 487Type resourceType, 586DecrementRefCntByType(Type writerType)
Serialization\Manager\XpsOMSerializationManagerAsync.cs (3)
309Type 311Type objectType 314Type serializerType = null;
Serialization\Manager\XpsSerializationManager.cs (15)
276Type objectType 307Type 309Type objectType 312Type serializerType = null; 409Type serializedObjectType 440Type writerType 478GetTypeRefCnt(Type writerType) 504DecrementRefCntByType(Type writerType) 532Type writerType 603Type resourceType 639Type resourceType, 676Type resourceType 708Type resourceType, 1075Type serializedObjectType = serializedObject.GetType(); 1473Type[] _xpsTypesRequiringXMLNS =
Serialization\Manager\XpsSerializationManagerAsync.cs (3)
404Type 406Type objectType 409Type serializerType = null;
Serialization\Manager\XpsTokenContext.cs (1)
93Type serviceType
Serialization\VisualTreeFlattener.cs (10)
55Type destinationType 81Type destinationType 197internal override String GetXmlNSForType(Type objectType) 202internal override XmlWriter AcquireXmlWriter(Type writerType) 207internal override void ReleaseXmlWriter(Type writerType) 212internal override XpsResourceStream AcquireResourceStream(Type resourceType) 217internal override XpsResourceStream AcquireResourceStream(Type resourceType, String resourceID) 222internal override void ReleaseResourceStream(Type resourceType) 227internal override void ReleaseResourceStream(Type resourceType, String resourceID) 261internal override TypeConverter GetTypeConverter(Type objType)
Serialization\XpsFontSerializationService.cs (1)
39SignalCommit( Type type )
RoutingSandbox (1)
Program.cs (1)
35Type startupType;
RoutingWebSite (1)
Program.cs (1)
37Type startupType;
SocialWeather (11)
FormatterResolver.cs (11)
10private readonly Dictionary<string, Dictionary<Type, Type>> _formatters 11= new Dictionary<string, Dictionary<Type, Type>>(); 21Dictionary<Type, Type> typeFormatters; 24typeFormatters = _formatters[formatType] = new Dictionary<Type, Type>(); 31Dictionary<Type, Type> typeFormatters; 32Type typeFormatterType;
Sockets.BindTests (3)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (2)
23public List<Type> IgnoredExceptions { get; } = new List<Type>();
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
32public List<Type> IgnoredCriticalLogExceptions => TestApplicationErrorLogger.IgnoredExceptions;
Sockets.FunctionalTests (3)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (2)
23public List<Type> IgnoredExceptions { get; } = new List<Type>();
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
32public List<Type> IgnoredCriticalLogExceptions => TestApplicationErrorLogger.IgnoredExceptions;
System.CodeDom (30)
Microsoft\CSharp\CSharpCodeProvider.cs (1)
41public override TypeConverter GetConverter(Type type) =>
Microsoft\CSharp\CSharpModifierAttributeConverter.cs (2)
16public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) => 37public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Microsoft\VisualBasic\VBCodeProvider.cs (1)
43public override TypeConverter GetConverter(Type type) =>
Microsoft\VisualBasic\VBModifierAttributeConverter.cs (2)
16public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) => 37public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (5)
43public CodeTypeReference(Type type) 70public CodeTypeReference(Type type, CodeTypeReferenceOptions codeTypeReferenceOption) : this(type) 85private void InitializeFromType(Type type) 90Type currentType = type; 106Type[] genericArgs = type.GetGenericArguments();
src\libraries\Common\src\System\CodeDom\CodeTypeReferenceCollection.cs (1)
40public void Add(Type value) => Add(new CodeTypeReference(value));
System\CodeDom\CodeArrayCreateExpression.cs (3)
27public CodeArrayCreateExpression(Type createType, params CodeExpression[] initializers) 45public CodeArrayCreateExpression(Type createType, int size) 63public CodeArrayCreateExpression(Type createType, CodeExpression size)
System\CodeDom\CodeCastExpression.cs (1)
24public CodeCastExpression(Type targetType, CodeExpression expression)
System\CodeDom\CodeMemberField.cs (1)
24public CodeMemberField(Type type, string name)
System\CodeDom\CodeObjectCreateExpression.cs (1)
24public CodeObjectCreateExpression(Type createType, params CodeExpression[] parameters)
System\CodeDom\CodeParameterDeclarationExpression.cs (1)
26public CodeParameterDeclarationExpression(Type type, string name)
System\CodeDom\CodeTypeOfExpression.cs (1)
22public CodeTypeOfExpression(Type type)
System\CodeDom\CodeTypeReferenceExpression.cs (1)
22public CodeTypeReferenceExpression(Type type)
System\CodeDom\CodeVariableDeclarationStatement.cs (2)
25public CodeVariableDeclarationStatement(Type type, string name) 45public CodeVariableDeclarationStatement(Type type, string name, CodeExpression initExpression)
System\CodeDom\Compiler\CodeDomProvider.cs (1)
134public virtual TypeConverter GetConverter(Type type) => TypeDescriptor.GetConverter(type);
System\CodeDom\Compiler\CompilerInfo.cs (6)
17private Type _type; 25public Type CodeDomProviderType 33_type ??= Type.GetType(_codeDomProviderTypeName); 41public bool IsCodeDomProviderTypeValid => Type.GetType(_codeDomProviderTypeName) != null; 53ConstructorInfo ci = CodeDomProviderType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) }); 70ConstructorInfo constructor = CodeDomProviderType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) });
System.Collections.Specialized (1)
System\Collections\Specialized\NameObjectCollectionBase.cs (1)
438protected object?[] BaseGetAllValues(Type type)
System.ComponentModel (1)
System\IServiceProvider.cs (1)
8object? GetService(Type serviceType);
System.ComponentModel.Annotations (85)
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptionProvider.cs (5)
15private readonly Type? _associatedMetadataType; 22public AssociatedMetadataTypeTypeDescriptionProvider(Type type) 35Type type, 36[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type associatedMetadataType) 50public override ICustomTypeDescriptor GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, object? instance)
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (26)
15private Type? AssociatedMetadataType { get; set; } 21[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type type, 22[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? associatedMetadataType) 96private static readonly ConcurrentDictionary<Type, Type?> s_metadataTypeCache = new ConcurrentDictionary<Type, Type?>(); 99private static readonly ConcurrentDictionary<(Type, string), Attribute[]> s_typeMemberCache = new ConcurrentDictionary<(Type, string), Attribute[]>(); 102private static readonly ConcurrentDictionary<(Type, Type), bool> s_validatedMetadataTypeCache = new ConcurrentDictionary<(Type, Type), bool>(); 105[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type type, 106[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.PublicProperties)] Type associatedType) 108(Type, Type) typeTuple = (type, associatedType); 117public static Type? GetAssociatedMetadataType(Type type) 119if (TryGetAssociatedMetadataTypeFromCache(type, out Type? associatedMetadataType)) 138static bool TryGetAssociatedMetadataTypeFromCache(Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] out Type? associatedMetadataType) 145[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type mainType, 146[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.PublicProperties)] Type associatedMetadataType) 169[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 172(Type, string) memberTuple = (type, memberName);
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (6)
66private Type? _firstParameterType; 67private Tuple<string, Type>? _typeId; 87public CustomValidationAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type validatorType, string method) 103public Type ValidatorType { get; } 108public override object TypeId => _typeId ??= new Tuple<string, Type>(Method, ValidatorType); 305var expectedValueType = _firstParameterType!;
System\ComponentModel\DataAnnotations\DisplayAttribute.cs (3)
31private Type? _resourceType; 167/// Gets or sets the <see cref="System.Type" /> that contains the resources for <see cref="ShortName" />, 174public Type? ResourceType
System\ComponentModel\DataAnnotations\DisplayFormatAttribute.cs (2)
73/// Gets or sets the <see cref="Type" /> that contains the resources for <see cref="NullDisplayText" />. 78public Type? NullDisplayTextResourceType
System\ComponentModel\DataAnnotations\EnumDataTypeAttribute.cs (5)
14public EnumDataTypeAttribute(Type enumType) 20public Type EnumType { get; } 43Type valueType = value.GetType(); 101private static bool IsEnumTypeInFlagsMode(Type enumType) => 104private static string? GetUnderlyingTypeValueString(Type enumType, object enumValue) =>
System\ComponentModel\DataAnnotations\LocalizableString.cs (2)
21private Type? _resourceType; 67public Type? ResourceType
System\ComponentModel\DataAnnotations\MetadataPropertyDescriptorWrapper.cs (2)
30public override Type ComponentType { get { return _descriptor.ComponentType; } } 45public override Type PropertyType { get { return _descriptor.PropertyType; } }
System\ComponentModel\DataAnnotations\MetadataTypeAttribute.cs (3)
16private readonly Type _metadataClassType; 24public MetadataTypeAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type metadataClassType) 33public Type MetadataClassType
System\ComponentModel\DataAnnotations\RangeAttribute.cs (6)
53[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 89public Type OperandType { get; } 99/// by the <c>type</c> parameter of the <see cref="RangeAttribute(Type, string, string)"/> constructor are carried 202Type operandType = minimum.GetType(); 215Type type = OperandType; 220Type comparableType = typeof(IComparable);
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (2)
30private Type? _errorMessageResourceType; 201public Type? ErrorMessageResourceType
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (8)
23private readonly ConcurrentDictionary<Type, TypeStoreItem> _typeStoreItems = new(); 90internal Type GetPropertyType(ValidationContext validationContext) 118private TypeStoreItem GetTypeStoreItem([DynamicallyAccessedMembers(TypeStoreItem.DynamicallyAccessedTypes)] Type type) 126static TypeStoreItem AddTypeStoreItem(Type type) 170private readonly Type _type; 173internal TypeStoreItem([DynamicallyAccessedMembers(DynamicallyAccessedTypes)] Type type, AttributeCollection attributes) 268internal PropertyStoreItem(Type propertyType, AttributeCollection attributes) 275internal Type PropertyType { get; }
System\ComponentModel\DataAnnotations\ValidationContext.cs (10)
36private Func<Type, object?>? _serviceProvider; 120public Type ObjectType => ObjectInstance.GetType(); 173internal Type? MemberType 179Type? propertyType = _propertyType; 192private Type? _propertyType; 228/// service instances by <see cref="Type" /> when <see cref="GetService" /> is called. 232/// desired <see cref="Type" /> when <see cref="GetService" /> is called. 235public void InitializeServiceProvider(Func<Type, object?> serviceProvider) 245/// See <see cref="IServiceProvider.GetService(Type)" />. 249public object? GetService(Type serviceType) => _serviceProvider?.Invoke(serviceType);
System\ComponentModel\DataAnnotations\Validator.cs (5)
53var propertyType = _store.GetPropertyType(validationContext); 219var propertyType = _store.GetPropertyType(validationContext); 348/// <param name="destinationType">The destination <see cref="Type" /> for the value.</param> 355private static bool CanBeAssigned(Type destinationType, object? value) 376private static void EnsureValidPropertyType(string propertyName, Type propertyType, object? value)
System.ComponentModel.Composition (444)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (3)
12public static ICollection<object> GetCollectionWrapper(Type itemType, object collectionObject) 17var underlyingItemType = itemType.UnderlyingSystemType; 32Type collectionType = typeof(CollectionOfObject<>).MakeGenericType(underlyingItemType);
Microsoft\Internal\Collections\CollectionServices.cs (12)
15private static readonly Type StringType = typeof(string); 16private static readonly Type IEnumerableType = typeof(IEnumerable); 17private static readonly Type IEnumerableOfTType = typeof(IEnumerable<>); 18private static readonly Type ICollectionOfTType = typeof(ICollection<>); 20public static bool IsEnumerableOfT(Type type) 24Type genericType = type.GetGenericTypeDefinition().UnderlyingSystemType; 34public static Type? GetEnumerableElementType(Type type) 41if (ReflectionServices.TryGetGenericInterfaceType(type, IEnumerableOfTType, out Type? closedType)) 49public static Type? GetCollectionElementType(Type type) 51if (ReflectionServices.TryGetGenericInterfaceType(type, ICollectionOfTType, out Type? closedType))
Microsoft\Internal\ContractServices.cs (1)
11public static bool TryCast(Type contractType, object? value, out object? result)
Microsoft\Internal\GenerationServices.cs (26)
17private static readonly MethodInfo s_typeGetTypeFromHandleMethod = typeof(Type).GetMethod("GetTypeFromHandle")!; 20private static readonly Type s_typeType = typeof(System.Type); 21private static readonly Type s_stringType = typeof(string); 22private static readonly Type s_charType = typeof(char); 23private static readonly Type s_booleanType = typeof(bool); 24private static readonly Type s_byteType = typeof(byte); 25private static readonly Type s_sByteType = typeof(sbyte); 26private static readonly Type s_int16Type = typeof(short); 27private static readonly Type s_uInt16Type = typeof(ushort); 28private static readonly Type s_int32Type = typeof(int); 29private static readonly Type s_uInt32Type = typeof(uint); 30private static readonly Type s_int64Type = typeof(long); 31private static readonly Type s_uInt64Type = typeof(ulong); 32private static readonly Type s_doubleType = typeof(double); 33private static readonly Type s_singleType = typeof(float); 34private static readonly Type s_iEnumerableTypeofT = typeof(System.Collections.Generic.IEnumerable<>); 35private static readonly Type s_iEnumerableType = typeof(System.Collections.IEnumerable); 39private static readonly ConstructorInfo ObjectCtor = typeof(object).GetConstructor(Type.EmptyTypes)!; 41public static ILGenerator CreateGeneratorForPublicConstructor(this TypeBuilder typeBuilder, Type[] ctrArgumentTypes) 85Type valueType = value.GetType(); 104ilGenerator.LoadTypeOf((Type)rawValue); 221Type elementType; 222if (ReflectionServices.TryGetGenericInterfaceType(enumerable.GetType(), GenerationServices.s_iEnumerableTypeofT, out Type? closedType)) 234Type generatedArrayType = elementType.MakeArrayType(); 320private static void LoadTypeOf(this ILGenerator ilGenerator, Type type)
Microsoft\Internal\ReflectionInvoke.cs (1)
11public static object? SafeCreateInstance(this Type type, params object?[]? arguments)
Microsoft\Internal\ReflectionServices.cs (18)
18if (member is Type type) 50foreach (Type typeArgument in method.GetGenericArguments()) 60public static string GetDisplayName(Type declaringType, string? name) 76return AttributedModelServices.GetTypeIdentity(((Type)member)); 82internal static bool TryGetGenericInterfaceType(Type instanceType, Type targetOpenInterfaceType, [NotNullWhen(true)] out Type? targetClosedInterfaceType) 107Type? targetInterface = instanceType.GetInterface(targetOpenInterfaceType.Name, false); 124internal static IEnumerable<PropertyInfo> GetAllProperties(this Type type) 126return type.GetInterfaces().Concat(new Type[] { type }).SelectMany(itf => itf.GetProperties()); 129internal static IEnumerable<MethodInfo> GetAllMethods(this Type type) 133Type? baseType = type.BaseType; 145private static IEnumerable<MethodInfo> GetDeclaredMethods(this Type type) 153public static IEnumerable<FieldInfo> GetAllFields(this Type type) 157Type? baseType = type.BaseType; 169private static IEnumerable<FieldInfo> GetDeclaredFields(this Type type) 177internal static bool HasBaseclassOf(this Type? type, Type baseClass)
System\ComponentModel\Composition\AttributedModel\AttributedExportDefinition.cs (2)
17private readonly Type? _typeIdentityType; 21public AttributedExportDefinition(AttributedPartCreationInfo partCreationInfo, MemberInfo member, ExportAttribute exportAttribute, Type? typeIdentityType, string contractName)
System\ComponentModel\Composition\AttributedModel\AttributedModelDiscovery.cs (2)
16public static ComposablePartDefinition? CreatePartDefinitionIfDiscoverable(Type type, ICompositionElement? origin) 27public static ReflectionComposablePartDefinition CreatePartDefinition(Type type, PartCreationPolicyAttribute? partCreationPolicy, bool ignoreConstructorImports, ICompositionElement? origin)
System\ComponentModel\Composition\AttributedModel\AttributedPartCreationInfo.cs (16)
18private readonly Type _type; 27public AttributedPartCreationInfo(Type type, PartCreationPolicyAttribute? partCreationPolicy, bool ignoreConstructorImports, ICompositionElement? origin) 37public Type GetPartType() 42public Lazy<Type> GetLazyPartType() 44return new Lazy<Type>(GetPartType, LazyThreadSafetyMode.PublicationOnly); 184private static ConstructorInfo? SelectPartConstructor(Type type) 292foreach (Type type in GetInheritedExports(_type)) 317member.GetContractInfoFromExport(exportAttribute, out Type? typeIdentityType, out string contractName); 322private static IEnumerable<MemberInfo> GetExportMembers(Type type) 365private static IEnumerable<Type> GetInheritedExports(Type type) 379Type? currentType = type.BaseType; 398foreach (Type iface in type.GetInterfaces()) 441private static IEnumerable<MemberInfo> GetImportMembers(Type type) 456Type? baseType = type.BaseType; 472private static IEnumerable<MemberInfo> GetDeclaredOnlyImportMembers(Type type)
System\ComponentModel\Composition\AttributedModelServices.cs (7)
55public static ComposablePartDefinition CreatePartDefinition(Type type, ICompositionElement? origin) 62public static ComposablePartDefinition CreatePartDefinition(Type type, ICompositionElement? origin, bool ensureIsDiscoverable) 75public static string GetTypeIdentity(Type type) 89public static string GetContractName(Type type) 230public static bool Exports(this ComposablePartDefinition part, Type contractType) 261public static bool Imports(this ComposablePartDefinition part, Type contractType) 293public static bool Imports(this ComposablePartDefinition part, Type contractType, ImportCardinality importCardinality)
System\ComponentModel\Composition\CatalogReflectionContextAttribute.cs (2)
16private readonly Type _reflectionContextType; 18public CatalogReflectionContextAttribute(Type reflectionContextType)
System\ComponentModel\Composition\ConstraintServices.cs (7)
20private static readonly MethodInfo _metadataEqualsMethod = typeof(object).GetMethod("Equals", new Type[] { typeof(object) })!; 21private static readonly MethodInfo _typeIsInstanceOfTypeMethod = typeof(Type).GetMethod("IsInstanceOfType")!; 23public static Expression<Func<ExportDefinition, bool>> CreateConstraint(string contractName, string? requiredTypeIdentity, IEnumerable<KeyValuePair<string, Type>> requiredMetadata, CreationPolicy requiredCreationPolicy) 66private static Expression? CreateMetadataConstraintBody(IEnumerable<KeyValuePair<string, Type>> requiredMetadata, ParameterExpression parameter) 72foreach (KeyValuePair<string, Type> requiredMetadataItem in requiredMetadata) 136private static MethodCallExpression CreateMetadataOfTypeExpression(ParameterExpression parameter, string constantKey, Type constantType) 155Expression.Constant(constantType, typeof(Type)),
System\ComponentModel\Composition\ContractNameServices.cs (30)
29private static Dictionary<Type, string>? typeIdentityCache; 31private static Dictionary<Type, string> TypeIdentityCache 35return typeIdentityCache ??= new Dictionary<Type, string>(); 39internal static string GetTypeIdentity(Type type) 44internal static string GetTypeIdentity(Type type, bool formatGenericName) 108private static void WriteTypeWithNamespace(StringBuilder typeName, Type type, bool formatGenericName) 119private static void WriteType(StringBuilder typeName, Type type, bool formatGenericName) 128Queue<Type> genericTypeArguments = new Queue<Type>(type.GetGenericArguments()); 141private static void WriteNonGenericType(StringBuilder typeName, Type type, bool formatGenericName) 169private static void WriteArrayType(StringBuilder typeName, Type type, bool formatGenericName) 177Type rootElementType = FindArrayElementType(type); 179Type? elementType = type; 187private static void WritePointerType(StringBuilder typeName, Type type, bool formatGenericName) 196private static void WriteByRefType(StringBuilder typeName, Type type, bool formatGenericName) 205private static void WriteArrayTypeDimensions(StringBuilder typeName, Type type) 219private static void WriteGenericType(StringBuilder typeName, Type type, bool isDefinition, Queue<Type> genericTypeArguments, bool formatGenericName) 241private static void WriteGenericTypeName(StringBuilder typeName, Type type, bool isDefinition, Queue<Type> genericTypeArguments, bool formatGenericName) 256private static void WriteTypeArgumentsString(StringBuilder typeName, int argumentsCount, bool isDefinition, Queue<Type> genericTypeArguments, bool formatGenericName) 272Type genericTypeArgument = genericTypeArguments.Dequeue(); 279private static void WriteTypeArgument(StringBuilder typeName, bool isDefinition, Type genericTypeArgument, bool formatGenericName) 296internal static void WriteCustomModifiers(StringBuilder typeName, string customKeyword, Type[] types, bool formatGenericName) 303Queue<Type> typeArguments = new Queue<Type>(types); 311private static Type FindArrayElementType(Type type) 316Type? elementType = type; 336private static int GetGenericArity(Type type)
System\ComponentModel\Composition\ExceptionBuilder.cs (1)
88public static ArgumentException CreateReflectionModelInvalidPartDefinition(string parameterName, Type partDefinitionType)
System\ComponentModel\Composition\ExportAttribute.cs (13)
22/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the type of the 31: this((string?)null, (Type?)null) 41/// A <see cref="Type"/> of which to derive the contract name to export the type or 48/// <see cref="AttributedModelServices.GetContractName(Type)"/> on 53/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the type of the 61public ExportAttribute(Type? contractType) 78/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the property or field 87: this(contractName, (Type?)null) 101/// A <see cref="Type"/> of which to derive the contract name to export the type or 108/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the property or field 116public ExportAttribute(string? contractName, Type? contractType) 135/// A <see cref="Type"/> of the export that is be provided. The default value is 139public Type? ContractType { get; }
System\ComponentModel\Composition\ExportServices.cs (10)
23internal static readonly Type DefaultMetadataViewType = typeof(IDictionary<string, object>); 24internal static readonly Type DefaultExportedValueType = typeof(object); 26internal static bool IsDefaultMetadataViewType(Type metadataViewType) 36internal static bool IsDictionaryConstructorViewType(Type metadataViewType) 42Type.DefaultBinder, 43new Type[] { typeof(IDictionary<string, object>) }, 47internal static Func<Export, object> CreateStronglyTypedLazyFactory(Type? exportType, Type? metadataViewType) 67internal static Func<Export, Lazy<object, object>> CreateSemiStronglyTypedLazyFactory(Type? exportType, Type? metadataViewType)
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (9)
39/// attributed <see cref="Type"/> objects to add to the <see cref="AssemblyCatalog"/>. 87/// attributed <see cref="Type"/> objects to add to the <see cref="AssemblyCatalog"/>. 145/// attributed <see cref="Type"/> objects to add to the <see cref="AssemblyCatalog"/>. 201/// attributed <see cref="Type"/> objects to add to the <see cref="AssemblyCatalog"/>. 266/// The <see cref="Assembly"/> containing the attributed <see cref="Type"/> objects to 299/// The <see cref="Assembly"/> containing the attributed <see cref="Type"/> objects to 340/// The <see cref="Assembly"/> containing the attributed <see cref="Type"/> objects to 363/// The <see cref="Assembly"/> containing the attributed <see cref="Type"/> objects to 463/// The <see cref="Assembly"/> containing the attributed <see cref="Type"/> objects
System\ComponentModel\Composition\Hosting\CompositionServices.cs (39)
16internal static readonly Type InheritedExportAttributeType = typeof(InheritedExportAttribute); 17internal static readonly Type ExportAttributeType = typeof(ExportAttribute); 18internal static readonly Type AttributeType = typeof(Attribute); 19internal static readonly Type ObjectType = typeof(object); 26internal static Type GetDefaultTypeFromMember(this MemberInfo member) 37return ((Type)member); 49internal static Type AdjustSpecifiedTypeIdentityType(this Type specifiedContractType, MemberInfo member) 61internal static Type AdjustSpecifiedTypeIdentityType(this Type specifiedContractType, Type? memberType) 93private static string AdjustTypeIdentity(string originalTypeIdentity, Type typeIdentityType) 98internal static void GetContractInfoFromExport(this MemberInfo member, ExportAttribute export, out Type? typeIdentityType, out string contractName) 111internal static string GetTypeIdentityFromExport(this MemberInfo member, Type? typeIdentityType) 133private static Type? GetTypeIdentityTypeFromExport(this MemberInfo member, ExportAttribute export) 150internal static Type GetContractTypeFromImport(this IAttributedImport import, ImportType importType) 167Type contractType = import.GetContractTypeFromImport(importType); 174Type contractType = import.GetContractTypeFromImport(importType); 185internal static IDictionary<string, object?> GetPartMetadataForType(this Type type, CreationPolicy creationPolicy) 213Type[] genericArguments = type.GetGenericArguments(); 222Type genericArgument = genericArguments[i]; 224Type[]? constraints = genericArgument.GetGenericParameterConstraints(); 281Type attrType = attr.GetType(); 335private static bool TryContributeMetadataValue(this IDictionary<string, object?> dictionary, string name, object? value, Type? valueType, bool allowsMultiple) 366private Type? _arrayType; 368private static readonly Type ObjectType = typeof(object); 369private static readonly Type TypeType = typeof(Type); 372public void Add(object? item, Type? itemType) 389if (item is Type) 403private void InferArrayType(Type itemType) 469internal static IEnumerable<KeyValuePair<string, Type>> GetRequiredMetadata(Type? metadataViewType) 476return Enumerable.Empty<KeyValuePair<string, Type>>(); 487return properties.Select(property => new KeyValuePair<string, Type>(property.Name, property.PropertyType)); 495internal static IDictionary<string, object?> GetImportMetadata(Type type, IAttributedImport? attributedImport) 613private static bool IsValidAttributeType(Type type) 618private static bool IsValidAttributeType(Type type, bool arrayAllowed) 641if (typeof(Type).IsAssignableFrom(type))
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (27)
38/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 89/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 134/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 187/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 220/// The <see cref="Type"/> of the <see cref="Export"/> objects to return. 223/// The <see cref="Type"/> of the metadata view of the <see cref="Export"/> objects to 245/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <paramref name="type"/>. 261public IEnumerable<Lazy<object, object>> GetExports(Type type, Type? metadataViewType, string? contractName) 297/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 338/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 373/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 415/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 448/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 498/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 553/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 605/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 647/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 688/// <see cref="AttributedModelServices.GetContractName(Type)"/> on <typeparamref name="T"/>. 713IEnumerable<Export> exports = GetExportsCore(typeof(T), (Type?)null, contractName, ImportCardinality.ZeroOrMore); 730Export? export = GetExportsCore(typeof(T), (Type?)null, contractName, cardinality).SingleOrDefault(); 737IEnumerable<Export> exports = GetExportsCore(typeof(T), (Type?)null, contractName, ImportCardinality.ZeroOrMore); 773private IEnumerable<Export> GetExportsCore(Type type, Type? metadataViewType, string? contractName, ImportCardinality cardinality) 794private static ContractBasedImportDefinition BuildImportDefinition(Type type, Type metadataViewType, string contractName, ImportCardinality cardinality) 800IEnumerable<KeyValuePair<string, Type>> requiredMetadata = CompositionServices.GetRequiredMetadata(metadataViewType);
System\ComponentModel\Composition\Hosting\ImportSourceImportDefinitionHelpers.cs (1)
100public override IEnumerable<KeyValuePair<string, Type>> RequiredMetadata
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (19)
28private Type[]? _types; 39/// An <see cref="Array"/> of attributed <see cref="Type"/> objects to add to the 52public TypeCatalog(params Type[] types) : this((IEnumerable<Type>)types) 61/// An <see cref="IEnumerable{T}"/> of attributed <see cref="Type"/> objects to add 74public TypeCatalog(IEnumerable<Type> types) 89/// An <see cref="IEnumerable{T}"/> of attributed <see cref="Type"/> objects to add 101public TypeCatalog(IEnumerable<Type> types, ICompositionElement definitionOrigin) 117/// An <see cref="IEnumerable{T}"/> of attributed <see cref="Type"/> objects to add 130public TypeCatalog(IEnumerable<Type> types, ReflectionContext reflectionContext) 146/// An <see cref="IEnumerable{T}"/> of attributed <see cref="Type"/> objects to add 162public TypeCatalog(IEnumerable<Type> types, ReflectionContext reflectionContext, ICompositionElement definitionOrigin) 174private void InitializeTypeCatalog(IEnumerable<Type> types, ReflectionContext reflectionContext) 176var typesList = new List<Type>(); 177foreach (var type in types) 204private void InitializeTypeCatalog(IEnumerable<Type> types) 206Type[] arr = types.ToArray(); 207foreach (Type type in arr) 267foreach (Type type in _types)
System\ComponentModel\Composition\IAttributedImport.cs (1)
11Type? ContractType { get; }
System\ComponentModel\Composition\ImportAttribute.cs (10)
23/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the property, field, 41/// A <see cref="Type"/> of which to derive the contract name of the export to import, or 47/// <see cref="AttributedModelServices.GetContractName(Type)"/> on 52/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the property, field, 60public ImportAttribute(Type? contractType) 76/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the property, field, 85: this(contractName, (Type?)null) 89public ImportAttribute(string? contractName, Type? contractType) 108/// A <see cref="Type"/> of the export that this import is expecting. The default value is 113public Type? ContractType { get; }
System\ComponentModel\Composition\ImportManyAttribute.cs (10)
23/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the element\item type of 41/// A <see cref="Type"/> of which to derive the contract name of the exports to import, or 47/// <see cref="AttributedModelServices.GetContractName(Type)"/> on 52/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the property, field, 60public ImportManyAttribute(Type? contractType) 76/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the property, field, 85: this(contractName, (Type?)null) 89public ImportManyAttribute(string? contractName, Type? contractType) 108/// A <see cref="Type"/> of the export that this import is expecting. The default value is 113public Type? ContractType { get; }
System\ComponentModel\Composition\InheritedExportAttribute.cs (11)
21/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the type itself, 30: this((string?)null, (Type?)null) 39/// A <see cref="Type"/> of which to derive the contract name to export the type 46/// <see cref="AttributedModelServices.GetContractName(Type)"/> on 51/// <see cref="AttributedModelServices.GetContractName(Type)"/> on the type of the 59public InheritedExportAttribute(Type? contractType) 76/// <see cref="AttributedModelServices.GetContractName(Type)"/> on 85: this(contractName, (Type?)null) 99/// A <see cref="Type"/> of which to derive the contract name to export the type 106/// <see cref="AttributedModelServices.GetContractName(Type)"/> on 114public InheritedExportAttribute(string? contractName, Type? contractType)
System\ComponentModel\Composition\MetadataViewGenerator.cs (18)
69private static readonly Dictionary<Type, MetadataViewFactory> _metadataViewFactories = new Dictionary<Type, MetadataViewFactory>(); 73private static readonly Type[] CtorArgumentTypes = new Type[] { typeof(IDictionary<string, object>) }; 75private static readonly MethodInfo ObjectGetType = typeof(object).GetMethod("GetType", Type.EmptyTypes)!; 76private static readonly ConstructorInfo ObjectCtor = typeof(object).GetConstructor(Type.EmptyTypes)!; 91public static MetadataViewFactory GetMetadataViewFactory(Type viewType) 112Type? generatedProxyType = GenerateInterfaceViewProxyType(viewType); 181private static Type? GenerateInterfaceViewProxyType(Type viewType) 184Type? proxyType; 186Type[] interfaces = { viewType }; 202LocalBuilder sourceType = proxyCtorIL.DeclareLocal(typeof(Type)); 216Type[] propertyTypeArguments = new Type[] { propertyInfo.PropertyType }; 217Type[]? optionalModifiers = null; 218Type[]? requiredModifiers = null; 323Type.EmptyTypes, null, null);
System\ComponentModel\Composition\MetadataViewImplementationAttribute.cs (4)
17/// A <see cref="Type"/> for the implementation of the MetadataView. 26public MetadataViewImplementationAttribute(Type? implementationType) 35/// A <see cref="Type"/> of the export that is be provided. The default value is 39public Type? ImplementationType { get; }
System\ComponentModel\Composition\MetadataViewProvider.cs (3)
19Type metadataViewType = typeof(TMetadataView); 29Type? proxyType = null; 126public static bool IsViewTypeValid(Type metadataViewType)
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (12)
24private readonly IEnumerable<KeyValuePair<string, Type>> _requiredMetadata = Enumerable.Empty<KeyValuePair<string, Type>>(); 57/// The type identity of the export type expected. Use <see cref="AttributedModelServices.GetTypeIdentity(Type)"/> 101public ContractBasedImportDefinition(string contractName, string? requiredTypeIdentity, IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 118/// The type identity of the export type expected. Use <see cref="AttributedModelServices.GetTypeIdentity(Type)"/> 163public ContractBasedImportDefinition(string contractName, string? requiredTypeIdentity, IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 183/// A <see cref="string"/> that is generated by <see cref="AttributedModelServices.GetTypeIdentity(Type)"/> 208public virtual IEnumerable<KeyValuePair<string, Type>> RequiredMetadata 224foreach (KeyValuePair<string, Type> metadataItem in _requiredMetadata) 319foreach (KeyValuePair<string, Type> metadataItem in RequiredMetadata) 322Type metadataValueType = metadataItem.Value; 374foreach (KeyValuePair<string, Type> metadataItem in _requiredMetadata)
System\ComponentModel\Composition\Primitives\ExportedDelegate.cs (4)
26public virtual Delegate? CreateDelegate(Type delegateType) 45private Type CreateStandardDelegateType() 50Type[] parameterTypes = new Type[parameters.Length + 1];
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.cs (8)
14private readonly Type _exportFactoryType; 16public ExportFactoryCreator(Type exportFactoryType) 23public Func<Export, object> CreateStronglyTypedExportFactoryFactory(Type exportType, Type? metadataViewType) 46Type[] typeArgs = { typeof(T) }; 47Type constructed = _exportFactoryType.MakeGenericType(typeArgs); 59Type[] typeArgs = { typeof(T), typeof(M) }; 60Type constructed = _exportFactoryType.MakeGenericType(typeArgs);
System\ComponentModel\Composition\ReflectionModel\GenericServices.cs (29)
14internal static IList<Type> GetPureGenericParameters(this Type type) 20List<Type> pureGenericParameters = new List<Type>(); 21TraverseGenericType(type, (Type t) => 32return Type.EmptyTypes; 36internal static int GetPureGenericArity(this Type type) 43TraverseGenericType(type, (Type t) => 54private static void TraverseGenericType(Type type, Action<Type> onType) 58foreach (Type genericArgument in type.GetGenericArguments()) 66public static int[] GetGenericParametersOrder(Type type) 92public static IEnumerable<Type>? CreateTypeSpecializations(this Type[]? types, Type[] specializationTypes) 104public static Type CreateTypeSpecialization(this Type type, Type[] specializationTypes) 119Type[] typeGenericArguments = type.GetGenericArguments(); 120Type[] subSpecialization = new Type[typeGenericArguments.Length]; 124Type typeGenericArgument = typeGenericArguments[i]; 136public static bool CanSpecialize(Type? type, IEnumerable<Type>? constraints, GenericParameterAttributes attributes) 141public static bool CanSpecialize(Type? type, IEnumerable<Type>? constraintTypes) 150foreach (Type constraintType in constraintTypes) 161public static bool CanSpecialize(Type type, GenericParameterAttributes attributes) 181if (!type.IsValueType && (type.GetConstructor(Type.EmptyTypes) == null))
System\ComponentModel\Composition\ReflectionModel\GenericSpecializationPartCreationInfo.cs (12)
20private readonly Type[] _specialization; 24private readonly Lazy<Type> _lazyPartType; 32public GenericSpecializationPartCreationInfo(IReflectionPartCreationInfo originalPartCreationInfo, ReflectionComposablePartDefinition originalPart, Type[] specialization) 46_lazyPartType = new Lazy<Type>( 60public Type GetPartType() 65public Lazy<Type> GetLazyPartType() 184Type closedGenericPartType = GetPartType(); 197foreach (var iface in closedGenericPartType.GetInterfaces()) 202foreach (var type in closedGenericPartType.GetNestedTypes()) 208var baseType = closedGenericPartType.BaseType; 547public static bool CanSpecialize(IDictionary<string, object?> partMetadata, Type[] specialization) 579(genericParameterConstraints![i] as Type[]).CreateTypeSpecializations(specialization),
System\ComponentModel\Composition\ReflectionModel\ImportingItem.cs (3)
51Type elementType = ImportType.ElementType ?? typeof(object); 82private object? CastSingleExportToImportType(Type type, Export export) 92private object? Cast(Type type, Export export)
System\ComponentModel\Composition\ReflectionModel\ImportingMember.cs (3)
110Type? itemType = CollectionServices.GetCollectionElementType(ImportType.ActualType); 120private ICollection<object> GetNormalizedCollection(Type itemType, object? instance) 145ConstructorInfo? constructor = ImportType.ActualType.GetConstructor(Type.EmptyTypes);
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (27)
14private static readonly Type LazyOfTType = typeof(Lazy<>); 15private static readonly Type LazyOfTMType = typeof(Lazy<,>); 16private static readonly Type ExportFactoryOfTType = typeof(ExportFactory<>); 18private readonly Type _type; 20private Type _contractType; 25internal static Dictionary<Type, Func<Export, object>?>? _castSingleValueCache; 27private static Dictionary<Type, Func<Export, object>?> CastSingleValueCache 31return _castSingleValueCache ??= new Dictionary<Type, Func<Export, object>?>(); 35public ImportType(Type type, ImportCardinality cardinality) 40Type contractType = type; 58public Type? ElementType { get; private set; } 60public Type ActualType 67public Type ContractType { get { return _contractType; } } 81public Type? MetadataViewType { get; private set; } 83private Type CheckForCollection(Type type) 93private static bool IsGenericDescendentOf(Type? type, Type baseGenericTypeDefinition) 108public static bool IsDescendentOf(Type type, Type baseType) 122private void Initialize(Type type) 131Type[] arguments = type.GetGenericArguments(); 132Type genericType = type.GetGenericTypeDefinition().UnderlyingSystemType; 158private static bool IsLazyGenericType(Type genericType) 163private static bool TryGetCastFunction(Type genericType, bool isOpenGeneric, Type[] arguments, out Func<Export, object>? castFunction) 212private static bool IsTypeAssignableCollectionType(Type type)
System\ComponentModel\Composition\ReflectionModel\IReflectionPartCreationInfo.cs (2)
12Type GetPartType(); 13Lazy<Type> GetLazyPartType();
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePartDefinition.cs (11)
31public Type GetPartType() 36public Lazy<Type> GetLazyPartType() 155if (TryGetGenericTypeParameters(genericParameters, out Type?[]? genericTypeParameters)) 161foreach (Type[] candidateParameters in GetCandidateParameters(genericTypeParameters!)) 264private IEnumerable<Type[]> GetCandidateParameters(Type[] genericParameters) 278private static bool TryGetGenericTypeParameters(IEnumerable<object> genericParameters, [NotNullWhen(true)] out Type?[]? genericTypeParameters) 280genericTypeParameters = genericParameters as Type[]; 284genericTypeParameters = new Type[genericParametersAsArray.Length]; 287genericTypeParameters[i] = genericParametersAsArray[i] as Type; 297internal bool TryMakeGenericPartDefinition(Type[] genericTypeParameters, [NotNullWhen(true)] out ComposablePartDefinition? genericPartDefinition)
System\ComponentModel\Composition\ReflectionModel\ReflectionExtensions.cs (2)
33return ((Type)accessors[0]).ToReflectionType(); 122public static ReflectionType ToReflectionType(this Type type)
System\ComponentModel\Composition\ReflectionModel\ReflectionField.cs (1)
45public override Type ReturnType
System\ComponentModel\Composition\ReflectionModel\ReflectionImportDefinition.cs (1)
16IEnumerable<KeyValuePair<string, Type>>? requiredMetadata,
System\ComponentModel\Composition\ReflectionModel\ReflectionItem.cs (1)
10public abstract Type ReturnType { get; }
System\ComponentModel\Composition\ReflectionModel\ReflectionMember.cs (1)
16public Type DeclaringType
System\ComponentModel\Composition\ReflectionModel\ReflectionMemberImportDefinition.cs (1)
18IEnumerable<KeyValuePair<string, Type>>? requiredMetadata,
System\ComponentModel\Composition\ReflectionModel\ReflectionMethod.cs (1)
40public override Type ReturnType
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (13)
17public static Lazy<Type> GetPartType(ComposablePartDefinition partDefinition) 127Lazy<Type> partType, 165IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 178IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 204IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 251IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 263IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 302public static bool TryMakeGenericPartDefinition(ComposablePartDefinition partDefinition, IEnumerable<Type> genericParameters, [NotNullWhen(true)] out ComposablePartDefinition? specialization) 319private readonly Lazy<Type> _partType; 328Lazy<Type> partType, 345public Type GetPartType() 350public Lazy<Type> GetLazyPartType() 373_constructor = GetPartType().GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, null);
System\ComponentModel\Composition\ReflectionModel\ReflectionParameter.cs (1)
34public override Type ReturnType
System\ComponentModel\Composition\ReflectionModel\ReflectionParameterImportDefinition.cs (1)
20IEnumerable<KeyValuePair<string, Type>>? requiredMetadata,
System\ComponentModel\Composition\ReflectionModel\ReflectionProperty.cs (1)
92public override Type ReturnType
System\ComponentModel\Composition\ReflectionModel\ReflectionType.cs (3)
10private readonly Type _type; 12public ReflectionType(Type type) 34public override Type ReturnType
System\Composition\Diagnostics\CompositionTrace.cs (3)
62internal static void DefinitionMarkedWithPartNotDiscoverableAttribute(Type type) 74internal static void DefinitionMismatchedExportArity(Type type, MemberInfo member) 87internal static void DefinitionContainsNoExports(Type type)
System.ComponentModel.Composition.Registration (59)
src\libraries\Common\src\System\Composition\Diagnostics\CompositionTrace.cs (8)
10public static void Registration_ConstructorConventionOverridden(Type type) 23public static void Registration_TypeExportConventionOverridden(Type type) 36public static void Registration_MemberExportConventionOverridden(Type type, MemberInfo member) 55public static void Registration_MemberImportConventionOverridden(Type type, MemberInfo member) 74public static void Registration_OnSatisfiedImportNotificationOverridden(Type type, MemberInfo member) 93public static void Registration_PartCreationConventionOverridden(Type type) 108public static void Registration_MemberImportConventionMatchedTwice(Type type, MemberInfo member) 127public static void Registration_PartMetadataConventionOverridden(Type type)
System\ComponentModel\Composition\Registration\ExportBuilder.cs (7)
12private Type _contractType; 14private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs; 23public ExportBuilder AsContractType(Type type) 49public ExportBuilder AddMetadata(string name, Func<Type, object> itemFunc) 51_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 57internal void BuildAttributes(Type type, ref List<Attribute> attributes) 84foreach (Tuple<string, Func<Type, object>> item in _metadataItemFuncs)
System\ComponentModel\Composition\Registration\ImportBuilder.cs (4)
11private static readonly Type s_stringType = typeof(string); 13private Type _contractType; 28public ImportBuilder AsContractType(Type type) 71internal void BuildAttributes(Type type, ref List<Attribute> attributes)
System\ComponentModel\Composition\Registration\PartBuilder.cs (32)
14private static readonly Type s_exportAttributeType = typeof(ExportAttribute); 21private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs; 28private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>> _propertyExports; 29private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>> _propertyImports; 30private readonly List<Tuple<Predicate<Type>, Action<Type, ExportBuilder>>> _interfaceExports; 32internal Predicate<Type> SelectType { get; } 34internal PartBuilder(Predicate<Type> selectType) 40_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>>(); 41_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>>(); 42_interfaceExports = new List<Tuple<Predicate<Type>, Action<Type, ExportBuilder>>>(); 89public PartBuilder ExportInterfaces(Predicate<Type> interfaceFilter) 99public PartBuilder ExportInterfaces(Predicate<Type> interfaceFilter, 100Action<Type, ExportBuilder> exportConfiguration) 131_propertyExports.Add(Tuple.Create(propertyFilter, exportConfiguration, default(Type))); 179_propertyImports.Add(Tuple.Create(propertyFilter, importConfiguration, default(Type))); 221public PartBuilder AddMetadata(string name, Func<Type, object> itemFunc) 223_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 239Type attrType = attr.GetType(); 250internal IEnumerable<Attribute> BuildTypeAttributes(Type type) 313foreach (Tuple<string, Func<Type, object>> item in _metadataItemFuncs) 333foreach (Type iface in type.GetInterfaces()) 335Type underlyingType = iface.UnderlyingSystemType; 343foreach (Tuple<Predicate<Type>, Action<Type, ExportBuilder>> exportSpecification in _interfaceExports) 348exportBuilder.AsContractType((Type)iface); 362internal bool BuildConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers) 403internal static void BuildDefaultConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers) 444internal void BuildPropertyAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers) 457foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type> importSpecification in _propertyImports) 497foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type> exportSpecification in _propertyExports)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (1)
150internal PartBuilder(Predicate<Type> selectType) : base(selectType)
System\ComponentModel\Composition\Registration\RegistrationBuilder.cs (7)
41public PartBuilder ForTypesDerivedFrom(Type type) 62public PartBuilder ForType(Type type) 75public PartBuilder<T> ForTypesMatching<T>(Predicate<Type> typeFilter) 88public PartBuilder ForTypesMatching(Predicate<Type> typeFilter) 101private List<Tuple<object, List<Attribute>>> EvaluateThisTypeAgainstTheConvention(Type type) 139MemberInfo underlyingMemberType = ((Type)member).UnderlyingSystemType; 153foreach (Tuple<object, List<Attribute>> element in EvaluateThisTypeAgainstTheConvention((Type)member))
System.ComponentModel.Primitives (12)
System\ComponentModel\Component.cs (1)
107protected virtual object? GetService(Type service) => _site?.GetService(service);
System\ComponentModel\Design\Serialization\DesignerSerializerAttribute.cs (3)
19public DesignerSerializerAttribute(Type serializerType, Type baseSerializerType) 31public DesignerSerializerAttribute(string? serializerTypeName, Type baseSerializerType)
System\ComponentModel\DesignerAttribute.cs (4)
32public DesignerAttribute(Type designerType) 56public DesignerAttribute(string designerTypeName, Type designerBaseType) 69public DesignerAttribute(Type designerType, Type designerBaseType)
System\ComponentModel\EditorAttribute.cs (3)
41public EditorAttribute(string typeName, Type baseType) 53public EditorAttribute(Type type, Type baseType)
System\ComponentModel\InvalidEnumArgumentException.cs (1)
47public InvalidEnumArgumentException(string? argumentName, int invalidValue, Type enumClass)
System.ComponentModel.TypeConverter (610)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (3)
20public override ICustomTypeDescriptor GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, object? instance) 72public override Type ComponentType 82public override Type PropertyType
src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
24[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type typeWithColors)
System\ComponentModel\AmbientValueAttribute.cs (2)
27public AmbientValueAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, string value) 43static TypeConverter TypeDescriptorGetConverter([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) => TypeDescriptor.GetConverter(type);
System\ComponentModel\ArrayConverter.cs (5)
18public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 47Type arrayType = value.GetType(); 48Type elementType = arrayType.GetElementType()!; 67public ArrayPropertyDescriptor(Type arrayType, Type elementType, int index)
System\ComponentModel\AttributeCollection.cs (8)
23private static Dictionary<Type, Attribute?>? s_defaultAttributes; 31public Type type; 127public virtual Attribute? this[[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor | DynamicallyAccessedMemberTypes.PublicFields)] Type attributeType] 176Type aType = attribute.GetType(); 243protected Attribute? GetDefaultAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor | DynamicallyAccessedMemberTypes.PublicFields)] Type attributeType) 249s_defaultAttributes ??= new Dictionary<Type, Attribute?>(); 260Type reflect = TypeDescriptor.GetReflectionType(attributeType); 269ConstructorInfo? ci = reflect.UnderlyingSystemType.GetConstructor(Type.EmptyTypes);
System\ComponentModel\AttributeProviderAttribute.cs (1)
38public AttributeProviderAttribute([DynamicallyAccessedMembers(RequiredMemberTypes)] Type type)
System\ComponentModel\BaseNumberConverter.cs (4)
24internal abstract Type TargetType { get; } 45public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 90public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 110public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType)
System\ComponentModel\BindingList.cs (2)
80Type itemType = typeof(T); 88return itemType.GetConstructor(BindingFlags, null, Type.EmptyTypes, null) != null;
System\ComponentModel\BooleanConverter.cs (1)
19public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
System\ComponentModel\ByteConverter.cs (1)
17internal override Type TargetType => typeof(byte);
System\ComponentModel\CharConverter.cs (2)
18public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 26public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
System\ComponentModel\CollectionConverter.cs (1)
19public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
System\ComponentModel\ComponentConverter.cs (1)
17public ComponentConverter(Type type) : base(type)
System\ComponentModel\ComponentResourceManager.cs (4)
27public ComponentResourceManager(Type t) : base(t) 85Type typeFromValue = value.GetType(); 90private void ApplyResources(object value, Type typeFromValue, string objectName, CultureInfo? culture) 191Type? t = typeFromValue;
System\ComponentModel\Container.cs (2)
130protected virtual object? GetService(Type service) => service == typeof(IContainer) ? this : null; 263public object? GetService(Type service)
System\ComponentModel\CultureInfoConverter.cs (4)
43public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 52public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 139public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 161typeof(CultureInfo).GetConstructor(new Type[] { typeof(string) }),
System\ComponentModel\CustomTypeDescriptor.cs (1)
132public virtual object? GetEditor(Type editorBaseType) => _parent?.GetEditor(editorBaseType);
System\ComponentModel\DateOnlyConverter.cs (4)
20public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 26public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 77public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 98return new InstanceDescriptor(typeof(DateOnly).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int) }), new object[] { date.Year, date.Month, date.Day });
System\ComponentModel\DateTimeConverter.cs (5)
22public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 31public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 81public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 126typeof(DateTime).GetConstructor(new Type[] { typeof(long) }), 132typeof(DateTime).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int) }),
System\ComponentModel\DateTimeOffsetConverter.cs (5)
21public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 30public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 81public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 138typeof(DateTimeOffset).GetConstructor(new Type[] { typeof(long) }), 144typeof(DateTimeOffset).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(TimeSpan) }),
System\ComponentModel\DecimalConverter.cs (4)
26internal override Type TargetType => typeof(decimal); 32public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 44public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 48ConstructorInfo? ctor = typeof(decimal).GetConstructor(new Type[] { typeof(int[]) });
System\ComponentModel\DelegatingTypeDescriptionProvider.cs (12)
18private readonly Type _type; 23internal DelegatingTypeDescriptionProvider(Type type) 37[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, 38Type[]? argTypes, 100public override Type GetReflectionType( 101[DynamicallyAccessedMembers(TypeDescriptor.ReflectTypesDynamicallyAccessedMembers)] Type objectType, 107public override Type GetRuntimeType(Type objectType) => Provider.GetRuntimeType(objectType); 117public override ICustomTypeDescriptor? GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, object? instance) 122public override bool IsSupportedType(Type type) => Provider.IsSupportedType(type); 124public override bool IsRegisteredType(Type type) => Provider.IsRegisteredType(type); 128public override ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType(Type objectType, object? instance) => Provider.GetTypeDescriptorFromRegisteredType(objectType, instance);
System\ComponentModel\Design\DesignerOptionService.cs (5)
414public override Type ComponentType => _property.ComponentType; 418public override Type PropertyType => _property.PropertyType; 460public override object? ConvertTo(ITypeDescriptorContext? cxt, CultureInfo? culture, object? value, Type destinationType) 478public override Type ComponentType => _option.GetType(); 482public override Type PropertyType => _option.GetType();
System\ComponentModel\Design\DesigntimeLicenseContext.cs (3)
28public override string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) => null; 33public override void SetSavedLicenseKey(Type type, string key) 60public override string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly)
System\ComponentModel\Design\HelpKeywordAttribute.cs (1)
72public HelpKeywordAttribute(Type t)
System\ComponentModel\Design\IComponentDiscoveryService.cs (1)
19ICollection GetComponentTypes(IDesignerHost? designerHost, Type? baseType);
System\ComponentModel\Design\IDesignerHost.cs (3)
94IComponent CreateComponent(Type componentClass); 99IComponent CreateComponent(Type componentClass, string name); 134Type? GetType(string typeName);
System\ComponentModel\Design\IReferenceService.cs (1)
35object[] GetReferences(Type baseType);
System\ComponentModel\Design\IServiceObjectContainer.cs (6)
16void AddService(Type serviceType, object serviceInstance); 21void AddService(Type serviceType, object serviceInstance, bool promote); 26void AddService(Type serviceType, ServiceCreatorCallback callback); 31void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote); 36void RemoveService(Type serviceType); 41void RemoveService(Type serviceType, bool promote);
System\ComponentModel\Design\ITypeDiscoveryService.cs (1)
21ICollection GetTypes(Type? baseType, bool excludeGlobalTypes);
System\ComponentModel\Design\ITypeResolutionService.cs (3)
28Type? GetType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] string name); 34Type? GetType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] string name, bool throwOnError); 40Type? GetType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] string name, bool throwOnError, bool ignoreCase);
System\ComponentModel\Design\PropertyTabAttribute.cs (10)
17private Type[]? _tabClasses; 34public PropertyTabAttribute(Type tabClass) : this(tabClass, PropertyTabScope.Component) 53public PropertyTabAttribute(Type tabClass, PropertyTabScope tabScope) 55_tabClasses = new Type[] { tabClass }; 83public Type[] TabClasses 103_tabClasses = new Type[_tabClassNames.Length]; 120_tabClasses[i] = Type.GetType(className, false)!; 187protected void InitializeArrays(Type[]? tabClasses, PropertyTabScope[]? tabScopes) 192private void InitializeArrays(string[]? tabClassNames, Type[]? tabClasses, PropertyTabScope[]? tabScopes) 200_tabClasses = (Type[])tabClasses.Clone();
System\ComponentModel\Design\Serialization\ContextStack.cs (1)
66public object? this[Type type]
System\ComponentModel\Design\Serialization\DefaultSerializationProviderAttribute.cs (1)
19public DefaultSerializationProviderAttribute(Type providerType)
System\ComponentModel\Design\Serialization\IDesignerSerializationManager.cs (4)
74object CreateInstance(Type type, ICollection? arguments, string? name, bool addToContainer); 92object? GetSerializer(Type? objectType, Type serializerType); 97Type? GetType(string typeName);
System\ComponentModel\Design\Serialization\IDesignerSerializationProvider.cs (2)
30object? GetSerializer(IDesignerSerializationManager manager, object? currentSerializer, Type? objectType, Type serializerType);
System\ComponentModel\Design\Serialization\INameCreationService.cs (1)
21string CreateName(IContainer? container, Type dataType);
System\ComponentModel\Design\Serialization\RootDesignerSerializerAttribute.cs (3)
20public RootDesignerSerializerAttribute(Type serializerType, Type baseSerializerType, bool reloadable) 33public RootDesignerSerializerAttribute(string serializerTypeName, Type baseSerializerType, bool reloadable)
System\ComponentModel\Design\ServiceContainer.cs (16)
16private static readonly Type[] s_defaultServices = new Type[] { typeof(IServiceContainer), typeof(ServiceContainer) }; 47protected virtual Type[] DefaultServices => s_defaultServices; 58public void AddService(Type serviceType, object serviceInstance) 66public virtual void AddService(Type serviceType, object serviceInstance, bool promote) 99public void AddService(Type serviceType, ServiceCreatorCallback callback) 107public virtual void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote) 168public virtual object? GetService(Type serviceType) 174Type[] defaults = DefaultServices; 215public void RemoveService(Type serviceType) 223public virtual void RemoveService(Type serviceType, bool promote) 248private sealed class ServiceCollection<T> : Dictionary<Type, T> 252private sealed class EmbeddedTypeAwareTypeComparer : IEqualityComparer<Type> 254public bool Equals(Type? x, Type? y) => x!.IsEquivalentTo(y); 256public int GetHashCode(Type obj) => obj.FullName!.GetHashCode();
System\ComponentModel\Design\ServiceCreatorCallback.cs (1)
9public delegate object? ServiceCreatorCallback(IServiceContainer container, Type serviceType);
System\ComponentModel\DoubleConverter.cs (1)
22internal override Type TargetType => typeof(double);
System\ComponentModel\EnumConverter.cs (12)
24public EnumConverter(Type type) 34protected Type EnumType { get; } 42public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 55public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 123public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 150Type underlyingType = Enum.GetUnderlyingType(EnumType); 155MethodInfo? method = typeof(Enum).GetMethod("ToObject", new Type[] { typeof(Type), underlyingType }); 242static Type GetTypeDescriptorReflectionType(Type enumType) => TypeDescriptor.GetReflectionType(enumType); 244Type _reflectType = GetTypeDescriptorReflectionType(EnumType); 250static FieldInfo[]? GetPublicStaticEnumFields(Type type) => type.GetFields(BindingFlags.Public | BindingFlags.Static);
System\ComponentModel\EventDescriptor.cs (2)
41public abstract Type ComponentType { get; } 46public abstract Type EventType { get; }
System\ComponentModel\ExtendedPropertyDescriptor.cs (3)
22public ExtendedPropertyDescriptor(ReflectPropertyDescriptor extenderInfo, Type? receiverType, IExtenderProvider provider, Attribute[]? attributes) 73public override Type ComponentType => _extenderInfo.ComponentType; 83public override Type PropertyType => _extenderInfo.ExtenderGetType();
System\ComponentModel\ExtenderProvidedPropertyAttribute.cs (2)
19internal static ExtenderProvidedPropertyAttribute Create(PropertyDescriptor? extenderProperty, Type? receiverType, IExtenderProvider? provider) 49public Type? ReceiverType { get; private set; }
System\ComponentModel\GuidConverter.cs (4)
22public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 31public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 56public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 60ConstructorInfo? ctor = typeof(Guid).GetConstructor(new Type[] { typeof(string) });
System\ComponentModel\HalfConverter.cs (1)
23internal override Type TargetType => typeof(Half);
System\ComponentModel\IComNativeDescriptorHandler.cs (1)
22object GetEditor(object component, Type baseEditorType);
System\ComponentModel\ICustomTypeDescriptor.cs (1)
51object? GetEditor(Type editorBaseType);
System\ComponentModel\InstallerTypeAttribute.cs (3)
20public InstallerTypeAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type installerType) 36public virtual Type? InstallerType => Type.GetType(_typeName!);
System\ComponentModel\InstanceCreationEditor.cs (1)
21public abstract object? CreateInstance(ITypeDescriptorContext context, Type instanceType);
System\ComponentModel\Int128Converter.cs (1)
18internal override Type TargetType => typeof(Int128);
System\ComponentModel\Int16Converter.cs (1)
17internal override Type TargetType => typeof(short);
System\ComponentModel\Int32Converter.cs (1)
17internal override Type TargetType => typeof(int);
System\ComponentModel\Int64Converter.cs (1)
17internal override Type TargetType => typeof(long);
System\ComponentModel\LicenseContext.cs (3)
22public virtual string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) => null; 27public virtual object? GetService(Type type) => null; 32public virtual void SetSavedLicenseKey(Type type, string key)
System\ComponentModel\LicenseException.cs (5)
26public LicenseException(Type? type) : this(type, null, SR.Format(SR.LicExceptionTypeOnly, type?.FullName)) 33public LicenseException(Type? type, object? instance) : this(type, null, SR.Format(SR.LicExceptionTypeAndInstance, type?.FullName, instance?.GetType().FullName)) 40public LicenseException(Type? type, object? instance, string? message) : base(message) 51public LicenseException(Type? type, object? instance, string? message, Exception? innerException) : base(message, innerException) 70public Type? LicensedType { get; }
System\ComponentModel\LicenseManager.cs (16)
85private static void CacheProvider(Type type, LicenseProvider? provider) 104Type providerType = provider.GetType(); 120[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type, 133[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type, 170private static bool GetCachedNoLicenseProvider(Type type) 184private static LicenseProvider? GetCachedProvider(Type type) 194private static LicenseProvider? GetCachedProviderInstance(Type providerType) 203public static bool IsLicensed(Type type) 214public static bool IsValid(Type type) 226public static bool IsValid(Type type, object? instance, out License? license) 258private static bool ValidateInternal(Type type, object? instance, bool allowExceptions, out License? license) 274private static bool ValidateInternalRecursive(LicenseContext context, Type type, object? instance, bool allowExceptions, out License? license, out string? licenseKey) 284Type providerType = attr.LicenseProvider!; 315Type? baseType = type.BaseType; 341public static void Validate(Type type) 355public static License? Validate(Type type, object? instance)
System\ComponentModel\LicenseManager.LicenseInteropHelper.cs (10)
16private readonly Type _type; 19private CLRLicenseContext(Type type, LicenseUsageMode mode) 25public static CLRLicenseContext CreateDesignContext(Type type) 30public static CLRLicenseContext CreateRuntimeContext(Type type, string? key) 43public override string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) 53public override void SetSavedLicenseKey(Type type, string? key) 71public override string? GetSavedLicenseKey(Type type, Assembly? resourceAssembly) => null; 73public override void SetSavedLicenseKey(Type type, string key) 87Type type, 105public static LicenseContext GetCurrentContextInfo(Type type, out bool isDesignTime, out string? key)
System\ComponentModel\LicenseProvider.cs (1)
15public abstract License? GetLicense(LicenseContext context, Type type, object? instance, bool allowExceptions);
System\ComponentModel\LicenseProviderAttribute.cs (5)
21private Type? _licenseProviderType; 46public LicenseProviderAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type type) 55public Type? LicenseProvider 61_licenseProviderType = Type.GetType(_licenseProviderName); 92Type? type = ((LicenseProviderAttribute)value).LicenseProvider;
System\ComponentModel\LicFileLicenseProvider.cs (3)
22protected virtual bool IsKeyValid(string? key, Type type) 35protected virtual string GetKey(Type type) 48public override License? GetLicense(LicenseContext context, Type type, object? instance, bool allowExceptions)
System\ComponentModel\MarshalByValueComponent.cs (1)
147public virtual object? GetService(Type service) => _site?.GetService(service);
System\ComponentModel\MemberDescriptor.cs (8)
385[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type componentClass, 387Type[] args, 388Type returnType) 397[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type componentClass, 399Type[] args, 400Type returnType, 433protected virtual object? GetInvocationTarget(Type type, object instance) 447protected static object GetInvokee(Type componentClass, object component)
System\ComponentModel\MultilineStringConverter.cs (1)
17public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
System\ComponentModel\NestedContainer.cs (2)
83protected override object? GetService(Type service) 121public object? GetService(Type service)
System\ComponentModel\NullableConverter.cs (6)
24public NullableConverter(Type type) 41public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 79public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 100public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 267public Type NullableType { get; } 272public Type UnderlyingType { get; }
System\ComponentModel\PropertyDescriptor.cs (20)
21private Type[]? _editorTypes; 56public abstract Type ComponentType { get; } 75Type? converterType = GetTypeFromName(attr.ConverterTypeName); 118Type? converterType = GetTypeFromName(attr.ConverterTypeName); 158public abstract Type PropertyType { get; } 220[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) 222Type[] typeArgs = new Type[] { typeof(Type) }; 278public virtual object? GetEditor(Type editorBaseType) 308Type? editorType = GetTypeFromName(attr.EditorBaseTypeName); 312Type? type = GetTypeFromName(attr.EditorTypeName); 328_editorTypes = new Type[5]; 334Type[] newTypes = new Type[_editorTypes.Length * 2]; 361protected override object? GetInvocationTarget(Type type, object instance) 377protected Type? GetTypeFromName( 386Type? typeFromGetType = Type.GetType(typeName); 391Type? typeFromComponent = null;
System\ComponentModel\ProvidePropertyAttribute.cs (1)
19[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type receiverType)
System\ComponentModel\ReferenceConverter.cs (4)
19private readonly Type _type; 24public ReferenceConverter(Type type) 33public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 84public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
System\ComponentModel\ReflectEventDescriptor.cs (14)
62private Type? _type; // the delegate type for the event 64private readonly Type _componentClass; // the class of the component this info is for 75[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentClass, 77Type type, 95[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentClass, 107internal static ReflectEventDescriptor CreateWithRegisteredType(Type componentClass, EventInfo eventInfo) => new ReflectEventDescriptor(componentClass, eventInfo); 114[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, 133public override Type ComponentType => _componentClass; 138public override Type EventType 261Type currentReflectType = realEventInfo.ReflectedType!; 328Type? start = _componentClass.BaseType; 363Type[] argsType = new Type[] { _type! }; 382Type? currentReflectType = realMethodInfo.ReflectedType;
System\ComponentModel\ReflectionCachesUpdateHandler.cs (2)
14public static void ClearCache(Type[]? types) 24foreach (Type type in types)
System\ComponentModel\ReflectPropertyDescriptor.cs (32)
65private readonly Type _componentClass; // used to determine if we should all on us or on the designer 66private readonly Type _type; // the data type of the property 76private readonly Type? _receiverType; // Only set if we are an extender 82Type componentClass, 84Type type, 117Type componentClass, 119Type type, 140[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentClass, 142Type type, 143Type receiverType, 161[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentClass, 286public override Type ComponentType => _componentClass; 335_propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 348_getMethod = FindMethod(_componentClass, "Get" + Name, new Type[] { _receiverType }, _type); 373public override Type PropertyType => _type; 386Type[] args; 390args = Type.EmptyTypes; 394args = new Type[] { _receiverType }; 424for (Type? t = _componentClass.BaseType; t != null && t != typeof(object); t = t.BaseType) 427PropertyInfo? p = t.GetProperty(name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, null); 448_propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 458new Type[] { _receiverType, _type }, typeof(void)); 478Type[] args; 482args = Type.EmptyTypes; 486args = new Type[] { _receiverType }; 552internal Type? ExtenderGetReceiverType() => _receiverType; 554internal Type ExtenderGetType() => PropertyType; 788Type? currentReflectType = _componentClass; 814memberInfo = currentReflectType.GetMethod("Get" + Name, bindingFlags, binder: null, new Type[] { _receiverType! }, modifiers: null); 818memberInfo = currentReflectType.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 840Type? specificType = Type.GetType(sta.TypeName!);
System\ComponentModel\ReflectTypeDescriptionProvider.cs (80)
26private Dictionary<Type, ReflectedTypeData>? _typeData; 32private static readonly Type[] s_typeConstructor = { typeof(Type) }; 63private static readonly Type[] s_skipInterfaceAttributeList = InitializeSkipInterfaceAttributeList(); 73private static Type[] InitializeSkipInterfaceAttributeList() 75return new Type[] 101private readonly Func<Type, TypeConverter> _constructionFunc; 117public IntrinsicTypeConverterData(Func<Type, TypeConverter> constructionFunc, bool cacheConverterInstance = true) 123public TypeConverter GetOrCreateConverterInstance(Type innerType) 143/// appropriate logic to handle this in <see cref="GetIntrinsicTypeConverter(Type)"/> below. 194private static NullableConverter CreateNullableConverter(Type type) => new NullableConverter(type); 221internal static void AddEditorTable(Type editorBaseType, Hashtable table) 242[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, 243Type[]? argTypes, 258argTypes = new Type[args.Length]; 273argTypes = Type.EmptyTypes; 283public override bool IsRegisteredType(Type type) 301[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, 302Type callingType) 311internal AttributeCollection GetAttributes([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 344internal string? GetClassName([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 353internal string? GetClassNameFromRegisteredType(Type type) 372internal TypeConverter GetConverter([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, object? instance) 378internal TypeConverter GetConverterFromRegisteredType(Type type, object? instance) 389internal EventDescriptor? GetDefaultEvent([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, object? instance) 399internal PropertyDescriptor? GetDefaultProperty([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, object? instance) 409internal object? GetEditor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, object? instance, Type editorBaseType) 419private static Hashtable? GetEditorTable(Type editorBaseType) 465internal EventDescriptorCollection GetEvents([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 471internal EventDescriptorCollection GetEventsFromRegisteredType(Type type) 535internal object? GetExtendedEditor(object instance, Type editorBaseType) 564Type componentType = instance.GetType(); 616Type? receiverType = eppa.ReceiverType; 830public override ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType(Type objectType, object? instance) 862internal Type[] GetPopulatedTypes(Module module) 864List<Type> typeList = new List<Type>(); 868Dictionary<Type, ReflectedTypeData>? typeData = _typeData; 871foreach (KeyValuePair<Type, ReflectedTypeData> kvp in typeData) 888internal PropertyDescriptorCollection GetProperties([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 897internal PropertyDescriptorCollection GetPropertiesFromRegisteredType(Type type) 906internal static object GetPropertyOwner(Type type, object instance) 916public override Type GetReflectionType( 917[DynamicallyAccessedMembers(TypeDescriptor.ReflectTypesDynamicallyAccessedMembers)] Type objectType, 929private ReflectedTypeData? GetTypeData([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, bool createIfNeeded) 962_typeData ??= new Dictionary<Type, ReflectedTypeData>(); 970private ReflectedTypeData GetTypeDataFromRegisteredType(Type type) 994Type componentType = typeof(T); 1012_typeData ??= new Dictionary<Type, ReflectedTypeData>(); 1018private ReflectedTypeData GetOrRegisterType(Type type) 1037_typeData ??= new Dictionary<Type, ReflectedTypeData>(); 1053public override ICustomTypeDescriptor GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, object? instance) 1065private static Type? GetTypeFromName( 1069Type? t = Type.GetType(typeName); 1086t = Type.GetType(typeName.Substring(0, commaIndex)); 1099internal bool IsPopulated(Type type) 1116internal static Attribute[] ReflectGetAttributes(Type type) 1172private static EventDescriptor[] ReflectGetEvents(Type type) 1273Type providerType = provider.GetType(); 1296Type? receiverType = GetTypeFromName(provideAttr.ReceiverTypeName); 1300MethodInfo? getMethod = providerType.GetMethod("Get" + provideAttr.PropertyName, new Type[] { receiverType }); 1304MethodInfo? setMethod = providerType.GetMethod("Set" + provideAttr.PropertyName, new Type[] { receiverType, getMethod.ReturnType }); 1349[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) => 1352private static PropertyDescriptor[] ReflectGetPropertiesFromRegisteredType(Type type) 1357private static PropertyDescriptor[] ReflectGetPropertiesImpl(Type type) 1441internal void Refresh(Type type) 1457private static object? GetIntrinsicTypeEditor(Hashtable table, Type callingType) 1468Type? baseType = callingType; 1479hashEntry = Type.GetType(typeString); 1504Type? keyType = de.Key as Type; 1513hashEntry = Type.GetType(typeString); 1555Type? type = hashEntry as Type; 1575private static TypeConverter GetIntrinsicTypeConverter(Type callingType) 1613Type? key = null; 1615Type? baseType = callingType.BaseType; 1641private static bool IsIntrinsicType(Type callingType)
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (24)
20private readonly Type _type; 26private Type[]? _editorTypes; 30internal ReflectedTypeData(Type type, bool isRegisteredType) 90Type? baseType = _type.BaseType; 101Type[] interfaces = TrimSafeReflectionHelper.GetInterfaces(_type); 105Type iface = interfaces[idx]; 199Type? converterType = GetTypeFromName(instanceAttr.ConverterTypeName); 219Type? converterType = GetTypeFromName(typeAttr.ConverterTypeName); 315internal object? GetEditor(object? instance, Type editorBaseType) 330Type? editorType = GetTypeFromName(instanceAttr!.EditorTypeName); 356Type? editorType = GetTypeFromName(typeAttr.EditorTypeName); 389Type[] newTypes = new Type[newLength]; 414private static EditorAttribute? GetEditorAttribute(AttributeCollection attributes, Type editorBaseType) 420Type? attrEditorBaseType = Type.GetType(edAttr.EditorBaseTypeName!); 445Type? baseType = _type; 446Type objType = typeof(object); 480Type? baseType = _type; 481Type objType = typeof(object); 515private Type? GetTypeFromName( 526Type? t = null; 533t ??= Type.GetType(typeName); 545t = Type.GetType(typeName.Substring(0, commaIndex));
System\ComponentModel\RefreshEventArgs.cs (2)
25public RefreshEventArgs(Type? typeChanged) 38public Type? TypeChanged { get; }
System\ComponentModel\RefreshEventHandler.cs (1)
8/// raised when a <see cref='System.Type'/> or component is changed during design time.
System\ComponentModel\SByteConverter.cs (1)
17internal override Type TargetType => typeof(sbyte);
System\ComponentModel\SingleConverter.cs (1)
22internal override Type TargetType => typeof(float);
System\ComponentModel\StringConverter.cs (1)
18public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
System\ComponentModel\TimeOnlyConverter.cs (5)
20public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 26public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 77public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 95return new InstanceDescriptor(typeof(TimeOnly).GetConstructor(new Type[] { typeof(long) }), new object[] { time.Ticks }); 98return new InstanceDescriptor(typeof(TimeOnly).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int) }),
System\ComponentModel\TimeSpanConverter.cs (4)
22public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 31public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 65public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 70typeof(TimeSpan).GetMethod(nameof(TimeSpan.Parse), new Type[] { typeof(string) }),
System\ComponentModel\ToolboxItemAttribute.cs (4)
16private Type? _toolboxItemType; 67public ToolboxItemAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type toolboxItemType) 79public Type? ToolboxItemType 89_toolboxItemType = Type.GetType(_toolboxItemTypeName, true);
System\ComponentModel\TrimSafeReflectionHelper.cs (5)
13public static PropertyInfo[] GetProperties(Type type, BindingFlags bindingAttr) => type.GetProperties(bindingAttr); 14public static PropertyInfo? GetProperty(Type type, string name, BindingFlags bindingAttr) => type.GetProperty(name, bindingAttr); 15public static EventInfo[] GetEvents(Type type, BindingFlags bindingAttr) => type.GetEvents(bindingAttr); 16public static Type[] GetInterfaces(Type type) => type.GetInterfaces();
System\ComponentModel\TypeConverter.cs (13)
22public bool CanConvertFrom(Type sourceType) => CanConvertFrom(null, sourceType); 28public virtual bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 35public bool CanConvertTo([NotNullWhen(true)] Type? destinationType) => CanConvertTo(null, destinationType); 41public virtual bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 104public object? ConvertTo(object? value, Type destinationType) 113public virtual object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 202protected Exception GetConvertToException(object? value, Type destinationType) 349protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType) : this(componentType, name, propertyType, Array.Empty<Attribute>()) 356protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType, Attribute[]? attributes) : base(name, attributes) 365public override Type ComponentType { get; } 380public override Type PropertyType { get; }
System\ComponentModel\TypeDescriptionProvider.cs (15)
66[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, 67Type[]? argTypes, 180public Type GetReflectionType([DynamicallyAccessedMembers(TypeDescriptor.ReflectTypesDynamicallyAccessedMembers)] Type objectType) => GetReflectionType(objectType, null); 192public Type GetReflectionType(object instance) 209public virtual Type GetReflectionType( 210[DynamicallyAccessedMembers(TypeDescriptor.ReflectTypesDynamicallyAccessedMembers)] Type objectType, 227public virtual Type GetRuntimeType(Type reflectionType) 252public ICustomTypeDescriptor? GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType) 287public virtual ICustomTypeDescriptor? GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, object? instance) 305public ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType(Type objectType) 356public virtual ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType(Type objectType, object? instance) 394public virtual bool IsRegisteredType(Type type) 410public virtual bool IsSupportedType(Type type)
System\ComponentModel\TypeDescriptionProviderService.cs (1)
9public abstract TypeDescriptionProvider GetProvider(Type type);
System\ComponentModel\TypeDescriptor.cs (102)
52private static readonly Dictionary<Type, TypeDescriptionNode> s_providerTypeTable = new Dictionary<Type, TypeDescriptionNode>(); 57private static readonly Dictionary<Type, object?> s_defaultProviderInitialized = new Dictionary<Type, object?>(); 128public static Type InterfaceType 162internal static void ValidateRegisteredType(Type type) 182public static TypeDescriptionProvider AddAttributes(Type type, params Attribute[] attributes) 223public static void AddEditorTable(Type editorBaseType, Hashtable table) 238public static void AddProvider(TypeDescriptionProvider provider, Type type) 298public static void AddProviderTransparent(TypeDescriptionProvider provider, Type type) 327private static void CheckDefaultProvider(Type type) 347private static void AddDefaultProvider(Type type) 369Type? providerType = Type.GetType(pa.TypeName); 381Type? baseType = type.BaseType; 447[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, 449Type type, 460[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, 474[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, 475Type[]? argTypes, 507[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, 509Type type, 521[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, 602public static object GetAssociation(Type type, object primary) 672public static AttributeCollection GetAttributes([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType) 804[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType) 859public static TypeConverter GetConverter([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 866internal static TypeConverter GetConverterTrimUnsafe([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) => 872public static TypeConverter GetConverterFromRegisteredType(Type type) 879private static object? ConvertFromInvariantString([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, string stringValue) 889[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType) 927[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType) 965[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 979private static DefaultTypeDescriptor GetDescriptorFromRegisteredType(Type type, 1052public static object? GetEditor(object component, Type editorBaseType) 1063public static object? GetEditor(object component, Type editorBaseType, bool noCustomTypeDesc) 1075[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 1076Type editorBaseType) 1087[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType) 1101public static EventDescriptorCollection GetEventsFromRegisteredType(Type componentType) 1113[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, 1306private static Type? GetNodeForBaseType(Type searchType) 1324[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType) 1338public static PropertyDescriptorCollection GetPropertiesFromRegisteredType(Type componentType) 1350[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, 1521public static TypeDescriptionProvider GetProvider(Type type) 1589internal static TypeDescriptionProvider GetProviderRecursive(Type type) 1599public static Type GetReflectionType([DynamicallyAccessedMembers(ReflectTypesDynamicallyAccessedMembers)] Type type) 1611public static Type GetReflectionType(object instance) 1625private static TypeDescriptionNode NodeFor(Type type) => NodeFor(type, false); 1642private static TypeDescriptionNode NodeFor(Type type, bool createDelegator) 1654Type searchType = type; 1665Type? baseType = GetNodeForBaseType(searchType); 1737Type type = instance.GetType(); 1848Type keyType = key as Type ?? key.GetType(); 2286private static void RaiseRefresh(Type type) 2315Type type = component.GetType(); 2328Type? nodeType = de.Key as Type; 2386public static void Refresh(Type type) 2412Type? nodeType = de.Key as Type; 2473Type? nodeType = de.Key as Type; 2487Type[] populatedTypes = provider.GetPopulatedTypes(module); 2489foreach (Type populatedType in populatedTypes) 2503foreach (Type t in refreshedTypes.Keys) 2529public static Type ComObjectType 2537public static IDesigner? CreateDesigner(IComponent component, Type designerBaseType) 2539Type? type = null; 2546Type? type2 = Type.GetType(designerAttribute.DesignerBaseTypeName); 2559type = Type.GetType(designerAttribute.DesignerTypeName); 2657public static void RemoveProvider(TypeDescriptionProvider provider, Type type) 2692public static void RemoveProviderTransparent(TypeDescriptionProvider provider, Type type) 2773public override ICustomTypeDescriptor? GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, object? instance) 2832object ICustomTypeDescriptor.GetEditor(Type editorBaseType) 2884public override ICustomTypeDescriptor GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, object? instance) 3051Type realComNativeDescriptor = Type.GetType("System.Windows.Forms.ComponentModel.Com2Interop.ComNativeDescriptor, System.Windows.Forms", throwOnError: true)!; 3056public override ICustomTypeDescriptor? GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, object? instance) 3146object? ICustomTypeDescriptor.GetEditor(Type editorBaseType) 3241[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, 3242Type[]? argTypes, 3292Type type = instance.GetType(); 3330public override Type GetReflectionType( 3331[DynamicallyAccessedMembers(ReflectTypesDynamicallyAccessedMembers)] Type objectType, 3339public override Type GetRuntimeType(Type objectType) 3350public override ICustomTypeDescriptor GetTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, object? instance) 3366public override ICustomTypeDescriptor GetTypeDescriptorFromRegisteredType(Type objectType, object? instance) 3387internal DefaultTypeDescriptor GetDefaultTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType) 3392public override bool IsSupportedType(Type type) 3401public override bool IsRegisteredType(Type type) => Provider.IsRegisteredType(type); 3580object? ICustomTypeDescriptor.GetEditor(Type editorBaseType) 3770private readonly Type _objectType; 3778[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, 3974public object? GetEditor(Type editorBaseType) 4207internal static void ThrowInvalidOperationException_RegisterTypeRequired(Type type) =>
System\ComponentModel\TypeListConverter.cs (7)
15private readonly Type[] _types; 22protected TypeListConverter(Type[] types) 32public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 41public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 53foreach (Type t in _types) 68public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 80return ((Type)value).FullName;
System\ComponentModel\UInt128Converter.cs (1)
18internal override Type TargetType => typeof(UInt128);
System\ComponentModel\UInt16Converter.cs (1)
17internal override Type TargetType => typeof(ushort);
System\ComponentModel\UInt32Converter.cs (1)
17internal override Type TargetType => typeof(uint);
System\ComponentModel\UInt64Converter.cs (1)
17internal override Type TargetType => typeof(ulong);
System\ComponentModel\UriTypeConverter.cs (4)
23public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 32public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 65public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 73ConstructorInfo? ctor = typeof(Uri).GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(UriKind) }, null);
System\ComponentModel\VersionConverter.cs (4)
22public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 31public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 66public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 74ConstructorInfo? ctor = typeof(Version).GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(int), typeof(int), typeof(int), typeof(int) }, null);
System\Drawing\ColorConverter.cs (6)
28public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 33public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 48public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 111member = typeof(Color).GetMethod("FromArgb", new Type[] { typeof(int), typeof(int), typeof(int), typeof(int) }); 116member = typeof(Color).GetMethod("FromName", new Type[] { typeof(string) }); 121member = typeof(Color).GetMethod("FromArgb", new Type[] { typeof(int), typeof(int), typeof(int) });
System\Drawing\PointConverter.cs (4)
15public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 20public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 61public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 84ConstructorInfo? ctor = typeof(Point).GetConstructor(new Type[] { typeof(int), typeof(int) });
System\Drawing\RectangleConverter.cs (4)
15public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 20public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 59public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 84ConstructorInfo? ctor = typeof(Rectangle).GetConstructor(new Type[] {
System\Drawing\SizeConverter.cs (4)
15public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 20public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 59public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 82ConstructorInfo? ctor = typeof(Size).GetConstructor(new Type[] { typeof(int), typeof(int) });
System\Drawing\SizeFConverter.cs (4)
15public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 20public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 58public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 79ConstructorInfo? ctor = typeof(SizeF).GetConstructor(new Type[] { typeof(float), typeof(float) });
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicyTypeConverter.cs (5)
16public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 22public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 28Type[] parameterTypes; 33parameterTypes = new Type[] { typeof(PolicyEnforcement) }; 38parameterTypes = new Type[] { typeof(PolicyEnforcement), typeof(ProtectionScenario), typeof(ICollection) };
System.Composition.AttributedModel (8)
System\Composition\Convention\AttributedModelProvider.cs (2)
20public abstract IEnumerable<Attribute> GetCustomAttributes(System.Type reflectedType, MemberInfo member); 27public abstract IEnumerable<Attribute> GetCustomAttributes(System.Type reflectedType, ParameterInfo parameter);
System\Composition\ExportAttribute.cs (6)
29/// A <see cref="Type"/> of which to derive the contract name to export the type or 33public ExportAttribute(Type contractType) : this(null, contractType) 60/// A <see cref="Type"/> of which to derive the contract name to export the type or 64public ExportAttribute(string contractName, Type contractType) 83/// A <see cref="Type"/> of the export that is be provided. The default value is 87public Type ContractType { get; }
System.Composition.Convention (69)
src\libraries\Common\src\System\Composition\Diagnostics\CompositionTrace.cs (8)
10public static void Registration_ConstructorConventionOverridden(Type type) 23public static void Registration_TypeExportConventionOverridden(Type type) 36public static void Registration_MemberExportConventionOverridden(Type type, MemberInfo member) 55public static void Registration_MemberImportConventionOverridden(Type type, MemberInfo member) 74public static void Registration_OnSatisfiedImportNotificationOverridden(Type type, MemberInfo member) 93public static void Registration_PartCreationConventionOverridden(Type type) 108public static void Registration_MemberImportConventionMatchedTwice(Type type, MemberInfo member) 127public static void Registration_PartMetadataConventionOverridden(Type type)
System\Composition\Convention\ConventionBuilder.cs (12)
48public PartConventionBuilder ForTypesDerivedFrom(Type type) 77public PartConventionBuilder ForType(Type type) 96public PartConventionBuilder<T> ForTypesMatching<T>(Predicate<Type> typeFilter) 114public PartConventionBuilder ForTypesMatching(Predicate<Type> typeFilter) 132Type type = typeInfo.AsType(); 159public override IEnumerable<Attribute> GetCustomAttributes(Type reflectedType, System.Reflection.MemberInfo member) 247private List<Attribute> ReadMemberCustomAttributes(Type reflectedType, System.Reflection.MemberInfo member) 299public override IEnumerable<Attribute> GetCustomAttributes(Type reflectedType, System.Reflection.ParameterInfo parameter) 311private List<Attribute> ReadParameterCustomAttributes(Type reflectedType, System.Reflection.ParameterInfo parameter) 365foreach (Type iface in derivedType.ImplementedInterfaces) 375private static bool IsDescendentOf(Type type, Type baseType)
System\Composition\Convention\ExportConventionBuilder.cs (9)
19private Type _contractType; 21private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs; 22private Func<Type, string> _getContractNameFromPartType; 41public ExportConventionBuilder AsContractType(Type type) 77public ExportConventionBuilder AsContractName(Func<Type, string> getContractNameFromPartType) 117public ExportConventionBuilder AddMetadata(string name, Func<Type, object> getValueFromPartType) 133_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 138internal void BuildAttributes(Type type, ref List<Attribute> attributes) 157foreach (Tuple<string, Func<Type, object>> item in _metadataItemFuncs)
System\Composition\Convention\ImportConventionBuilder.cs (8)
15private static readonly Type[] s_supportedImportManyTypes = new[] { typeof(IList<>), typeof(ICollection<>), typeof(IEnumerable<>) }; 20private Func<Type, string> _getContractNameFromPartType; 22private List<Tuple<string, Func<Type, object>>> _metadataConstraintItemFuncs; 51public ImportConventionBuilder AsContractName(Func<Type, string> getContractNameFromPartType) 122public ImportConventionBuilder AddMetadataConstraint(string name, Func<Type, object> getConstraintValueFromPartType) 138_metadataConstraintItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 143internal void BuildAttributes(Type type, ref List<Attribute> attributes) 178foreach (Tuple<string, Func<Type, object>> item in _metadataConstraintItemFuncs)
System\Composition\Convention\PartConventionBuilder.cs (31)
16private readonly Type[] _emptyTypeArray = Type.EmptyTypes; 19private static readonly Type s_exportAttributeType = typeof(ExportAttribute); 26private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs; 33private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>> _propertyExports; 35private readonly List<Tuple<Predicate<Type>, Action<Type, ExportConventionBuilder>>> _interfaceExports; 38internal Predicate<Type> SelectType { get; } 40internal PartConventionBuilder(Predicate<Type> selectType) 44_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>>(); 46_interfaceExports = new List<Tuple<Predicate<Type>, Action<Type, ExportConventionBuilder>>>(); 148public PartConventionBuilder ExportInterfaces(Predicate<Type> interfaceFilter) 173public PartConventionBuilder ExportInterfaces(Predicate<Type> interfaceFilter, 174Action<Type, ExportConventionBuilder> exportConfiguration) 188private PartConventionBuilder ExportInterfacesImpl(Predicate<Type> interfaceFilter, 189Action<Type, ExportConventionBuilder> exportConfiguration) 234_propertyExports.Add(Tuple.Create(propertyFilter, exportConfiguration, default(Type))); 447public PartConventionBuilder AddPartMetadata(string name, Func<Type, object> getValueFromPartType) 463_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 478Type attrType = attr.GetType(); 489internal IEnumerable<Attribute> BuildTypeAttributes(Type type) 553foreach (Tuple<string, Func<Type, object>> item in _metadataItemFuncs) 573foreach (Type iface in type.GetTypeInfo().ImplementedInterfaces) 581foreach (Tuple<Predicate<Type>, Action<Type, ExportConventionBuilder>> exportSpecification in _interfaceExports) 598internal bool BuildConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers) 636internal static void BuildDefaultConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers) 677internal void BuildOnImportsSatisfiedNotification(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers) 731internal void BuildPropertyAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers) 782foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type> exportSpecification in _propertyExports)
System\Composition\Convention\PartConventionBuilderOfT.cs (1)
209internal PartConventionBuilder(Predicate<Type> selectType) : base(selectType)
System.Composition.Hosting (4)
System\Composition\Hosting\Providers\ImportMany\ImportManyExportDescriptorProvider.cs (2)
15private static readonly Type[] s_supportedContractTypes = new[] { typeof(IList<>), typeof(ICollection<>), typeof(IEnumerable<>) }; 28var elementType = contract.ContractType.IsArray ?
System\Composition\Hosting\Util\Formatters.cs (2)
22public static string Format(Type type) 36private static string FormatClosedGeneric(Type closedGenericType)
System.Composition.Runtime (14)
System\Composition\CompositionContext.cs (6)
60public bool TryGetExport(Type exportType, out object export) 74public bool TryGetExport(Type exportType, string contractName, out object export) 124public object GetExport(Type exportType) 137public object GetExport(Type exportType, string contractName) 163public IEnumerable<object> GetExports(Type exportType) 176public IEnumerable<object> GetExports(Type exportType, string contractName)
System\Composition\Hosting\Core\CompositionContract.cs (6)
16private readonly Type _contractType; 24public CompositionContract(Type contractType) 34public CompositionContract(Type contractType, string contractName) 45public CompositionContract(Type contractType, string contractName, IDictionary<string, object> metadataConstraints) 58public Type ContractType => _contractType; 125public CompositionContract ChangeType(Type newContractType)
System\Composition\Runtime\Util\Formatters.cs (2)
17public static string Format(Type type) => 22private static string FormatClosedGeneric(Type closedGenericType)
System.Composition.TypedParts (55)
System\Composition\CompositionContextExtensions.cs (1)
60var objType = objectWithLooseImports.GetType();
System\Composition\Convention\AttributedModelProviderExtensions.cs (6)
14public static TAttribute GetDeclaredAttribute<TAttribute>(this AttributedModelProvider convention, Type reflectedType, MemberInfo member) where TAttribute : Attribute 19public static Attribute[] GetDeclaredAttributes(this AttributedModelProvider convention, Type reflectedType, MemberInfo member) 24public static TAttribute[] GetDeclaredAttributes<TAttribute>(this AttributedModelProvider convention, Type reflectedType, MemberInfo member) where TAttribute : Attribute 29public static TAttribute GetDeclaredAttribute<TAttribute>(this AttributedModelProvider convention, Type reflectedType, ParameterInfo parameter) where TAttribute : Attribute 34public static Attribute[] GetDeclaredAttributes(this AttributedModelProvider convention, Type reflectedType, ParameterInfo parameter) 39public static TAttribute[] GetDeclaredAttributes<TAttribute>(this AttributedModelProvider convention, Type reflectedType, ParameterInfo parameter) where TAttribute : Attribute
System\Composition\Debugging\ContainerConfigurationDebuggerProxy.cs (4)
19private Type[] _ignoredTypes; 43public Type[] IgnoredTypes 60var ignored = new List<Type>(); 68foreach (var type in typeSet.Item1)
System\Composition\Debugging\DiscoveredPartDebuggerProxy.cs (1)
20public Type PartType
System\Composition\Hosting\ContainerConfiguration.cs (11)
24private readonly List<Tuple<IEnumerable<Type>, AttributedModelProvider>> _types = new List<Tuple<IEnumerable<Type>, AttributedModelProvider>>(); 88public ContainerConfiguration WithPart(Type partType) 100public ContainerConfiguration WithPart(Type partType, AttributedModelProvider conventions) 135public ContainerConfiguration WithParts(params Type[] partTypes) 137return WithParts((IEnumerable<Type>)partTypes); 146public ContainerConfiguration WithParts(IEnumerable<Type> partTypes) 158public ContainerConfiguration WithParts(IEnumerable<Type> partTypes, AttributedModelProvider conventions) 260public ContainerConfiguration WithExport(Type contractType, object exportedInstance) 282public ContainerConfiguration WithExport(Type contractType, object exportedInstance, string contractName = null, IDictionary<string, object> metadata = null) 301internal Tuple<IEnumerable<Type>, AttributedModelProvider>[] DebugGetRegisteredTypes()
System\Composition\Hosting\InstanceExportDescriptorProvider.cs (1)
13public InstanceExportDescriptorProvider(object exportedInstance, Type contractType, string contractName, IDictionary<string, object> metadata)
System\Composition\Hosting\SinglePartExportDescriptorProvider.cs (2)
12private readonly Type _contractType; 15protected SinglePartExportDescriptorProvider(Type contractType, string contractName, IDictionary<string, object> metadata)
System\Composition\TypedParts\ActivationFeatures\OnImportsSatisfiedFeature.cs (1)
40var partTypeAsType = partType.AsType();
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
29var partTypeAsType = partType.AsType();
System\Composition\TypedParts\ContractHelpers.cs (3)
17public static bool TryGetExplicitImportInfo(Type memberType, object[] attributes, object site, out ImportInfo importInfo) 29public static ImportInfo GetImportInfo(Type memberType, object[] attributes, object site) 66var attrType = attr.GetType();
System\Composition\TypedParts\Discovery\DiscoveredExport.cs (1)
48public abstract DiscoveredExport CloseGenericExport(TypeInfo closedPartType, Type[] genericArguments);
System\Composition\TypedParts\Discovery\DiscoveredInstanceExport.cs (2)
22public override DiscoveredExport CloseGenericExport(TypeInfo closedPartType, Type[] genericArguments) 24var closedContractType = Contract.ContractType.MakeGenericType(genericArguments);
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (6)
30private readonly List<Type[]> _appliedArguments = new List<Type[]>(); 83var partTypeAsType = _partType.AsType(); 138Type genericPartType = type.GetGenericTypeDefinition(); 222public bool TryCloseGenericPart(Type[] typeArguments, out DiscoveredPart closed) 226foreach (var genericParameterConstraints in _partType.GenericTypeParameters[index].GetTypeInfo().GetGenericParameterConstraints())
System\Composition\TypedParts\Discovery\DiscoveredPropertyExport.cs (2)
36public override DiscoveredExport CloseGenericExport(TypeInfo closedPartType, Type[] genericArguments) 38var closedContractType = Contract.ContractType.MakeGenericType(genericArguments);
System\Composition\TypedParts\Discovery\TypeInspector.cs (8)
54var partTypeAsType = partType.AsType(); 63var contractType = export.ContractType ?? partTypeAsType; 77var partTypeAsType = partType.AsType(); 89var contractType = export.ContractType ?? property.PropertyType; 112var valueType = ema.Value?.GetType() ?? typeof(object); 122private static void AddMetadata(IDictionary<string, object> metadata, string name, Type valueType, object value) 150var attrType = attribute.GetType(); 213foreach (var ifce in exportingMemberType.ImplementedInterfaces)
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (3)
18public TypedPartExportDescriptorProvider(IEnumerable<Type> types, AttributedModelProvider attributeContext) 23foreach (var type in types) 109var gtd = contract.ContractType.GetGenericTypeDefinition();
System\Composition\TypedParts\Util\DirectAttributeContext.cs (2)
12public override IEnumerable<Attribute> GetCustomAttributes(Type reflectedType, Reflection.MemberInfo member) 23public override IEnumerable<Attribute> GetCustomAttributes(Type reflectedType, Reflection.ParameterInfo parameter)
System.Configuration.ConfigurationManager (134)
System\Configuration\ApplicationSettingsBase.cs (5)
470Type providerType = Type.GetType(providerTypeName); 547Type type = GetType(); 616Type providerType = Type.GetType(providerTypeName);
System\Configuration\AppSettingsReader.cs (2)
16private static readonly Type s_stringType = typeof(string); 31public object GetValue(string key, Type type)
System\Configuration\CallbackValidator.cs (3)
9private readonly Type _type; 11public CallbackValidator(Type type, ValidatorCallback callback) : this(callback) 29public override bool CanValidate(Type type)
System\Configuration\CallbackValidatorAttribute.cs (2)
13private Type _type; 45public Type Type
System\Configuration\ClientConfigPaths.cs (1)
292Type mainType = null;
System\Configuration\CommaDelimitedStringAttributeCollectionConverter.cs (1)
11public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Configuration\Configuration.cs (2)
20private readonly Type _typeConfigHost; 28internal Configuration(string locationSubPath, Type typeConfigHost, params object[] hostInitConfigurationParams)
System\Configuration\ConfigurationCollectionAttribute.cs (2)
17public ConfigurationCollectionAttribute(Type itemType) 24public Type ItemType { get; }
System\Configuration\ConfigurationConverterBase.cs (3)
10public override bool CanConvertTo(ITypeDescriptorContext ctx, Type type) 15public override bool CanConvertFrom(ITypeDescriptorContext ctx, Type type) 20internal static void ValidateType(object value, Type expected)
System\Configuration\ConfigurationElement.cs (6)
43private static volatile Dictionary<Type, ConfigurationValidatorBase> s_perTypeValidators; 229internal static ConfigurationElement CreateElement(Type type) 709private static bool PropertiesFromType(Type type, out ConfigurationPropertyCollection result) 730private static ConfigurationPropertyCollection CreatePropertyBagFromType(Type type) 783private static void CachePerTypeValidator(Type type, ConfigurationValidatorBase validator) 793s_perTypeValidators ??= new Dictionary<Type, ConfigurationValidatorBase>();
System\Configuration\ConfigurationErrorsException.cs (2)
130Type currentExceptionType = Type.GetType(currentType, true);
System\Configuration\ConfigurationProperty.cs (8)
20public ConfigurationProperty(string name, Type type) 38public ConfigurationProperty(string name, Type type, object defaultValue) 42public ConfigurationProperty(string name, Type type, object defaultValue, ConfigurationPropertyOptions options) 47Type type, 56Type type, 120Type propertyType = info.PropertyType; 182public Type Type { get; private set; } 219Type type,
System\Configuration\ConfigurationValidatorAttribute.cs (4)
11internal Type _declaringType; 15public ConfigurationValidatorAttribute(Type validator) 31public Type ValidatorType { get; } 39internal void SetDeclaringType(Type declaringType)
System\Configuration\ConfigurationValidatorBase.cs (1)
8public virtual bool CanValidate(Type type)
System\Configuration\DefaultValidator.cs (1)
10public override bool CanValidate(Type type)
System\Configuration\ElementInformation.cs (1)
51public Type Type => _thisElement.GetType();
System\Configuration\FactoryRecord.cs (1)
209Type t1, t2;
System\Configuration\GenericEnumConverter.cs (3)
12private readonly Type _enumType; 14public GenericEnumConverter(Type typeEnum) 22public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Configuration\IdnElement.cs (1)
41public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
System\Configuration\InfiniteIntConverter.cs (1)
12public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Configuration\InfiniteTimeSpanConverter.cs (1)
13public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Configuration\IntegerValidator.cs (1)
35public override bool CanValidate(Type type)
System\Configuration\Internal\ConfigSystem.cs (1)
12void IConfigSystem.Init(Type typeConfigHost, params object[] hostInitParams)
System\Configuration\Internal\DelegatingConfigHost.cs (2)
202public virtual Type GetConfigType(string typeName, bool throwOnError) 207public virtual string GetConfigTypeName(Type t)
System\Configuration\Internal\IConfigSystem.cs (1)
10void Init(Type typeConfigHost, params object[] hostInitParams);
System\Configuration\Internal\IInternalConfigConfigurationFactory.cs (1)
10Configuration Create(Type typeConfigHost, params object[] hostInitConfigurationParams);
System\Configuration\Internal\IInternalConfigHost.cs (2)
96Type GetConfigType(string typeName, bool throwOnError); 98string GetConfigTypeName(Type t);
System\Configuration\Internal\InternalConfigConfigurationFactory.cs (1)
11Type typeConfigHost,
System\Configuration\Internal\InternalConfigHost.cs (3)
175Type IInternalConfigHost.GetConfigType(string typeName, bool throwOnError) 177return Type.GetType(typeName, throwOnError); 180string IInternalConfigHost.GetConfigTypeName(Type t)
System\Configuration\LongValidator.cs (1)
35public override bool CanValidate(Type type)
System\Configuration\MgmtConfigurationRecord.cs (2)
127Type type = TypeUtil.GetType(Host, factoryRecord.FactoryTypeName, throwOnError: true); 167Type type = string.IsNullOrEmpty(factoryRecord.FactoryTypeName)
System\Configuration\PositiveTimeSpanValidator.cs (1)
8public override bool CanValidate(Type type)
System\Configuration\PropertyInformation.cs (1)
86public Type Type => Prop.Type;
System\Configuration\ProtectedConfigurationSection.cs (2)
64private static ProtectedConfigurationProvider CreateAndInitializeProviderWithAssert(Type t, ProviderSettings pn) 79Type t = TypeUtil.GetType(pn.Type, true);
System\Configuration\RegexStringValidator.cs (1)
21public override bool CanValidate(Type type)
System\Configuration\RuntimeConfigurationRecord.cs (1)
95Type type = TypeUtil.GetType(configRecord.Host, factoryRecord.FactoryTypeName,
System\Configuration\SettingsProperty.cs (2)
13public virtual Type PropertyType { get; set; } 28Type propertyType,
System\Configuration\SettingsPropertyValue.cs (4)
124Type type = Type.GetType(webBaseEventTypeName, true); 196private static object GetObjectFromString(Type type, SettingsSerializeAs serializeAs, string serializedValue) 269private static string ConvertObjectToString(object propertyValue, Type type, SettingsSerializeAs serializeAs, bool throwOnError)
System\Configuration\SettingsProviderAttribute.cs (1)
25public SettingsProviderAttribute(Type providerType)
System\Configuration\StringValidator.cs (1)
27public override bool CanValidate(Type type)
System\Configuration\SubclassTypeValidator.cs (8)
9private readonly Type _base; 11public SubclassTypeValidator(Type baseClass) 19public override bool CanValidate(Type type) 21return type == typeof(Type); 29if (!(value is Type)) ValidatorUtils.HelperParamValidation(value, typeof(Type)); 31if (!_base.IsAssignableFrom((Type)value)) 33throw new ArgumentException(SR.Format(SR.Subclass_validator_error, ((Type)value).FullName,
System\Configuration\SubclassTypeValidatorAttribute.cs (2)
9public SubclassTypeValidatorAttribute(Type baseClass) 16public Type BaseClass { get; }
System\Configuration\TimeSpanMinutesConverter.cs (1)
11public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Configuration\TimeSpanMinutesOrInfiniteConverter.cs (1)
11public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Configuration\TimeSpanSecondsConverter.cs (1)
11public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Configuration\TimeSpanSecondsOrInfiniteConverter.cs (1)
11public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Configuration\TimeSpanValidator.cs (1)
35public override bool CanValidate(Type type)
System\Configuration\TypeNameConverter.cs (5)
11public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type) 14if (!(value is Type)) ValidateType(value, typeof(Type)); 18if (value != null) result = ((Type)value).AssemblyQualifiedName; 25Type result = TypeUtil.GetType((string)data, false);
System\Configuration\TypeUtil.cs (17)
40private static Type GetImplicitType(string typeString) 63Type type = configurationAssembly.GetType(typeString, false); 73Type type = Type.GetType($"{typeString}, {assembly}"); 86internal static Type GetType(string typeString, bool throwOnError) 88Type type; 92type = Type.GetType(typeString, throwOnError); 109internal static Type GetType(IInternalConfigHost host, string typeString, bool throwOnError) 111Type type; 130Type type = GetType(typeString, true); 135internal static object CreateInstance(Type type) 140internal static ConstructorInfo GetConstructor(Type type, Type baseType, bool throwOnError) 148ConstructorInfo ctor = type.GetConstructor(BindingFlags, null, CallingConventions.HasThis, Type.EmptyTypes, 156internal static Type VerifyAssignableType(Type baseType, Type type, bool throwOnError)
System\Configuration\ValidatorUtils.cs (1)
11public static void HelperParamValidation(object value, Type allowedType)
System\Configuration\WhiteSpaceTrimStringConverter.cs (1)
11public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
System\Diagnostics\FilterElement.cs (1)
23if (Type.GetType(TypeName) != filter.GetType() || InitDataChanged(filter))
System\Diagnostics\ListenerElementsCollection.cs (1)
335if (Type.GetType(className) != listener.GetType() || InitDataChanged(listener))
System\Diagnostics\TraceConfiguration.cs (1)
116Type currentType = traceSource.Switch.GetType();
System\Diagnostics\TraceUtils.cs (10)
18internal static object GetRuntimeObject(string className, Type baseType, string initializeData) 21Type objectType = null; 37objectType = Type.GetType(className); 57ConstructorInfo ctorInfo = objectType.GetConstructor(Array.Empty<Type>()); 66ConstructorInfo ctorInfo = objectType.GetConstructor(new Type[] { typeof(string) }); 103Type paramtype = ctorparams[0].ParameterType; 144private static Type MapToBuiltInTypes(string className) 183internal static bool IsOwnedTL(Type type) 189internal static bool IsOwnedTextWriterTL(Type type) 196private static object ConvertToBaseTypeOrEnum(string value, Type type)
System\Diagnostics\TypedElement.cs (2)
14private readonly Type _baseType; 16public TypedElement(Type baseType) : base()
System.Data.Common (324)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (22)
188internal static ArgumentOutOfRangeException NotSupportedEnumerationValue(Type type, string value, string method) 233private static readonly Type s_stackOverflowType = typeof(StackOverflowException); 234private static readonly Type s_outOfMemoryType = typeof(OutOfMemoryException); 235private static readonly Type s_threadAbortType = typeof(ThreadAbortException); 236private static readonly Type s_nullReferenceType = typeof(NullReferenceException); 237private static readonly Type s_accessViolationType = typeof(AccessViolationException); 238private static readonly Type s_securityType = typeof(SecurityException); 244Type type = e.GetType(); 264Type type = e.GetType(); 274internal static ArgumentOutOfRangeException InvalidEnumerationValue(Type type, int value) 290internal static ArgumentException ConvertFailed(Type fromType, Type toType, Exception? innerException) 310internal static ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection) 314internal static ArgumentNullException CollectionNullValue(string parameter, Type collection, Type itemType) 318internal static IndexOutOfRangeException CollectionIndexInt32(int index, Type collection, int count) 322internal static IndexOutOfRangeException CollectionIndexString(Type itemType, string propertyName, string propertyValue, Type collection) 326internal static InvalidCastException CollectionInvalidType(Type collection, Type itemType, object invalidValue) 396internal static ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection) 400internal static ArgumentException ParametersIsParent(Type parameterType, ICollection collection)
System\Data\ColumnTypeConverter.cs (9)
18private static readonly Type[] s_types = new Type[] { 62public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) => 71public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 94if (value is Type || value is string) 96MethodInfo method = typeof(Type).GetMethod("GetType", new Type[] { typeof(string) })!; 99return new InstanceDescriptor(method, new object[] { ((Type)newValue).AssemblyQualifiedName! }); 107public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) =>
System\Data\Common\AdapterUtil.Common.cs (4)
278internal static Exception WrongType(Type got, Type expected) 286internal static Exception CollectionUniqueValue(Type itemType, string propertyName, string? propertyValue) 312internal static InvalidOperationException ColumnSchemaMismatch(string? srcColumn, Type srcType, DataColumn column)
System\Data\Common\BigIntegerStorage.cs (1)
77internal static object ConvertFromBigInteger(BigInteger value, Type type, IFormatProvider formatProvider)
System\Data\Common\DataColumnMapping.cs (7)
74public DataColumn? GetDataColumnBySchemaAction(DataTable dataTable, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type? dataType, MissingSchemaAction schemaAction) 80public static DataColumn? GetDataColumnBySchemaAction(string? sourceColumn, string? dataSetColumn, DataTable dataTable, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type? dataType, MissingSchemaAction schemaAction) 115internal static DataColumn? CreateDataColumnBySchemaAction(string? sourceColumn, string? dataSetColumn, DataTable dataTable, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type? dataType, MissingSchemaAction schemaAction) 150public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 159public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 171Type[] types = new Type[] { typeof(string), typeof(string) };
System\Data\Common\DataColumnMappingCollection.cs (2)
84private static Type ItemType 445public static DataColumn? GetDataColumn(DataColumnMappingCollection? columnMappings, string sourceColumn, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type? dataType, DataTable dataTable, MissingMappingAction mappingAction, MissingSchemaAction schemaAction)
System\Data\Common\DataRecordInternal.cs (3)
69public override Type GetFieldType(int i) 339object? ICustomTypeDescriptor.GetEditor(Type editorBaseType) 377public Type type;
System\Data\Common\DataStorage.cs (24)
66private static readonly Type?[] s_storageClassType = new Type?[] { 90typeof(Type), 115internal readonly Type _dataType; 127private static readonly Func<Type, Tuple<bool, bool, bool, bool>> s_inspectTypeForInterfaces = InspectTypeForInterfaces; 128private static readonly ConcurrentDictionary<Type, Tuple<bool, bool, bool, bool>> s_typeImplementsInterface = new ConcurrentDictionary<Type, Tuple<bool, bool, bool, bool>>(); 130protected DataStorage(DataColumn column, Type type, object? defaultValue, StorageType storageType) 135protected DataStorage(DataColumn column, Type type, object? defaultValue, object nullValue, StorageType storageType) 140protected DataStorage(DataColumn column, Type type, object? defaultValue, object nullValue, bool isICloneable, StorageType storageType) 291public static DataStorage CreateStorage(DataColumn column, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type dataType, StorageType typeCode) 358internal static StorageType GetStorageType(Type? dataType) 367TypeCode tcode = Type.GetTypeCode(dataType); 375internal static Type GetTypeStorage(StorageType storageType) 381internal static bool IsTypeCustomType(Type type) 396public static bool IsSqlType(Type dataType) 408private static bool DetermineIfValueType(StorageType typeCode, Type dataType) 467Type dataType, 507private static Tuple<bool, bool, bool, bool> InspectTypeForInterfaces(Type dataType) 518internal static bool ImplementsINullableValue(StorageType typeCode, Type dataType) 568internal static Type GetType(string value) 570Type? dataType = Type.GetType(value); // throwOnError=false, ignoreCase=fase 589internal static string GetQualifiedName(Type type)
System\Data\Common\DataTableMapping.cs (5)
115public DataColumn? GetDataColumn(string sourceColumn, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type? dataType, DataTable dataTable, MissingMappingAction mappingAction, MissingSchemaAction schemaAction) 172public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 181public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 195Type[] types = new Type[] { typeof(string), typeof(string), typeof(DataColumnMapping[]) };
System\Data\Common\DataTableMappingCollection.cs (1)
57private static Type ItemType => typeof(DataTableMapping);
System\Data\Common\DbColumn.cs (1)
29public Type? DataType { get; protected set; }
System\Data\Common\DbConnectionStringBuilder.cs (2)
478Type vtype; 612object? ICustomTypeDescriptor.GetEditor(Type editorBaseType)
System\Data\Common\DbConnectionStringBuilderDescriptor.cs (4)
10internal DbConnectionStringBuilderDescriptor(string propertyName, Type componentType, Type propertyType, bool isReadOnly, Attribute[] attributes) : base(propertyName, attributes) 18public override Type ComponentType { get; } 20public override Type PropertyType { get; }
System\Data\Common\DbDataReader.cs (2)
72public abstract Type GetFieldType(int ordinal); 188public virtual Type GetProviderSpecificFieldType(int ordinal)
System\Data\Common\DbDataReaderExtensions.cs (1)
48DataType = GetDbColumnValue<Type?>(SchemaTableColumn.DataType);
System\Data\Common\DbDataRecord.cs (2)
45public abstract Type GetFieldType(int i); 89object? ICustomTypeDescriptor.GetEditor(Type editorBaseType) => null;
System\Data\Common\DbEnumerator.cs (4)
114private readonly Type _type; 116internal DbColumnDescriptor(int ordinal, string name, Type type) 123public override Type ComponentType => typeof(IDataRecord); 127public override Type PropertyType => _type;
System\Data\Common\DbProviderFactories.cs (5)
119public static void RegisterFactory(string providerInvariantName, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] Type providerFactoryClass) 168private static DbProviderFactory GetFactoryInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] Type providerFactoryClass) 194private static Type GetProviderTypeFromTypeName([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] string assemblyQualifiedName) 196Type? providerType = Type.GetType(assemblyQualifiedName);
System\Data\Common\DBSchemaRow.cs (2)
303internal Type? DataType 313return (Type)value;
System\Data\Common\ObjectStorage.cs (31)
30internal ObjectStorage(DataColumn column, Type type) 193private static Families GetFamily(Type dataType) 195switch (Type.GetTypeCode(dataType)) 246Type valType = value.GetType(); 320Type type = _dataType; // real type of objects in this column 326if (type == typeof(Type)) 328return Type.GetType(s)!; 367Type? type = null; 399retValue = Type.GetType(xmlReader.ReadString()); 464Type type = _dataType; 469if ((type == typeof(Type)) || ((type == typeof(object)) && (value is Type))) 471return ((Type)value).AssemblyQualifiedName!; 479if (Type.GetTypeCode(value.GetType()) != TypeCode.Object) 548private static Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>? s_tempAssemblyCache; 558internal static void VerifyIDynamicMetaObjectProvider(Type type) 568internal static XmlSerializer GetXmlSerializer(Type type) 580internal static XmlSerializer GetXmlSerializer(Type type, XmlRootAttribute attribute) 583KeyValuePair<Type, XmlRootAttribute> key = new KeyValuePair<Type, XmlRootAttribute>(type, attribute); 586Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>? cache = s_tempAssemblyCache; 603Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer> tmp = 604new Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>( 606foreach (KeyValuePair<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer> entry in cache) 614cache = new Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>( 620key = new KeyValuePair<Type, XmlRootAttribute>(type, new XmlRootAttribute()); 635private sealed class TempAssemblyComparer : IEqualityComparer<KeyValuePair<Type, XmlRootAttribute>> 637internal static readonly IEqualityComparer<KeyValuePair<Type, XmlRootAttribute>> s_default = new TempAssemblyComparer(); 641public bool Equals(KeyValuePair<Type, XmlRootAttribute> x, KeyValuePair<Type, XmlRootAttribute> y) 652public int GetHashCode(KeyValuePair<Type, XmlRootAttribute> obj)
System\Data\Common\SQLConvert.cs (20)
19Type valueType = value.GetType(); 37Type valueType = value.GetType(); 56Type valueType = value.GetType(); 79Type valueType = value.GetType(); 104Type valueType = value.GetType(); 137Type valueType = value.GetType(); 167Type valueType = value.GetType(); 198Type valueType = value.GetType(); 228Type valueType = value.GetType(); 246Type valueType = value.GetType(); 264Type valueType = value.GetType(); 282Type valueType = value.GetType(); 300Type valueType = value.GetType(); 318Type valueType = value.GetType(); 334Type valueType = value.GetType(); 348public static object ChangeTypeForDefaultValue(object value, Type type, IFormatProvider formatProvider) 364public static object ChangeType2(object value, StorageType stype, Type type, IFormatProvider formatProvider) 409Type valueType = value.GetType(); 559public static object ChangeTypeForXML(object value, Type type) 563Type valueType = value.GetType();
System\Data\Common\SqlUDTStorage.cs (8)
23private static readonly ConcurrentDictionary<Type, object> s_typeToNull = new ConcurrentDictionary<Type, object>(); 25public SqlUdtStorage(DataColumn column, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type type) 30private SqlUdtStorage(DataColumn column, Type type, object nullValue) 38internal static object GetStaticNullForUdtType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type type) => s_typeToNull.GetOrAdd(type, GetStaticNullForUdtTypeCore); 42private static object GetStaticNullForUdtTypeCore(Type type) 184Type type = (typeName == null) ? _dataType : Type.GetType(typeName)!;
System\Data\Common\TimeSpanStorage.cs (1)
186Type typeofValue = value.GetType();
System\Data\ConstraintConverter.cs (4)
20public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) => 31public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 40Reflection.ConstructorInfo ctor = typeof(UniqueConstraint).GetConstructor(new Type[] { typeof(string), typeof(string[]), typeof(bool) })!; 50typeof(ForeignKeyConstraint).GetConstructor(new Type[] { typeof(string), typeof(string), typeof(string[]),
System\Data\DataColumn.cs (13)
36private Type _dataType = null!; // Always set in UpdateColumnType 103public DataColumn(string? columnName, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type dataType) : this(columnName, dataType, null, MappingType.Element) 113public DataColumn(string? columnName, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type dataType, string? expr) : this(columnName, dataType, expr, MappingType.Element) 124public DataColumn(string? columnName, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type dataType, string? expr, MappingType type) 156private void UpdateColumnType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type type, StorageType typeCode) 477public Type DataType 1483Type leftType = value.GetType(); 1484Type rightType = _storage!.Get(record1).GetType(); 1610internal static bool IsAutoIncrementType(Type dataType) => 1630(DataStorage.IsTypeCustomType(value.GetType()) && !(value is Type)); 1872internal abstract Type DataType { get; } 1909internal override Type DataType => typeof(long); 1990internal override Type DataType => typeof(BigInteger);
System\Data\DataColumnCollection.cs (2)
215public DataColumn Add(string? columnName, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type type, string expression) 227public DataColumn Add(string? columnName, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type type)
System\Data\DataColumnPropertyDescriptor.cs (2)
40public override Type ComponentType => typeof(DataRowView); 44public override Type PropertyType => Column.DataType;
System\Data\DataException.cs (13)
374public static Exception TypeNotAllowed(Type type) => _InvalidOperation(SR.Format(SR.Data_TypeNotAllowed, type.AssemblyQualifiedName)); 486public static Exception DefaultValueDataType(string column, Type defaultType, Type columnType, Exception inner) => 491public static Exception DefaultValueColumnDataType(string column, Type defaultType, Type columnType, Exception inner) => _Argument(SR.Format(SR.DataColumn_DefaultValueColumnDataType, column, defaultType.FullName, columnType.FullName), inner); 503public static Exception SetFailed(object? value, DataColumn column, Type type, Exception innerException) => _Argument(innerException.Message + SR.Format(SR.DataColumn_SetFailed, value?.ToString(), column.ColumnName, type.Name), innerException); 508public static Exception CannotSetSimpleContentType(string columnName, Type type) => _Argument(SR.Format(SR.DataColumn_CannotSimpleContentType, columnName, type)); 509public static Exception CannotSetSimpleContent(string columnName, Type type) => _Argument(SR.Format(SR.DataColumn_CannotSimpleContent, columnName, type)); 517public static Exception InvalidDataColumnMapping(Type type) => _Argument(SR.Format(SR.DataColumn_InvalidDataColumnMapping, type.AssemblyQualifiedName)); 648public static Exception InvalidSchemaSerializationMode(Type enumType, string mode) => _InvalidEnumArgumentException(SR.Format(SR.ADP_InvalidEnumerationValue, enumType.Name, mode)); 680public static Exception AggregateException(AggregateType aggregateType, Type type) => _Data(SR.Format(SR.DataStorage_AggregateException, aggregateType, type.Name)); 741public static Exception ConvertFailed(Type type1, Type type2) => _Data(SR.Format(SR.SqlConvert_ConvertFailed, type1.FullName, type2.FullName));
System\Data\DataReaderExtensions.cs (2)
85public static Type GetFieldType(this DbDataReader reader, string name) 142public static Type GetProviderSpecificFieldType(this DbDataReader reader, string name)
System\Data\DataRelationPropertyDescriptor.cs (2)
18public override Type ComponentType => typeof(DataRowView); 22public override Type PropertyType => typeof(IBindingList);
System\Data\DataRowComparer.cs (2)
67switch (Type.GetTypeCode(a.GetType().GetElementType())) 192Type valueType = value.GetType();
System\Data\DataRowExtensions.cs (4)
192Type valueType = value.GetType(); 193Type nullableType = Nullable.GetUnderlyingType(typeof(T))!; 196Type fromType = valueType.IsEnum ? Enum.GetUnderlyingType(valueType) : valueType; 197Type toType = nullableType.IsEnum ? Enum.GetUnderlyingType(nullableType) : nullableType;
System\Data\DataRowView.cs (1)
246object? ICustomTypeDescriptor.GetEditor(Type editorBaseType) => null;
System\Data\DataSet.cs (12)
1899/// <param name="multipleTargetConverter">A delegate used to convert <see cref='Type'/> into string.</param> 1901public void WriteXmlSchema(Stream? stream, Converter<Type, string> multipleTargetConverter) 1914/// <param name="multipleTargetConverter">A delegate used to convert <see cref='Type'/> into string.</param> 1916public void WriteXmlSchema(string fileName, Converter<Type, string> multipleTargetConverter) 1929/// <param name="multipleTargetConverter">A delegate used to convert <see cref='Type'/> into string.</param> 1931public void WriteXmlSchema(TextWriter? writer, Converter<Type, string> multipleTargetConverter) 1944/// <param name="multipleTargetConverter">A delegate used to convert <see cref='Type'/> into string.</param> 1946public void WriteXmlSchema(XmlWriter? writer, Converter<Type, string> multipleTargetConverter) 1953private void WriteXmlSchema(string fileName, SchemaFormat schemaFormat, Converter<Type, string>? multipleTargetConverter) 1970private void WriteXmlSchema(Stream? stream, SchemaFormat schemaFormat, Converter<Type, string>? multipleTargetConverter) 1984private void WriteXmlSchema(TextWriter? writer, SchemaFormat schemaFormat, Converter<Type, string>? multipleTargetConverter) 1998private void WriteXmlSchema(XmlWriter? writer, SchemaFormat schemaFormat, Converter<Type, string>? multipleTargetConverter)
System\Data\DataSetUtil.cs (1)
48internal static ArgumentOutOfRangeException InvalidEnumerationValue(Type type, int value)
System\Data\DataTable.cs (2)
463dc.DataType = Type.GetType(typeName, throwOnError: true); 3519protected virtual Type GetRowType() => typeof(DataRow);
System\Data\DataTablePropertyDescriptor.cs (2)
18public override Type ComponentType => typeof(DataRowView); 22public override Type PropertyType => typeof(IBindingList);
System\Data\DataTableReader.cs (3)
293public override Type GetProviderSpecificFieldType(int ordinal) 511public override Type GetFieldType(int ordinal) 726new DataColumn(SchemaTableColumn.DataType, typeof(Type));
System\Data\DataViewManagerListItemTypeDescriptor.cs (1)
70object? ICustomTypeDescriptor.GetEditor(Type editorBaseType) => null;
System\Data\DefaultValueTypeConverter.cs (1)
22public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
System\Data\EnumerableRowCollection.cs (2)
18internal abstract Type ElementType { get; } 45internal override Type ElementType
System\Data\Filter\BinaryNode.cs (4)
135internal static void SetTypeMismatchError(int op, Type left, Type right) 301Type typeofLeft = vLeft.GetType(); 302Type typeofRight = vRight.GetType();
System\Data\Filter\DataExpression.cs (2)
21private readonly Type? _dataType; // This set if the expression is part of ExpressionCoulmn 30internal DataExpression(DataTable? table, string? expression, Type? type)
System\Data\Filter\FilterException.cs (10)
166public static Exception DatatypeConversion(Type type1, Type type2) 171public static Exception DatavalueConversion(object value, Type type) 211public static Exception Overflow(Type type) 216public static Exception ArgumentType(string function, int arg, Type type) 226public static Exception TypeMismatchInBinop(int op, Type type1, Type type2) 231public static Exception AmbiguousBinop(int op, Type type1, Type type2) 326public static Exception UnsupportedDataType(Type type)
System\Data\Filter\FunctionNode.cs (14)
280private Type GetDataType(ExpressionNode node) 282Type nodeType = node.GetType(); 296throw ExprException.ArgumentType(s_funcs[_info]._name, 2, typeof(Type)); 299Type? dataType = Type.GetType(typeName); 486Type type = (Type)argumentValues[1]; 666internal readonly Type _result; 670internal readonly Type?[] _parameters = new Type?[] { null, null, null }; 682internal Function(string name, FunctionId id, Type result, bool IsValidateArguments, 683bool IsVariantArgumentList, int argumentCount, Type? a1, Type? a2, Type? a3)
System\Data\IDataRecord.cs (1)
16Type GetFieldType(int i);
System\Data\PrimaryKeyTypeConverter.cs (2)
19public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) => 23public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
System\Data\ProviderBase\DataReaderContainer.cs (4)
46internal abstract Type GetFieldType(int ordinal); 104internal override Type GetFieldType(int ordinal) 106Type fieldType = _providerSpecificDataReader.GetProviderSpecificFieldType(ordinal); 145internal override Type GetFieldType(int ordinal)
System\Data\ProviderBase\SchemaMapping.cs (4)
588Type fieldType = _dataReader.GetFieldType(i); 702Type fieldType = chapterValue.GetType(); 810Type? fieldType = schemaRow.DataType; 1049Type fieldType = chapterValue.GetType();
System\Data\RelationshipConverter.cs (4)
22public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 38public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 53ctor = typeof(DataRelation).GetConstructor(new Type[] { typeof(string) /*relationName*/, typeof(string) /*parentTableName*/, typeof(string) /*childTableName */, 60ctor = typeof(DataRelation).GetConstructor(new Type[] { typeof(string)/*relationName*/, typeof(string)/*parentTableName*/, typeof(string)/*parentTableNamespace*/,
System\Data\SimpleType.cs (1)
312internal static SimpleType? CreateSimpleType(StorageType typeCode, Type type)
System\Data\TypeLimiter.cs (15)
55public static void EnsureTypeIsAllowed(Type? type, TypeLimiter? capturedLimiter = null) 107private static IEnumerable<Type> GetPreviouslyDeclaredDataTypes(DataTable dataTable) 111: Enumerable.Empty<Type>(); 118private static IEnumerable<Type> GetPreviouslyDeclaredDataTypes(DataSet dataSet) 122: Enumerable.Empty<Type>(); 130private static readonly HashSet<Type> s_allowedTypes = new HashSet<Type>() 169typeof(Type), 186private readonly HashSet<Type> m_allowedTypes; 198internal Scope(Scope? previousScope, IEnumerable<Type> allowedTypes) 203m_allowedTypes = new HashSet<Type>(allowedTypes.Where(type => type != null)); 221public bool IsAllowedType(Type type) 245Type[]? appDomainAllowedTypes = (Type[]?)AppDomain.CurrentDomain.GetData(AppDomainDataSetDefaultAllowedTypesKey); 262private static bool IsTypeUnconditionallyAllowed(Type type)
System\Data\XDRSchema.cs (4)
221public Type type; 222public NameType(string n, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type t) 297private static Type ParseDataType(string dt, string dtValues) 350Type type;
System\Data\xmlsaver.cs (15)
54private Converter<Type, string>? _targetConverter; 66internal static void AddExtendedProperties(PropertyCollection? props, XmlElement node, Type? type) 134Type type = pd.PropertyType; 151type != typeof(Type) && 229internal static string XmlDataTypeName(Type type) 409internal static void ValidateColumnMapping(Type columnType) 1131internal void Save(DataSet? ds, DataTable? dt, XmlWriter xw, bool writeHierarchy, Converter<Type, string>? multipleTargetConverter) 1319if (col.DataType == typeof(Guid) || col.DataType == typeof(Type)) 2221private void SetMSDataAttribute(XmlElement root, Type type) 2573Type valuesType = columnValue.GetType(); 2617if (valuesType == typeof(Type) || valuesType == typeof(Guid) || valuesType == typeof(char) || 2622else if (columnValue is Type) 3006Type valuesType = value.GetType(); 3046if (valuesType == typeof(Type) || valuesType == typeof(Guid) || valuesType == typeof(char) || 3051else if (value is Type)
System\Data\XMLSchema.cs (14)
19internal static TypeConverter GetConverter(Type type) 46Type type = pd.PropertyType; 54else if (type == typeof(Type)) 293Type type = pd.PropertyType; 301else if (type == typeof(Type)) 303propValue = Type.GetType(value); 1767public readonly Type type; 1768public NameType(string n, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicFields)] Type t) 1776public static Type XsdtoClr(string xsdTypeName) 1860private Type ParseDataType(string dt) 1955Type? type; 2092Type? type; 2187Type? type; 2350Type? type;
System.Data.Odbc (43)
Common\System\Data\Common\AdapterUtil.Odbc.cs (8)
304internal static Exception UninitializedParameterSize(int index, Type dataType) 368internal static ArgumentException UnknownDataType(Type dataType) 372internal static ArgumentException DbTypeNotSupported(System.Data.DbType type, Type enumtype) 376internal static ArgumentException UnknownDataTypeCode(Type dataType, TypeCode typeCode) 389internal static Exception ParameterConversionFailed(object value, Type destType, Exception inner) 427internal static Exception ParametersSourceIndex(string parameterName, IDataParameterCollection collection, Type parameterType) 431internal static Exception ParameterNull(string parameter, IDataParameterCollection collection, Type parameterType) 435internal static Exception InvalidParameterType(IDataParameterCollection collection, Type parameterType, object invalidValue)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (22)
188internal static ArgumentOutOfRangeException NotSupportedEnumerationValue(Type type, string value, string method) 233private static readonly Type s_stackOverflowType = typeof(StackOverflowException); 234private static readonly Type s_outOfMemoryType = typeof(OutOfMemoryException); 235private static readonly Type s_threadAbortType = typeof(ThreadAbortException); 236private static readonly Type s_nullReferenceType = typeof(NullReferenceException); 237private static readonly Type s_accessViolationType = typeof(AccessViolationException); 238private static readonly Type s_securityType = typeof(SecurityException); 244Type type = e.GetType(); 264Type type = e.GetType(); 274internal static ArgumentOutOfRangeException InvalidEnumerationValue(Type type, int value) 290internal static ArgumentException ConvertFailed(Type fromType, Type toType, Exception? innerException) 310internal static ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection) 314internal static ArgumentNullException CollectionNullValue(string parameter, Type collection, Type itemType) 318internal static IndexOutOfRangeException CollectionIndexInt32(int index, Type collection, int count) 322internal static IndexOutOfRangeException CollectionIndexString(Type itemType, string propertyName, string propertyValue, Type collection) 326internal static InvalidCastException CollectionInvalidType(Type collection, Type itemType, object invalidValue) 396internal static ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection) 400internal static ArgumentException ParametersIsParent(Type parameterType, ICollection collection)
src\libraries\Common\src\System\Data\ProviderBase\DbMetaDataFactory.cs (1)
174resultTable.Columns.Add(row["ColumnName"] as string, (Type)row["DataType"]);
System\Data\Odbc\DbDataRecord.cs (1)
14internal Type? _type;
System\Data\Odbc\Odbc32.cs (6)
33internal static ArgumentOutOfRangeException NotSupportedEnumerationValue(Type type, int value) 797internal readonly Type _type; 808private TypeMap(OdbcType odbcType, DbType dbType, Type type, ODBC32.SQL_TYPE sql_type, ODBC32.SQL_C sql_c, ODBC32.SQL_C param_sql_c, int bsize, int csize, bool signType) 886internal static TypeMap FromSystemType(Type dataType) 888switch (Type.GetTypeCode(dataType)) 931default: throw ADP.UnknownDataTypeCode(dataType, Type.GetTypeCode(dataType));
System\Data\Odbc\OdbcDataReader.cs (1)
415public override Type GetFieldType(int i)
System\Data\Odbc\OdbcMetaDataFactory.cs (1)
1071resultTable.Columns.Add(row["ColumnName"] as string, (Type)row["DataType"]);
System\Data\Odbc\OdbcParameter.cs (2)
992Type valueType = value.GetType(); 1027Type type = value.GetType();
System\Data\Odbc\OdbcParameterCollection.cs (1)
15private static readonly Type s_itemType = typeof(OdbcParameter);
System.Data.OleDb (2)
artifacts\obj\System.Data.OleDb\Debug\net9.0\System.Data.OleDb.notsupported.cs (2)
212public override System.Type GetFieldType(int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 233public static System.Data.OleDb.OleDbDataReader GetEnumerator(System.Type type) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); }
System.Diagnostics.DiagnosticSource (28)
System\Diagnostics\DiagnosticSourceEventSource.cs (21)
1031Type argType = args.GetType(); 1058new ConcurrentDictionary<Type, TransformSpec?>(1, 8), null); 1102private static TransformSpec? MakeImplicitTransforms(Type type) 1134private ConcurrentDictionary<Type, TransformSpec?>? _implicitTransformsTable; // If there is more than one object type for an implicit transform, they go here. 1144public Type? Type; 1257Type? objType = obj?.GetType(); 1281public PropertyFetch(Type? type) 1290internal Type? Type { get; } 1299public static PropertyFetch FetcherForProperty(Type? type, string propertyName) 1313foreach (Type iFaceType in typeInfo.GetInterfaces()) 1362private static PropertyFetch CreateEnumeratePropertyFetch(Type type, TypeInfo enumerableOfTType) 1364Type elemType = enumerableOfTType.GetGenericArguments()[0]; 1371Type instantiatedTypedPropertyFetcher = typeof(EnumeratePropertyFetch<>) 1378private static PropertyFetch CreatePropertyFetch(Type type, PropertyInfo propertyInfo) 1386Type typedPropertyFetcher = type.IsValueType ? 1388Type instantiatedTypedPropertyFetcher = typedPropertyFetcher.GetTypeInfo().MakeGenericType( 1402public RefTypedFetchProperty(Type type, PropertyInfo property) : base(type) 1421public ValueTypedFetchProperty(Type type, PropertyInfo property) : base(type) 1444public ReflectionPropertyFetch(Type type, PropertyInfo property) : base(type) 1457public EnumeratePropertyFetch(Type type) : base(type) { } 1522public EnumeratePropertyFetch(Type type) : base(type) { }
System\Diagnostics\Metrics\AggregationManager.cs (4)
289Type aggregatorType = createAggregatorFunc.GetType().GenericTypeArguments[0]; 290Type instrumentStateType = typeof(InstrumentState<>).MakeGenericType(aggregatorType); 296Type type = instrument.GetType(); 297Type? genericDefType = null;
System\Diagnostics\Metrics\Instrument.cs (1)
143Type type = typeof(T);
System\Diagnostics\Metrics\Meter.cs (2)
469private static Instrument? GetCachedInstrument(List<Instrument> instrumentList, Type instrumentType, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) 485private Instrument GetOrCreateInstrument<T>(Type instrumentType, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags, Func<Instrument> instrumentCreator)
System.Diagnostics.TraceSource (9)
System\Diagnostics\SwitchAttribute.cs (6)
14private Type _type; 17public SwitchAttribute(string switchName, Type switchType) 35public Type SwitchType 57foreach (Type type in assembly.GetTypes()) 67private static void GetAllRecursive([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, List<object> switchAttribs) 77if (!(member is Type))
System\Diagnostics\SwitchLevelAttribute.cs (3)
11private Type _type; 13public SwitchLevelAttribute(Type switchLevelType) 18public Type SwitchLevelType
System.DirectoryServices (5)
artifacts\obj\System.DirectoryServices\Debug\net9.0\System.DirectoryServices.notsupported.cs (5)
57public override System.Type AccessRightType { get { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } } 58public override System.Type AccessRuleType { get { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } } 59public override System.Type AuditRuleType { get { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } } 560public ActiveDirectoryObjectNotFoundException(string? message, System.Type? type, string? name) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } 562public System.Type? Type { get { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } }
System.DirectoryServices.AccountManagement (5)
artifacts\obj\System.DirectoryServices.AccountManagement\Debug\net9.0\System.DirectoryServices.AccountManagement.notsupported.cs (5)
14protected void AdvancedFilterSet(string attribute, object value, System.Type objectType, System.DirectoryServices.AccountManagement.MatchType mt) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } 212protected static System.DirectoryServices.AccountManagement.Principal FindByIdentityWithType(System.DirectoryServices.AccountManagement.PrincipalContext context, System.Type principalType, System.DirectoryServices.AccountManagement.IdentityType identityType, string identityValue) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } 214protected static System.DirectoryServices.AccountManagement.Principal FindByIdentityWithType(System.DirectoryServices.AccountManagement.PrincipalContext context, System.Type principalType, string identityValue) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } 219public System.Type GetUnderlyingObjectType() { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } 325public System.Type GetUnderlyingSearcherType() { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
System.DirectoryServices.Protocols (1)
artifacts\obj\System.DirectoryServices.Protocols\Debug\net9.0\System.DirectoryServices.Protocols.notsupported.cs (1)
116public object[] GetValues(System.Type valuesType) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
System.Drawing.Primitives (1)
src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
24[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type typeWithColors)
System.Formats.Asn1 (13)
System\Formats\Asn1\AsnDecoder.cs (1)
549private static int GetPrimitiveIntegerSize(Type primitiveType)
System\Formats\Asn1\AsnDecoder.Enumerated.cs (4)
123Type tEnum = typeof(TEnum); 192Type enumType, 204Type backingType = enumType.GetEnumUnderlyingType(); 404public Enum ReadEnumeratedValue(Type enumType, Asn1Tag? expectedTag = null)
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (4)
112Type tFlagsEnum = typeof(TFlagsEnum); 180Type flagsEnumType, 189Type backingType = flagsEnumType.GetEnumUnderlyingType(); 538public Enum ReadNamedBitListValue(Type flagsEnumType, Asn1Tag? expectedTag = null)
System\Formats\Asn1\AsnWriter.Enumerated.cs (2)
73private void WriteEnumeratedValue(Asn1Tag tag, Type tEnum, object value) 77Type backingType = tEnum.GetEnumUnderlyingType();
System\Formats\Asn1\AsnWriter.NamedBitList.cs (2)
106private void WriteNamedBitList(Asn1Tag? tag, Type tEnum, Enum value) 108Type backingType = tEnum.GetEnumUnderlyingType();
System.IO.FileSystem.AccessControl (5)
artifacts\obj\System.IO.FileSystem.AccessControl\Debug\net9.0\System.IO.FileSystem.AccessControl.notsupported.cs (5)
34public System.Security.AccessControl.AuthorizationRuleCollection GetAccessRules(bool includeExplicit, bool includeInherited, System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 35public System.Security.AccessControl.AuthorizationRuleCollection GetAuditRules(bool includeExplicit, bool includeInherited, System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 104public override System.Type AccessRightType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 105public override System.Type AccessRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 106public override System.Type AuditRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } }
System.IO.IsolatedStorage (6)
System\IO\IsolatedStorage\IsolatedStorage.cs (3)
135protected void InitStore(IsolatedStorageScope scope, Type appEvidenceType) 140protected void InitStore(IsolatedStorageScope scope, Type? domainEvidenceType, Type? assemblyEvidenceType)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (3)
515public static IsolatedStorageFile GetStore(IsolatedStorageScope scope, Type? applicationEvidenceType) 527public static IsolatedStorageFile GetStore(IsolatedStorageScope scope, Type? domainEvidenceType, Type? assemblyEvidenceType)
System.IO.Packaging (2)
System\IO\Packaging\InternalRelationshipCollection.cs (1)
34private static readonly UriKind DotNetRelativeOrAbsolute = Type.GetType("Mono.Runtime") == null ? UriKind.RelativeOrAbsolute : (UriKind)300;
System\IO\Packaging\XmlWrappingReader.cs (1)
39public override System.Type ValueType { get { return _reader.ValueType; } }
System.IO.Pipes.AccessControl (3)
artifacts\obj\System.IO.Pipes.AccessControl\Debug\net9.0\System.IO.Pipes.AccessControl.notsupported.cs (3)
32public override System.Type AccessRightType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 33public override System.Type AccessRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 34public override System.Type AuditRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } }
System.Linq (1)
System\Linq\OrderBy.cs (1)
145Type t = typeof(T);
System.Linq.Expressions (916)
System\Dynamic\BinaryOperationBinder.cs (1)
29public sealed override Type ReturnType => typeof(object);
System\Dynamic\BindingRestrictions.cs (3)
63public static BindingRestrictions GetTypeRestriction(Expression expression, Type type) 258private readonly Type _type; 260internal TypeRestriction(Expression parameter, Type type)
System\Dynamic\ConvertBinder.cs (3)
21protected ConvertBinder(Type type, bool @explicit) 32public Type Type { get; } 79public sealed override Type ReturnType => Type;
System\Dynamic\CreateInstanceBinder.cs (1)
29public sealed override Type ReturnType => typeof(object);
System\Dynamic\DeleteIndexBinder.cs (1)
29public sealed override Type ReturnType => typeof(void);
System\Dynamic\DeleteMemberBinder.cs (1)
42public sealed override Type ReturnType => typeof(void);
System\Dynamic\DynamicMetaObject.cs (4)
72/// Gets the <see cref="Type"/> of the runtime value or null if the <see cref="DynamicMetaObject"/> has no value associated with it. 74public Type? RuntimeType 80Type ct = Expression.Type; 100public Type LimitType => RuntimeType ?? Expression.Type;
System\Dynamic\DynamicMetaObjectBinder.cs (4)
36public virtual Type ReturnType => typeof(object); 62Type expectedResult; 171public Expression GetUpdateExpression(Type type) 213Type delegateType = DelegateHelpers.MakeDeferredSiteDelegate(args, ReturnType);
System\Dynamic\GetIndexBinder.cs (1)
29public sealed override Type ReturnType => typeof(object);
System\Dynamic\GetMemberBinder.cs (1)
32public sealed override Type ReturnType => typeof(object);
System\Dynamic\InvokeBinder.cs (1)
29public sealed override Type ReturnType => typeof(object);
System\Dynamic\InvokeMemberBinder.cs (1)
35public sealed override Type ReturnType => typeof(object);
System\Dynamic\SetIndexBinder.cs (1)
29public sealed override Type ReturnType => typeof(object);
System\Dynamic\SetMemberBinder.cs (1)
32public sealed override Type ReturnType => typeof(object);
System\Dynamic\UnaryOperationBinder.cs (1)
29public sealed override Type ReturnType
System\Dynamic\Utils\CachedReflectionInfo.cs (2)
14s_String_Format_String_ObjectArray ??= typeof(string).GetMethod(nameof(string.Format), new Type[] { typeof(string), typeof(object[]) })!; 18s_InvalidCastException_Ctor_String ??= typeof(InvalidCastException).GetConstructor(new Type[] { typeof(string) })!;
System\Dynamic\Utils\DelegateHelpers.cs (24)
23public static Func<Type, Func<object?[], object?>, Delegate> CreateObjectArrayDelegate { get; } 26private static Func<Type, Func<object?[], object?>, Delegate> CreateObjectArrayDelegateInternal() 33return Type.GetType("Internal.Runtime.Augments.DynamicDelegateAugments, System.Private.CoreLib", throwOnError: true)! 35.CreateDelegate<Func<Type, Func<object?[], object?>, Delegate>>(); 39return new Func<Type, Func<object?[], object?>, Delegate>((_x, _y) => throw new NotImplementedException()); 55internal static Delegate CreateObjectArrayDelegate(Type delegateType, Func<object?[], object?> handler) 70private static readonly CacheDict<Type, MethodInfo> s_thunks = new CacheDict<Type, MethodInfo>(256); 111Type delHelpers = typeof(DelegateHelpers); 119Type delHelpers = typeof(DelegateHelpers); 128private static MethodInfo? GetCSharpThunk(Type returnType, bool hasReturnValue, ParameterInfo[] parameters) 144Type parameterType = parameter.ParameterType; 155Type[] thunkTypeArgs = thunkTypeArgCount == 0 ? Type.EmptyTypes : new Type[thunkTypeArgCount]; 201private static Delegate CreateObjectArrayDelegateRefEmit(Type delegateType, Func<object?[], object?> handler) 207Type returnType = delegateInvokeMethod.ReturnType; 234Type[] paramTypes = new Type[parameters.Length + 1]; 277Type paramType = parameters[i].ParameterType; 291Type boxType = ConvertToBoxableType(paramType); 319Type byrefToType = parameters[i].ParameterType.GetElementType()!; 348private static Type ConvertToBoxableType(Type t)
System\Dynamic\Utils\ExpressionUtils.cs (3)
157Type pType = pi.ParameterType; 219public static bool TryQuote(Type parameterType, ref Expression argument) 224Type quoteable = typeof(LambdaExpression);
System\Dynamic\Utils\TypeExtensions.cs (6)
20[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] this Type type, 22Type[] types) 38private static bool MatchesArgumentTypes(this MethodInfo? mi, Type[] argTypes) 65public static Type GetReturnType(this MethodBase mi) => mi.IsConstructor ? mi.DeclaringType! : ((MethodInfo)mi).ReturnType; 67public static TypeCode GetTypeCode(this Type type) => Type.GetTypeCode(type);
System\Dynamic\Utils\TypeUtils.cs (97)
15private static readonly Type[] s_arrayAssignableInterfaces = typeof(int[]).GetInterfaces() 22public static Type GetNonNullableType(this Type type) => IsNullableType(type) ? type.GetGenericArguments()[0] : type; 25public static Type GetNullableType(this Type type) 40public static Type LiftPrimitiveOrThrow(this Type type) 93public static ConstructorInfo GetNullableConstructor(Type nullableType) 100public static bool IsNullableType(this Type type) => type.IsConstructedGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); 102public static bool IsNullableOrReferenceType(this Type type) => !type.IsValueType || IsNullableType(type); 104public static bool IsBool(this Type type) => GetNonNullableType(type) == typeof(bool); 106public static bool IsNumeric(this Type type) 131public static bool IsInteger(this Type type) 153public static bool IsInteger64(this Type type) 169public static bool IsArithmetic(this Type type) 191public static bool IsUnsignedInt(this Type type) 208public static bool IsIntegerOrBool(this Type type) 231public static bool IsNumericOrBool(this Type type) => IsNumeric(type) || IsBool(type); 234public static bool IsValidInstanceType(MemberInfo member, Type instanceType) 236Type? targetType = member.DeclaringType; 274static Type[] GetTypeInterfaces(Type instanceType) => instanceType.GetInterfaces(); 275foreach (Type interfaceType in GetTypeInterfaces(instanceType)) 288public static bool HasIdentityPrimitiveOrNullableConversionTo(this Type source, Type dest) 319public static bool HasReferenceConversionTo(this Type source, Type dest) 331Type nnSourceType = GetNonNullableType(source); 332Type nnDestType = GetNonNullableType(dest); 364private static bool StrictHasReferenceConversionTo(this Type source, Type dest, bool skipNonArray) 439private static bool HasArrayToInterfaceConversion(Type source, Type dest) 447Type[] destParams = dest.GetGenericArguments(); 453Type destGen = dest.GetGenericTypeDefinition(); 455foreach (Type iface in s_arrayAssignableInterfaces) 466private static bool HasInterfaceToArrayConversion(Type source, Type dest) 474Type[] sourceParams = source.GetGenericArguments(); 480Type sourceGen = source.GetGenericTypeDefinition(); 482foreach (Type iface in s_arrayAssignableInterfaces) 493private static bool IsCovariant(Type t) 499private static bool IsContravariant(Type t) 505private static bool IsInvariant(Type t) 511private static bool IsDelegate(Type t) 517public static bool IsLegalExplicitVariantDelegateConversion(Type source, Type dest) 536Type genericDelegate = source.GetGenericTypeDefinition(); 543Type[] genericParameters = genericDelegate.GetGenericArguments(); 544Type[] sourceArguments = source.GetGenericArguments(); 545Type[] destArguments = dest.GetGenericArguments(); 555Type sourceArgument = sourceArguments[iParam]; 556Type destArgument = destArguments[iParam]; 566Type genericParameter = genericParameters[iParam]; 591public static bool IsConvertible(this Type type) 620public static bool HasReferenceEquality(Type left, Type right) 637public static bool HasBuiltInEqualityOperator(Type left, Type right) 674Type nnType = GetNonNullableType(left); 678public static bool IsImplicitlyConvertibleTo(this Type source, Type destination) => 687public static MethodInfo? GetUserDefinedCoercionMethod(Type convertFrom, Type convertToType) 689Type nnExprType = GetNonNullableType(convertFrom); 690Type nnConvType = GetNonNullableType(convertToType); 721private static MethodInfo? FindConversionOperator(MethodInfo[] methods, Type? typeFrom, Type? typeTo) 738private static bool IsImplicitNumericConversion(Type source, Type destination) 856private static bool IsImplicitReferenceConversion(Type source, Type destination) => 859private static bool IsImplicitBoxingConversion(Type source, Type destination) => 862private static bool IsImplicitNullableConversion(Type source, Type destination) => 865public static Type? FindGenericType(Type definition, Type? type) 894public static MethodInfo? GetBooleanOperator(Type type, string name) 912public static Type GetNonRefType(this Type type) => type.IsByRef ? type.GetElementType()! : type; 914public static bool AreEquivalent(Type? t1, Type? t2) => t1 != null && t1.IsEquivalentTo(t2); 916public static bool AreReferenceAssignable(Type dest, Type src) 927public static bool IsSameOrSubclass(Type type, Type subType) => 930public static void ValidateType(Type type, string? paramName) => ValidateType(type, paramName, false, false); 932public static void ValidateType(Type type, string? paramName, bool allowByRef, bool allowPointer) 948public static bool ValidateType(Type type, string? paramName, int index) 967public static MethodInfo GetInvokeMethod(this Type delegateType) 973internal static bool IsUnsigned(this Type type) => IsUnsigned(GetNonNullableType(type).GetTypeCode()); 991internal static bool IsFloatingPoint(this Type type) => IsFloatingPoint(GetNonNullableType(type).GetTypeCode()); 1008public static MethodInfo GetArrayGetMethod(Type arrayType) 1016public static MethodInfo GetArraySetMethod(Type arrayType) 1024public static MethodInfo GetArrayAddressMethod(Type arrayType)
System\Linq\Expressions\BinaryExpression.cs (51)
313internal static BinaryExpression Create(ExpressionType nodeType, Expression left, Expression right, Type type, MethodInfo? method, LambdaExpression? conversion) 336Type left = Left.Type; 337Type right = Right.Type; 354Type left = Left.Type; 355Type right = Right.Type; 466public sealed override Type Type => typeof(bool); 493public sealed override Type Type => Left.Type; 525public sealed override Type Type => Right.Type; 535internal OpAssignMethodConversionBinaryExpression(ExpressionType nodeType, Expression left, Expression right, Type type, MethodInfo method, LambdaExpression conversion) 548internal SimpleBinaryExpression(ExpressionType nodeType, Expression left, Expression right, Type type) 557public sealed override Type Type { get; } 566internal MethodBinaryExpression(ExpressionType nodeType, Expression left, Expression right, Type type, MethodInfo method) 613Type nnLeftType = left.Type.GetNonNullableType(); 614Type nnRightType = right.Type.GetNonNullableType(); 717private static MethodInfo? GetUserDefinedBinaryOperator(ExpressionType binaryType, Type leftType, Type rightType, string name) 721Type[] types = new Type[] { leftType, rightType }; 722Type nnLeftType = leftType.GetNonNullableType(); 723Type nnRightType = rightType.GetNonNullableType(); 737private static bool IsLiftingConditionalLogicalOperator(Type left, Type right, MethodInfo? method, ExpressionType binaryType) 745internal static bool ParameterIsAssignable(ParameterInfo pi, Type argType) 747Type pType = pi.ParameterType; 753private static void ValidateParamsWithOperandsOrThrow(Type paramType, Type operandType, ExpressionType exprType, string name) 799private static void ValidateUserDefinedConditionalLogicOperator(ExpressionType nodeType, Type left, Type right, MethodInfo method) 827Type? declaringType = method.DeclaringType; 843private static void VerifyOpTrueFalse(ExpressionType nodeType, Type left, MethodInfo opTrue, string paramName) 856private static bool IsValidLiftedConditionalLogicalOperator(Type left, Type right, ParameterInfo[] pms) 1270Type returnType; 1323Type returnType; 1383Type resultType = ValidateCoalesceArgTypes(left.Type, right.Type); 1392Type delegateType = conversion.Type; 1423private static Type ValidateCoalesceArgTypes(Type left, Type right) 1425Type leftStripped = left.GetNonNullableType(); 1548Type delegateType = conversion.Type; 2230private static bool IsSimpleShift(Type left, Type right) 2236private static Type GetResultTypeOfShift(Type left, Type right) 2275Type resultType = GetResultTypeOfShift(left.Type, right.Type); 2334Type resultType = GetResultTypeOfShift(left.Type, right.Type); 2371Type resultType = GetResultTypeOfShift(left.Type, right.Type); 2430Type resultType = GetResultTypeOfShift(left.Type, right.Type); 2851Type arrayType = array.Type;
System\Linq\Expressions\BlockExpression.cs (9)
56/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 57public override Type Type => GetExpression(ExpressionCount - 1).Type; 642internal ScopeWithType(IReadOnlyList<ParameterExpression> variables, IReadOnlyList<Expression> expressions, Type type) 648public sealed override Type Type { get; } 925public static BlockExpression Block(Type type, params Expression[] expressions) 937public static BlockExpression Block(Type type, IEnumerable<Expression> expressions) 960public static BlockExpression Block(Type type, IEnumerable<ParameterExpression>? variables, params Expression[] expressions) 999public static BlockExpression Block(Type type, IEnumerable<ParameterExpression>? variables, IEnumerable<Expression> expressions) 1027private static BlockExpression BlockCore(Type? type, ReadOnlyCollection<ParameterExpression> variables, ReadOnlyCollection<Expression> expressions)
System\Linq\Expressions\CatchBlock.cs (5)
16internal CatchBlock(Type test, ParameterExpression? variable, Expression body, Expression? filter) 32public Type Test { get; } 82public static CatchBlock Catch(Type type, Expression body) 107public static CatchBlock Catch(Type type, Expression body, Expression? filter) 135public static CatchBlock MakeCatchBlock(Type type, ParameterExpression? variable, Expression body, Expression? filter)
System\Linq\Expressions\Common\CachedReflectionInfo.cs (4)
71s_MethodInfo_CreateDelegate_Type_Object ??= typeof(MethodInfo).GetMethod(nameof(MethodInfo.CreateDelegate), new[] { typeof(Type), typeof(object) })!; 91s_Type_GetTypeFromHandle ??= typeof(Type).GetMethod(nameof(Type.GetTypeFromHandle))!; 156s_RuntimeOps_CreateRuntimeVariables ??= typeof(RuntimeOps).GetMethod(nameof(RuntimeOps.CreateRuntimeVariables), Type.EmptyTypes)!;
System\Linq\Expressions\Common\ConstantCheck.cs (4)
50private static AnalyzeTypeIsResult AnalyzeTypeIs(Expression operand, Type testType) 52Type operandType = operand.Type; 70Type nnOperandType = operandType.GetNonNullableType(); 71Type nnTestType = testType.GetNonNullableType();
System\Linq\Expressions\Compiler\AssemblyGen.cs (1)
42private TypeBuilder DefineType(string name, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type parent, TypeAttributes attr)
System\Linq\Expressions\Compiler\BoundConstants.cs (5)
30internal readonly Type Type; 32internal TypedConstant(object value, Type type) 83internal void AddReference(object value, Type type) 95internal void EmitConstant(LambdaCompiler lc, object value, Type type) 181private void EmitConstantFromArray(LambdaCompiler lc, object value, Type type)
System\Linq\Expressions\Compiler\CompilerScope.cs (4)
324Type boxType = typeof(StrongBox<>).MakeGenericType(v.Type); 331lc.IL.Emit(OpCodes.Newobj, boxType.GetConstructor(new Type[] { v.Type })!); 337lc.IL.Emit(OpCodes.Newobj, boxType.GetConstructor(new Type[] { v.Type })!); 342lc.IL.Emit(OpCodes.Newobj, boxType.GetConstructor(Type.EmptyTypes)!);
System\Linq\Expressions\Compiler\CompilerScope.Storage.cs (3)
107private readonly Type _boxType; 115Type boxType = typeof(StrongBox<>).MakeGenericType(variable.Type); 167Type boxType = typeof(StrongBox<>).MakeGenericType(variable.Type);
System\Linq\Expressions\Compiler\DelegateHelpers.cs (12)
23internal static Type MakeCallSiteDelegate(ReadOnlyCollection<Expression> types, Type returnType) 58internal static Type MakeDeferredSiteDelegate(DynamicMetaObject[] args, Type returnType) 71Type paramType = mo.Expression.Type; 87Type[] paramTypes = new Type[args.Length + 2]; 93Type paramType = mo.Expression.Type; 113private static System.Reflection.TypeInfo MakeNewCustomDelegate(Type[] types) 117Type returnType = types[types.Length - 1]; 118Type[] parameters = types.RemoveLast(); 119Type[] delegateCtorSignature = { typeof(object), typeof(IntPtr) };
System\Linq\Expressions\Compiler\DelegateHelpers.Generated.cs (21)
19internal static Type MakeDelegateType(Type[] types) 35curTypeInfo.DelegateType = MakeNewDelegate((Type[])types.Clone()); 42internal static TypeInfo NextTypeInfo(Type initialArg) 50internal static TypeInfo GetNextTypeInfo(Type initialArg, TypeInfo curTypeInfo) 64public Type DelegateType; 65public Dictionary<Type, TypeInfo> TypeChain; 68private static TypeInfo NextTypeInfo(Type initialArg, TypeInfo curTypeInfo) 70Type lookingUp = initialArg; 72curTypeInfo.TypeChain ??= new Dictionary<Type, TypeInfo>(); 96private static Type TryMakeVBStyledCallSite(Type[] types) 108Type t = types[i]; 134internal static Type MakeNewDelegate(Type[] types) 152Type type = types[i]; 173Type result; 188internal static Type GetFuncType(Type[] types) 233internal static Type GetActionType(Type[] types)
System\Linq\Expressions\Compiler\ILGen.cs (48)
17private static readonly MethodInfo s_nullableGetValueOrDefault = typeof(Nullable<>).GetMethod("GetValueOrDefault", Type.EmptyTypes)!; 63internal static void EmitLoadValueIndirect(this ILGenerator il, Type type) 116internal static void EmitStoreValueIndirect(this ILGenerator il, Type type) 161internal static void EmitLoadElement(this ILGenerator il, Type type) 213internal static void EmitStoreElement(this ILGenerator il, Type type) 256internal static void EmitType(this ILGenerator il, Type type) 361internal static bool CanEmitConstant(object? value, Type type) 368if (value is Type t) 377private static bool CanEmitILConstant(Type type) 404internal static bool TryEmitConstant(this ILGenerator il, object? value, Type type, ILocalCache locals) 422if (value is Type t) 427if (type != typeof(Type)) 441Type? dt = mb.DeclaringType; 463private static bool ShouldLdtoken(Type t) 478Type? dt = mb.DeclaringType; 482private static bool TryEmitILConstant(this ILGenerator il, object value, Type type) 488Type nonNullType = type.GetNonNullableType(); 552internal static void EmitConvertToType(this ILGenerator il, Type typeFrom, Type typeTo, bool isChecked, ILocalCache locals) 564Type nnExprType = typeFrom.GetNonNullableType(); 565Type nnType = typeTo.GetNonNullableType(); 599private static void EmitCastToType(this ILGenerator il, Type typeFrom, Type typeTo) 617private static void EmitNumericConversion(this ILGenerator il, Type typeFrom, Type typeTo, bool isChecked) 787private static void EmitNullableToNullableConversion(this ILGenerator il, Type typeFrom, Type typeTo, bool isChecked, ILocalCache locals) 803Type nnTypeFrom = typeFrom.GetNonNullableType(); 804Type nnTypeTo = typeTo.GetNonNullableType(); 821private static void EmitNonNullableToNullableConversion(this ILGenerator il, Type typeFrom, Type typeTo, bool isChecked, ILocalCache locals) 825Type nnTypeTo = typeTo.GetNonNullableType(); 831private static void EmitNullableToNonNullableConversion(this ILGenerator il, Type typeFrom, Type typeTo, bool isChecked, ILocalCache locals) 842private static void EmitNullableToNonNullableStructConversion(this ILGenerator il, Type typeFrom, Type typeTo, bool isChecked, ILocalCache locals) 852Type nnTypeFrom = typeFrom.GetNonNullableType(); 857private static void EmitNullableToReferenceConversion(this ILGenerator il, Type typeFrom) 866private static void EmitNullableConversion(this ILGenerator il, Type typeFrom, Type typeTo, bool isChecked, ILocalCache locals) 879internal static void EmitHasValue(this ILGenerator il, Type nullableType) 888internal static void EmitGetValue(this ILGenerator il, Type nullableType) 897internal static void EmitGetValueOrDefault(this ILGenerator il, Type nullableType) 934internal static void EmitArray(this ILGenerator il, Type elementType, int count) 950internal static void EmitArray(this ILGenerator il, Type arrayType) 961Type[] types = new Type[arrayType.GetArrayRank()]; 1056internal static void EmitDefault(this ILGenerator il, Type type, ILocalCache? locals)
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (16)
13private void EmitAddress(Expression node, Type type) 22private void EmitAddress(Expression node, Type type, CompilationFlags flags) 66private void AddressOf(BinaryExpression node, Type type) 83private void AddressOf(ParameterExpression node, Type type) 112private void AddressOf(MemberExpression node, Type type) 117Type? objectType = null; 131private void EmitMemberAddress(MemberInfo member, Type? objectType) 165private void AddressOf(MethodCallExpression node, Type type) 186private void AddressOf(IndexExpression node, Type type) 207private void AddressOf(UnaryExpression node, Type type) 217private void EmitExpressionAddress(Expression node, Type type) 232private WriteBack? EmitAddressWriteBack(Expression node, Type type) 274Type? instanceType = null; 323Type? instanceType = null; 377private LocalBuilder GetInstanceLocal(Type type) 379Type instanceLocalType = type.IsValueType ? type.MakeByRefType() : type;
System\Linq\Expressions\Compiler\LambdaCompiler.Binary.cs (21)
100Type resultType; 129private void EmitBinaryOperator(ExpressionType op, Type leftType, Type rightType, Type resultType, bool liftedToNull) 148private void EmitUnliftedBinaryOp(ExpressionType op, Type leftType, Type rightType) 255private void EmitShiftMask(Type leftType) 266private void EmitConvertArithmeticResult(ExpressionType op, Type resultType) 287private void EmitLiftedBinaryOp(ExpressionType op, Type leftType, Type rightType, Type resultType, bool liftedToNull) 346private void EmitLiftedRelational(ExpressionType op, Type type) 367Type unnullable = type.GetNonNullableType(); 384private void EmitLiftedToNullRelational(ExpressionType op, Type type) 410Type unnullable = type.GetNonNullableType(); 417private void EmitLiftedBinaryArithmetic(ExpressionType op, Type leftType, Type rightType, Type resultType) 479Type resultNonNullableType = resultType.GetNonNullableType(); 505Type type = typeof(bool?); 536Type type = typeof(bool?);
System\Linq\Expressions\Compiler\LambdaCompiler.cs (5)
17LocalBuilder GetLocal(Type type); 64private readonly KeyedStack<Type, LocalBuilder> _freeLocals = new KeyedStack<Type, LocalBuilder>(); 71Type[] parameterTypes = GetParameterTypes(lambda, typeof(Closure)); 227public LocalBuilder GetLocal(Type type) => _freeLocals.TryPop(type) ?? _ilg.DeclareLocal(type);
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (31)
123private void EmitExpressionAsType(Expression node, Type type, CompilationFlags flags) 232Type? objectType = null; 258Type? objectType = null; 293private void EmitGetIndexCall(IndexExpression node, Type? objectType) 307private void EmitGetArrayElement(Type arrayType) 321private void EmitSetIndexCall(IndexExpression node, Type? objectType) 335private void EmitSetArrayElement(Type arrayType) 373Type? objectType = null; 392private void EmitMethodCall(MethodInfo mi, IArgumentProvider args, Type? objectType) 398private void EmitMethodCall(MethodInfo mi, IArgumentProvider args, Type? objectType, CompilationFlags flags) 422Type[] types = new Type[count]; 451private void EmitCall(Type? objectType, MethodInfo method) 523Type type = parameter.ParameterType; 571private void EmitConstant(object? value, Type type) 594Type siteType = site.GetType(); 614private static FieldInfo GetCallSiteTargetField(Type siteType) 655Type type = node.Expression.Type; 793Type? objectType = null; 836Type? instanceType = null; 846private void EmitMemberGet(MemberInfo member, Type? objectType) 869private void EmitInstance(Expression instance, out Type type) 905Type elementType = node.Type.GetElementType()!; 941private void EmitBinding(MemberBinding binding, Type objectType) 957private void EmitMemberAssignment(MemberAssignment binding, Type objectType) 973Type type = GetMemberType(binding.Member); 991Type type = GetMemberType(binding.Member); 1027private void EmitMemberInit(ReadOnlyCollection<MemberBinding> bindings, bool keepOnStack, Type objectType) 1071private void EmitListInit(ReadOnlyCollection<ElementInit> initializers, bool keepOnStack, Type objectType) 1102private static Type GetMemberType(MemberInfo member) 1112private void EmitLift(ExpressionType nodeType, Type resultType, MethodCallExpression mc, ParameterExpression[] paramList, Expression[] argList)
System\Linq\Expressions\Compiler\LambdaCompiler.Lambda.cs (6)
94Type delegateType = inner._lambda.Type; 156private static Type[] GetParameterTypes(LambdaExpression lambda, Type firstType) 160Type[] result; 165result = new Type[count + 1]; 171result = new Type[count];
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (3)
123Type nnLeftType = b.Left.Type.GetNonNullableType(); 238Type type = typeof(bool?); 341Type type = typeof(bool?);
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (6)
238private static Type GetTestValueType(SwitchExpression node) 248Type result = node.Comparison.GetParametersCached()[1].ParameterType.GetNonRefType(); 277internal readonly Type Type; 342private static bool CanOptimizeSwitchType(Type valueType) 373Type type = node.SwitchValue.Type; 828Type tryType = node.Type;
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (8)
74Type type = node.Type; 90Type nnType = type.GetNonNullableType(); 120private void EmitUnaryOperator(ExpressionType op, Type operandType, Type resultType) 163Type nnOperandType = resultType.GetNonNullableType(); 250private void EmitConstantOne(Type type) 310Type paramType = pis[0].ParameterType; 357Type resultType = mc.Type.GetNullableType();
System\Linq\Expressions\Compiler\StackSpiller.Temps.cs (3)
26private ParameterExpression MakeTemp(Type type) => _tm.Temp(type); 68Type tempType = byRef ? expression.Type.MakeByRefType() : expression.Type; 109internal ParameterExpression Temp(Type type)
System\Linq\Expressions\Compiler\TypeInfoExtensions.cs (6)
13public static Type MakeDelegateType(this DelegateHelpers.TypeInfo info, Type retType, params Expression[] args) 19public static Type MakeDelegateType(this DelegateHelpers.TypeInfo info, Type retType, IList<Expression> args) 23Type[] paramTypes = new Type[args.Count + 2];
System\Linq\Expressions\ConditionalExpression.cs (6)
22internal static ConditionalExpression Make(Expression test, Expression ifTrue, Expression ifFalse, Type type) 48/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 49public override Type Type => IfTrue.Type; 114internal FullConditionalExpressionWithType(Expression test, Expression ifTrue, Expression ifFalse, Type type) 120public sealed override Type Type { get; } 165public static ConditionalExpression Condition(Expression test, Expression ifTrue, Expression ifFalse, Type type)
System\Linq\Expressions\ConstantExpression.cs (6)
23/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 24public override Type Type 60internal TypedConstantExpression(object? value, Type type) 66public sealed override Type Type { get; } 95public static ConstantExpression Constant(object? value, Type type) 113Type valueType = value.GetType();
System\Linq\Expressions\DebugInfoExpression.cs (2)
27/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 28public sealed override Type Type => typeof(void);
System\Linq\Expressions\DebugViewWriter.cs (1)
488private static string? GetConstantValueSuffix(Type type)
System\Linq\Expressions\DefaultExpression.cs (4)
15internal DefaultExpression(Type type) 23/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 24public sealed override Type Type { get; } 64public static DefaultExpression Default(Type type)
System\Linq\Expressions\DynamicExpression.cs (65)
22internal DynamicExpression(Type delegateType, CallSiteBinder binder) 51internal static DynamicExpression Make(Type returnType, Type delegateType, CallSiteBinder binder, ReadOnlyCollection<Expression> arguments) 63internal static DynamicExpression Make(Type returnType, Type delegateType, CallSiteBinder binder, Expression arg0) 75internal static DynamicExpression Make(Type returnType, Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1) 87internal static DynamicExpression Make(Type returnType, Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2) 99internal static DynamicExpression Make(Type returnType, Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 115public override Type Type => typeof(object); 133public Type DelegateType { get; } 244public static new DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, params Expression[] arguments) 266public static new DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, IEnumerable<Expression> arguments) 288public static new DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0) 311public static new DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1) 335public static new DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2) 360public static new DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 379public static new DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, IEnumerable<Expression>? arguments) 397public static new DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, params Expression[]? arguments) 415public static new DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0) 434public static new DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1) 454public static new DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2) 475public static new DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 496internal DynamicExpressionN(Type delegateType, CallSiteBinder binder, IReadOnlyList<Expression> arguments) 524internal TypedDynamicExpressionN(Type returnType, Type delegateType, CallSiteBinder binder, IReadOnlyList<Expression> arguments) 531public sealed override Type Type { get; } 538internal DynamicExpression1(Type delegateType, CallSiteBinder binder, Expression arg0) 582internal TypedDynamicExpression1(Type retType, Type delegateType, CallSiteBinder binder, Expression arg0) 588public sealed override Type Type { get; } 596internal DynamicExpression2(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1) 651internal TypedDynamicExpression2(Type retType, Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1) 657public sealed override Type Type { get; } 665internal DynamicExpression3(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2) 726internal TypedDynamicExpression3(Type retType, Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2) 732public sealed override Type Type { get; } 740internal DynamicExpression4(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 807internal TypedDynamicExpression4(Type retType, Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 813public sealed override Type Type { get; } 833public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, params Expression[]? arguments) 851public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, IEnumerable<Expression>? arguments) 891public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0) 921public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1) 954public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2) 990public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 1012private static MethodInfo GetValidMethodForDynamic(Type delegateType) 1037public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, params Expression[] arguments) 1059public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0) 1072Type delegateType = info.DelegateType ?? info.MakeDelegateType(returnType, arg0); 1095public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1) 1112Type delegateType = info.DelegateType ?? info.MakeDelegateType(returnType, arg0, arg1); 1136public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2) 1157Type delegateType = info.DelegateType ?? info.MakeDelegateType(returnType, arg0, arg1, arg2); 1182public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 1207Type delegateType = info.DelegateType ?? info.MakeDelegateType(returnType, arg0, arg1, arg2, arg3); 1229public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, IEnumerable<Expression> arguments) 1240private static DynamicExpression MakeDynamic(CallSiteBinder binder, Type returnType, ReadOnlyCollection<Expression> arguments) 1253Type delegateType = DelegateHelpers.MakeCallSiteDelegate(arguments, returnType); 1276var type = arg.Type;
System\Linq\Expressions\Error.cs (2)
1371internal static ArgumentException InvalidNullValue(Type? type, string? paramName) 1376internal static ArgumentException InvalidTypeException(object? value, Type? type, string? paramName)
System\Linq\Expressions\Expression.cs (19)
31private static readonly CacheDict<Type, MethodInfo> s_lambdaDelegateCache = new CacheDict<Type, MethodInfo>(40); 32private static volatile CacheDict<Type, Func<Expression, string?, bool, ReadOnlyCollection<ParameterExpression>, LambdaExpression>>? s_lambdaFactories; 43public ExtensionInfo(ExpressionType nodeType, Type type) 50internal readonly Type Type; 61protected Expression(ExpressionType nodeType, Type type) 104public virtual Type Type 304public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, IEnumerable<Expression> arguments) => 324public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0) => 345public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1) => 367public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2) => 390public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2, Expression arg3) => 410public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, params Expression[] arguments) => 427public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, IEnumerable<Expression>? arguments) => 444public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0) => 462public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1) => 481public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2) => 501public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2, Expression arg3) => 518public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, params Expression[]? arguments) =>
System\Linq\Expressions\Expression.DebuggerProxy.cs (27)
31public Type Type => _node.Type; 49public Type Type => _node.Type; 65public Type Test => _node.Test; 85public Type Type => _node.Type; 101public Type Type => _node.Type; 124public Type Type => _node.Type; 140public Type Type => _node.Type; 158public Type? Type => _node.Type; 178public Type Type => _node.Type; 196public Type Type => _node.Type; 214public Type Type => _node.Type; 233public Type ReturnType => _node.ReturnType; 235public Type Type => _node.Type; 253public Type Type => _node.Type; 272public Type Type => _node.Type; 290public Type Type => _node.Type; 308public Type Type => _node.Type; 327public Type Type => _node.Type; 344public Type Type => _node.Type; 363public Type Type => _node.Type; 381public Type Type => _node.Type; 397public Type Type => _node.Type; 432public Type Type => _node.Type; 452public Type Type => _node.Type; 469public Type Type => _node.Type; 470public Type TypeOperand => _node.TypeOperand; 490public Type Type => _node.Type;
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
783MethodInfo toString = node.GetType().GetMethod("ToString", Type.EmptyTypes)!;
System\Linq\Expressions\ExpressionVisitor.cs (2)
686private static void ValidateChildType(Type before, Type after, string methodName)
System\Linq\Expressions\GotoExpression.cs (21)
38internal GotoExpression(GotoExpressionKind kind, LabelTarget target, Expression? value, Type type) 49/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 50public sealed override Type Type { get; } 134/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 140public static GotoExpression Break(LabelTarget target, Type type) 151/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 158public static GotoExpression Break(LabelTarget target, Expression? value, Type type) 181/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 188public static GotoExpression Continue(LabelTarget target, Type type) 211/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 218public static GotoExpression Return(LabelTarget target, Type type) 244/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 251public static GotoExpression Return(LabelTarget target, Expression? value, Type type) 274/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 281public static GotoExpression Goto(LabelTarget target, Type type) 307/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 314public static GotoExpression Goto(LabelTarget target, Expression? value, Type type) 326/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 333public static GotoExpression MakeGoto(GotoExpressionKind kind, LabelTarget target, Expression? value, Type type) 339private static void ValidateGoto(LabelTarget target, ref Expression? value, string targetParameter, string valueParameter, Type? type) 358private static void ValidateGotoType(Type expectedType, ref Expression value, string paramName)
System\Linq\Expressions\IDynamicExpression.cs (1)
14Type DelegateType { get; }
System\Linq\Expressions\IndexExpression.cs (11)
48/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 49public sealed override Type Type 158/// or through <see cref="NewArrayBounds(Type, Expression[])"/> or <see cref="NewArrayInit(Type, Expression[])"/>.</remarks> 171/// or through <see cref="NewArrayBounds(Type, IEnumerable{Expression})"/> or <see cref="NewArrayInit(Type, IEnumerable{Expression})"/>.</remarks> 177Type arrayType = array.Type; 228[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 271[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 414Type valueType = setParameters[setParameters.Length - 1].ParameterType; 504Type pType = pi.ParameterType;
System\Linq\Expressions\Interpreter\AddInstruction.cs (2)
163public static Instruction Create(Type type) 299public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\AndInstruction.cs (1)
174public static Instruction Create(Type type) =>
System\Linq\Expressions\Interpreter\ArrayOperations.cs (6)
11private readonly Type _elementType; 14internal NewArrayInitInstruction(Type elementType, int elementCount) 39private readonly Type _elementType; 41internal NewArrayInstruction(Type elementType) 64private readonly Type _elementType; 67internal NewArrayBoundsInstruction(Type elementType, int rank)
System\Linq\Expressions\Interpreter\CallInstruction.cs (5)
121Type arrayType = info.DeclaringType!; 173private static Type? TryGetParameterOrReturnType(MethodInfo target, ParameterInfo[] pi, int index) 212List<Type> types = new List<Type>(); 222Type[] arrTypes = types.ToArray();
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (6)
38Type t = TryGetParameterOrReturnType(target, pi, 0); 78Type t = TryGetParameterOrReturnType(target, pi, 1); 122Type t = TryGetParameterOrReturnType(target, pi, 2); 164private static Type GetHelperType(MethodInfo info, Type[] arrTypes) 166Type t;
System\Linq\Expressions\Interpreter\DecrementInstruction.cs (1)
155public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\DefaultValueInstruction.cs (2)
13private readonly Type _type; 15internal DefaultValueInstruction(Type type)
System\Linq\Expressions\Interpreter\DivInstruction.cs (1)
163public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\EqualInstruction.cs (1)
510public static Instruction Create(Type type, bool liftedToNull)
System\Linq\Expressions\Interpreter\ExclusiveOrInstruction.cs (1)
162public static Instruction Create(Type type) =>
System\Linq\Expressions\Interpreter\GreaterThanInstruction.cs (1)
277public static Instruction Create(Type type, bool liftedToNull = false)
System\Linq\Expressions\Interpreter\GreaterThanOrEqualInstruction.cs (1)
277public static Instruction Create(Type type, bool liftedToNull = false)
System\Linq\Expressions\Interpreter\IncrementInstruction.cs (1)
155public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\InstructionList.cs (32)
344public void EmitLoad(object? value, Type? type) 575public void EmitInitializeLocal(int index, Type type) 637public void EmitNewArray(Type elementType) => Emit(new NewArrayInstruction(elementType)); 640public void EmitNewArrayBounds(Type elementType, int rank) 646public void EmitNewArrayInit(Type elementType, int elementCount) 655public void EmitAdd(Type type, bool @checked) 660public void EmitSub(Type type, bool @checked) 665public void EmitMul(Type type, bool @checked) 670public void EmitDiv(Type type) 675public void EmitModulo(Type type) 684public void EmitExclusiveOr(Type type) 689public void EmitAnd(Type type) 694public void EmitOr(Type type) 699public void EmitLeftShift(Type type) 704public void EmitRightShift(Type type) 709public void EmitEqual(Type type, bool liftedToNull = false) 714public void EmitNotEqual(Type type, bool liftedToNull = false) 719public void EmitLessThan(Type type, bool liftedToNull) 724public void EmitLessThanOrEqual(Type type, bool liftedToNull) 729public void EmitGreaterThan(Type type, bool liftedToNull) 734public void EmitGreaterThanOrEqual(Type type, bool liftedToNull) 758public void EmitCast(Type toType) 763public void EmitCastToEnum(Type toType) 768public void EmitCastReferenceToEnum(Type toType) 778public void EmitNot(Type type) 787public void EmitDefaultValue(Type type) 817public void EmitNegate(Type type) 822public void EmitNegateChecked(Type type) 827public void EmitIncrement(Type type) 832public void EmitDecrement(Type type) 837public void EmitTypeIs(Type type) 842public void EmitTypeAs(Type type)
System\Linq\Expressions\Interpreter\LeftShiftInstruction.cs (1)
162public static Instruction Create(Type type) =>
System\Linq\Expressions\Interpreter\LessThanInstruction.cs (1)
276public static Instruction Create(Type type, bool liftedToNull = false)
System\Linq\Expressions\Interpreter\LessThanOrEqualInstruction.cs (1)
277public static Instruction Create(Type type, bool liftedToNull = false)
System\Linq\Expressions\Interpreter\LightCompiler.cs (20)
35private readonly Type _exceptionType; 41internal ExceptionHandler(int labelIndex, int handlerStartIndex, int handlerEndIndex, Type exceptionType, ExceptionFilter? filter) 51public bool Matches(Type exceptionType) => _exceptionType.IsAssignableFrom(exceptionType); 121Type exceptionType = unwrappedException.GetType(); 355private void CompileDefaultExpression(Type type) 417private void EmitCopyValueType(Type valueType) 446private static bool MaybeMutableValueType(Type type) 1046Type operandType = operand.Type; 1049Type parameterType = parameter.ParameterType; 1113private void CompileConvertToType(Type typeFrom, Type typeTo, bool isChecked, bool isLiftedToNull) 1139Type nonNullableFrom = typeFrom.GetNonNullableType(); 1140Type nonNullableTo = typeTo.GetNonNullableType(); 1146Type? enumTypeTo = null; 2425Type type = node.Type; 2525Type elementType = node.Type.GetElementType()!; 2604Type typeToCompare = node.Left.Type; 2654Type nnLeftType = node.Left.Type.GetNonNullableType(); 2745Type type = GetMemberType(memberMember.Member); 2759private static Type GetMemberType(MemberInfo member)
System\Linq\Expressions\Interpreter\LightLambda.cs (1)
355internal Delegate MakeDelegate(Type delegateType)
System\Linq\Expressions\Interpreter\LocalAccess.cs (4)
372private readonly Type _type; 374internal MutableValue(int index, Type type) 411private readonly Type _type; 413internal MutableBox(int index, Type type)
System\Linq\Expressions\Interpreter\ModuloInstruction.cs (1)
163public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\MulInstruction.cs (2)
163public static Instruction Create(Type type) 300public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\NegateInstruction.cs (2)
104public static Instruction Create(Type type) 180public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\NotEqualInstruction.cs (1)
492public static Instruction Create(Type type, bool liftedToNull)
System\Linq\Expressions\Interpreter\NotInstruction.cs (1)
171public static Instruction Create(Type type) =>
System\Linq\Expressions\Interpreter\OrInstruction.cs (1)
176public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\RightShiftInstruction.cs (1)
162public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\SubInstruction.cs (2)
163public static Instruction Create(Type type) 299public static Instruction Create(Type type)
System\Linq\Expressions\Interpreter\TypeOperations.cs (16)
51private readonly Type _type; 53internal TypeIsInstruction(Type type) 73private readonly Type _type; 75internal TypeAsInstruction(Type type) 149private readonly Type _defaultValueType; 279private readonly Type _t; 281protected CastInstructionNoT(Type t) 286public static new CastInstruction Create(Type t) 303Type valueType = value.GetType(); 329public Ref(Type t) 342public Value(Type t) 354public static Instruction Create(Type t) 382private readonly Type _t; 384public CastToEnumInstruction(Type t) 406private readonly Type _t; 408public CastReferenceToEnumInstruction(Type t)
System\Linq\Expressions\Interpreter\Utilities.cs (1)
97internal static object? GetPrimitiveDefaultValue(Type type)
System\Linq\Expressions\InvocationExpression.cs (12)
19internal InvocationExpression(Expression expression, Type returnType) 28/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 29public sealed override Type Type { get; } 129public InvocationExpressionN(Expression lambda, IReadOnlyList<Expression> arguments, Type returnType) 155public InvocationExpression0(Expression lambda, Type returnType) 185public InvocationExpression1(Expression lambda, Type returnType, Expression arg0) 223public InvocationExpression2(Expression lambda, Type returnType, Expression arg0, Expression arg1) 264public InvocationExpression3(Expression lambda, Type returnType, Expression arg0, Expression arg1, Expression arg2) 308public InvocationExpression4(Expression lambda, Type returnType, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 355public InvocationExpression5(Expression lambda, Type returnType, Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4) 745Type delegateType = expression.Type; 748Type? exprType = TypeUtils.FindGenericType(typeof(Expression<>), expression.Type);
System\Linq\Expressions\LabelExpression.cs (2)
26/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 27public sealed override Type Type => Target.Type;
System\Linq\Expressions\LabelTarget.cs (4)
13internal LabelTarget(Type type, string? name) 29public Type Type { get; } 67public static LabelTarget Label(Type type) 78public static LabelTarget Label(Type type, string? name)
System\Linq\Expressions\LambdaExpression.cs (48)
24private static readonly MethodInfo s_expressionCompileMethodInfo = typeof(Expression<>).GetMethod("Compile", Type.EmptyTypes)!; 43public sealed override Type Type => TypeCore; 45internal abstract Type TypeCore { get; } 47internal abstract Type PublicType { get; } 76public Type ReturnType => Type.GetInvokeMethod().ReturnType; 120internal static MethodInfo GetCompileMethod(Type lambdaExpressionType) 127return typeof(LambdaExpression).GetMethod("Compile", Type.EmptyTypes)!; 209internal sealed override Type TypeCore => typeof(TDelegate); 211internal override Type PublicType => typeof(Expression<TDelegate>); 612internal static LambdaExpression CreateLambda(Type delegateType, Expression body, string? name, bool tailCall, ReadOnlyCollection<ParameterExpression> parameters) 618CacheDict<Type, Func<Expression, string?, bool, ReadOnlyCollection<ParameterExpression>, LambdaExpression>>? factories = 619s_lambdaFactories ??= new CacheDict<Type, Func<Expression, string?, bool, ReadOnlyCollection<ParameterExpression>, LambdaExpression>>(50); 787public static LambdaExpression Lambda(Type delegateType, Expression body, params ParameterExpression[]? parameters) 800public static LambdaExpression Lambda(Type delegateType, Expression body, bool tailCall, params ParameterExpression[]? parameters) 812public static LambdaExpression Lambda(Type delegateType, Expression body, IEnumerable<ParameterExpression>? parameters) 825public static LambdaExpression Lambda(Type delegateType, Expression body, bool tailCall, IEnumerable<ParameterExpression>? parameters) 859Type[] typeArgs = new Type[paramCount + 1]; 876Type delegateType = Compiler.DelegateHelpers.MakeDelegateType(typeArgs); 889public static LambdaExpression Lambda(Type delegateType, Expression body, string? name, IEnumerable<ParameterExpression>? parameters) 906public static LambdaExpression Lambda(Type delegateType, Expression body, string? name, bool tailCall, IEnumerable<ParameterExpression>? parameters) 914private static void ValidateLambdaArgs(Type delegateType, ref Expression body, ReadOnlyCollection<ParameterExpression> parameters, string paramName) 926CacheDict<Type, MethodInfo> ldc = s_lambdaDelegateCache; 950Type pType = pi.ParameterType; 991private static TryGetFuncActionArgsResult ValidateTryGetFuncActionArgs(Type[]? typeArgs) 1000Type a = typeArgs[i]; 1021/// Creates a <see cref="System.Type"/> object that represents a generic System.Func delegate type that has specific type arguments. 1024/// <param name="typeArgs">An array of <see cref="System.Type"/> objects that specify the type arguments for the System.Func delegate type.</param> 1027public static Type GetFuncType(params Type[]? typeArgs) 1039Type result = Compiler.DelegateHelpers.GetFuncType(typeArgs); 1050/// Creates a <see cref="System.Type"/> object that represents a generic System.Func delegate type that has specific type arguments. 1053/// <param name="typeArgs">An array of <see cref="System.Type"/> objects that specify the type arguments for the System.Func delegate type.</param> 1057public static bool TryGetFuncType(Type[] typeArgs, [NotNullWhen(true)] out Type? funcType) 1069/// Creates a <see cref="System.Type"/> object that represents a generic System.Action delegate type that has specific type arguments. 1071/// <param name="typeArgs">An array of <see cref="System.Type"/> objects that specify the type arguments for the System.Action delegate type.</param> 1074public static Type GetActionType(params Type[]? typeArgs) 1086Type result = Compiler.DelegateHelpers.GetActionType(typeArgs); 1097/// Creates a <see cref="System.Type"/> object that represents a generic System.Action delegate type that has specific type arguments. 1099/// <param name="typeArgs">An array of <see cref="System.Type"/> objects that specify the type arguments for the System.Action delegate type.</param> 1103public static bool TryGetActionType(Type[] typeArgs, [NotNullWhen(true)] out Type? actionType) 1115/// Gets a <see cref="System.Type"/> object that represents a generic System.Func or System.Action delegate type that has specific type arguments. 1119/// <param name="typeArgs">An array of <see cref="System.Type"/> objects that specify the type arguments of the delegate type.</param> 1125public static Type GetDelegateType(params Type[] typeArgs)
System\Linq\Expressions\ListInitExpression.cs (2)
39/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 40public sealed override Type Type => NewExpression.Type;
System\Linq\Expressions\LoopExpression.cs (2)
25/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 26public sealed override Type Type => BreakLabel == null ? typeof(void) : BreakLabel.Type;
System\Linq\Expressions\MemberAssignment.cs (3)
63Type memberType; 87private static void ValidateSettableFieldOrPropertyMember(MemberInfo member, out Type memberType) 89Type? decType = member.DeclaringType;
System\Linq\Expressions\MemberExpression.cs (6)
100public sealed override Type Type => _field.FieldType; 114public sealed override Type Type => _property.PropertyType; 178[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields)] Type type, 229[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 310Type? type = mi.DeclaringType; 343Type type = method.DeclaringType!;
System\Linq\Expressions\MemberInitExpression.cs (2)
26/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 27public sealed override Type Type => NewExpression.Type;
System\Linq\Expressions\MemberListBinding.cs (2)
84Type memberType; 121private static void ValidateListInitArgs(Type listType, ReadOnlyCollection<ElementInit> initializers, string listTypeParamName)
System\Linq\Expressions\MemberMemberBinding.cs (4)
84Type memberType; 123private static void ValidateGettableFieldOrPropertyMember(MemberInfo member, out Type memberType) 125Type? decType = member.DeclaringType; 153private static void ValidateMemberInitArgs(Type type, ReadOnlyCollection<MemberBinding> bindings)
System\Linq\Expressions\MethodCallExpression.cs (13)
35/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 36public sealed override Type Type => Method.ReturnType; 1142public static MethodCallExpression Call(Expression instance, string methodName, Type[]? typeArguments, params Expression[]? arguments) 1167[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type type, 1169Type[]? typeArguments, 1261private static void ValidateCallInstanceType(Type instanceType, MethodInfo method) 1290private static bool TryQuote(Type parameterType, ref Expression argument) 1298[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type type, 1300Type[]? typeArgs, 1356Type argType = arg.Type; 1357Type pType = parms[i].ParameterType; 1373private static MethodInfo? ApplyTypeArgs(MethodInfo m, Type[]? typeArgs) 1414Type arrayType = array.Type;
System\Linq\Expressions\NewArrayExpression.cs (13)
20internal NewArrayExpression(Type type, ReadOnlyCollection<Expression> expressions) 26internal static NewArrayExpression Make(ExpressionType nodeType, Type type, ReadOnlyCollection<Expression> expressions) 42/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 43public sealed override Type Type { get; } 84internal NewArrayInitExpression(Type type, ReadOnlyCollection<Expression> expressions) 100internal NewArrayBoundsExpression(Type type, ReadOnlyCollection<Expression> expressions) 123public static NewArrayExpression NewArrayInit(Type type, params Expression[] initializers) 135public static NewArrayExpression NewArrayInit(Type type, IEnumerable<Expression> initializers) 195/// <param name="type">A <see cref="System.Type"/> that represents the element type of the array.</param> 199public static NewArrayExpression NewArrayBounds(Type type, params Expression[] bounds) 207/// <param name="type">A <see cref="System.Type"/> that represents the element type of the array.</param> 211public static NewArrayExpression NewArrayBounds(Type type, IEnumerable<Expression> bounds) 238Type arrayType;
System\Linq\Expressions\NewExpression.cs (8)
32/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 33public override Type Type => Constructor!.DeclaringType!; 98internal NewValueTypeExpression(Type type, ReadOnlyCollection<Expression> arguments, ReadOnlyCollection<MemberInfo>? members) 104public sealed override Type Type { get; } 198[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type) 245Type memberType; 255Type pType = pi.ParameterType; 313private static void ValidateAnonymousTypeMember(ref MemberInfo member, out Type memberType, string paramName, int index)
System\Linq\Expressions\ParameterExpression.cs (12)
20internal static ParameterExpression Make(Type type, string? name, bool isByRef) 74/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 75public override Type Type => typeof(object); 111internal ByRefParameterExpression(Type type, string? name) 125internal TypedParameterExpression(Type type, string? name) 131public sealed override Type Type { get; } 145public sealed override Type Type => typeof(T); 155public static ParameterExpression Parameter(Type type) 165public static ParameterExpression Variable(Type type) 176public static ParameterExpression Parameter(Type type, string? name) 194public static ParameterExpression Variable(Type type, string? name) 200private static void Validate(Type type, bool allowByRef)
System\Linq\Expressions\RuntimeVariablesExpression.cs (2)
28/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 29public sealed override Type Type => typeof(IRuntimeVariables);
System\Linq\Expressions\Strings.cs (1)
16internal static string LiftingInExpressionRequiresDynamicCode(Type type)
System\Linq\Expressions\SwitchExpression.cs (8)
18internal SwitchExpression(Type type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, ReadOnlyCollection<SwitchCase> cases) 30/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 31public sealed override Type Type { get; } 150public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params SwitchCase[]? cases) 177public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<SwitchCase>? cases) 186Type resultType; 227Type rightOperandType = c.TestValues[i].Type; 294private static void ValidateSwitchCaseType(Expression @case, bool customType, Type resultType, string parameterName)
System\Linq\Expressions\TryExpression.cs (5)
24internal TryExpression(Type type, Expression body, Expression? @finally, Expression? fault, ReadOnlyCollection<CatchBlock> handlers) 36/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 37public sealed override Type Type { get; } 153public static TryExpression MakeTry(Type? type, Expression body, Expression? @finally, Expression? fault, IEnumerable<CatchBlock>? handlers) 182private static void ValidateTryAndCatchHaveSameType(Type? type, Expression tryBody, ReadOnlyCollection<CatchBlock> handlers)
System\Linq\Expressions\TypeBinaryExpression.cs (9)
17internal TypeBinaryExpression(Expression expression, Type typeOperand, ExpressionType nodeType) 27/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 28public sealed override Type Type => typeof(bool); 45public Type TypeOperand { get; } 51Type cType = Expression.Type; 116ParameterExpression temp = Expression.Parameter(typeof(Type)); 133Expression.Constant(TypeOperand.GetNonNullableType(), typeof(Type)) 191public static TypeBinaryExpression TypeIs(Expression expression, Type type) 206public static TypeBinaryExpression TypeEqual(Expression expression, Type type)
System\Linq\Expressions\UnaryExpression.cs (26)
18internal UnaryExpression(ExpressionType nodeType, Expression expression, Type type, MethodInfo? method) 29/// <returns>The <see cref="System.Type"/> that represents the static type of the expression.</returns> 30public sealed override Type Type { get; } 303public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type) 318public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type, MethodInfo? method) => 359Type operandType = operand.Type; 360Type[] types = new Type[] { operandType }; 361Type nnOperandType = operandType.GetNonNullableType(); 403private static UnaryExpression GetUserDefinedCoercionOrThrow(ExpressionType coercionType, Expression expression, Type convertToType) 413private static UnaryExpression? GetUserDefinedCoercion(ExpressionType coercionType, Expression expression, Type convertToType) 426private static UnaryExpression GetMethodBasedCoercionOperator(ExpressionType unaryType, Expression operand, Type convertToType, MethodInfo method) 687/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 690public static UnaryExpression TypeAs(Expression expression, Type type) 707/// <param name="type">The new <see cref="System.Type"/> of the expression.</param> 709public static UnaryExpression Unbox(Expression expression, Type type) 725/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 729public static UnaryExpression Convert(Expression expression, Type type) 737/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 745public static UnaryExpression Convert(Expression expression, Type type, MethodInfo? method) 765/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 769public static UnaryExpression ConvertChecked(Expression expression, Type type) 777/// <param name="type">A <see cref="System.Type"/> to set the <see cref="Type"/> property equal to.</param> 785public static UnaryExpression ConvertChecked(Expression expression, Type type, MethodInfo? method) 859public static UnaryExpression Rethrow(Type type) 880public static UnaryExpression Throw(Expression? value, Type type)
System\Linq\IQueryable.cs (1)
23Type ElementType { get; }
System\Runtime\CompilerServices\CallSite.cs (12)
54private static volatile CacheDict<Type, Func<CallSiteBinder, CallSite>>? s_siteCtors; 87public static CallSite Create(Type delegateType, CallSiteBinder binder) 93CacheDict<Type, Func<CallSiteBinder, CallSite>>? ctors = s_siteCtors; 97s_siteCtors = ctors = new CacheDict<Type, Func<CallSiteBinder, CallSite>>(100); 286Type target = typeof(T); 290&& target.IsGenericType && IsSimpleSignature(invoke, out Type[] args)) 334private static bool IsSimpleSignature(MethodInfo invoke, out Type[] sig) 339Type[] args = new Type[invoke.ReturnType != typeof(void) ? pis.Length : pis.Length - 1]; 362Type returnType = invoke.GetReturnType(); 370Type[] typeArgs = new[] { typeof(T) }; 684private static Expression Convert(Expression arg, Type type)
System\Runtime\CompilerServices\CallSiteBinder.cs (4)
24internal Dictionary<Type, object>? Cache; 52Type target = typeof(T); 155Type siteType = typeof(CallSite<T>); 207Interlocked.CompareExchange(ref Cache, new Dictionary<Type, object>(), null);
System\Runtime\CompilerServices\CallSiteHelpers.cs (1)
14private static readonly Type s_knownNonDynamicMethodType = typeof(object).GetMethod(nameof(ToString))!.GetType();
System.Linq.Queryable (50)
System\Linq\EnumerableExecutor.cs (1)
21Type execType = typeof(EnumerableExecutor<>).MakeGenericType(expression.Type);
System\Linq\EnumerableQuery.cs (6)
20internal static IQueryable Create(Type elementType, IEnumerable sequence) 22Type seqType = typeof(EnumerableQuery<>).MakeGenericType(elementType); 28internal static IQueryable Create(Type elementType, Expression expression) 30Type seqType = typeof(EnumerableQuery<>).MakeGenericType(elementType); 61Type IQueryable.ElementType => typeof(T); 67Type? iqType = TypeHelper.FindGenericType(typeof(IQueryable<>), expression.Type);
System\Linq\EnumerableRewriter.cs (37)
22private Dictionary<Type, Type>? _equivalentTypeCache; 37Type[]? typeArgs = (mInfo.IsGenericMethod) ? mInfo.GetGenericArguments() : null; 91private static Expression FixupQuotedExpression(Type type, Expression expression) 104Type strippedType = StripExpression(expr.Type); 107Type elementType = type.GetElementType()!; 122private static Type GetPublicType(Type t) 133foreach (Type iType in t.GetInterfaces()) 146private Type GetEquivalentType(Type type) 148Type? equiv; 152_equivalentTypeCache ??= new Dictionary<Type, Type> 159Type pubType = GetPublicType(type); 162Type genericType = pubType.GetGenericTypeDefinition(); 179Type? typeArg = singleTypeGenInterfacesWithGetType 207Type t = GetPublicType(sq.Enumerable.GetType()); 218private static MethodInfo FindEnumerableMethodForQueryable(string name, ReadOnlyCollection<Expression> args, params Type[]? typeArgs) 236static MethodInfo[] GetEnumerableStaticMethods(Type type) => 284Type leftParam = left[i].ParameterType; 285Type rightParam = right[i].ParameterType; 297private static MethodInfo FindMethod(Type type, string name, ReadOnlyCollection<Expression> args, Type[]? typeArgs) 313private static bool ArgsMatch(MethodInfo m, ReadOnlyCollection<Expression> args, Type[]? typeArgs) 335static ParameterInfo[] GetConstrutedGenericParameters(MethodInfo method, Type[] genericTypes) => 340Type parameterType = mParams[i].ParameterType; 363private static Type StripExpression(Type type) 366Type tmp = isArray ? type.GetElementType()! : type; 367Type? eType = TypeHelper.FindGenericType(typeof(Expression<>), tmp); 380Type type = c.Type; 386Type trueType = ifTrue.Type; 387Type falseType = ifFalse.Type; 397Type type = node.Type; 409Type type = node.Value!.Type; 429Type type = node!.Type;
System\Linq\Queryable.cs (1)
36Type? enumType = TypeHelper.FindGenericType(typeof(IEnumerable<>), source.GetType());
System\Linq\TypeHelper.cs (5)
16internal static Type? FindGenericType(Type definition, Type type) 27foreach (Type itype in type.GetInterfaces()) 29Type? found = FindGenericType(definition, itype);
System.Memory.Data (3)
System\BinaryData.cs (2)
90public BinaryData(object? jsonSerializable, JsonSerializerOptions? options = default, Type? type = default) : this( 107public BinaryData(object? jsonSerializable, JsonSerializerContext context, Type? type = default) : this(
System\BinaryDataConverter.cs (1)
18public override BinaryData? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System.Net.Http.Json (23)
System\Net\Http\Json\HttpClientJsonExtensions.cs (2)
19private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 27private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Delete.cs (6)
33public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 48public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 91public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 104public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 144public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, CancellationToken cancellationToken = default) => 158public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Get.cs (6)
23public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 28public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 41public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 44public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 55public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, CancellationToken cancellationToken = default) => 60public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpContentJsonExtensions.cs (5)
30public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) 49public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, CancellationToken cancellationToken = default) 90private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken) 108public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) 128private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerContext context, CancellationToken cancellationToken)
System\Net\Http\Json\JsonContent.cs (3)
19public Type ObjectType => _typeInfo.Type; 66public static JsonContent Create(object? inputValue, Type inputType, MediaTypeHeaderValue? mediaType = null, JsonSerializerOptions? options = null) 165private static void EnsureTypeCompatibility(object? inputValue, Type inputType)
System\Net\Http\Json\JsonHelpers.cs (1)
17internal static JsonTypeInfo GetJsonTypeInfo(Type type, JsonSerializerOptions? options)
System.Net.Quic (3)
System\Net\Quic\QuicConnection.cs (1)
643[UnmanagedCallersOnly(CallConvs = new Type[] { typeof(CallConvCdecl) })]
System\Net\Quic\QuicListener.cs (1)
367[UnmanagedCallersOnly(CallConvs = new Type[] { typeof(CallConvCdecl) })]
System\Net\Quic\QuicStream.cs (1)
657[UnmanagedCallersOnly(CallConvs = new Type[] { typeof(CallConvCdecl) })]
System.Net.Requests (1)
System\Net\HttpWebRequest.cs (1)
1680FieldInfo? fi = Type.GetType("System.Net.Http.HttpConnectionSettings, System.Net.Http")?.GetField("_impersonationLevel", BindingFlags.NonPublic | BindingFlags.Instance);
System.Net.Security (22)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (22)
92Type? socketsHttpHandlerType = Type.GetType("System.Net.Http.SocketsHttpHandler, System.Net.Http", throwOnError: false); 93Type? httpMessageHandlerType = Type.GetType("System.Net.Http.HttpMessageHandler, System.Net.Http", throwOnError: false); 94Type? httpClientType = Type.GetType("System.Net.Http.HttpClient, System.Net.Http", throwOnError: false); 95Type? httpRequestMessageType = Type.GetType("System.Net.Http.HttpRequestMessage, System.Net.Http", throwOnError: false); 96Type? httpResponseMessageType = Type.GetType("System.Net.Http.HttpResponseMessage, System.Net.Http", throwOnError: false); 97Type? httpResponseHeadersType = Type.GetType("System.Net.Http.Headers.HttpResponseHeaders, System.Net.Http", throwOnError: false); 98Type? httpContentType = Type.GetType("System.Net.Http.HttpContent, System.Net.Http", throwOnError: false); 99Type? taskOfHttpResponseMessageType = Type.GetType("System.Threading.Tasks.Task`1[[System.Net.Http.HttpResponseMessage, System.Net.Http]], System.Runtime", throwOnError: false); 109ConstructorInfo? socketsHttpHandlerCtor = socketsHttpHandlerType.GetConstructor(Type.EmptyTypes); 112ConstructorInfo? httpClientCtor = httpClientType.GetConstructor(new Type[] { httpMessageHandlerType }); 114ConstructorInfo? httpRequestMessageCtor = httpRequestMessageType.GetConstructor(Type.EmptyTypes); 115MethodInfo? sendMethod = httpClientType.GetMethod("Send", new Type[] { httpRequestMessageType, typeof(CancellationToken) }); 116MethodInfo? sendAsyncMethod = httpClientType.GetMethod("SendAsync", new Type[] { httpRequestMessageType, typeof(CancellationToken) }); 122MethodInfo? readAsStreamMethod = httpContentType.GetMethod("ReadAsStream", Type.EmptyTypes);
System.Net.WebProxy (1)
System\Net\IWebProxyScript.cs (1)
9bool Load(Uri scriptLocation, string script, Type helperType);
System.Numerics.Tensors (1)
System\ThrowHelper.cs (1)
44internal static void ThrowInvalidTypeWithPointersNotSupported(Type targetType)
System.ObjectModel (8)
System\ComponentModel\TypeConverterAttribute.cs (2)
35public TypeConverterAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) 55/// Gets the fully qualified type name of the <see cref='System.Type'/> to use as a
System\ComponentModel\TypeDescriptionProviderAttribute.cs (1)
24public TypeDescriptionProviderAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type type)
System\Reflection\ICustomTypeProvider.cs (1)
8Type GetCustomType();
System\Windows\Markup\ValueSerializerAttribute.cs (4)
20private Type? _valueSerializerType; 28public ValueSerializerAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type valueSerializerType) 46public Type ValueSerializerType 52_valueSerializerType = Type.GetType(_valueSerializerTypeName);
System.Private.CoreLib (2005)
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (4)
310Type? delegateType; 322delegateType = Type.GetType(delegateTypeName, resolver, null, throwOnError: true)!; 326Type type = Type.GetType(typeName, resolver, null, throwOnError: true)!;
src\libraries\System.Private.CoreLib\src\System\Activator.cs (5)
25public static object? CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.PublicConstructors)] Type type, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture) => 30public static object? CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type, params object?[]? args) => 35public static object? CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type, object?[]? args, object?[]? activationAttributes) => 40public static object? CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type type) => 55Type t = assembly.GetType(typeName, throwOnError: true, ignoreCase)!;
src\libraries\System.Private.CoreLib\src\System\Activator.RuntimeType.cs (4)
21public static object? CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.PublicConstructors)] Type type, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture, object?[]? activationAttributes) 90public static object? CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type, bool nonPublic) => 93internal static object? CreateInstance(Type type, bool nonPublic, bool wrapExceptions) 129Type? type = assembly.GetType(typeName, throwOnError: true, ignoreCase);
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (4)
412Type type = Type.GetType("System.Security.Principal.GenericPrincipal, System.Security.Claims", throwOnError: true)!; 426Type type = Type.GetType("System.Security.Principal.WindowsPrincipal, System.Security.Principal.Windows", throwOnError: true)!;
src\libraries\System.Private.CoreLib\src\System\Array.cs (16)
75public static unsafe Array CreateInstance(Type elementType, int length) 89public static unsafe Array CreateInstance(Type elementType, int length1, int length2) 105public static unsafe Array CreateInstance(Type elementType, int length1, int length2, int length3) 121public static unsafe Array CreateInstance(Type elementType, params int[] lengths) 146public static unsafe Array CreateInstance(Type elementType, int[] lengths, int[] lowerBounds) 175public static Array CreateInstance(Type elementType, params long[] lengths) 198/// <returns>A new one-dimensional <see cref="Array"/> of the specified <see cref="Type"/> with the specified length.</returns> 205/// <remarks>When the array type is readily available, this method should be preferred over <see cref="CreateInstance(Type, int)"/>, as it has 207public static unsafe Array CreateInstanceFromArrayType(Type arrayType, int length) 226/// Creates a multidimensional <see cref="Array"/> of the specified <see cref="Type"/> and dimension lengths, with zero-based indexing. 242/// <remarks>When the array type is readily available, this method should be preferred over <see cref="CreateInstance(Type, int[])"/>, as it has 244public static unsafe Array CreateInstanceFromArrayType(Type arrayType, params int[] lengths) 272/// Creates a multidimensional <see cref="Array"/> of the specified <see cref="Type"/> and dimension lengths, with the specified lower bounds. 277/// <returns>A new multidimensional <see cref="Array"/> of the specified <see cref="Type"/> with the specified length and lower bound for each dimension.</returns> 294/// <remarks>When the array type is readily available, this method should be preferred over <see cref="CreateInstance(Type, int[], int[])"/>, as it has 296public static unsafe Array CreateInstanceFromArrayType(Type arrayType, int[] lengths, int[] lowerBounds)
src\libraries\System.Private.CoreLib\src\System\Attribute.cs (3)
29Type thisType = this.GetType(); 57Type type = GetType(); 97Type thisValueType = thisValue.GetType();
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
401object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
252object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
587object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (6)
681public virtual Array ToArray(Type type) 1060public override Array ToArray(Type type) 1453public override Array ToArray(Type type) 1836public override Array ToArray(Type type) 2088public override Array ToArray(Type type) 2533public override Array ToArray(Type type)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\EqualityComparer.cs (1)
246if (Type.GetTypeCode(typeof(T)) != TypeCode.Int32)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (2)
209Type targetType = array.GetType().GetElementType()!; 210Type sourceType = typeof(T);
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (2)
139Type targetType = array.GetType().GetElementType()!; 140Type sourceType = typeof(T);
src\libraries\System.Private.CoreLib\src\System\ComponentModel\DefaultValueAttribute.cs (6)
38[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 77[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type typeToConvert, 86Type? typeDescriptorType = Type.GetType("System.ComponentModel.TypeDescriptor, System.ComponentModel.TypeConverter", throwOnError: false); 88s_convertFromInvariantString = mi == null ? new object() : mi.CreateDelegate<Func<Type, string, object>>(); 91if (!(s_convertFromInvariantString is Func<Type, string?, object> convertFromInvariantString))
src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
168internal static object DefaultToType(IConvertible value, Type targetType, IFormatProvider? provider) 223public static object? ChangeType(object? value, Type conversionType) 229public static object? ChangeType(object? value, Type conversionType, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
2011object IConvertible.ToType(Type type, IFormatProvider? provider) => Convert.DefaultToType(this, type, provider);
src\libraries\System.Private.CoreLib\src\System\DBNull.cs (1)
112object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1104object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (41)
76Type[] paramArrayTypes = new Type[candidates.Length]; 78Type[] argTypes = new Type[args.Length]; 96Type? paramArrayType; 186Type pCls; 207if (defaultValueBinding && args[index] == Type.Missing) 460Type valueType; 471Type pCls = candidates[i].FieldType; 540public sealed override MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers) 545Type[] realTypes = new Type[types.Length]; 570Type pCls = par[j].ParameterType; 576Type? type = types[j]; 633public sealed override PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, 634Type[]? indexes, ParameterModifier[]? modifiers) 639foreach (Type index in indexes) 665Type pCls = par[j].ParameterType; 750public override object ChangeType(object value, Type type, CultureInfo? cultureInfo) 791public static MethodBase? ExactBinding(MethodBase[] match, Type[] types) 808Type pCls = par[j].ParameterType; 833public static PropertyInfo? ExactPropertyBinding(PropertyInfo[] match, Type? returnType, Type[]? types) 845Type pCls = par[j].ParameterType; 864private static int FindMostSpecific(ReadOnlySpan<ParameterInfo> p1, int[] paramOrder1, Type? paramArrayType1, 865ReadOnlySpan<ParameterInfo> p2, int[] paramOrder2, Type? paramArrayType2, 866Type[] types, object?[]? args) 879if (args != null && args[i] == Type.Missing) 882Type c1, c2; 941private static int FindMostSpecificType(Type c1, Type c2, Type? t) 1014private static int FindMostSpecificMethod(MethodBase m1, int[] paramOrder1, Type? paramArrayType1, 1015MethodBase m2, int[] paramOrder2, Type? paramArrayType2, 1016Type[] types, object?[]? args) 1115private static int GetHierarchyDepth(Type t) 1119Type? currentType = t; 1232internal static bool CanChangePrimitive(Type? source, Type? target) 1238Primitives widerCodes = PrimitiveConversions[(int)(Type.GetTypeCode(source))]; 1239Primitives targetCode = (Primitives)(1 << (int)(Type.GetTypeCode(target)));
src\libraries\System.Private.CoreLib\src\System\Delegate.cs (8)
55public static Delegate CreateDelegate(Type type, object? firstArgument, MethodInfo method) => CreateDelegate(type, firstArgument, method, throwOnBindFailure: true)!; 58public static Delegate CreateDelegate(Type type, MethodInfo method) => CreateDelegate(type, method, throwOnBindFailure: true)!; 62public static Delegate CreateDelegate(Type type, object target, string method) => CreateDelegate(type, target, method, ignoreCase: false, throwOnBindFailure: true)!; 64public static Delegate CreateDelegate(Type type, object target, string method, bool ignoreCase) => CreateDelegate(type, target, method, ignoreCase, throwOnBindFailure: true)!; 67public static Delegate CreateDelegate(Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target, string method) => CreateDelegate(type, target, method, ignoreCase: false, throwOnBindFailure: true)!; 68public static Delegate CreateDelegate(Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target, string method, bool ignoreCase) => CreateDelegate(type, target, method, ignoreCase, throwOnBindFailure: true)!;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\DynamicallyAccessedMembersAttribute.cs (3)
7/// Indicates that certain members on a specified <see cref="Type"/> are accessed dynamically, 14/// This attribute is valid on members whose type is <see cref="Type"/> or <see cref="string"/>. 20/// can be accessed dynamically on <see cref="Type"/> instances returned from calling
src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\DynamicDependencyAttribute.cs (8)
35/// with the specified signature of a member on a <see cref="System.Type"/>. 38/// <param name="type">The <see cref="System.Type"/> containing <paramref name="memberSignature"/>.</param> 39public DynamicDependencyAttribute(string memberSignature, Type type) 61/// with the specified types of members on a <see cref="System.Type"/>. 64/// <param name="type">The <see cref="System.Type"/> containing the specified members.</param> 65public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, Type type) 105/// Gets the <see cref="System.Type"/> containing the specified member. 111public Type? Type { get; }
src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\FeatureGuardAttribute.cs (2)
30public FeatureGuardAttribute(Type featureType) 38public Type FeatureType { get; }
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (6)
45private readonly Type _typeWithContracts; 47public ContractClassAttribute(Type typeContainingContracts) 52public Type TypeContainingContracts => _typeWithContracts; 62private readonly Type _typeIAmAContractFor; 64public ContractClassForAttribute(Type typeContractsAreFor) 69public Type TypeContractsAreFor => _typeIAmAContractFor;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebuggerDisplayAttribute.cs (2)
18private Type? _target; 33public Type? Target
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebuggerTypeProxyAttribute.cs (3)
11private Type? _target; 14[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 32public Type? Target
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebuggerVisualizerAttribute.cs (7)
15private Type? _target; 33[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type visualizerObjectSource) 42[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type visualizer) 50[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type visualizer, 51[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type visualizerObjectSource) 61[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type visualizer, 78public Type? Target
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DiagnosticMethodInfo.cs (1)
33Type? declaringType = _method.DeclaringType;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackFrame.cs (1)
213Type[] typars = methodInfo.GetGenericArguments();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (6)
240Type? declaringType = mb.DeclaringType; 270Type[] typars = mi.GetGenericArguments(); 395Type? declaringType = mb.DeclaringType; 414private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type declaringType) 421Type? parentType = declaringType.DeclaringType; 430static MethodInfo[]? GetDeclaredMethods(Type type) =>
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (5)
244internal Type ParameterType; 247internal void SetInfo(string name, Type type, TraceLoggingTypeInfo? typeInfo = null) 483internal static bool GetTypeInfoFromType(Type? type, out TraceLoggingTypeInfo? typeInfo) 651private static TypeCode GetTypeCodeExtended(Type parameterType) 667return Type.GetTypeCode(parameterType);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipePayloadDecoder.cs (2)
29Type parameterType = parameters[i].ParameterType; 30Type? enumType = parameterType.IsEnum ? Enum.GetUnderlyingType(parameterType) : null;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
421Type underlyingType = Enum.GetUnderlyingType(data.GetType());
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (34)
303public static Guid GetGuid(Type eventSourceType) 332public static string GetName(Type eventSourceType) 355Type eventSourceType, 378Type eventSourceType, 695Type myType = this.GetType(); 1671private static string GetName(Type eventSourceType, EventManifestOptions flags) 1702private static unsafe void DecodeObjects(object?[] decodedObjects, Type[] parameterTypes, EventData* data) 1707Type dataType = parameterTypes[i]; 1721TypeCode typeCode = Type.GetTypeCode(dataType); 2042Type pType = infos[i].ParameterType; 2167new TraceLoggingEventTypes(EventName, EventTags.None, new Type[] { typeof(string) }); 2485private Type[]? _parameterTypes; 2486public Type[] ParameterTypes 2492static Type[] GetParameterTypes(ParameterInfo[] parameters) 2494var types = new Type[parameters.Length]; 2916Type attributeType, 2947Type attributeType, 3009private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAttributeType) 3023private static Type? GetEventSourceBaseType(Type eventSourceType, bool allowEventSourceOverride, bool reflectionOnly) 3025Type? ret = eventSourceType; 3065Type eventSourceType, 3135Type? nestedType = eventSourceType.GetNestedType(providerEnumKind); 3400Type staticFieldType = staticField.FieldType; 3469Type dataType = parameter.ParameterType; 3475(dataType.IsEnum && Type.GetTypeCode(dataType.GetEnumUnderlyingType()) <= TypeCode.UInt32)) 5357public void AddEventParameter(Type type, string name) 5385mapsTab ??= new Dictionary<string, Type>(); 5543static FieldInfo[] GetEnumFields(Type localEnumType) 5552foreach (Type enumType in mapsTab.Values) 5865private string GetTypeName(Type type) 5880switch (Type.GetTypeCode(type)) 6032private Dictionary<string, Type>? mapsTab;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\ArrayTypeInfo.cs (1)
10public ArrayTypeInfo(Type type, TraceLoggingTypeInfo elementInfo)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EnumerableTypeInfo.cs (1)
13public EnumerableTypeInfo(Type type, TraceLoggingTypeInfo elementInfo)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\InvokeTypeInfo.cs (1)
18Type type,
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (4)
103public static Func<object?, PropertyValue> GetFactory(Type type) 174Type type = property.PropertyType; 205protected static Delegate GetGetMethod(PropertyInfo property, Type propertyType) 218Type type = property.PropertyType;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (5)
64Type type, 123Type type, 315public NullableTypeInfo(Type type, List<Type> recursionCheck) 318Type[] typeArgs = type.GenericTypeArguments;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (13)
329Type attributeType) 346public static AttributeType? GetCustomAttribute<AttributeType>(Type type) 358public static Type? FindEnumerableElementType( 360Type type) 362Type? elementType = null; 370Type[] ifaceTypes = type.FindInterfaces(IsGenericMatch, typeof(IEnumerable<>)); 372foreach (Type ifaceType in ifaceTypes) 388public static bool IsGenericMatch(Type type, object? openType) 390return type.IsGenericType && type.GetGenericTypeDefinition() == (Type?)openType; 395Type dataType, 396List<Type> recursionCheck) 417Type elementType = dataType.GetElementType()!; 578Type? elementType = FindEnumerableElementType(dataType);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventTypes.cs (4)
49params Type[] types) 178var recursionCheck = new List<Type>(paramInfos.Length); 189private static TraceLoggingTypeInfo[] MakeArray(Type[] types) 193var recursionCheck = new List<Type>(types.Length);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingTypeInfo.cs (10)
21private readonly Type dataType; 24internal TraceLoggingTypeInfo(Type dataType) 34Type dataType, 86internal Type DataType => this.dataType; 138private static Dictionary<Type, TraceLoggingTypeInfo>? threadCache; 141public static TraceLoggingTypeInfo GetInstance(Type type, List<Type>? recursionCheck) 143Dictionary<Type, TraceLoggingTypeInfo> cache = threadCache ??= new Dictionary<Type, TraceLoggingTypeInfo>(); 147recursionCheck ??= new List<Type>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (3)
24Type dataType, 26List<Type> recursionCheck) 54Type propertyType = propertyInfo.PropertyType;
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
522object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (42)
62Type underlyingType = typeof(TEnum).GetEnumUnderlyingType(); 89public static string? GetName(Type enumType, object value) 107Type underlyingType = enumType.GetEnumUnderlyingType(); 108switch (Type.GetTypeCode(underlyingType)) // can't use InternalGetCorElementType as enumType may actually be the underlying type 226Type underlyingType = typeof(TEnum).GetEnumUnderlyingType(); 250public static string[] GetNames(Type enumType) 283public static Type GetUnderlyingType(Type enumType) 309public static Array GetValues(Type enumType) 334public static Array GetValuesAsUnderlyingType(Type enumType) 477Type underlyingType = typeof(TEnum).GetEnumUnderlyingType(); 521public static bool IsDefined(Type enumType, object value) 550public static object Parse(Type enumType, string value) => 562public static object Parse(Type enumType, ReadOnlySpan<char> value) => 578public static object Parse(Type enumType, string value, bool ignoreCase) 603public static object Parse(Type enumType, ReadOnlySpan<char> value, bool ignoreCase) 674public static bool TryParse(Type enumType, string? value, [NotNullWhen(true)] out object? result) => 682public static bool TryParse(Type enumType, ReadOnlySpan<char> value, [NotNullWhen(true)] out object? result) => 694public static bool TryParse(Type enumType, string? value, bool ignoreCase, [NotNullWhen(true)] out object? result) 714public static bool TryParse(Type enumType, ReadOnlySpan<char> value, bool ignoreCase, [NotNullWhen(true)] out object? result) => 718private static unsafe bool TryParse(Type enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, [NotNullWhen(true)] out object? result) 894Type underlyingType = typeof(TEnum).GetEnumUnderlyingType(); 1003Type underlyingType = GetUnderlyingType(enumType); 1152Type valueType = value.GetType(); 1626public static string Format(Type enumType, object value, [StringSyntax(StringSyntaxAttribute.EnumFormat)] string format) 1633Type valueType = value.GetType(); 1649Type underlyingType = GetUnderlyingType(rtType); 1752Type underlyingType = typeof(TEnum).GetEnumUnderlyingType(); 1811Type underlyingType = typeof(TEnum).GetEnumUnderlyingType(); 2127private static RuntimeType ValidateRuntimeType(Type enumType) 2148private static void ThrowInvalidRuntimeType(Type enumType) => 2193object IConvertible.ToType(Type type, IFormatProvider? provider) => Convert.DefaultToType(this, type, provider); 2195public static object ToObject(Type enumType, object value) 2215Type valueType = value.GetType(); 2228public static object ToObject(Type enumType, sbyte value) => 2231public static object ToObject(Type enumType, short value) => 2234public static object ToObject(Type enumType, int value) => 2237public static object ToObject(Type enumType, byte value) => 2241public static object ToObject(Type enumType, ushort value) => 2245public static object ToObject(Type enumType, uint value) => 2248public static object ToObject(Type enumType, long value) => 2252public static object ToObject(Type enumType, ulong value) =>
src\libraries\System.Private.CoreLib\src\System\Exception.cs (1)
202public new Type GetType() => base.GetType();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
676public virtual object? GetFormat(Type? formatType)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
320public object? GetFormat(Type? formatType)
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (1)
783public object? GetFormat(Type? formatType)
src\libraries\System.Private.CoreLib\src\System\IConvertible.cs (1)
59object ToType(Type conversionType, IFormatProvider? provider);
src\libraries\System.Private.CoreLib\src\System\IFormatProvider.cs (1)
12object? GetFormat(Type? formatType);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
255object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
264object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
261object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\MulticastDelegate.cs (1)
24protected MulticastDelegate([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target, string method) : base(target, method)
src\libraries\System.Private.CoreLib\src\System\Nullable.cs (3)
103public static Type? GetUnderlyingType(Type nullableType) 110Type genericType = nullableType.GetGenericTypeDefinition();
src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (1)
70public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (17)
31Type[] types = GetTypes(); 46public virtual Type[] GetTypes() 55Type[][] moduleTypes = new Type[m.Length][]; 64Type[] ret = new Type[finalLength]; 75public virtual IEnumerable<Type> ExportedTypes 81public virtual Type[] GetExportedTypes() { throw NotImplemented.ByDesign; } 83public virtual Type[] GetForwardedTypes() { throw NotImplemented.ByDesign; } 101public virtual Stream? GetManifestResourceStream(Type type, string name) { throw NotImplemented.ByDesign; } 109public virtual Type? GetType(string name) => GetType(name, throwOnError: false, ignoreCase: false); 111public virtual Type? GetType(string name, bool throwOnError) => GetType(name, throwOnError: throwOnError, ignoreCase: false); 113public virtual Type? GetType(string name, bool throwOnError, bool ignoreCase) { throw NotImplemented.ByDesign; } 115public virtual bool IsDefined(Type attributeType, bool inherit) { throw NotImplemented.ByDesign; } 121public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) { throw NotImplemented.ByDesign; } 136Type? t = GetType(typeName, throwOnError: false, ignoreCase: ignoreCase); 210public static Assembly? GetAssembly(Type type)
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyName.cs (3)
169Type readerType = Type.GetType( 177new Type[] { typeof(string) },
src\libraries\System.Private.CoreLib\src\System\Reflection\Binder.cs (4)
13public abstract object ChangeType(object value, Type type, CultureInfo? culture); 15public abstract MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers); 16public abstract PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, Type[]? indexes, ParameterModifier[]? modifiers);
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (1)
21/// <see cref="Type.Missing"/> is specified. In addition, the target constructor may be inlined for performance and not
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeData.cs (1)
84public virtual Type AttributeType => Constructor.DeclaringType!;
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeExtensions.cs (18)
11public static Attribute? GetCustomAttribute(this Assembly element, Type attributeType) 15public static Attribute? GetCustomAttribute(this Module element, Type attributeType) 19public static Attribute? GetCustomAttribute(this MemberInfo element, Type attributeType) 23public static Attribute? GetCustomAttribute(this ParameterInfo element, Type attributeType) 45public static Attribute? GetCustomAttribute(this MemberInfo element, Type attributeType, bool inherit) 49public static Attribute? GetCustomAttribute(this ParameterInfo element, Type attributeType, bool inherit) 93public static IEnumerable<Attribute> GetCustomAttributes(this Assembly element, Type attributeType) 97public static IEnumerable<Attribute> GetCustomAttributes(this Module element, Type attributeType) 101public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element, Type attributeType) 105public static IEnumerable<Attribute> GetCustomAttributes(this ParameterInfo element, Type attributeType) 127public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element, Type attributeType, bool inherit) 131public static IEnumerable<Attribute> GetCustomAttributes(this ParameterInfo element, Type attributeType, bool inherit) 147public static bool IsDefined(this Assembly element, Type attributeType) 151public static bool IsDefined(this Module element, Type attributeType) 155public static bool IsDefined(this MemberInfo element, Type attributeType) 159public static bool IsDefined(this ParameterInfo element, Type attributeType) 164public static bool IsDefined(this MemberInfo element, Type attributeType, bool inherit) 168public static bool IsDefined(this ParameterInfo element, Type attributeType, bool inherit)
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs (2)
20Type type = memberInfo switch 62internal Type ArgumentType =>
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeTypedArgument.cs (6)
16private readonly Type _argumentType; 18public CustomAttributeTypedArgument(Type argumentType, object? value) 54if (ArgumentType == typeof(Type)) 55return $"typeof({((Type)Value!).FullName})"; 60Type elementType = ArgumentType.GetElementType()!; 96public Type ArgumentType => _argumentType;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\AssemblyBuilder.cs (2)
63public override Type[] GetExportedTypes() => 83public override Stream? GetManifestResourceStream(Type type, string name) =>
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ConstructorOnTypeBuilderInstantiation.cs (6)
31internal override Type[] GetParameterTypes() 40public override Type? DeclaringType => _type; 41public override Type? ReflectedType => _type; 43public override object[] GetCustomAttributes(Type attributeType, bool inherit) { return _ctor.GetCustomAttributes(attributeType, inherit); } 44public override bool IsDefined(Type attributeType, bool inherit) { return _ctor.IsDefined(attributeType, inherit); } 59public override Type[] GetGenericArguments() { return _ctor.GetGenericArguments(); }
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (28)
30Type? returnType, 31Type[]? parameterTypes) 46Type? returnType, 47Type[]? parameterTypes, 63Type? returnType, 64Type[]? parameterTypes, 82Type? returnType, 83Type[]? parameterTypes, 104Type? returnType, 105Type[]? parameterTypes, 124Type? returnType, 125Type[]? parameterTypes, 126Type owner) 143Type? returnType, 144Type[]? parameterTypes, 145Type owner, 165Type? returnType, 166Type[]? parameterTypes, 167Type owner, 216Type? returnType, 217Type[]? signature, 218Type? owner, 317public override Type? DeclaringType => null; 319public override Type? ReflectedType => null; 346public override object[] GetCustomAttributes(Type attributeType, bool inherit) 368public override bool IsDefined(Type attributeType, bool inherit) 375public override Type ReturnType => _returnType; 417Type[] parameterTypes = _parameterTypes;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\EmptyCAHolder.cs (2)
10object[] ICustomAttributeProvider.GetCustomAttributes(Type attributeType, bool inherit) => Array.Empty<object>(); 14bool ICustomAttributeProvider.IsDefined(Type attributeType, bool inherit) => false;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\EnumBuilder.cs (5)
20public Type CreateType() 43public override Type MakePointerType() 48public override Type MakeByRefType() 54public override Type MakeArrayType() 60public override Type MakeArrayType(int rank)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\FieldOnTypeBuilderInstantiation.cs (7)
47public override Type? DeclaringType => _type; 48public override Type? ReflectedType => _type; 50public override object[] GetCustomAttributes(Type attributeType, bool inherit) { return _field.GetCustomAttributes(attributeType, inherit); } 51public override bool IsDefined(Type attributeType, bool inherit) { return _field.IsDefined(attributeType, inherit); } 57public override Type[] GetRequiredCustomModifiers() { return _field.GetRequiredCustomModifiers(); } 58public override Type[] GetOptionalCustomModifiers() { return _field.GetOptionalCustomModifiers(); } 68public override Type FieldType => _field.FieldType;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\GenericTypeParameterBuilder.cs (4)
25public void SetBaseTypeConstraint([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? baseTypeConstraint) => SetBaseTypeConstraintCore(baseTypeConstraint); 27protected abstract void SetBaseTypeConstraintCore([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? baseTypeConstraint); 29public void SetInterfaceConstraints(params Type[]? interfaceConstraints) => SetInterfaceConstraintsCore(interfaceConstraints); 31protected abstract void SetInterfaceConstraintsCore(params Type[]? interfaceConstraints);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (26)
43Type? returnType, Type[]? parameterTypes, Type[]? optionalParameterTypes); 45public abstract void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes); 47public abstract void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes); 53public abstract void Emit(OpCode opcode, Type cls); 73public abstract void BeginCatchBlock(Type? exceptionType); 89public virtual void ThrowException([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type excType) 98ConstructorInfo? con = excType.GetConstructor(Type.EmptyTypes); 108private static readonly Type[] s_parameterTypes = new Type[] { typeof(string) }; 114Type consoleType = Type.GetType(ConsoleTypeFullName, throwOnError: true)!; 126Type consoleType = Type.GetType(ConsoleTypeFullName, throwOnError: true)!; 130Type[] parameterTypes = new Type[1]; 131Type cls = localBuilder.LocalType; 154Type consoleType = Type.GetType(ConsoleTypeFullName, throwOnError: true)!; 167Type[] parameterTypes = new Type[1]; 168Type cls = fld.FieldType; 186public virtual LocalBuilder DeclareLocal(Type localType) 191public abstract LocalBuilder DeclareLocal(Type localType, bool pinned);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilder.cs (14)
77public void SetParameters(params Type[] parameterTypes) 80public void SetReturnType(Type? returnType) 83public void SetSignature(Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 84Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 88protected abstract void SetSignatureCore(Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 89Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (11)
12internal static MethodInfo MakeGenericMethod(MethodInfo method, Type[] inst) 24private readonly Type[] _inst; 28internal MethodBuilderInstantiation(MethodInfo method, Type[] inst) 36internal override Type[] GetParameterTypes() 45public override Type? DeclaringType => _method.DeclaringType; 46public override Type? ReflectedType => _method.ReflectedType; 48public override object[] GetCustomAttributes(Type attributeType, bool inherit) { return _method.GetCustomAttributes(attributeType, inherit); } 49public override bool IsDefined(Type attributeType, bool inherit) { return _method.IsDefined(attributeType, inherit); } 63public override Type[] GetGenericArguments() { return _inst; } 89public override MethodInfo MakeGenericMethod(params Type[] arguments) 99public override Type ReturnType => _method.ReturnType;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (12)
20private Type _type; 24internal MethodOnTypeBuilderInstantiation(MethodInfo method, Type type) 43Type t = info.DeclaringType!; 53public override Type? DeclaringType => _type; 54public override Type? ReflectedType => _type; 56public override object[] GetCustomAttributes(Type attributeType, bool inherit) { return _method.GetCustomAttributes(attributeType, inherit); } 57public override bool IsDefined(Type attributeType, bool inherit) { return _method.IsDefined(attributeType, inherit); } 85Type[] args = GetGenericArguments(); 100public override Type[] GetGenericArguments() 106public override MethodInfo MakeGenericMethod(params Type[] typeArgs) 120public override Type ReturnType => _method.ReturnType; 127internal override Type[] GetParameterTypes()
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ModuleBuilder.cs (39)
22public EnumBuilder DefineEnum(string name, TypeAttributes visibility, Type underlyingType) 68protected abstract EnumBuilder DefineEnumCore(string name, TypeAttributes visibility, Type underlyingType); 70public MethodBuilder DefineGlobalMethod(string name, MethodAttributes attributes, Type? returnType, Type[]? parameterTypes) 74Type? returnType, Type[]? parameterTypes) 78Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, 79Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers) 89Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, 90Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers); 100Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) 107Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) 114Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet); 123[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent) 127[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces) 135[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, int typesize) 139[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packsize) 143[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packingSize, int typesize) 151[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, PackingSize packingSize, int typesize); 158public MethodInfo GetArrayMethod(Type arrayClass, string methodName, CallingConventions callingConvention, 159Type? returnType, Type[]? parameterTypes) 167protected abstract MethodInfo GetArrayMethodCore(Type arrayClass, string methodName, 168CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes); 187public abstract int GetTypeMetadataToken(Type type);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (26)
24internal Type _baseType = null!; 43internal static Type? FormCompoundType(string? format, Type baseType, int curIndex) 215internal SymbolType(Type baseType, TypeKind typeKind) 264public override Type MakePointerType() 269public override Type MakeByRefType() 275public override Type MakeArrayType() 281public override Type MakeArrayType(int rank) 319Type baseType; 330Type baseType; 344Type baseType; 365public override Type BaseType => typeof(Array); 369CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 382CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 407public override Type GetInterface(string name, bool ignoreCase) 413public override Type[] GetInterfaces() 432Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 444public override Type[] GetNestedTypes(BindingFlags bindingAttr) 450public override Type GetNestedType(string name, BindingFlags bindingAttr) 474public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) 488Type baseType; 525public override Type? GetElementType() 535public override Type UnderlyingSystemType => this; 542public override object[] GetCustomAttributes(Type attributeType, bool inherit) 547public override bool IsDefined(Type attributeType, bool inherit)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (92)
27public void AddInterfaceImplementation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType) 34protected abstract void AddInterfaceImplementationCore([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType); 37public Type CreateType() 47public ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, Type[]? parameterTypes) 51Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers) 55Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers); 62public EventBuilder DefineEvent(string name, EventAttributes attributes, Type eventtype) 69protected abstract EventBuilder DefineEventCore(string name, EventAttributes attributes, Type eventtype); 71public FieldBuilder DefineField(string fieldName, Type type, FieldAttributes attributes) 74public FieldBuilder DefineField(string fieldName, Type type, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers, 83protected abstract FieldBuilder DefineFieldCore(string fieldName, Type type, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers, 113Type? returnType, Type[]? parameterTypes) 116public MethodBuilder DefineMethod(string name, MethodAttributes attributes, Type? returnType, Type[]? parameterTypes) 120Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 121Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 139Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 140Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers); 159[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent) 163[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces) 171[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, PackingSize packSize, int typeSize); 174[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, int typeSize) 178[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packSize) 182[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packSize, int typeSize) 191CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, 198CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, 207Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 208Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, 224Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 225Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, 228public PropertyBuilder DefineProperty(string name, PropertyAttributes attributes, Type returnType, Type[]? parameterTypes) 232CallingConventions callingConvention, Type returnType, Type[]? parameterTypes) 236Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 237Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 243Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 244Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 254Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 255Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers); 289public void SetParent([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent) 292protected abstract void SetParentCore([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent); 294public override Type MakePointerType() 299public override Type MakeByRefType() 305public override Type MakeArrayType() 311public override Type MakeArrayType(int rank) 319public override Type MakeGenericType(params Type[] typeArguments) 327public static MethodInfo GetMethod(Type type, MethodInfo method) 374public static ConstructorInfo GetConstructor(Type type, ConstructorInfo constructor) 407public static FieldInfo GetField(Type type, FieldInfo field)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (41)
18private Type _genericType; 19private Type[] _typeArguments; 32internal static Type MakeGenericType(Type type, Type[] typeArguments) 41foreach (Type t in typeArguments) 51internal TypeBuilderInstantiation(Type type, Type[] inst) 67public override Type? DeclaringType => _genericType.DeclaringType; 69public override Type? ReflectedType => _genericType.ReflectedType; 77public override Type MakePointerType() 81public override Type MakeByRefType() 85public override Type MakeArrayType() 89public override Type MakeArrayType(int rank) 115private Type Substitute(Type[] substitutes) 117Type[] inst = GetGenericArguments(); 118Type[] instSubstituted = new Type[inst.Length]; 122Type t = inst[i]; 141public override Type? BaseType 151Type? typeBldrBase = _genericType.BaseType; 165protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 171protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 184public override Type GetInterface(string name, bool ignoreCase) { throw new NotSupportedException(); } 187public override Type[] GetInterfaces() { throw new NotSupportedException(); } 196protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 202public override Type[] GetNestedTypes(BindingFlags bindingAttr) { throw new NotSupportedException(); } 205public override Type GetNestedType(string name, BindingFlags bindingAttr) { throw new NotSupportedException(); } 210public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) { throw new NotSupportedException(); } 228public override Type GetElementType() { throw new NotSupportedException(); } 230public override Type UnderlyingSystemType => this; 231public override Type[] GetGenericArguments() { return _typeArguments; } 252public override Type GetGenericTypeDefinition() { return _genericType; } 255public override Type MakeGenericType(params Type[] inst) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); } 256public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) { throw new NotSupportedException(); } 258public override bool IsSubclassOf(Type c) 267public override object[] GetCustomAttributes(Type attributeType, bool inherit) { throw new NotSupportedException(); } 269public override bool IsDefined(Type attributeType, bool inherit) { throw new NotSupportedException(); }
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (8)
251internal static string? ToString(Type type, Format format) 264private void AddElementType(Type type) 281private void AddAssemblyQualifiedName(Type type, Format format) 283Type rootType = type; 289var nestings = new List<Type>(); 290for (Type? t = rootType; t != null; t = t.IsGenericParameter ? null : t.DeclaringType) 295Type enclosingType = nestings[i]; 307Type[] genericArguments = rootType.GetGenericArguments();
src\libraries\System.Private.CoreLib\src\System\Reflection\EventInfo.cs (5)
37Type? cl = EventHandlerType; 38Type mc = typeof(MulticastDelegate); 43public virtual Type? EventHandlerType 49Type del = typeof(Delegate); 52Type c = p[i].ParameterType;
src\libraries\System.Private.CoreLib\src\System\Reflection\ExceptionHandlingClause.cs (1)
17public virtual Type? CatchType => null;
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (2)
392private static FieldAccessorType GetPrimitiveAccessorTypeForInstance(Type fieldType) 419private static FieldAccessorType GetPrimitiveAccessorTypeForStatic(Type fieldType)
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldInfo.cs (5)
17public abstract Type FieldType { get; } 68public void SetValue(object? obj, object? value) => SetValue(obj, value, BindingFlags.Default, Type.DefaultBinder, null); 78public virtual Type GetModifiedFieldType() => throw new NotSupportedException(); 80public virtual Type[] GetOptionalCustomModifiers() { throw NotImplemented.ByDesign; } 81public virtual Type[] GetRequiredCustomModifiers() { throw NotImplemented.ByDesign; }
src\libraries\System.Private.CoreLib\src\System\Reflection\ICustomAttributeProvider.cs (2)
9object[] GetCustomAttributes(Type attributeType, bool inherit); 10bool IsDefined(Type attributeType, bool inherit);
src\libraries\System.Private.CoreLib\src\System\Reflection\InterfaceMapping.cs (2)
8public Type TargetType; // The type implementing the interface 9public Type InterfaceType; // The type representing the interface
src\libraries\System.Private.CoreLib\src\System\Reflection\IntrospectionExtensions.cs (1)
12public static TypeInfo GetTypeInfo(this Type type)
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (11)
26Type[] delegateParameters = new Type[5] { typeof(object), typeof(object), typeof(object), typeof(object), typeof(object) }; 94Type[] delegateParameters = new Type[2] { typeof(object), typeof(Span<object>) }; 151Type[] delegateParameters = new Type[3] { typeof(object), typeof(object), typeof(IntPtr*) }; 199private static void Unbox(ILGenerator il, Type parameterType) 239Type returnType = method.DeclaringType!; 342s_Pointer_Box ??= typeof(Pointer).GetMethod(nameof(Pointer.Box), new[] { typeof(void*), typeof(Type) })!; 346s_Type_GetTypeFromHandle ??= typeof(Type).GetMethod(nameof(Type.GetTypeFromHandle), new[] { typeof(RuntimeTypeHandle) })!;
src\libraries\System.Private.CoreLib\src\System\Reflection\IReflect.cs (6)
15MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers); 44PropertyInfo? GetProperty(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[] types, ParameterModifier[]? modifiers); 52[DynamicallyAccessedMembers(Type.GetAllMembers)] 56[DynamicallyAccessedMembers(Type.GetAllMembers)] 85Type UnderlyingSystemType { get; }
src\libraries\System.Private.CoreLib\src\System\Reflection\LocalVariableInfo.cs (1)
10public virtual Type LocalType { get { Debug.Fail("type must be set!"); return null!; } }
src\libraries\System.Private.CoreLib\src\System\Reflection\MemberInfo.cs (5)
15public abstract Type? DeclaringType { get; } 16public abstract Type? ReflectedType { get; } 25if (this is Type type) 34public abstract bool IsDefined(Type attributeType, bool inherit); 36public abstract object[] GetCustomAttributes(Type attributeType, bool inherit);
src\libraries\System.Private.CoreLib\src\System\Reflection\Metadata\MetadataUpdateHandlerAttribute.cs (3)
13/// The <see cref="Type" /> specified by this attribute should implement static methods matching the signature of one or more 31public MetadataUpdateHandlerAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type handlerType) => 36public Type HandlerType { get; }
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (8)
51public virtual Type[] GetGenericArguments() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 91internal static void AppendParameters(ref ValueStringBuilder sbParamList, Type[] parameterTypes, CallingConventions callingConvention) 97Type t = parameterTypes[i]; 126internal virtual Type[] GetParameterTypes() 131return Type.EmptyTypes; 134Type[] parameterTypes = new Type[paramInfo.Length]; 157Type argumentType = sigType.GetGenericArguments()[0];
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (1)
366if (ReferenceEquals(arg, Type.Missing))
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInfo.cs (5)
16public virtual Type ReturnType => throw NotImplemented.ByDesign; 18public override Type[] GetGenericArguments() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 23public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 29public virtual Delegate CreateDelegate(Type delegateType) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 30public virtual Delegate CreateDelegate(Type delegateType, object? target) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); }
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (1)
22/// <see cref="Type.Missing"/> is specified. In addition, the target method may be inlined for performance and not
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedFunctionPointerType.cs (12)
15private Type[]? _parameterTypes; 16private Type? _returnType; 18internal ModifiedFunctionPointerType(Type unmodifiedType, TypeSignature typeSignature) 24public override Type GetFunctionPointerReturnType() 28Type Initialize() 35public override Type[] GetFunctionPointerParameterTypes() 37return (Type[])(_parameterTypes ?? Initialize()).Clone(); 39Type[] Initialize() 41Type[] parameterTypes = UnmodifiedType.GetFunctionPointerParameterTypes(); 51public override Type[] GetFunctionPointerCallingConventions() 53ArrayBuilder<Type> builder = default; 72foreach (Type type in GetFunctionPointerReturnType().GetOptionalCustomModifiers())
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedGenericType.cs (6)
11private Type[]? _genericArguments; 13internal ModifiedGenericType(Type unmodifiedType, TypeSignature typeSignature) 19public override Type[] GetGenericArguments() 21return (Type[])(_genericArguments ?? Initialize()).Clone(); 23Type[] Initialize() 25Type[] genericArguments = UnmodifiedType.GetGenericArguments();
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedHasElementType.cs (4)
14private Type? _elementType; 16internal ModifiedHasElementType(Type unmodifiedType, TypeSignature typeSignature) 22public override Type? GetElementType() 26Type Initialize()
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (29)
16private readonly Type _unmodifiedType; 18internal ModifiedType(Type unmodifiedType, TypeSignature typeSignature) 29protected static Type Create(Type unmodifiedType, TypeSignature typeSignature) 31Type modifiedType; 51protected Type UnmodifiedType => _unmodifiedType; 56public override Type[] GetRequiredCustomModifiers() 62public override Type[] GetOptionalCustomModifiers() 71public override bool Equals(Type? other) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 75public override Type UnderlyingSystemType => _unmodifiedType; 79public override Type GetGenericTypeDefinition() => _unmodifiedType.GetGenericTypeDefinition(); 96public override Type? BaseType => throw new NotSupportedException(SR.NotSupported_ModifiedType); 97public override Type? DeclaringType => throw new NotSupportedException(SR.NotSupported_ModifiedType); 98public override Type? ReflectedType => throw new NotSupportedException(SR.NotSupported_ModifiedType); 102CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 109CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 121public override Type[] GetFunctionPointerCallingConventions() => _unmodifiedType.GetFunctionPointerCallingConventions(); 122public override Type[] GetFunctionPointerParameterTypes() => _unmodifiedType.GetFunctionPointerParameterTypes(); 123public override Type GetFunctionPointerReturnType() => _unmodifiedType.GetFunctionPointerReturnType(); 127public override Type? GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 130public override Type[] GetInterfaces() => throw new NotSupportedException(SR.NotSupported_ModifiedType); 131public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => _unmodifiedType.GetInterfaceMap(interfaceType); 141Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 151public override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 154public override Type? GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 192public override Type? GetElementType() => _unmodifiedType.GetElementType(); // Supported 197public override object[] GetCustomAttributes(Type attributeType, bool inherit) => _unmodifiedType.GetCustomAttributes(attributeType, inherit); 198public override bool IsDefined(Type attributeType, bool inherit) => _unmodifiedType.IsDefined(attributeType, inherit);
src\libraries\System.Private.CoreLib\src\System\Reflection\Module.cs (24)
32public virtual bool IsDefined(Type attributeType, bool inherit) { throw NotImplemented.ByDesign; } 36public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) { throw NotImplemented.ByDesign; } 47public MethodInfo? GetMethod(string name, Type[] types) => GetMethod(name, DefaultLookup, null, CallingConventions.Any, types, null); 49public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 62protected virtual MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw NotImplemented.ByDesign; } 80public virtual Type[] GetTypes() { throw NotImplemented.ByDesign; } 83public virtual Type? GetType(string className) => GetType(className, throwOnError: false, ignoreCase: false); 85public virtual Type? GetType(string className, bool ignoreCase) => GetType(className, throwOnError: false, ignoreCase: ignoreCase); 87public virtual Type? GetType(string className, bool throwOnError, bool ignoreCase) { throw NotImplemented.ByDesign; } 90public virtual Type[] FindTypes(TypeFilter? filter, object? filterCriteria) 92Type[] c = GetTypes(); 104Type[] ret = new Type[cnt]; 119public virtual FieldInfo? ResolveField(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } 124public virtual MemberInfo? ResolveMember(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } 129public virtual MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } 137public Type ResolveType(int metadataToken) => ResolveType(metadataToken, null, null); 139public virtual Type ResolveType(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } 179private static bool FilterTypeNameImpl(Type cls, object filterCriteria, StringComparison comparison)
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfo.cs (3)
18internal NullabilityInfo(Type type, NullabilityState readState, NullabilityState writeState, 29/// The <see cref="System.Type" /> of the member or generic parameter 32public Type Type { get; }
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (23)
360private NullabilityInfo GetNullabilityInfo(MemberInfo memberInfo, Type type, NullableAttributeStateParser parser) 373private NullabilityInfo GetNullabilityInfo(MemberInfo memberInfo, Type type, NullableAttributeStateParser parser, ref int index) 378Type underlyingType = type; 418Type[] genericArguments = underlyingType.GetGenericArguments(); 448Type? metaType = null; 466Type? type = member.DeclaringType; 475private static Type GetPropertyMetaType(PropertyInfo property) 485private void CheckGenericParameters(NullabilityInfo nullability, MemberInfo metaMember, Type metaType, Type? reflectedType) 498Type[] genericArguments = metaType.GetGenericArguments(); 518private bool TryUpdateGenericParameterNullability(NullabilityInfo nullability, Type genericParameter, Type? reflectedType) 556private bool TryUpdateGenericTypeParameterNullabilityFromReflectedType(NullabilityInfo nullability, Type genericParameter, Type context, Type reflectedType) 565Type contextTypeDefinition = context.IsGenericType && !context.IsGenericTypeDefinition ? context.GetGenericTypeDefinition() : context; 571Type? baseType = contextTypeDefinition.BaseType; 583Type[] genericArguments = baseType.GetGenericArguments(); 584Type genericArgument = genericArguments[genericParameter.GenericParameterPosition]; 598static int CountNullabilityStates(Type type) 600Type underlyingType = Nullable.GetUnderlyingType(type) ?? type; 604foreach (Type genericArgument in underlyingType.GetGenericArguments()) 668private static bool IsValueTypeOrValueTypeByRef(Type type) =>
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (9)
22public virtual Type ParameterType => ClassImpl!; 35public virtual bool IsDefined(Type attributeType, bool inherit) 45public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) 51public virtual Type GetModifiedParameterType() => throw new NotSupportedException(); 53public virtual Type[] GetOptionalCustomModifiers() => Type.EmptyTypes; 54public virtual Type[] GetRequiredCustomModifiers() => Type.EmptyTypes; 111protected Type? ClassImpl;
src\libraries\System.Private.CoreLib\src\System\Reflection\Pointer.cs (1)
23public static object Box(void* ptr, Type type)
src\libraries\System.Private.CoreLib\src\System\Reflection\PropertyInfo.cs (6)
16public abstract Type PropertyType { get; } 36public virtual Type GetModifiedPropertyType() => throw new NotSupportedException(); 37public virtual Type[] GetOptionalCustomModifiers() => Type.EmptyTypes; 38public virtual Type[] GetRequiredCustomModifiers() => Type.EmptyTypes;
src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionTypeLoadException.cs (6)
15public ReflectionTypeLoadException(Type?[]? classes, Exception?[]? exceptions) : 20public ReflectionTypeLoadException(Type?[]? classes, Exception?[]? exceptions, string? message) 23Types = classes ?? Type.EmptyTypes; 32Types = Type.EmptyTypes; 41info.AddValue("Types", null, typeof(Type[])); 45public Type?[] Types { get; }
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeConstructorInfo.cs (2)
18Type? declaringType = DeclaringType; 50internal static void CheckCanCreateInstance(Type declaringType, bool isVarArg)
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs (4)
18Type? declaringType = DeclaringType; 50static bool IsDisallowedByRefType(Type type) 55Type elementType = type.GetElementType()!; 85Type elementType = ReturnType.GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeReflectionExtensions.cs (10)
15this Type type) 24this Type type) 33this Type type) 42this Type type) 51this Type type, string name) 60this Type type, string name, Type[] parameters) 69this Type type, string name) 78this Type type, string name) 92public static InterfaceMapping GetRuntimeInterfaceMap(this TypeInfo typeInfo, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType)
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureConstructedGenericType.cs (9)
12internal SignatureConstructedGenericType(Type genericTypeDefinition, Type[] typeArguments) 17typeArguments = (Type[])(typeArguments.Clone()); 55public sealed override Type GetGenericTypeDefinition() => _genericTypeDefinition; 56public sealed override Type[] GetGenericArguments() => GenericTypeArguments; 57public sealed override Type[] GenericTypeArguments => (Type[])(_genericTypeArguments.Clone()); 77private readonly Type _genericTypeDefinition; 78private readonly Type[] _genericTypeArguments;
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureGenericParameterType.cs (3)
32public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 33public sealed override Type[] GetGenericArguments() => EmptyTypes; 34public sealed override Type[] GenericTypeArguments => EmptyTypes;
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureHasElementType.cs (3)
33public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 34public sealed override Type[] GetGenericArguments() => EmptyTypes; 35public sealed override Type[] GenericTypeArguments => EmptyTypes;
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (33)
41public sealed override Type MakeArrayType() => new SignatureArrayType(this, rank: 1, isMultiDim: false); 43public sealed override Type MakeArrayType(int rank) 49public sealed override Type MakeByRefType() => new SignatureByRefType(this); 50public sealed override Type MakePointerType() => new SignaturePointerType(this); 54public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_SignatureType); // There is no SignatureType for type definition types so it would never be legal to call this. 57public sealed override Type? GetElementType() => ElementType; 59public abstract override Type GetGenericTypeDefinition(); 60public abstract override Type[] GenericTypeArguments { get; } 61public abstract override Type[] GetGenericArguments(); 68public sealed override bool Equals(Type? o) => base.Equals(o); 71public sealed override Type UnderlyingSystemType => this; // Equals(Type) depends on this. 84public sealed override Type ReflectedType => throw new NotSupportedException(SR.NotSupported_SignatureType); 85public sealed override Type BaseType => throw new NotSupportedException(SR.NotSupported_SignatureType); 88public sealed override Type[] GetInterfaces() => throw new NotSupportedException(SR.NotSupported_SignatureType); 89public sealed override bool IsAssignableFrom([NotNullWhen(true)] Type? c) => throw new NotSupportedException(SR.NotSupported_SignatureType); 93public sealed override Type DeclaringType => throw new NotSupportedException(SR.NotSupported_SignatureType); 96public sealed override Type[] GetGenericParameterConstraints() => throw new NotSupportedException(SR.NotSupported_SignatureType); 101public sealed override Type GetEnumUnderlyingType() => throw new NotSupportedException(SR.NotSupported_SignatureType); 130public sealed override Type GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 133public sealed override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 142protected sealed override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 145protected sealed override MethodInfo GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 148protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 172public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType); 173public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType); 178public sealed override Type GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(SR.NotSupported_SignatureType); 181protected sealed override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 188public sealed override Type[] FindInterfaces(TypeFilter filter, object? filterCriteria) => throw new NotSupportedException(SR.NotSupported_SignatureType); 189public sealed override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => throw new NotSupportedException(SR.NotSupported_SignatureType); 192public sealed override bool IsEquivalentTo([NotNullWhen(true)] Type? other) => throw new NotSupportedException(SR.NotSupported_SignatureType); 200public sealed override bool IsSubclassOf(Type c) => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureTypeExtensions.cs (23)
17public static bool MatchesParameterTypeExactly(this Type pattern, ParameterInfo parameter) 32internal static bool MatchesExactly(this SignatureType pattern, Type actual) 56Type[] patternGenericTypeArguments = pattern.GenericTypeArguments; 57Type[] actualGenericTypeArguments = actual.GenericTypeArguments; 63Type patternGenericTypeArgument = patternGenericTypeArguments[i]; 102internal static Type? TryResolveAgainstGenericMethod(this SignatureType signatureType, MethodInfo genericMethod) 111private static Type? TryResolve(this SignatureType signatureType, Type[] genericMethodParameters) 131Type[] genericTypeArguments = signatureType.GenericTypeArguments; 133Type?[] newGenericTypeArguments = new Type[count]; 136Type genericTypeArgument = genericTypeArguments[i]; 165private static Type? TryMakeArrayType(this Type type) 179private static Type? TryMakeArrayType(this Type type, int rank) 191private static Type? TryMakeByRefType(this Type type) 203private static Type? TryMakePointerType(this Type type) 217private static Type? TryMakeGenericType(this Type type, Type[] instantiation)
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (19)
27protected Type typeImpl = null!; 34public TypeDelegator([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type delegatingType) 58public override Type? BaseType => typeImpl.BaseType; 62CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 72CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 91public override Type[] GetFunctionPointerCallingConventions() => typeImpl.GetFunctionPointerCallingConventions(); 92public override Type[] GetFunctionPointerParameterTypes() => typeImpl.GetFunctionPointerParameterTypes(); 93public override Type GetFunctionPointerReturnType() => typeImpl.GetFunctionPointerReturnType(); 97public override Type? GetInterface(string name, bool ignoreCase) => typeImpl.GetInterface(name, ignoreCase); 100public override Type[] GetInterfaces() => typeImpl.GetInterfaces(); 110Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 125public override Type[] GetNestedTypes(BindingFlags bindingAttr) => typeImpl.GetNestedTypes(bindingAttr); 128public override Type? GetNestedType(string name, BindingFlags bindingAttr) => typeImpl.GetNestedType(name, bindingAttr); 160public override Type? GetElementType() => typeImpl.GetElementType(); 163public override Type UnderlyingSystemType => typeImpl.UnderlyingSystemType; 167public override object[] GetCustomAttributes(Type attributeType, bool inherit) => typeImpl.GetCustomAttributes(attributeType, inherit); 169public override bool IsDefined(Type attributeType, bool inherit) => typeImpl.IsDefined(attributeType, inherit); 170public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => typeImpl.GetInterfaceMap(interfaceType);
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeFilter.cs (1)
6public delegate bool TypeFilter(Type m, object? filterCriteria);
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeInfo.cs (8)
14public virtual Type AsType() => this; 16public virtual Type[] GenericTypeParameters => IsGenericTypeDefinition ? GetGenericArguments() : EmptyTypes; 45Type type) => type.GetMethods(DeclaredOnlyLookup); 83foreach (Type t in GetDeclaredOnlyNestedTypes(this)) 90static Type[] GetDeclaredOnlyNestedTypes( 91Type type) => type.GetNestedTypes(DeclaredOnlyLookup); 101public virtual IEnumerable<Type> ImplementedInterfaces 126Type[] constraints = GetGenericParameterConstraints();
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeNameResolver.cs (8)
35private Type? Resolve(TypeName typeName) 47Type? type = Resolve(typeName.GetElementType()); 69private Type? GetSimpleType(TypeName typeName) 103private Type? GetGenericType(TypeName typeName) 105Type? type = Resolve(typeName.GetGenericTypeDefinition()); 110Type[] genericTypes = new Type[genericArgs.Length]; 113Type? genericArg = Resolve(genericArgs[i]);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (4)
293Type readerType = Type.GetType(readerTypeName, throwOnError: true)!; 302Type? resSetType = mediator.UserResourceSet; 306resSetType = Type.GetType(resSetTypeName, true, false)!;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (8)
108private readonly Type? _userResourceSet; // Which ResourceSet instance to create 170Type? userResourceSet) 202Type? usingResourceSet) 220public ResourceManager(Type resourceSource) 230char c = Type.Delimiter; 270public virtual Type ResourceSetType => _userResourceSet ?? typeof(RuntimeResourceSet); 308Type? usingResourceSet) 752internal Type? UserResourceSet => _rm._userResourceSet;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (4)
25private static Type? s_binaryFormatterType; 82Type type = FindType(typeIndex); 104Type binaryFormatterType = Type.GetType("System.Runtime.Serialization.Formatters.Binary.BinaryFormatter, System.Runtime.Serialization.Formatters", throwOnError: true)!;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (7)
82private Type?[] _typeTable; // Lazy array of Types for resource values. 567Type type = FindType(typeIndex); 864_typeTable = new Type[numTypes]; 968private Type FindType(int typeIndex) 984Type UseReflectionToGetTypeLocal(int typeIndex) => UseReflectionToGetType(typeIndex); 991private Type UseReflectionToGetType(int typeIndex) 1000_typeTable[typeIndex] = Type.GetType(typeName, true);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (3)
101public virtual Type GetDefaultReader() 109public virtual Type GetDefaultWriter() 111return Type.GetType("System.Resources.ResourceWriter, System.Resources.Writer", throwOnError: true)!;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs (1)
12public AsyncIteratorStateMachineAttribute(Type stateMachineType)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderAttribute.cs (4)
15/// <param name="builderType">The <see cref="Type"/> of the associated builder.</param> 16public AsyncMethodBuilderAttribute(Type builderType) => BuilderType = builderType; 18/// <summary>Gets the <see cref="Type"/> of the associated builder.</summary> 19public Type BuilderType { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (2)
93Type stateMachineType = stateMachine.GetType(); 106internal static void LogTraceOperationBegin(Task t, Type stateMachineType)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncStateMachineAttribute.cs (1)
9public AsyncStateMachineAttribute(Type stateMachineType)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CollectionBuilderAttribute.cs (2)
22public CollectionBuilderAttribute(Type builderType, string methodName) 29public Type BuilderType { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CompExactlyDependsOnAttribute.cs (2)
16public CompExactlyDependsOnAttribute(Type intrinsicsTypeUsedInHelperFunction) 21public Type IntrinsicsTypeUsedInHelperFunction { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\FixedBufferAttribute.cs (2)
12public FixedBufferAttribute(Type elementType, int length) 18public Type ElementType { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\IteratorStateMachineAttribute.cs (1)
9public IteratorStateMachineAttribute(Type stateMachineType)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\MetadataUpdateOriginalTypeAttribute.cs (2)
20public MetadataUpdateOriginalTypeAttribute(Type originalType) => OriginalType = originalType; 22public Type OriginalType { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (1)
125internal static bool IsKnownConstant(Type? t) => false;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\StateMachineAttribute.cs (2)
9public StateMachineAttribute(Type stateMachineType) 14public Type StateMachineType { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TypeForwardedToAttribute.cs (2)
9public TypeForwardedToAttribute(Type destination) 14public Type Destination { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CoClassAttribute.cs (2)
9public CoClassAttribute(Type coClass) 14public Type CoClass { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComDefaultInterfaceAttribute.cs (2)
9public ComDefaultInterfaceAttribute(Type defaultInterface) 14public Type Value { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComEventInterfaceAttribute.cs (4)
18[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type SourceInterface, 19[DynamicallyAccessedMembers(EventProviderAccessedMemberTypes)] Type EventProvider) 26public Type SourceInterface { get; } 28public Type EventProvider { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComSourceInterfacesAttribute.cs (10)
17public ComSourceInterfacesAttribute(Type sourceInterface) 22public ComSourceInterfacesAttribute(Type sourceInterface1, Type sourceInterface2) 27public ComSourceInterfacesAttribute(Type sourceInterface1, Type sourceInterface2, Type sourceInterface3) 32public ComSourceInterfacesAttribute(Type sourceInterface1, Type sourceInterface2, Type sourceInterface3, Type sourceInterface4)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (1)
111/// allocated with the <see cref="CompilerServices.RuntimeHelpers.AllocateTypeAssociatedMemory(Type, int)"/> API.
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ICustomFactory.cs (1)
8MarshalByRefObject CreateInstance(Type serverType);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\LibraryImportAttribute.cs (2)
57/// Gets or sets the <see cref="Type"/> used to control how string arguments to the method are marshalled. 63public Type? StringMarshallingCustomType { get; set; }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (8)
106public static int SizeOf(Type t) 533public static void PrelinkAll(Type c) 560Type structureType) 616Type structureType = typeof(T); 1051public static Guid GenerateGuidForType(Type type) 1068public static string? GenerateProgIdForType(Type type) 1093public static Delegate GetDelegateForFunctionPointer(IntPtr ptr, Type t) 1248public static Type? GetTypeFromCLSID(Guid clsid) => GetTypeFromCLSID(clsid, null, throwOnError: false);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.NoCom.cs (8)
50public static object? CreateWrapperOfType(object? o, Type t) 75public static IntPtr GetComInterfaceForObject(object o, Type T) 82public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode) 126public static object GetTypedObjectForIUnknown(IntPtr pUnk, Type t) 166public static int GetStartComSlot(Type t) 172public static int GetEndComSlot(Type t) 178internal static Type? GetTypeFromCLSID(Guid clsid, string? server, bool throwOnError) 206public static bool IsTypeVisibleFromCom(Type t)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (1)
158internal static Type? GetTypeFromProgID(string progID, string? server, bool throwOnError)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MarshalAsAttribute.cs (2)
22public Type? SafeArrayUserDefinedSubType; 35public Type? MarshalTypeRef; // Type of marshaler class
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\CustomMarshallerAttribute.cs (4)
18public CustomMarshallerAttribute(Type managedType, MarshalMode marshalMode, Type marshallerType) 28public Type ManagedType { get; } 38public Type MarshallerType { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\MarshalUsingAttribute.cs (2)
30public MarshalUsingAttribute(Type nativeType) 39public Type? NativeType { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\NativeMarshallingAttribute.cs (2)
22public NativeMarshallingAttribute(Type nativeType) 30public Type NativeType { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\UnmanagedCallConvAttribute.cs (1)
23public Type[]? CallConvs;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\UnmanagedCallersOnlyAttribute.cs (1)
31public Type[]? CallConvs;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
509/// * <see cref="Type.GetType" />
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\IFormatterConverter.cs (1)
10object Convert(object value, Type type);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (33)
20private Type[] _types; 26private Type _rootType; 30public SerializationInfo(Type type, IFormatterConverter converter) 41_types = new Type[DefaultSize]; 50public SerializationInfo(Type type, IFormatterConverter converter, bool requireSameTokenInPartialTrust) 82public void SetType(Type type) 98public Type ObjectType => _rootType; 121Type[] newTypes = new Type[newSize]; 133public void AddValue(string name, object? value, Type type) 227internal void AddValueInternal(string name, object? value, Type type) 265internal void UpdateValue(string name, object value, Type type) 302private object? GetElement(string name, out Type foundType) 318private object? GetElementNoThrow(string name, out Type? foundType) 335public object? GetValue(string name, Type type) 342object? value = GetElement(name, out Type foundType); 353internal object? GetValueNoThrow(string name, Type type) 358object? value = GetElementNoThrow(name, out Type? foundType); 374object? value = GetElement(name, out Type foundType); 380object? value = GetElement(name, out Type foundType); 387object? value = GetElement(name, out Type foundType); 393object? value = GetElement(name, out Type foundType); 399object? value = GetElement(name, out Type foundType); 406object? value = GetElement(name, out Type foundType); 412object? value = GetElement(name, out Type foundType); 419object? value = GetElement(name, out Type foundType); 425object? value = GetElement(name, out Type foundType); 432object? value = GetElement(name, out Type foundType); 438object? value = GetElement(name, out Type foundType); 445object? value = GetElement(name, out Type foundType); 451object? value = GetElement(name, out Type foundType); 457object? value = GetElement(name, out Type foundType); 463object? value = GetElement(name, out Type foundType);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfoEnumerator.cs (6)
13private readonly Type _type; 15internal SerializationEntry(string entryName, object? entryValue, Type entryType) 24public Type ObjectType => _type; 31private readonly Type[] _types; 36internal SerializationInfoEnumerator(string[] members, object?[] info, Type[] types, int numItems) 113public Type ObjectType
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (1)
32public static string MakeVersionSafeName(string? name, ResourceScope from, ResourceScope to, Type? type)
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (12)
17public override Type? BaseType => GetBaseType(); 26public override Type? ReflectedType => DeclaringType; 33public override Type UnderlyingSystemType => this; 58public override object[] GetCustomAttributes(Type attributeType, bool inherit) 96public override Type GetElementType() => RuntimeTypeHandle.GetElementType(this); 160public override Type GetEnumUnderlyingType() 191public override bool IsDefined(Type attributeType, bool inherit) 264public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) 292Type[] constraints = GetGenericParameterConstraints(); 575if (!FilterApplyMethodInfo((RuntimeMethodInfo)semiFinalist, bindingFlags, CallingConventions.Any, new Type[argCnt])) 621if (!FilterApplyMethodInfo((RuntimeMethodInfo)semiFinalist, bindingFlags, CallingConventions.Any, new Type[argCnt])) 682Type[] constraints = GetGenericParameterConstraints();
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
258object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Security\PermissionSet.cs (4)
37public IPermission? GetPermission(Type? permClass) { return GetPermissionImpl(permClass); } 38protected virtual IPermission? GetPermissionImpl(Type? permClass) { return default; } 44public IPermission? RemovePermission(Type? permClass) { return RemovePermissionImpl(permClass); } 45protected virtual IPermission? RemovePermissionImpl(Type? permClass) { return default; }
src\libraries\System.Private.CoreLib\src\System\Security\SecurityException.cs (3)
40public SecurityException(string? message, Type? type) 47public SecurityException(string? message, Type? type, string? state) 89public Type? PermissionType { get; set; }
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
517object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (3)
168Type type = assembly.GetType(StartupHookTypeName, throwOnError: true)!; 174Type.EmptyTypes, // parameters 205StartupHookTypeName + Type.Delimiter + InitializeMethodName,
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (7)
87internal static void ThrowInvalidTypeWithPointersNotSupported(Type targetType) 300internal static void ThrowWrongKeyTypeArgumentException<T>(T key, Type targetType) 307internal static void ThrowWrongValueTypeArgumentException<T>(T value, Type targetType) 468internal static void ThrowObjectDisposedException(Type? type) 697Type? declaringType = memberInfo.DeclaringType; 734private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 739private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\libraries\System.Private.CoreLib\src\System\Type.cs (94)
21public new Type GetType() => base.GetType(); 43public override Type? DeclaringType => null; 46public override Type? ReflectedType => null; 47public abstract Type UnderlyingSystemType { get; } 73public abstract Type? GetElementType(); 77public virtual Type GetGenericTypeDefinition() => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 78public virtual Type[] GenericTypeArguments => (IsGenericType && !IsGenericTypeDefinition) ? GetGenericArguments() : EmptyTypes; 79public virtual Type[] GetGenericArguments() => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 81public virtual Type[] GetOptionalCustomModifiers() => EmptyTypes; 82public virtual Type[] GetRequiredCustomModifiers() => EmptyTypes; 86public virtual Type[] GetGenericParameterConstraints() 150public bool IsAssignableTo([NotNullWhen(true)] Type? targetType) => targetType?.IsAssignableFrom(this) ?? false; 167public ConstructorInfo? GetConstructor(Type[] types) => GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, types, null); 180/// An empty array of the type <see cref="Type"/> (that is, Type[] types = Array.Empty{Type}()) to get a constructor that takes no parameters. 188public ConstructorInfo? GetConstructor(BindingFlags bindingAttr, Type[] types) => GetConstructor(bindingAttr, binder: null, types, modifiers: null); 191public ConstructorInfo? GetConstructor(BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetConstructor(bindingAttr, binder, CallingConventions.Any, types, modifiers); 194public ConstructorInfo? GetConstructor(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 206protected abstract ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers); 238public virtual Type[] GetFunctionPointerCallingConventions() => throw new NotSupportedException(); 239public virtual Type GetFunctionPointerReturnType() => throw new NotSupportedException(); 240public virtual Type[] GetFunctionPointerParameterTypes() => throw new NotSupportedException(); 267/// Searches for the <see cref="MemberInfo"/> on the current <see cref="Type"/> that matches the specified <see cref="MemberInfo"/>. 270/// The <see cref="MemberInfo"/> to find on the current <see cref="Type"/>. 272/// <returns>An object representing the member on the current <see cref="Type"/> that matches the specified member.</returns> 275/// <exception cref="ArgumentException"><paramref name="member"/> does not match a member on the current <see cref="Type"/>.</exception> 322/// An array of <see cref="Type"/> objects representing the number, order, and type of the parameters for the method to get. 324/// An empty array of <see cref="Type"/> objects (as provided by the <see cref="EmptyTypes"/> field) to get a method that takes no parameters. 328public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Type[] types) => GetMethod(name, bindingAttr, binder: null, types, modifiers: null); 331public MethodInfo? GetMethod(string name, Type[] types) => GetMethod(name, types, null); 334public MethodInfo? GetMethod(string name, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, DefaultLookup, null, types, modifiers); 337public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, bindingAttr, binder, CallingConventions.Any, types, modifiers); 340public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 353protected abstract MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers); 356public MethodInfo? GetMethod(string name, int genericParameterCount, Type[] types) => GetMethod(name, genericParameterCount, types, null); 359public MethodInfo? GetMethod(string name, int genericParameterCount, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, genericParameterCount, DefaultLookup, null, types, modifiers); 362public MethodInfo? GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Type[] types) => GetMethod(name, genericParameterCount, bindingAttr, null, types, null); 365public MethodInfo? GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, genericParameterCount, bindingAttr, binder, CallingConventions.Any, types, modifiers); 368public MethodInfo? GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 381protected virtual MethodInfo? GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 390public Type? GetNestedType(string name) => GetNestedType(name, DefaultLookup); 393public abstract Type? GetNestedType(string name, BindingFlags bindingAttr); 396public Type[] GetNestedTypes() => GetNestedTypes(DefaultLookup); 399public abstract Type[] GetNestedTypes(BindingFlags bindingAttr); 415public PropertyInfo? GetProperty(string name, Type? returnType) 423public PropertyInfo? GetProperty(string name, Type[] types) => GetProperty(name, null, types); 426public PropertyInfo? GetProperty(string name, Type? returnType, Type[] types) => GetProperty(name, returnType, types, null); 429public PropertyInfo? GetProperty(string name, Type? returnType, Type[] types, ParameterModifier[]? modifiers) => GetProperty(name, DefaultLookup, null, returnType, types, modifiers); 432public PropertyInfo? GetProperty(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[] types, ParameterModifier[]? modifiers) 441protected abstract PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers); 471public static Type[] GetTypeArray(object[] args) 475Type[] cls = new Type[args.Length]; 486public static TypeCode GetTypeCode(Type? type) 540Type systemType = UnderlyingSystemType; 550public static Type? GetTypeFromCLSID(Guid clsid) => GetTypeFromCLSID(clsid, null, throwOnError: false); 552public static Type? GetTypeFromCLSID(Guid clsid, bool throwOnError) => GetTypeFromCLSID(clsid, null, throwOnError: throwOnError); 554public static Type? GetTypeFromCLSID(Guid clsid, string? server) => GetTypeFromCLSID(clsid, server, throwOnError: false); 556public static Type? GetTypeFromCLSID(Guid clsid, string? server, bool throwOnError) => Marshal.GetTypeFromCLSID(clsid, server, throwOnError); 559public static Type? GetTypeFromProgID(string progID) => GetTypeFromProgID(progID, null, throwOnError: false); 561public static Type? GetTypeFromProgID(string progID, bool throwOnError) => GetTypeFromProgID(progID, null, throwOnError: throwOnError); 563public static Type? GetTypeFromProgID(string progID, string? server) => GetTypeFromProgID(progID, server, throwOnError: false); 565public static Type? GetTypeFromProgID(string progID, string? server, bool throwOnError) => Marshal.GetTypeFromProgID(progID, server, throwOnError); 567public abstract Type? BaseType { get; } 584public Type? GetInterface(string name) => GetInterface(name, ignoreCase: false); 587public abstract Type? GetInterface(string name, bool ignoreCase); 589public abstract Type[] GetInterfaces(); 591public virtual InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 594public virtual bool IsEquivalentTo([NotNullWhen(true)] Type? other) => this == other; 599public virtual Type GetEnumUnderlyingType() 634public virtual Type MakeArrayType() => throw new NotSupportedException(); 636public virtual Type MakeArrayType(int rank) => throw new NotSupportedException(); 637public virtual Type MakeByRefType() => throw new NotSupportedException(); 641public virtual Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 643public virtual Type MakePointerType() => throw new NotSupportedException(); 645public static Type MakeGenericSignatureType(Type genericTypeDefinition, params Type[] typeArguments) => new SignatureConstructedGenericType(genericTypeDefinition, typeArguments); 647public static Type MakeGenericMethodParameter(int position) 661Type elementType = GetRootElementType(); 674public override bool Equals(object? o) => o == null ? false : Equals(o as Type); 677Type systemType = UnderlyingSystemType; 682public virtual bool Equals(Type? o) => o == null ? false : ReferenceEquals(this.UnderlyingSystemType, o.UnderlyingSystemType); 685public static bool operator ==(Type? left, Type? right) 700public static bool operator !=(Type? left, Type? right) 706public static Type? ReflectionOnlyGetType(string typeName, bool throwIfNotFound, bool ignoreCase) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); 716public static readonly Type[] EmptyTypes = Array.Empty<Type>();
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (4)
28Type valueType = value.GetType(); 52Type underlyingType = GetEnumUnderlyingType(); 73Type valueType = value.GetType(); 167internal static bool IsIntegerType(Type t)
src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (21)
21Type? underlyingType = UnderlyingSystemType; 55Type[] genericArguments = GetGenericArguments(); 66internal Type GetRootElementType() 68Type rootElementType = this; 91Type type = this; 107foreach (Type t in GetGenericArguments()) 119public virtual Type[] FindInterfaces(TypeFilter filter, object? filterCriteria) 123Type?[] c = GetInterfaces(); 135Type[] ret = new Type[cnt]; 139if (c[i] is Type t) 154Type?[]? t = null; 315if (t[i] is Type type) 322public virtual bool IsSubclassOf(Type c) 324Type? p = this; 337public virtual bool IsAssignableFrom([NotNullWhen(true)] Type? c) 347Type toType = this.UnderlyingSystemType; 361Type[] constraints = GetGenericParameterConstraints(); 377internal bool ImplementInterface(Type ifaceType) 379Type? t = this; 388Type[] interfaces = t.GetInterfaces();
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (1)
82public static Type GetTargetType(TypedReference value)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
249object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
259object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
258object IConvertible.ToType(Type type, IFormatProvider? provider)
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (2)
194/// Managed pointer types are sometimes called byref types (<seealso cref="Type.IsByRef"/>) 211/// Unmanaged pointer types are often just called pointers (<seealso cref="Type.IsPointer"/>)
src\System\Attribute.CoreCLR.cs (52)
16private static Attribute[] InternalGetCustomAttributes(PropertyInfo element, Type type, bool inherit) 29Type[] indexParamTypes = GetIndexParameterTypes(element); 35Dictionary<Type, AttributeUsageAttribute> types = new Dictionary<Type, AttributeUsageAttribute>(11); 53private static bool InternalIsDefined(PropertyInfo element, Type attributeType, bool inherit) 67Type[] indexParamTypes = GetIndexParameterTypes(element); 86private static PropertyInfo? GetParentDefinition(PropertyInfo property, Type[] propertyParameters) 120private static Attribute[] InternalGetCustomAttributes(EventInfo element, Type type, bool inherit) 141Dictionary<Type, AttributeUsageAttribute> types = new Dictionary<Type, AttributeUsageAttribute>(11); 178private static bool InternalIsDefined(EventInfo element, Type attributeType, bool inherit) 237private static Attribute[] InternalParamGetCustomAttributes(ParameterInfo param, Type? type, bool inherit) 248List<Type> disAllowMultiple = new List<Type>(); 257Type objType = objAttr[i]!.GetType(); 285Type objType = objAttr[i]!.GetType(); 326private static bool InternalParamIsDefined(ParameterInfo param, Type type, bool inherit) 351Type objType = objAttr[i].GetType(); 367private static void CopyToAttributeList(List<Attribute> attributeList, Attribute[] attributes, Dictionary<Type, AttributeUsageAttribute> types) 373Type attrType = attributes[i].GetType(); 380private static Type[] GetIndexParameterTypes(PropertyInfo element) 386Type[] indexParamTypes = new Type[indexParams.Length]; 394return Type.EmptyTypes; 397private static void AddAttributesToList(List<Attribute> attributeList, Attribute[] attributes, Dictionary<Type, AttributeUsageAttribute> types) 401Type attrType = attributes[i].GetType(); 421private static AttributeUsageAttribute InternalGetAttributeUsage(Type type) 436private static Attribute[] CreateAttributeArrayHelper(Type elementType, int elementCount) => 445public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType) 450public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType, bool inherit) 483public static bool IsDefined(MemberInfo element, Type attributeType) 488public static bool IsDefined(MemberInfo element, Type attributeType, bool inherit) 505public static Attribute? GetCustomAttribute(MemberInfo element, Type attributeType) 510public static Attribute? GetCustomAttribute(MemberInfo element, Type attributeType, bool inherit) 532public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType) 537public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType, bool inherit) 569public static bool IsDefined(ParameterInfo element, Type attributeType) 574public static bool IsDefined(ParameterInfo element, Type attributeType, bool inherit) 603public static Attribute? GetCustomAttribute(ParameterInfo element, Type attributeType) 608public static Attribute? GetCustomAttribute(ParameterInfo element, Type attributeType, bool inherit) 627public static Attribute[] GetCustomAttributes(Module element, Type attributeType) 644public static Attribute[] GetCustomAttributes(Module element, Type attributeType, bool inherit) 655public static bool IsDefined(Module element, Type attributeType) 660public static bool IsDefined(Module element, Type attributeType, bool inherit) 673public static Attribute? GetCustomAttribute(Module element, Type attributeType) 678public static Attribute? GetCustomAttribute(Module element, Type attributeType, bool inherit) 697public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType) 702public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType, bool inherit) 725public static bool IsDefined(Assembly element, Type attributeType) 730public static bool IsDefined(Assembly element, Type attributeType, bool inherit) 743public static Attribute? GetCustomAttribute(Assembly element, Type attributeType) 748public static Attribute? GetCustomAttribute(Assembly element, Type attributeType, bool inherit)
src\System\Collections\Generic\ComparerHelpers.cs (2)
28internal static object CreateDefaultComparer(Type type) 62internal static object CreateDefaultEqualityComparer(Type type)
src\System\Delegate.CoreCLR.cs (9)
57protected Delegate([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target, string method) 181Type? currentType = _target!.GetType(); 182Type targetType = declaringType.GetGenericTypeDefinition(); 216public static Delegate? CreateDelegate(Type type, object target, string method, bool ignoreCase, bool throwOnBindFailure) 251public static Delegate? CreateDelegate(Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target, string method, bool ignoreCase, bool throwOnBindFailure) 287public static Delegate? CreateDelegate(Type type, MethodInfo method, bool throwOnBindFailure) 322public static Delegate? CreateDelegate(Type type, object? firstArgument, MethodInfo method, bool throwOnBindFailure) 358internal static Delegate CreateDelegateNoSecurityCheck(Type type, object? target, RuntimeMethodHandle method)
src\System\Diagnostics\StackFrameHelper.cs (4)
104Type? symbolsType = Type.GetType( 113Type[] parameterTypes = new Type[]
src\System\Diagnostics\StackTrace.CoreCLR.cs (1)
27Type? t = mb.DeclaringType;
src\System\Object.CoreCLR.cs (1)
14public extern Type GetType();
src\System\Reflection\ConstructorInfo.CoreCLR.cs (1)
8internal virtual Type GetReturnType() { throw new NotImplementedException(); }
src\System\Reflection\Emit\CustomAttributeBuilder.cs (22)
85Type[] paramTypes; 138Type propType = property.PropertyType; 196Type fldType = namedField.FieldType; 246private static bool ValidateType(Type t) 252if (t == typeof(string) || t == typeof(Type)) 258switch (Type.GetTypeCode(Enum.GetUnderlyingType(t))) 280private static void VerifyTypeAndPassedObjectType(Type type, Type passedType, string paramName) 282if (type != typeof(object) && Type.GetTypeCode(passedType) != Type.GetTypeCode(type)) 292private static void EmitType(BinaryWriter writer, Type type) 296switch (Type.GetTypeCode(type)) 348else if (type == typeof(Type)) 384private static void EmitValue(BinaryWriter writer, Type type, object? value) 388switch (Type.GetTypeCode(Enum.GetUnderlyingType(type))) 426else if (type == typeof(Type)) 432string? typeName = TypeNameBuilder.ToString((Type)value, TypeNameBuilder.Format.AssemblyQualifiedName); 445Type et = type.GetElementType()!; 453switch (Type.GetTypeCode(type)) 502Type ot = value == null ? typeof(string) : value is Type ? typeof(Type) : value.GetType();
src\System\Reflection\Emit\DynamicILGenerator.cs (27)
35public override LocalBuilder DeclareLocal(Type localType, bool pinned) 136public override void Emit(OpCode opcode, Type type) 187Type? returnType, 188Type[]? parameterTypes, 189Type[]? optionalParameterTypes) 227public override void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes) 255public override void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes) 342public override void BeginCatchBlock(Type? exceptionType) 404private int GetMemberRefToken(MethodInfo methodInfo, Type[]? optionalParameterTypes) 406Type[]? parameterTypes; 407Type[][]? requiredCustomModifiers; 408Type[][]? optionalCustomModifiers; 422parameterTypes = new Type[paramInfo.Length]; 423requiredCustomModifiers = new Type[parameterTypes.Length][]; 424optionalCustomModifiers = new Type[parameterTypes.Length][]; 455Type? returnType, 456Type[]? parameterTypes) 465Type? returnType, 466Type[]? parameterTypes, 467Type[][]? requiredCustomModifiers, 468Type[][]? optionalCustomModifiers, 469Type[]? optionalParameterTypes) 481private void AddParameters(SignatureHelper sigHelp, Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers) 1034Type t = m.DeclaringType!.GetGenericTypeDefinition();
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (2)
44public sealed override Delegate CreateDelegate(Type delegateType) => 47public sealed override Delegate CreateDelegate(Type delegateType, object? target)
src\System\Reflection\Emit\RuntimeAssemblyBuilder.cs (3)
222public override object[] GetCustomAttributes(Type attributeType, bool inherit) => 225public override bool IsDefined(Type attributeType, bool inherit) => 240public override Type? GetType(string name, bool throwOnError, bool ignoreCase) =>
src\System\Reflection\Emit\RuntimeConstructorBuilder.cs (10)
17Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers, RuntimeModuleBuilder mod, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] RuntimeTypeBuilder type) 30Type[]? parameterTypes, RuntimeModuleBuilder mod, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] RuntimeTypeBuilder type) : 38internal override Type[] GetParameterTypes() 67public override Type? ReflectedType => m_methodBuilder.ReflectedType; 69public override Type? DeclaringType => m_methodBuilder.DeclaringType; 112public override object[] GetCustomAttributes(Type attributeType, bool inherit) 117public override bool IsDefined(Type attributeType, bool inherit) 155internal override Type GetReturnType()
src\System\Reflection\Emit\RuntimeEnumBuilder.cs (18)
87public override Type? BaseType => m_typeBuilder.BaseType; 93CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 107CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 135public override Type? GetInterface(string name, bool ignoreCase) 141public override Type[] GetInterfaces() 160Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 172public override Type[] GetNestedTypes(BindingFlags bindingAttr) 178public override Type? GetNestedType(string name, BindingFlags bindingAttr) 195public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) 246public override Type? GetElementType() 257public override Type GetEnumUnderlyingType() 262public override Type UnderlyingSystemType => GetEnumUnderlyingType(); 271public override object[] GetCustomAttributes(Type attributeType, bool inherit) 283public override Type? DeclaringType => m_typeBuilder.DeclaringType; 287public override Type? ReflectedType => m_typeBuilder.ReflectedType; 290public override bool IsDefined(Type attributeType, bool inherit) 301Type underlyingType, // underlying type for an Enum
src\System\Reflection\Emit\RuntimeFieldBuilder.cs (9)
16private readonly Type m_fieldType; 20internal RuntimeFieldBuilder(RuntimeTypeBuilder typeBuilder, string fieldName, Type type, 21Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers, FieldAttributes attributes) 61public override Type? DeclaringType 72public override Type? ReflectedType 86public override Type FieldType => m_fieldType; 118public override object[] GetCustomAttributes(Type attributeType, bool inherit) 123public override bool IsDefined(Type attributeType, bool inherit)
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (28)
46public override Type? DeclaringType => m_type.DeclaringType; 48public override Type? ReflectedType => m_type.ReflectedType; 61public override Type MakePointerType() 66public override Type MakeByRefType() 72public override Type MakeArrayType() 78public override Type MakeArrayType(int rank) 100public override Type? BaseType => m_type.BaseType; 103protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 109protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 122public override Type GetInterface(string name, bool ignoreCase) { throw new NotSupportedException(); } 125public override Type[] GetInterfaces() { throw new NotSupportedException(); } 134protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 140public override Type[] GetNestedTypes(BindingFlags bindingAttr) { throw new NotSupportedException(); } 143public override Type GetNestedType(string name, BindingFlags bindingAttr) { throw new NotSupportedException(); } 148public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) { throw new NotSupportedException(); } 172public override Type GetElementType() { throw new NotSupportedException(); } 176public override Type UnderlyingSystemType => this; 178public override Type[] GetGenericArguments() { throw new InvalidOperationException(); } 196public override Type GetGenericTypeDefinition() { throw new InvalidOperationException(); } 200public override Type MakeGenericType(params Type[] typeArguments) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); } 204public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) { throw new NotSupportedException(); } 206public override bool IsSubclassOf(Type c) { throw new NotSupportedException(); } 212public override object[] GetCustomAttributes(Type attributeType, bool inherit) { throw new NotSupportedException(); } 214public override bool IsDefined(Type attributeType, bool inherit) { throw new NotSupportedException(); } 223protected override void SetBaseTypeConstraintCore([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? baseTypeConstraint) 228protected override void SetInterfaceConstraintsCore(params Type[]? interfaceConstraints)
src\System\Reflection\Emit\RuntimeILGenerator.cs (20)
169private int GetMethodToken(MethodBase method, Type[]? optionalParameterTypes, bool useMethodDef) 176Type? returnType, 177Type[]? parameterTypes, 178Type[]? optionalParameterTypes) 515Type? returnType, Type[]? parameterTypes, Type[]? optionalParameterTypes) 556public override void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes) 599public override void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes) 616Type[] parameters = methodInfo.GetParameterTypes(); 696Type[] parameters = con.GetParameterTypes(); 706public override void Emit(OpCode opcode, Type cls) 1003public override void BeginCatchBlock(Type? exceptionType) 1164public override LocalBuilder DeclareLocal(Type localType, bool pinned) 1263internal Type[] m_catchClass; 1279m_catchClass = new Type[4]; 1290Type? catchClass, // catch exception type 1352internal void MarkCatchAddr(int catchAddr, Type? catchException) 1414internal Type[] GetCatchClass()
src\System\Reflection\Emit\RuntimeLocalBuilder.cs (4)
10private readonly Type m_localType; 16internal RuntimeLocalBuilder(int localIndex, Type localType, MethodInfo methodBuilder) 18internal RuntimeLocalBuilder(int localIndex, Type localType, MethodInfo methodBuilder, bool isPinned) 33public override Type LocalType => m_localType;
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (36)
45internal Type[]? m_parameterTypes; 46private Type m_returnType; 47private Type[]? m_returnTypeRequiredCustomModifiers; 48private Type[]? m_returnTypeOptionalCustomModifiers; 49private Type[][]? m_parameterTypeRequiredCustomModifiers; 50private Type[][]? m_parameterTypeOptionalCustomModifiers; 60Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 61Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, 73foreach (Type t in parameterTypes) 100m_parameterTypes = new Type[parameterTypes.Length]; 145Type[] catchClass; 240internal override Type[] GetParameterTypes() => m_parameterTypes ??= Type.EmptyTypes; 242internal static Type? GetMethodBaseReturnType(MethodBase? method) 278m_parameterTypes ??= Type.EmptyTypes; 409public override Type? DeclaringType 421public override Type? ReflectedType => DeclaringType; 455public override Type ReturnType => m_returnType; 487public override object[] GetCustomAttributes(Type attributeType, bool inherit) 492public override bool IsDefined(Type attributeType, bool inherit) 508public override Type[] GetGenericArguments() => m_inst ?? Type.EmptyTypes; 512public override MethodInfo MakeGenericMethod(params Type[] typeArguments) 614Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 615Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 631m_parameterTypes = new Type[parameterTypes.Length]; 714Type? caType = con.DeclaringType; 720Type? caType = con.DeclaringType;
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (90)
49private readonly Dictionary<string, Type> _typeBuilderDict; 71_typeBuilderDict = new Dictionary<string, Type>(); 77internal void AddType(string name, Type type) => _typeBuilderDict.Add(name, type); 79internal void CheckTypeNameConflict(string strTypeName, Type? enclosingType) 81if (_typeBuilderDict.TryGetValue(strTypeName, out Type? foundType) && 89private static Type? GetType(string strFormat, Type baseType) 180internal Type? FindTypeBuilderWithName(string strTypeName, bool ignoreCase) 194if (_typeBuilderDict.TryGetValue(strTypeName, out Type? foundType)) 203private int GetTypeRefNested(Type type, Module? refedModule) 206Type? enclosingType = type.DeclaringType; 261Type[] parameterTypes = new Type[parameters.Length]; 262Type[][] requiredCustomModifiers = new Type[parameters.Length][]; 263Type[][] optionalCustomModifiers = new Type[parameters.Length][]; 307private int GetMemberRefToken(MethodBase method, Type[]? optionalParameterTypes) 375internal SignatureHelper GetMemberRefSignature(CallingConventions call, Type? returnType, 376Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers, 377Type[]? optionalParameterTypes, int cGenericParameters) 463Type[] parameterTypes = new Type[parameters.Length]; 464Type[][] requiredCustomModifiers = new Type[parameterTypes.Length][]; 465Type[][] optionalCustomModifiers = new Type[parameterTypes.Length][]; 492public override object[] GetCustomAttributes(Type attributeType, bool inherit) 497public override bool IsDefined(Type attributeType, bool inherit) 512public override Type[] GetTypes() 520internal Type[] GetTypesNoLock() 522Type[] typeList = new Type[_typeBuilderDict.Count]; 525foreach (Type builder in _typeBuilderDict.Values) 546public override Type? GetType(string className) 552public override Type? GetType(string className, bool ignoreCase) 558public override Type? GetType(string className, bool throwOnError, bool ignoreCase) 567private Type? GetTypeNoLock(string className, bool throwOnError, bool ignoreCase) 577Type? baseType = InternalModule.GetType(className, throwOnError, ignoreCase); 664public override MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 670public override FieldInfo? ResolveField(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 676public override Type ResolveType(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 682public override MemberInfo? ResolveMember(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 726CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 745protected override TypeBuilder DefineTypeCore(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, PackingSize packingSize, int typesize) 759protected override EnumBuilder DefineEnumCore(string name, TypeAttributes visibility, Type underlyingType) 779MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, 780Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) 795Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, 796Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers) 807Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, 808Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers) 884internal int GetTypeTokenInternal(Type type, bool getGenericDefinition = false) 892public override int GetTypeMetadataToken(Type type) 897private int GetTypeTokenWorkerNoLock(Type type, bool getGenericDefinition) 998Type? declaringType = method.DeclaringType; 1011Type[] tt = new Type[paramInfo.Length]; 1029Type[] parameterTypes = new Type[parameters.Length]; 1030Type[][] requiredCustomModifiers = new Type[parameterTypes.Length][]; 1031Type[][] optionalCustomModifiers = new Type[parameterTypes.Length][]; 1065internal int GetMethodTokenInternal(MethodBase method, Type[]? optionalParameterTypes, bool useMethodDef) 1130internal int GetArrayMethodToken(Type arrayClass, string methodName, CallingConventions callingConvention, 1131Type? returnType, Type[]? parameterTypes) 1139private int GetArrayMethodTokenNoLock(Type arrayClass, string methodName, CallingConventions callingConvention, 1140Type? returnType, Type[]? parameterTypes) 1159protected override MethodInfo GetArrayMethodCore(Type arrayClass, string methodName, CallingConventions callingConvention, 1160Type? returnType, Type[]? parameterTypes)
src\System\Reflection\Emit\RuntimePropertyBuilder.cs (7)
32Type returnType, // return type of the property. 161public override Type PropertyType => m_returnType; 180public override object[] GetCustomAttributes(Type attributeType, bool inherit) 185public override bool IsDefined(Type attributeType, bool inherit) 192public override Type? DeclaringType => m_containingType; 194public override Type? ReflectedType => m_containingType; 201private readonly Type m_returnType; // property's return type
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (75)
137internal static bool IsTypeEqual(Type? t1, Type? t2) 144Type? runtimeType1; 145Type? runtimeType2; 181internal static unsafe void SetConstantValue(RuntimeModuleBuilder module, int tk, Type destType, object? value) 188Type type = value.GetType(); 213Type? underlyingType; 312private Type? m_typeParent; 314private List<Type>? m_typeInterfaces; 325private Type? m_enumUnderlyingType; 358m_typeInterfaces = new List<Type>(); 372m_typeInterfaces = new List<Type>(); 380string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, RuntimeModuleBuilder module, 483Type? temp = m_module.FindTypeBuilderWithName(strValueClassName, false); 611public override Type? DeclaringType => m_DeclaringType; 613public override Type? ReflectedType => m_DeclaringType; 659public override Type? BaseType => m_typeParent; 663CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 682CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 726public override Type? GetInterface(string name, bool ignoreCase) 735public override Type[] GetInterfaces() 770Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 785public override Type[] GetNestedTypes(BindingFlags bindingAttr) 794public override Type? GetNestedType(string name, BindingFlags bindingAttr) 811public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) 840public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) 845Type? fromRuntimeType; 876Type[] interfaces = fromTypeBuilder.GetInterfaces(); 920public override Type GetElementType() 937public override bool IsSubclassOf(Type c) 939Type? p = this; 957public override Type UnderlyingSystemType 989public override object[] GetCustomAttributes(Type attributeType, bool inherit) 1002public override bool IsDefined(Type attributeType, bool inherit) 1022internal void SetInterfaces(params Type[]? interfaces) 1026m_typeInterfaces = new List<Type>(); 1051public override Type[] GetGenericArguments() => m_inst ?? EmptyTypes; 1062public override Type GetGenericTypeDefinition() { if (IsGenericTypeDefinition) return this; if (m_genTypeDef == null) throw new InvalidOperationException(); return m_genTypeDef; } 1087Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 1088Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 1119Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 1120Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, 1250Type? genericTypeDefinition = m_typeParent.GetGenericTypeDefinition(); 1258Type inst = genericTypeDefinition.MakeGenericType(m_typeParent.GetGenericArguments()); 1287Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers) 1303Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers) 1332protected override TypeBuilder DefineNestedTypeCore(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, PackingSize packSize, int typeSize) 1343protected override FieldBuilder DefineFieldCore(string fieldName, Type type, Type[]? requiredCustomModifiers, 1344Type[]? optionalCustomModifiers, FieldAttributes attributes) 1391Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 1392Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 1431protected override EventBuilder DefineEventCore(string name, EventAttributes attributes, Type eventtype) 1499m_typeInterfaces ??= new List<Type>(); 1685protected override void SetParentCore([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent) 1713protected override void AddInterfaceImplementationCore([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType)
src\System\Reflection\Emit\SignatureHelper.cs (66)
19public static SignatureHelper GetMethodSigHelper(Module? mod, Type? returnType, Type[]? parameterTypes) 24public static SignatureHelper GetMethodSigHelper(Module? mod, CallingConventions callingConvention, Type? returnType) 29internal static SignatureHelper GetMethodSpecSigHelper(Module? scope, Type[] inst) 33foreach (Type t in inst) 40Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, 41Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers) 49Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, 50Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers) 77internal static SignatureHelper GetMethodSigHelper(Module? mod, CallingConvention unmanagedCallConv, Type? returnType) 112public static SignatureHelper GetMethodSigHelper(CallingConventions callingConvention, Type? returnType) 117internal static SignatureHelper GetMethodSigHelper(CallingConvention unmanagedCallingConvention, Type? returnType) 132public static SignatureHelper GetPropertySigHelper(Module? mod, Type? returnType, Type[]? parameterTypes) 138Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, 139Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers) 145Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, 146Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers) 164internal static SignatureHelper GetTypeSigToken(Module module, Type type) 190Type returnType, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers) 202Type returnType, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers) 207private SignatureHelper(Module mod, Type type) 260private void AddOneArgTypeHelper(Type argument, bool pinned) 268private void AddOneArgTypeHelper(Type clsArgument, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers) 279Type t = optionalCustomModifiers[i]; 302Type t = requiredCustomModifiers[i]; 323private void AddOneArgTypeHelper(Type clsArgument) { AddOneArgTypeHelperWorker(clsArgument, false); } 324private void AddOneArgTypeHelperWorker(Type clsArgument, bool lastWasGenericInst) 341Type[] args = clsArgument.GetGenericArguments(); 345foreach (Type t in args) 541private unsafe void InternalAddRuntimeType(Type type) 732internal void AddDynamicArgument(DynamicScope dynamicScope, Type clsArgument, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers) 742Type t = optionalCustomModifiers[i]; 765Type t = requiredCustomModifiers[i]; 790public void AddArgument(Type clsArgument) 795public void AddArgument(Type argument, bool pinned) 803public void AddArguments(Type[]? arguments, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers) 820public void AddArgument(Type argument, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers)
src\System\Reflection\Emit\SymbolMethod.cs (14)
12private readonly Type m_containingType; 15private readonly Type m_returnType; 17private readonly Type[] m_parameterTypes; 21internal SymbolMethod(ModuleBuilder mod, int token, Type arrayClass, string methodName, 22CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes) 37m_parameterTypes = new Type[parameterTypes.Length]; 42m_parameterTypes = Type.EmptyTypes; 57internal override Type[] GetParameterTypes() 74public override Type? ReflectedType => m_containingType; 78public override Type? DeclaringType => m_containingType; 101public override Type ReturnType => m_returnType; 122public override object[] GetCustomAttributes(Type attributeType, bool inherit) 127public override bool IsDefined(Type attributeType, bool inherit)
src\System\Reflection\FieldInfo.CoreCLR.cs (1)
15Type? declaringType = f.DeclaringType;
src\System\Reflection\MdFieldInfo.cs (5)
109public override Type FieldType 125public override Type[] GetRequiredCustomModifiers() 127return Type.EmptyTypes; 130public override Type[] GetOptionalCustomModifiers() 132return Type.EmptyTypes;
src\System\Reflection\Metadata\RuntimeTypeMetadataUpdateHandler.cs (6)
17public static void ClearCache(Type[]? types) 33foreach (Type type in assembly.GetTypes()) 45foreach (Type type in types) 59private static void ClearCache(Type type) => (type as RuntimeType)?.ClearCache(); 64private static bool RequiresClearingAllTypes([NotNullWhen(false)] Type[]? types) 74foreach (Type type in types)
src\System\Reflection\MethodBase.CoreCLR.cs (1)
22Type? declaringType = m?.DeclaringType;
src\System\Reflection\ModifiedType.CoreCLR.cs (5)
14internal Type GetTypeParameter(Type unmodifiedType, int index) => 24internal static Type Create(Type unmodifiedType, Signature? signature, int parameterIndex = 0) => 31private Type[] GetCustomModifiers(bool required) =>
src\System\Reflection\RtFieldInfo.cs (4)
128public override Type FieldType 140public override Type[] GetRequiredCustomModifiers() 145public override Type[] GetOptionalCustomModifiers() 152public override Type GetModifiedFieldType() =>
src\System\Reflection\RuntimeAssembly.cs (18)
210internal Type? GetTypeCore(string typeName, ReadOnlySpan<string> nestedTypeNames, bool throwOnError, bool ignoreCase) 213Type? type = null; 246public override Type? GetType( 260public override Type[] GetExportedTypes() 262Type[]? types = null; 293public override Stream? GetManifestResourceStream(Type type, string name) 300char c = Type.Delimiter; 339public override object[] GetCustomAttributes(Type attributeType, bool inherit) 349public override bool IsDefined(Type attributeType, bool inherit) 716public sealed override Type[] GetForwardedTypes() 718List<Type> types = new List<Type>(); 728Type? type = null; 760types.AddRange(new Type[numExceptions]); // add one null Type for each exception. 769private static void AddPublicNestedTypes(Type type, List<Type> types, List<Exception> exceptions) 771Type[] nestedTypes; 781foreach (Type nestedType in nestedTypes)
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (6)
134public override object[] GetCustomAttributes(Type attributeType, bool inherit) 144public override bool IsDefined(Type attributeType, bool inherit) 164public override Type? DeclaringType => m_reflectedTypeCache.IsGlobal ? null : m_declaringType; 168public override Type? ReflectedType => m_reflectedTypeCache.IsGlobal ? null : ReflectedTypeInternal; 181internal override Type GetReturnType() { return Signature.ReturnType; } 207var declaringType = DeclaringType;
src\System\Reflection\RuntimeCustomAttributeData.cs (16)
124if (type == typeof(Type)) 223internal static CustomAttributeTypedArgument Filter(IList<CustomAttributeData> attrs, Type? caType, int parameter) 259Type attributeType = m_scope.ResolveType(metadataScope.GetParentToken(caCtorToken), null, null)!; 318Type type = typeof(DllImportAttribute); 347Type type = typeof(MarshalAsAttribute); 384Type type = typeof(TypeForwardedToAttribute); 386Type[] sig = new Type[] { typeof(Type) }; 390typedArgs[0] = new CustomAttributeTypedArgument(typeof(Type), forwardedTo.Destination); 400Type type = pca.GetType(); 500private static Type CustomAttributeEncodingToType(CustomAttributeEncoding encodedType) 507CustomAttributeEncoding.Type => typeof(Type), 571_argumentType = typeof(Type); 581Type elementType; 882Type? enumType = null;
src\System\Reflection\RuntimeEventInfo.cs (4)
94public override object[] GetCustomAttributes(Type attributeType, bool inherit) 104public override bool IsDefined(Type attributeType, bool inherit) 123public override Type? DeclaringType => m_declaringType; 125public override Type? ReflectedType => ReflectedTypeInternal;
src\System\Reflection\RuntimeExceptionHandlingClause.cs (3)
40public override Type? CatchType 52Type? type = null; 56Type? declaringType = _methodBody._methodBase.DeclaringType;
src\System\Reflection\RuntimeFieldInfo.cs (4)
41public override Type? ReflectedType => m_reflectedTypeCache.IsGlobal ? null : ReflectedTypeInternal; 43public override Type? DeclaringType => m_reflectedTypeCache.IsGlobal ? null : m_declaringType; 65public override object[] GetCustomAttributes(Type attributeType, bool inherit) 75public override bool IsDefined(Type attributeType, bool inherit)
src\System\Reflection\RuntimeLocalVariableInfo.cs (1)
16public override Type LocalType { get { Debug.Assert(_type != null, "type must be set!"); return _type; } }
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (15)
177public override object[] GetCustomAttributes(Type attributeType, bool inherit) 187public override bool IsDefined(Type attributeType, bool inherit) 206public override Type? DeclaringType 219public override Type? ReflectedType 316public override Type ReturnType => Signature.ReturnType; 350public override Delegate CreateDelegate(Type delegateType) 366public override Delegate CreateDelegate(Type delegateType, object? target) 379private Delegate CreateDelegateInternal(Type delegateType, object? firstArgument, DelegateBindingFlags bindingFlags) 403public override MethodInfo MakeGenericMethod(params Type[] methodInstantiation) 415Type methodInstantiationElem = methodInstantiation[i]; 422Type[] methodInstantiationCopy = new Type[methodInstantiation.Length]; 455public override Type[] GetGenericArguments() => 456RuntimeMethodHandle.GetMethodInstantiationPublic(this) ?? Type.EmptyTypes; 480Type[] pis = GetGenericArguments();
src\System\Reflection\RuntimeModule.cs (21)
27private static RuntimeTypeHandle[]? ConvertToTypeHandleArray(Type[]? genericArguments) 36Type typeArg = genericArguments[i]; 77public override MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 112Type declaringType = RuntimeMethodHandle.GetDeclaringType(methodHandle); 133private FieldInfo? ResolveLiteralField(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 145Type declaringType = ResolveType(tkDeclaringType, genericTypeArguments, genericMethodArguments); 161public override FieldInfo? ResolveField(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 222public override Type ResolveType(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 254public override MemberInfo? ResolveMember(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 330CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 337CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 365public override object[] GetCustomAttributes(Type attributeType, bool inherit) 375public override bool IsDefined(Type attributeType, bool inherit) 400public override Type? GetType( 437public override Type[] GetTypes() => GetDefinedTypes();
src\System\Reflection\RuntimeParameterInfo.cs (11)
199internal RuntimeParameterInfo(MethodInfo owner, string? name, Type parameterType, int position) 214public override Type ParameterType 290defaultValue = Type.Missing; 302Type attributeType = attributeData.AttributeType; 435public override Type[] GetRequiredCustomModifiers() 438Type.EmptyTypes : 442public override Type[] GetOptionalCustomModifiers() 445Type.EmptyTypes : 449public override Type GetModifiedParameterType() => 463public override object[] GetCustomAttributes(Type attributeType, bool inherit) 476public override bool IsDefined(Type attributeType, bool inherit)
src\System\Reflection\RuntimePropertyInfo.cs (8)
142public override object[] GetCustomAttributes(Type attributeType, bool inherit) 152public override bool IsDefined(Type attributeType, bool inherit) 171public override Type? DeclaringType => m_declaringType; 175public override Type? ReflectedType => ReflectedTypeInternal; 200public override Type[] GetRequiredCustomModifiers() 205public override Type[] GetOptionalCustomModifiers() 210public override Type GetModifiedPropertyType() => ModifiedType.Create(PropertyType, Signature); 249public override Type PropertyType => Signature.ReturnType;
src\System\Reflection\TypeNameResolver.CoreCLR.cs (11)
18private Func<Assembly?, string, bool, Type?>? _typeResolver; 28internal static Type? GetType( 39internal static Type? GetType( 42Func<Assembly?, string, bool, Type?>? typeResolver, 77internal static Type? GetType( 188private Type? GetType(string escapedTypeName, ReadOnlySpan<string> nestedTypeNames, TypeName parsedName) 203Type? type; 280private Type? GetTypeFromDefaultAssemblies(string typeName, ReadOnlySpan<string> nestedTypeNames, TypeName parsedName) 285Type? type = requestingAssembly.GetTypeCore(typeName, nestedTypeNames, throwOnError: false, ignoreCase: _ignoreCase); 293Type? type = coreLib.GetTypeCore(typeName, nestedTypeNames, throwOnError: false, ignoreCase: _ignoreCase); 301Type? type = resolvedAssembly.GetTypeCore(typeName, nestedTypeNames, throwOnError: false, ignoreCase: _ignoreCase);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (3)
210Type type) 345/// will be freed if and when the <see cref="Type"/> is unloaded. 350public static IntPtr AllocateTypeAssociatedMemory(Type type, int size)
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (2)
36public static IntPtr OffsetOf(Type t, string fieldName) 304public static unsafe void DestroyStructure(IntPtr ptr, Type structuretype)
src\System\RuntimeHandles.cs (14)
48public static RuntimeTypeHandle FromIntPtr(IntPtr value) => new RuntimeTypeHandle(Type.GetTypeFromHandleUnsafe(value)); 186internal static IntPtr[]? CopyRuntimeTypeHandles(Type[]? inHandles, out int length) 210Debug.Assert(type.GetConstructor(Type.EmptyTypes) is ConstructorInfo c && c.IsPublic, 234Debug.Assert(type.GetConstructor(Type.EmptyTypes) is ConstructorInfo c && c.IsPublic, 354internal static extern Type[] GetArgumentTypesFromFunctionPointer(RuntimeType type); 408internal static extern Type[]? GetInterfaces(RuntimeType type); 413internal Type[] GetConstraints() 415Type[]? types = null; 528internal Type[] GetInstantiationPublic() 530Type[]? types = null; 550internal RuntimeType Instantiate(Type[]? inst) 945internal static Type[] GetMethodInstantiationPublic(IRuntimeMethodInfo method) 1553internal Type[] GetCustomModifiers(int parameterIndex, bool required) => 1566internal extern Type[] GetCustomModifiersAtOffset(int offset, bool required);
src\System\RuntimeType.CoreCLR.cs (63)
830Type[] interfaces = ReflectedType.BaseType!.GetInterfaces(); 841Type[]? interfaces = RuntimeTypeHandle.GetInterfaces(ReflectedType); 996Type[] iFaces = iList.GetInterfaces(); 1019Type[]? ifaces = RuntimeTypeHandle.GetInterfaces(declaringType); 1058Type[] constraints = declaringType.GetGenericParameterConstraints(); 1067Type[] temp = constraint.GetInterfaces(); 1505public Type[] FunctionPointerReturnAndParameterTypes { get; } 1507private FunctionPointerCache(Type[] functionPointerReturnAndParameterTypes) 1521internal Type[] FunctionPointerReturnAndParameterTypes 1568Type type = m_runtimeType; 1616Type DefaultMemberAttrType = typeof(DefaultMemberAttribute); 2009if (definition is Type) 2030Type genericArgument = genericArguments[i]; 2031Type genericParameter = genericParameters[i]; 2237Type type, BindingFlags bindingFlags, string name, bool prefixLookup, string? ns) 2254RuntimeMethodInfo method, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes) 2261RuntimeConstructorInfo constructor, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes) 2270MethodBase methodBase, BindingFlags methodFlags, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes) 2377if (argumentTypes[i] is Type t && !t.MatchesParameterTypeExactly(parameterInfos[i])) 2516Type[]? types, bool allowPrefixLookup) 2541Type[]? types, bool allowPrefixLookup) 2562string? name, BindingFlags bindingAttr, Type[]? types, bool allowPrefixLookup) 2629private ListBuilder<Type> GetNestedTypeCandidates(string? fullname, BindingFlags bindingAttr, bool allowPrefixLookup) 2637ListBuilder<Type> candidates = new ListBuilder<Type>(cache.Length); 2683public override Type[] GetInterfaces() 2686return new ReadOnlySpan<Type>(candidates).ToArray(); 2690public override Type[] GetNestedTypes(BindingFlags bindingAttr) 2703ListBuilder<Type> nestedTypes = GetNestedTypeCandidates(null, bindingAttr, false); 2726public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) 2798Type[]? types, ParameterModifier[]? modifiers) 2806Type[]? types, ParameterModifier[]? modifiers) 2813Type[]? types, ParameterModifier[]? modifiers) 2849Type[] types, ParameterModifier[]? modifiers) 2875string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 2982public override Type? GetInterface(string fullname, bool ignoreCase) 3017public override Type? GetNestedType(string fullname, BindingFlags bindingAttr) 3055ListBuilder<Type> nestedTypes = default; 3284public override bool IsSubclassOf(Type type) 3313public override bool IsEquivalentTo([NotNullWhen(true)] Type? other) 3506public override Type GetGenericTypeDefinition() 3545public override Type[] GetGenericArguments() 3547Type[] types = GetRootElementType().TypeHandle.GetInstantiationPublic(); 3552public override Type MakeGenericType(Type[] instantiation) 3583Type instantiationElem = instantiation[i]; 3606return Reflection.Emit.TypeBuilderInstantiation.MakeGenericType(this, (Type[])(instantiation.Clone())); 3611Type ret; 3639public override Type[] GetGenericParameterConstraints() 3644Type[] constraints = new RuntimeTypeHandle(this).GetConstraints(); 3664public override Type MakePointerType() => new RuntimeTypeHandle(this).MakePointer(); 3666public override Type MakeByRefType() => new RuntimeTypeHandle(this).MakeByRef(); 3668public override Type MakeArrayType() => new RuntimeTypeHandle(this).MakeSZArray(); 3670public override Type MakeArrayType(int rank) 3720public override Type[] GetFunctionPointerCallingConventions() 3731public override Type[] GetFunctionPointerParameterTypes() 3738Type[] parameters = Cache.FunctionPointerReturnAndParameterTypes; 3749public override Type GetFunctionPointerReturnType() 3774public override Type? DeclaringType => Cache.GetEnclosingType(); 3785Type elementType = GetRootElementType(); 3822Type[] argsType = args.Length != 0 ? new Type[args.Length] : EmptyTypes;
src\System\RuntimeType.CreateUninitializedCache.CoreCLR.cs (1)
13/// A cache which allows optimizing <see cref="RuntimeHelpers.GetUninitializedObject(Type)"/>.
src\System\StubHelpers.cs (3)
880private Type? layoutType; 916Type elementType = pManagedHome.GetType().GetElementType()!; 919switch (Type.GetTypeCode(elementType))
src\System\Type.CoreCLR.cs (10)
16public static Type? GetType(string typeName, bool throwOnError, bool ignoreCase) 25public static Type? GetType(string typeName, bool throwOnError) 34public static Type? GetType(string typeName) 42public static Type? GetType( 45Func<Assembly?, string, bool, Type?>? typeResolver) 54public static Type? GetType( 57Func<Assembly?, string, bool, Type?>? typeResolver, 68public static Type? GetType( 71Func<Assembly?, string, bool, Type?>? typeResolver, 86public static Type? GetTypeFromHandle(RuntimeTypeHandle handle)
System.Private.DataContractSerialization (988)
src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (5)
43public CodeTypeReference(Type type) 70public CodeTypeReference(Type type, CodeTypeReferenceOptions codeTypeReferenceOption) : this(type) 85private void InitializeFromType(Type type) 90Type currentType = type; 106Type[] genericArgs = type.GetGenericArguments();
src\libraries\Common\src\System\CodeDom\CodeTypeReferenceCollection.cs (1)
40public void Add(Type value) => Add(new CodeTypeReference(value));
System\Runtime\Serialization\AccessorBuilder.cs (5)
34Type type) 46Type declaringType = propInfo.DeclaringType!; 47Type propertyType = propInfo.PropertyType!; 103Type declaringType = propInfo.DeclaringType!; 104Type propertyType = propInfo.PropertyType!;
System\Runtime\Serialization\ClassDataContract.cs (33)
36internal ClassDataContract(Type type) : base(new ClassDataContractCriticalHelper(type)) 43private ClassDataContract(Type type, XmlDictionaryString ns, string[] memberNames) : base(new ClassDataContractCriticalHelper(type, ns, memberNames)) 251internal static ClassDataContract CreateClassDataContractForKeyValue(Type type, XmlDictionaryString ns, string[] memberNames) 260Type declaringType = memberContract.MemberInfo.DeclaringType!; 275internal static XmlDictionaryString? GetChildNamespaceToDeclare(DataContract dataContract, Type childType, XmlDictionary dictionary) 288private static bool IsArraySegment(Type t) 302Type type) 324foreach (Type interfaceType in type.GetInterfaces()) 349type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes) != null); 589private static Type[]? s_serInfoCtorArgs; 619Type type) : base(type) 633Type? baseType = type.BaseType; 725Type type, XmlDictionaryString ns, string[] memberNames) : base(type) 744private void EnsureIsReferenceImported(Type type) 801Type type = UnderlyingType; 1037private XmlQualifiedName GetXmlNameAndSetHasDataContract(Type type) 1051Type type) 1071Type type = UnderlyingType; 1076Type? prevAttributeType = null; 1118private static bool IsValidCallback(MethodInfo method, ParameterInfo[] parameters, Type attributeType, MethodInfo? currentCallback, ref Type? prevAttributeType) 1260Type type = UnderlyingType; 1265ConstructorInfo? ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes); 1278private static Type[] SerInfoCtorArgs => s_serInfoCtorArgs ??= new Type[] { typeof(SerializationInfo), typeof(StreamingContext) }; 1316Type type = UnderlyingType; 1327Type boundType; 1336Type[] underlyingParamTypes = new Type[paramContracts.Length]; 1345Type[] paramTypes = type.GetGenericArguments(); 1349Type paramType = paramTypes[i]; 1500internal Type ObjectType 1504Type type = UnderlyingType;
System\Runtime\Serialization\CodeGenerator.cs (56)
24s_getTypeFromHandle = typeof(Type).GetMethod("GetTypeFromHandle"); 52s_arraySetValue = typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) }); 66s_objectToString = typeof(object).GetMethod("ToString", Type.EmptyTypes); 80s_stringFormat = typeof(string).GetMethod("Format", new Type[] { typeof(string), typeof(object[]) }); 89internal static MethodInfo GetInvokeMethod(Type delegateType) 95private Type _delegateType = null!; // initialized in BeginMethod 111internal void BeginMethod(DynamicMethod dynamicMethod, Type delegateType, Type[] argTypes) 121internal void BeginMethod(string methodName, Type delegateType, bool allowPrivateMemberAccess) 125Type[] paramTypes = new Type[parameters.Length]; 133private void BeginMethod(Type returnType, string methodName, Type[] argTypes, bool allowPrivateMemberAccess) 142private void InitILGeneration(Type[] argTypes) 180internal static Type GetVariableType(object var) 190internal LocalBuilder DeclareLocal(Type type, object initialValue) 198internal LocalBuilder DeclareLocal(Type type) 203internal LocalBuilder DeclareLocal(Type type, bool isPinned) 282internal void ForEach(LocalBuilder local, Type elementType, 317Type type = GetVariableType(value); 318TypeCode typeCode = Type.GetTypeCode(type); 518internal void InitObj(Type valueType) 523internal void NewArray(Type elementType, object len) 531Type objType = GetVariableType(obj).GetElementType()!; 545Type arrayType = GetVariableType(obj); 552Type objType = arrayType.GetElementType()!; 566private static bool IsStruct(Type objType) 571internal Type LoadMember(MemberInfo memberInfo) 573Type? memberType; 631internal void LoadDefaultValue(Type type) 635switch (Type.GetTypeCode(type)) 719internal void ConvertAddress(Type source, Type target) 724internal void ConvertValue(Type source, Type target) 730internal void Castclass(Type target) 735internal void Box(Type type) 740internal void Unbox(Type type) 764internal void Ldobj(Type type) 766OpCode opCode = GetLdindOpCode(Type.GetTypeCode(type)); 777internal void Stobj(Type type) 793internal void Ldtoken(Type t) 800Type valueType = o.GetType(); 801if (o is Type t) 812switch (Type.GetTypeCode(valueType)) 982internal void Ldelem(Type arrayElementType) 990OpCode opCode = GetLdelemOpCode(Type.GetTypeCode(arrayElementType)); 996internal void Ldelema(Type arrayElementType) 1022internal void Stelem(Type arrayElementType) 1028OpCode opCode = GetStelemOpCode(Type.GetTypeCode(arrayElementType)); 1150private void InternalConvert(Type source, Type target, bool isAddress) 1158OpCode opCode = GetConvOpCode(Type.GetTypeCode(target)); 1305internal void ToString(Type type) 1321internal Type ArgType; 1322internal ArgBuilder(int index, Type argType)
System\Runtime\Serialization\CollectionDataContract.cs (93)
85internal CollectionDataContract(Type type) : base(new CollectionDataContractCriticalHelper(type)) 92internal CollectionDataContract(Type type, DataContract itemContract) : base(new CollectionDataContractCriticalHelper(type, itemContract)) 99internal CollectionDataContract(Type type, CollectionKind kind) : base(new CollectionDataContractCriticalHelper(type, kind)) 106private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, string? serializationExceptionMessage, string? deserializationExceptionMessage) 114private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor) 122private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor, bool isConstructorCheckRequired) 130private CollectionDataContract(Type type, string invalidCollectionInSharedContractMessage) : base(new CollectionDataContractCriticalHelper(type, invalidCollectionInSharedContractMessage)) 150private static Type[] KnownInterfaces => CollectionDataContractCriticalHelper.KnownInterfaces; 154internal Type ItemType => _helper.ItemType; 395internal Type GetCollectionElementType() 402private static Type[]? s_knownInterfaces; 404private Type _itemType = null!; // _itemType is always set except for the "invalid" CollectionDataContract 428internal static Type[] KnownInterfaces => 430s_knownInterfaces ??= new Type[] 444private void Init(CollectionKind kind, Type? itemType, CollectionDataContractAttribute? collectionContractAttribute) 502Type type) : base(type) 516Type type, 528Type type, 543Type type, 544CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, string? serializationExceptionMessage, string? deserializationExceptionMessage) 566Type type, 567CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor) 580internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor, bool isConstructorCheckRequired) 590Type type, 599internal Type ItemType => _itemType; 787static MethodInfo GetBuildIncrementCollectionCountGenericDelegate(Type type) => BuildIncrementCollectionCountDelegateMethod.MakeGenericMethod(type); 793private static MethodInfo GetBuildIncrementCollectionCountGenericDelegate(Type type) => BuildIncrementCollectionCountDelegateMethod.MakeGenericMethod(type); 820Type[]? keyValueTypes = ItemType.GetGenericArguments(); 836static MethodInfo GetBuildCreateGenericDictionaryEnumeratorGenericMethod(Type[] keyValueTypes) => GetBuildCreateGenericDictionaryEnumeratorMethodInfo.MakeGenericMethod(keyValueTypes[0], keyValueTypes[1]); 841internal Type GetCollectionElementType() 846Type? enumeratorType; 849Type[] keyValueTypes = ItemType.GetGenericArguments(); 861MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 870Type ienumeratorInterface = Globals.TypeOfIEnumerator; 873Type[] interfaceTypes = enumeratorType.GetInterfaces(); 874foreach (Type interfaceType in interfaceTypes) 890Type elementType = getCurrentMethod.ReturnType; 910private DataContract? GetSharedTypeContract(Type type) 925internal static bool IsCollectionInterface(Type type) 929return ((IList<Type>)KnownInterfaces).Contains(type); 934internal static bool IsCollection(Type type) 941internal static bool IsCollection(Type type, [NotNullWhen(true)] out Type? itemType) 948internal static bool IsCollection(Type type, bool constructorRequired, bool skipIfReadOnlyContract) 955private static bool IsCollectionHelper(Type type, [NotNullWhen(true)] out Type? itemType, bool constructorRequired, bool skipIfReadOnlyContract = false) 967internal static bool TryCreate(Type type, [NotNullWhen(true)] out DataContract? dataContract) 974internal static bool TryCreateGetOnlyCollectionDataContract(Type type, [NotNullWhen(true)] out DataContract? dataContract) 992Type type, 994Type interfaceType) 996Type? t = type.GetInterfaces().Where(it => it.Equals(interfaceType)).FirstOrDefault(); 1000private static bool IsArraySegment(Type t) 1007private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataContract? dataContract, out Type itemType, bool constructorRequired, bool skipIfReadOnlyContract = false) 1023Type? baseType = type.BaseType; 1051Type interfaceTypeToCheck = type.IsGenericType ? type.GetGenericTypeDefinition() : type; 1052Type[] knownInterfaces = KnownInterfaces; 1060Type[] genericArgs = type.GetGenericArguments(); 1106defaultCtor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Type.EmptyTypes); 1127Type? knownInterfaceType = null; 1130Type[] interfaceTypes = type.GetInterfaces(); 1131foreach (Type interfaceType in interfaceTypes) 1133Type interfaceTypeToCheck = interfaceType.IsGenericType ? interfaceType.GetGenericTypeDefinition() : interfaceType; 1134Type[] knownInterfaces = KnownInterfaces; 1165GetCollectionMethods(type, knownInterfaceType, new Type[] { itemType }, 1204Type[]? addMethodTypeArray = null; 1214addMethodTypeArray = new Type[] { Globals.TypeOfObject, Globals.TypeOfObject }; 1224addMethodTypeArray = new Type[] { itemType }; 1246internal static bool IsCollectionDataContract(Type type) 1253private static bool HandleIfInvalidCollection(Type type, bool tryCreate, bool hasCollectionDataContract, bool createContractWithException, string message, string? param, ref DataContract? dataContract) 1272private static void GetReadOnlyCollectionExceptionMessages(Type type, bool hasCollectionDataContract, string message, string? param, out string serializationExceptionMessage, out string deserializationExceptionMessage) 1288Type type, 1290Type interfaceType, 1293Type? t = type.GetInterfaces().Where(it => it.Equals(interfaceType)).FirstOrDefault(); 1304Type type, 1306Type interfaceType, 1307Type[] addMethodTypeArray, bool addMethodOnInterface, out MethodInfo? getEnumeratorMethod, out MethodInfo? addMethod) 1319Type[] parentInterfaceTypes = interfaceType.GetInterfaces(); 1324foreach (Type parentInterfaceType in parentInterfaceTypes) 1346getEnumeratorMethod = type.GetMethod(Globals.GetEnumeratorMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 1349Type? ienumerableInterface = 1359Type type, 1361Type ienumerableInterface) 1364private static bool IsKnownInterface(Type type) 1366Type typeToCheck = type.IsGenericType ? type.GetGenericTypeDefinition() : type; 1367foreach (Type knownInterfaceType in KnownInterfaces) 1388Type type = UnderlyingType; 1389Type[] paramTypes = type.GetGenericArguments(); 1395Type boundType = type.MakeGenericType(paramTypes);
System\Runtime\Serialization\ContextAware.cs (3)
17private ConditionalWeakTable<Type, DataContract> _keepAlive; 24_keepAlive = new ConditionalWeakTable<Type, DataContract>(); 51where TKey : Type
System\Runtime\Serialization\DataContract.cs (106)
55internal static DataContract GetDataContract(Type type) 79internal static DataContract GetDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type? type) 86internal static DataContract GetGetOnlyCollectionDataContract(int id, RuntimeTypeHandle typeHandle, Type? type) 99internal static DataContract GetGetOnlyCollectionDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type? type) 121internal static DataContract? GetBuiltInDataContract(Type type) 151internal static void ThrowInvalidDataContractException(string? message, Type? type) 159public virtual Type UnderlyingType => _helper.UnderlyingType; 161public virtual Type OriginalUnderlyingType => _helper.OriginalUnderlyingType; 165internal Type TypeForInitialization => _helper.TypeForInitialization; 304private static readonly ContextAwareDictionary<Type, DataContract?> s_typeToBuiltInContract = new(); 318private readonly Type _underlyingType; 319private Type? _originalUnderlyingType; 332private Type _typeForInitialization; 336internal static DataContract GetDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type? type) 352internal static DataContract GetGetOnlyCollectionDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type? type) 428private static DataContract CreateDataContract(int id, RuntimeTypeHandle typeHandle, Type? type) 438type ??= Type.GetTypeFromHandle(typeHandle)!; 450private static DataContract CreateDataContract(Type type) 453Type originalType = type; 508private static DataContract CreateGetOnlyCollectionDataContract(int id, RuntimeTypeHandle typeHandle, Type? type) 516type ??= Type.GetTypeFromHandle(typeHandle)!; 533internal static Type GetDataContractAdapterType(Type type) 551internal static Type GetDataContractOriginalType(Type type) 578internal static DataContract? GetBuiltInDataContract(Type type) 583return s_typeToBuiltInContract.GetOrAdd(type, static (Type key) => 623Type? type = typeName.AsSpan(7) switch 665internal static bool TryCreateBuiltInDataContract(Type type, [NotNullWhen(true)] out DataContract? dataContract) 673switch (Type.GetTypeCode(type)) 929internal static void ThrowInvalidDataContractException(string? message, Type? type) 942Type type) 950internal Type UnderlyingType => _underlyingType; 952internal Type OriginalUnderlyingType => _originalUnderlyingType ??= GetDataContractOriginalType(_underlyingType); 956internal Type TypeForInitialization => _typeForInitialization; 959private void SetTypeForInitialization(Type classType) 1050MethodInfo? method = UnderlyingType.GetMethod(Globals.ParseMethodName, BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(string) }); 1087internal static bool IsTypeSerializable(Type type) 1094private static bool IsTypeSerializable(Type type, HashSet<Type>? previousCollectionTypes) 1110if (CollectionDataContract.IsCollection(type, out Type? itemType)) 1112previousCollectionTypes ??= new HashSet<Type>(); 1123private static void ValidatePreviousCollectionTypes(Type collectionType, Type itemType, HashSet<Type> previousCollectionTypes) 1134List<Type> itemTypeClosure = new List<Type>(); 1135Queue<Type> itemTypeQueue = new Queue<Type>(); 1149foreach (Type argType in itemType.GetGenericArguments()) 1161internal static Type UnwrapRedundantNullableType(Type type) 1163Type nullableType = type; 1172internal static Type UnwrapNullableType(Type type) 1220public static XmlQualifiedName GetXmlName(Type type) 1227internal static XmlQualifiedName GetXmlName(Type type, out bool hasDataContract) 1229return GetXmlName(type, new HashSet<Type>(), out hasDataContract); 1234internal static XmlQualifiedName GetXmlName(Type type, HashSet<Type> previousCollectionTypes, out bool hasDataContract) 1260private static XmlQualifiedName GetDCTypeXmlName(Type type, DataContractAttribute dataContractAttribute) 1290private static XmlQualifiedName GetNonDCTypeXmlName(Type type, HashSet<Type> previousCollectionTypes) 1294if (CollectionDataContract.IsCollection(type, out Type? itemType)) 1315private static bool TryGetBuiltInXmlAndArrayTypeXmlName(Type type, HashSet<Type> previousCollectionTypes, [NotNullWhen(true)] out XmlQualifiedName? xmlName) 1331Type itemType = type.GetElementType()!; 1338internal static bool TryGetDCAttribute(Type type, [NotNullWhen(true)] out DataContractAttribute? dataContractAttribute) 1357internal static XmlQualifiedName GetCollectionXmlName(Type type, Type itemType, out CollectionDataContractAttribute? collectionContractAttribute) 1359return GetCollectionXmlName(type, itemType, new HashSet<Type>(), out collectionContractAttribute); 1364internal static XmlQualifiedName GetCollectionXmlName(Type type, Type itemType, HashSet<Type> previousCollectionTypes, out CollectionDataContractAttribute? collectionContractAttribute) 1410private static string GetArrayPrefix(ref Type itemType) 1451internal static XmlQualifiedName GetDefaultXmlName(Type type) 1458private static string GetDefaultXmlLocalName(Type type) 1487Type[] genParams = type.GetGenericArguments(); 1490Type genParam = genParams[i]; 1515private static string GetDefaultDataContractNamespace(Type type) 1571internal static string GetDefaultXmlNamespace(Type type) 1644private static void CheckExplicitDataContractNamespaceUri(string dataContractNs, Type type) 1673internal static string GetClrTypeFullName(Type type) 1871private static string ExpandGenericParameters(string format, Type type) 1923internal static bool IsTypeNullable(Type type) 1932internal static DataContractDictionary? ImportKnownTypeAttributes(Type type) 1935Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 1942private static void ImportKnownTypeAttributes(Type? type, Dictionary<Type, Type> typesChecked, ref DataContractDictionary? knownDataContracts) 1984MethodInfo? method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes); 1997foreach (Type ty in (IEnumerable<Type>)types) 2048internal static void CheckAndAdd(Type type, Dictionary<Type, Type> typesChecked, [NotNullIfNotNull(nameof(nameToDataContractTable))] ref DataContractDictionary? nameToDataContractTable) 2113internal static bool IsTypeVisible(Type t) 2128foreach (Type genericType in t.GetGenericArguments()) 2137internal static bool IsTypeAndDeclaringTypeVisible(Type t) 2193private static bool IsTypeVisibleInSerializationModule(Type type) 2275internal GenericNameProvider(Type type) 2348Type? paramType = o as Type;
System\Runtime\Serialization\DataContractResolver.cs (4)
15public abstract bool TryResolveType(Type type, Type? declaredType, DataContractResolver knownTypeResolver, out XmlDictionaryString? typeName, out XmlDictionaryString? typeNamespace); 18public abstract Type? ResolveName(string typeName, string? typeNamespace, Type? declaredType, DataContractResolver knownTypeResolver);
System\Runtime\Serialization\DataContractSerializer.cs (37)
18private Type _rootType; 26private ReadOnlyCollection<Type>? _knownTypeCollection; 27internal IList<Type>? _knownTypeList; 66public DataContractSerializer(Type type) 67: this(type, (IEnumerable<Type>?)null) 71public DataContractSerializer(Type type, IEnumerable<Type>? knownTypes) 76public DataContractSerializer(Type type, string rootName, string rootNamespace) 81public DataContractSerializer(Type type, string rootName, string rootNamespace, IEnumerable<Type>? knownTypes) 86internal DataContractSerializer(Type type, string rootName, string rootNamespace, IEnumerable<Type>? knownTypes, 93public DataContractSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNamespace) 98public DataContractSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNamespace, IEnumerable<Type>? knownTypes) 103internal DataContractSerializer(Type type, IEnumerable<Type>? knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, bool preserveObjectReferences) 108public DataContractSerializer(Type type, DataContractSerializerSettings? settings) 116private void Initialize(Type type, 117IEnumerable<Type>? knownTypes, 130_knownTypeList = new List<Type>(); 131foreach (Type knownType in knownTypes) 147private void Initialize(Type type, XmlDictionaryString? rootName, XmlDictionaryString? rootNamespace, 148IEnumerable<Type>? knownTypes, 162public ReadOnlyCollection<Type> KnownTypes 168new ReadOnlyCollection<Type>(_knownTypeList) : 169ReadOnlyCollection<Type>.Empty; 373Type declaredType = contract.UnderlyingType; 374Type graphType = (graph == null) ? declaredType : graph.GetType(); 424internal static DataContract GetDataContract(DataContract declaredTypeContract, Type declaredType, Type objectType) 513internal override Type? GetSerializeType(object? graph) 518internal override Type? GetDeserializeType() 526internal static object? SurrogateToDataContractType(ISerializationSurrogateProvider serializationSurrogateProvider, object? oldObj, Type surrogatedDeclaredType, ref Type objType) 538internal static Type GetSurrogatedType(ISerializationSurrogateProvider serializationSurrogateProvider, Type type)
System\Runtime\Serialization\DataContractSerializerSettings.cs (1)
30public IEnumerable<Type>? KnownTypes { get; set; }
System\Runtime\Serialization\DataContractSet.cs (39)
23private readonly List<Type>? _referencedTypes; 24private readonly List<Type>? _referencedCollectionTypes; 26public DataContractSet(ISerializationSurrogateProvider? dataContractSurrogate, IEnumerable<Type>? referencedTypes, IEnumerable<Type>? referencedCollectionTypes) 30_referencedTypes = referencedTypes != null ? new List<Type>(referencedTypes) : null; 31_referencedCollectionTypes = referencedCollectionTypes != null ? new List<Type>(referencedCollectionTypes) : null; 72internal static void EnsureTypeNotGeneric(Type type) 80internal void Add(Type type) 216internal XmlQualifiedName GetXmlName(Type clrType) 220Type dcType = DataContractSurrogateCaller.GetDataContractType(_surrogateProvider, clrType); 228public DataContract GetDataContract(Type type) 237Type dcType = DataContractSurrogateCaller.GetDataContractType(_surrogateProvider, type); 265if (dataMember.MemberInfo is not Type) 267Type dataMemberType = dataMember.MemberType; 272Type dcType = DataContractSurrogateCaller.GetDataContractType(_surrogateProvider, dataMemberType); 324foreach (Type type in _referencedTypes) 345foreach (Type type in _referencedCollectionTypes) 361private void AddReferencedType(Dictionary<XmlQualifiedName, object> referencedTypes, Type type) 383if (value is Type referencedType) 388List<Type> types = new List<Type>(); 396List<Type> types = (List<Type>)value; 408private static bool IsTypeReferenceable(Type type) 434public Type? GetReferencedType(XmlQualifiedName xmlName, DataContract dataContract, out DataContract? referencedContract, out object[]? genericParameters, bool? supportGenericTypes = null) 436Type? type = GetReferencedTypeInternal(xmlName, dataContract); 463private Type? GetReferencedGenericTypeInternal(GenericInfo genInfo, out DataContract? referencedContract, out object[]? genericParameters) 468Type? type = GetReferencedTypeInternal(genInfo.XmlName, null); 501Type? paramType = GetReferencedGenericTypeInternal(paramInfo, out paramContract, out object[]? paramParameters); 504genericParameters[i] = new Tuple<Type, object[]?>(paramType, paramParameters); 525private Type? GetReferencedTypeInternal(XmlQualifiedName xmlName, DataContract? dataContract) 527Type? type; 560internal bool TryGetReferencedType(XmlQualifiedName xmlName, DataContract? dataContract, [NotNullWhen(true)] out Type? type) 567internal bool TryGetReferencedCollectionType(XmlQualifiedName xmlName, DataContract? dataContract, [NotNullWhen(true)] out Type? type) 574private bool TryGetReferencedType(XmlQualifiedName xmlName, DataContract? dataContract, bool useReferencedCollectionTypes, [NotNullWhen(true)] out Type? type) 579type = value as Type; 587List<Type> types = (List<Type>)value; 592Type conflictingType = types[i];
System\Runtime\Serialization\DataContractSurrogateCaller.cs (11)
16internal static Type GetDataContractType(ISerializationSurrogateProvider surrogateProvider, Type type) 26internal static object? GetObjectToSerialize(ISerializationSurrogateProvider surrogateProvider, object? obj, Type objType, Type membertype) 38internal static object? GetDeserializedObject(ISerializationSurrogateProvider surrogateProvider, object? obj, Type objType, Type memberType) 47internal static object? GetCustomDataToExport(ISerializationSurrogateProvider2 surrogateProvider, MemberInfo memberInfo, Type dataContractType) 54internal static object? GetCustomDataToExport(ISerializationSurrogateProvider2 surrogateProvider, Type clrType, Type dataContractType) 61internal static void GetKnownCustomDataTypes(ISerializationSurrogateProvider2 surrogateProvider, Collection<Type> customDataTypes) 68internal static Type? GetReferencedTypeOnImport(ISerializationSurrogateProvider2 surrogateProvider, string typeName, string typeNamespace, object? customData)
System\Runtime\Serialization\DataMember.cs (4)
63internal Type MemberType => _helper.MemberType; 107private Type? _memberType; 167internal Type MemberType 178_memberType = (Type)MemberInfo!;
System\Runtime\Serialization\EnumDataContract.cs (15)
25internal EnumDataContract(Type type) : base(new EnumDataContractCriticalHelper(type)) 30internal static Type? GetBaseType(XmlQualifiedName baseContractName) 78private static readonly Dictionary<Type, XmlQualifiedName> s_typeToName = new Dictionary<Type, XmlQualifiedName>(); 79private static readonly Dictionary<XmlQualifiedName, Type> s_nameToType = new Dictionary<XmlQualifiedName, Type>(); 101internal static void Add(Type type, string localName) 108internal static XmlQualifiedName GetBaseContractName(Type type) 116internal static Type? GetBaseType(XmlQualifiedName baseContractName) 118s_nameToType.TryGetValue(baseContractName, out Type? retVal); 126Type type) : base(type) 129Type baseType = Enum.GetUnderlyingType(type); 168Type? baseType = GetBaseType(value); 209private void ImportBaseType(Type baseType) 217Type type = UnderlyingType;
System\Runtime\Serialization\ExportOptions.cs (3)
18private Collection<Type>? _knownTypes; 28public Collection<Type> KnownTypes => _knownTypes ??= new Collection<Type>();
System\Runtime\Serialization\ExtensionDataObject.cs (3)
56Type DataType { get; } 73protected Type dataType; 94public Type DataType
System\Runtime\Serialization\ExtensionDataReader.cs (4)
461Type? dataNodeType = dataNode?.DataType; 631Type type = dataNode.DataType; 657private bool MoveToText(Type type, IDataNode dataNode, bool isTypedNode) 662switch (Type.GetTypeCode(type))
System\Runtime\Serialization\GenericParameterDataContract.cs (2)
16internal GenericParameterDataContract(Type type) 34Type type)
System\Runtime\Serialization\Globals.cs (145)
34private static Type? s_typeOfObject; 35internal static Type TypeOfObject => 38private static Type? s_typeOfValueType; 39internal static Type TypeOfValueType => 42private static Type? s_typeOfArray; 43internal static Type TypeOfArray => 46private static Type? s_typeOfString; 47internal static Type TypeOfString => 50private static Type? s_typeOfInt; 51internal static Type TypeOfInt => 54private static Type? s_typeOfULong; 55internal static Type TypeOfULong => 58private static Type? s_typeOfVoid; 59internal static Type TypeOfVoid => 62private static Type? s_typeOfByteArray; 63internal static Type TypeOfByteArray => 66private static Type? s_typeOfTimeSpan; 67internal static Type TypeOfTimeSpan => 70private static Type? s_typeOfGuid; 71internal static Type TypeOfGuid => 74private static Type? s_typeOfDateTimeOffset; 75internal static Type TypeOfDateTimeOffset => 78private static Type? s_typeOfDateTimeOffsetAdapter; 79internal static Type TypeOfDateTimeOffsetAdapter => 82private static Type? s_typeOfMemoryStream; 83internal static Type TypeOfMemoryStream => 86private static Type? s_typeOfMemoryStreamAdapter; 87internal static Type TypeOfMemoryStreamAdapter => 90private static Type? s_typeOfUri; 91internal static Type TypeOfUri => 94private static Type? s_typeOfTypeEnumerable; 95internal static Type TypeOfTypeEnumerable => 96s_typeOfTypeEnumerable ??= typeof(IEnumerable<Type>); 98private static Type? s_typeOfStreamingContext; 99internal static Type TypeOfStreamingContext => 102private static Type? s_typeOfISerializable; 103internal static Type TypeOfISerializable => 106private static Type? s_typeOfIDeserializationCallback; 107internal static Type TypeOfIDeserializationCallback => 111private static Type? s_typeOfIObjectReference; 112internal static Type TypeOfIObjectReference => 116private static Type? s_typeOfXmlFormatClassWriterDelegate; 117internal static Type TypeOfXmlFormatClassWriterDelegate => 120private static Type? s_typeOfXmlFormatCollectionWriterDelegate; 121internal static Type TypeOfXmlFormatCollectionWriterDelegate => 124private static Type? s_typeOfXmlFormatClassReaderDelegate; 125internal static Type TypeOfXmlFormatClassReaderDelegate => 128private static Type? s_typeOfXmlFormatCollectionReaderDelegate; 129internal static Type TypeOfXmlFormatCollectionReaderDelegate => 132private static Type? s_typeOfXmlFormatGetOnlyCollectionReaderDelegate; 133internal static Type TypeOfXmlFormatGetOnlyCollectionReaderDelegate => 136private static Type? s_typeOfKnownTypeAttribute; 137internal static Type TypeOfKnownTypeAttribute => 140private static Type? s_typeOfDataContractAttribute; 141internal static Type TypeOfDataContractAttribute => 144private static Type? s_typeOfDataMemberAttribute; 145internal static Type TypeOfDataMemberAttribute => 148private static Type? s_typeOfEnumMemberAttribute; 149internal static Type TypeOfEnumMemberAttribute => 152private static Type? s_typeOfCollectionDataContractAttribute; 153internal static Type TypeOfCollectionDataContractAttribute => 156private static Type? s_typeOfOptionalFieldAttribute; 157internal static Type TypeOfOptionalFieldAttribute => 160private static Type? s_typeOfObjectArray; 161internal static Type TypeOfObjectArray => 164private static Type? s_typeOfOnSerializingAttribute; 165internal static Type TypeOfOnSerializingAttribute => 168private static Type? s_typeOfOnSerializedAttribute; 169internal static Type TypeOfOnSerializedAttribute => 172private static Type? s_typeOfOnDeserializingAttribute; 173internal static Type TypeOfOnDeserializingAttribute => 176private static Type? s_typeOfOnDeserializedAttribute; 177internal static Type TypeOfOnDeserializedAttribute => 180private static Type? s_typeOfFlagsAttribute; 181internal static Type TypeOfFlagsAttribute => 184private static Type? s_typeOfIXmlSerializable; 185internal static Type TypeOfIXmlSerializable => 188private static Type? s_typeOfXmlSchemaProviderAttribute; 189internal static Type TypeOfXmlSchemaProviderAttribute => 192private static Type? s_typeOfXmlRootAttribute; 193internal static Type TypeOfXmlRootAttribute => 196private static Type? s_typeOfXmlQualifiedName; 197internal static Type TypeOfXmlQualifiedName => 200private static Type? s_typeOfXmlSchemaType; 201internal static Type TypeOfXmlSchemaType => 204private static Type? s_typeOfIExtensibleDataObject; 205internal static Type TypeOfIExtensibleDataObject => 208private static Type? s_typeOfExtensionDataObject; 209internal static Type TypeOfExtensionDataObject => 212private static Type? s_typeOfISerializableDataNode; 213internal static Type TypeOfISerializableDataNode => 216private static Type? s_typeOfClassDataNode; 217internal static Type TypeOfClassDataNode => 220private static Type? s_typeOfCollectionDataNode; 221internal static Type TypeOfCollectionDataNode => 224private static Type? s_typeOfXmlDataNode; 225internal static Type TypeOfXmlDataNode => 228private static Type? s_typeOfNullable; 229internal static Type TypeOfNullable => 232private static Type? s_typeOfReflectionPointer; 233internal static Type TypeOfReflectionPointer => 236private static Type? s_typeOfIDictionaryGeneric; 237internal static Type TypeOfIDictionaryGeneric => 240private static Type? s_typeOfIDictionary; 241internal static Type TypeOfIDictionary => 244private static Type? s_typeOfIListGeneric; 245internal static Type TypeOfIListGeneric => 248private static Type? s_typeOfIList; 249internal static Type TypeOfIList => 252private static Type? s_typeOfICollectionGeneric; 253internal static Type TypeOfICollectionGeneric => 256private static Type? s_typeOfICollection; 257internal static Type TypeOfICollection => 260private static Type? s_typeOfIEnumerableGeneric; 261internal static Type TypeOfIEnumerableGeneric => 264private static Type? s_typeOfIEnumerable; 265internal static Type TypeOfIEnumerable => 268private static Type? s_typeOfIEnumeratorGeneric; 269internal static Type TypeOfIEnumeratorGeneric => 272private static Type? s_typeOfIEnumerator; 273internal static Type TypeOfIEnumerator => 276private static Type? s_typeOfKeyValuePair; 277internal static Type TypeOfKeyValuePair => 280private static Type? s_typeOfKeyValue; 281internal static Type TypeOfKeyValue => 284private static Type? s_typeOfIDictionaryEnumerator; 285internal static Type TypeOfIDictionaryEnumerator => 288private static Type? s_typeOfDictionaryEnumerator; 289internal static Type TypeOfDictionaryEnumerator => 292private static Type? s_typeOfGenericDictionaryEnumerator; 293internal static Type TypeOfGenericDictionaryEnumerator => 296private static Type? s_typeOfDictionaryGeneric; 297internal static Type TypeOfDictionaryGeneric => 300private static Type? s_typeOfHashtable; 301internal static Type TypeOfHashtable 308private static Type? s_typeOfXmlElement; 309internal static Type TypeOfXmlElement => 312private static Type? s_typeOfXmlNodeArray; 313internal static Type TypeOfXmlNodeArray => 316private static Type? s_typeOfDBNull; 317internal static Type TypeOfDBNull => 321private static Type? s_typeOfSchemaDefinedType; 323internal static Type TypeOfSchemaDefinedType => 327private static Type? s_typeOfSchemaDefinedEnum; 329internal static Type TypeOfSchemaDefinedEnum =>
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (34)
24internal IList<Type>? knownTypeList; 27private ReadOnlyCollection<Type>? _knownTypeCollection; 36private Type _rootType; 41public DataContractJsonSerializer(Type type) 42: this(type, (IEnumerable<Type>?)null) 48public DataContractJsonSerializer(Type type, string? rootName) 55public DataContractJsonSerializer(Type type, XmlDictionaryString? rootName) 62public DataContractJsonSerializer(Type type, IEnumerable<Type>? knownTypes) 69public DataContractJsonSerializer(Type type, string? rootName, IEnumerable<Type>? knownTypes) 76public DataContractJsonSerializer(Type type, XmlDictionaryString? rootName, IEnumerable<Type>? knownTypes) 83public DataContractJsonSerializer(Type type, DataContractJsonSerializerSettings? settings) 94internal DataContractJsonSerializer(Type type, 96IEnumerable<Type>? knownTypes, 116public ReadOnlyCollection<Type> KnownTypes 122new ReadOnlyCollection<Type>(knownTypeList) : 123ReadOnlyCollection<Type>.Empty; 418internal override Type? GetDeserializeType() 423internal override Type? GetSerializeType(object? graph) 497Type declaredType = contract.UnderlyingType; 498Type graphType = (graph == null) ? declaredType : graph.GetType(); 558private void AddCollectionItemTypeToKnownTypes(Type knownType) 560Type? itemType; 561Type typeToCheck = knownType; 576private void Initialize(Type type, 577IEnumerable<Type>? knownTypes, 591this.knownTypeList = new List<Type>(); 592foreach (Type knownType in knownTypes) 614private void Initialize(Type type, 616IEnumerable<Type>? knownTypes, 642internal static DataContract GetDataContract(DataContract declaredTypeContract, Type declaredType, Type objectType)
System\Runtime\Serialization\Json\DataContractJsonSerializerSettings.cs (1)
25public IEnumerable<Type>? KnownTypes { get; set; }
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
223Type traditionalDataContractType = traditionalDataContract.GetType();
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (17)
57private static Type[]? s_serInfoCtorArgs; 118typeof(ExtensionDataObject).GetConstructor(Globals.ScanAllMembers, Type.EmptyTypes))!; 193s_getUninitializedObjectMethod = typeof(XmlFormatReaderGenerator).GetMethod("UnsafeGetUninitializedObject", Globals.ScanAllMembers, new Type[] { typeof(Type) }); 206s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Type.EmptyTypes); 218s_isStartElementMethod2 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 316s_serializationExceptionCtor = typeof(SerializationException).GetConstructor(new Type[] { typeof(string) }); 322public static Type[] SerInfoCtorArgs => s_serInfoCtorArgs ??= new Type[] { typeof(SerializationInfo), typeof(StreamingContext) }; 353s_typeHandleProperty = typeof(Type).GetProperty("TypeHandle"); 401s_writeAttributeStringMethod = typeof(XmlWriterDelegator).GetMethod("WriteAttributeString", Globals.ScanAllMembers, new Type[] { typeof(string), typeof(string), typeof(string), typeof(string) }); 413s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Type.EmptyTypes); 463s_writeStartElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteStartElement", Globals.ScanAllMembers, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 476s_writeStartElementStringMethod = typeof(XmlWriterDelegator).GetMethod("WriteStartElement", Globals.ScanAllMembers, new Type[] { typeof(string), typeof(string) }); 489s_parseEnumMethod = typeof(Enum).GetMethod("Parse", BindingFlags.Static | BindingFlags.Public, new Type[] { typeof(Type), typeof(string) }); 502s_getJsonMemberNameMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("GetJsonMemberName", Globals.ScanAllMembers, new Type[] { typeof(XmlReaderDelegator) });
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (27)
55private Type? _objectType; 178private static void BeginMethod(CodeGenerator ilg, string methodName, Type delegateType, bool allowPrivateMemberAccess) 182Type[] paramTypes = new Type[parameters.Length]; 202Type type = classContract.ObjectType; 367Type memberType = dataMember.MemberType; 467private LocalBuilder ReadValue(Type type, string name) 558private void InternalDeserialize(LocalBuilder value, Type type, string name) 562Type declaredType = type; 585Type innerType = innerValue.LocalType, outerType = outerValue.LocalType; 590Type type = Globals.TypeOfNullable.MakeGenericType(innerType); 591_ilg.New(type.GetConstructor(new Type[] { innerType })!); 594_ilg.Call(outerType.GetConstructor(new Type[] { innerType })!); 601Type type = collectionContract.UnderlyingType; 602Type itemType = collectionContract.ItemType; 611constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Type.EmptyTypes)!; 615constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Type.EmptyTypes)!; 726private void ReadSimpleDictionary(CollectionDataContract collectionContract, Type keyValueType) 728Type[] keyValueTypes = keyValueType.GetGenericArguments(); 729Type keyType = keyValueTypes[0]; 730Type valueType = keyValueTypes[1]; 733Type keyTypeOriginal = keyType; 822Type type = collectionContract.UnderlyingType; 823Type itemType = collectionContract.ItemType; 910private bool TryReadPrimitiveArray(Type itemType) 917switch (Type.GetTypeCode(itemType)) 962private LocalBuilder ReadCollectionItem(CollectionDataContract collectionContract, Type itemType)
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (29)
113private static void BeginMethod(CodeGenerator ilg, string methodName, Type delegateType, bool allowPrivateMemberAccess) 117Type[] paramTypes = new Type[parameters.Length]; 126private void InitArgs(Type objType) 243Type memberType = member.MemberType; 316Type itemType = collectionContract.ItemType; 363Type? enumeratorType; 364Type[]? keyValueTypes = null; 374keyValueTypes = new Type[] { Globals.TypeOfObject, Globals.TypeOfObject }; 381MethodInfo? moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 382MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 392Type ienumeratorInterface = Globals.TypeOfIEnumerator; 396Type[] interfaceTypes = enumeratorType.GetInterfaces(); 397foreach (Type interfaceType in interfaceTypes) 413Type elementType = getCurrentMethod.ReturnType; 420ConstructorInfo dictEnumCtor = enumeratorType.GetConstructor(Globals.ScanAllMembers, new Type[] { Globals.TypeOfIDictionaryEnumerator })!; 427Type ctorParam = Globals.TypeOfIEnumeratorGeneric.MakeGenericType(Globals.TypeOfKeyValuePair.MakeGenericType(keyValueTypes)); 428ConstructorInfo dictEnumCtor = enumeratorType.GetConstructor(Globals.ScanAllMembers, new Type[] { ctorParam })!; 438Type genericDictionaryKeyValueType = Globals.TypeOfKeyValue.MakeGenericType(keyValueTypes); 508private bool TryWritePrimitive(Type type, LocalBuilder? value, MemberInfo? memberInfo, LocalBuilder? arrayItemIndex, LocalBuilder? name, int nameIndex) 556private bool TryWritePrimitiveArray(Type type, Type itemType, LocalBuilder value, LocalBuilder itemName) 563switch (Type.GetTypeCode(itemType)) 596new Type[] { type, typeof(XmlDictionaryString), typeof(XmlDictionaryString) })!; 625Type memberType = memberValue.LocalType; 698private void InternalSerialize(MethodInfo methodInfo, LocalBuilder memberValue, Type memberType, bool writeXsiType) 710_ilg.Call(typeof(RuntimeTypeHandle).GetMethod("Equals", new Type[] { typeof(RuntimeTypeHandle) })!); 721Type memberType = memberValue.LocalType; 727Type innerType = memberType.GetGenericArguments()[0];
System\Runtime\Serialization\Json\JsonXmlDataContract.cs (5)
52DataContractSerializer dataContractSerializer = new DataContractSerializer(Type.GetTypeFromHandle(declaredTypeHandle)!, 62private static List<Type> GetKnownTypesFromContext(XmlObjectSerializerContext? context, IList<Type>? serializerKnownTypeList) 64List<Type> knownTypesList = new List<Type>();
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (5)
147private void ReadSimpleDictionary(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, CollectionDataContract collectionContract, Type keyValueType, object? dictionary) 149Type[] keyValueTypes = keyValueType.GetGenericArguments(); 150Type keyType = keyValueTypes[0]; 151Type valueType = keyValueTypes[1]; 209TypeCode typeCode = Type.GetTypeCode(keyDataContract.UnderlyingType);
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (7)
43Type itemType = collectionContract.ItemType; 72Type[] itemTypeGenericArguments = collectionContract.ItemType.GetGenericArguments(); 73Type? dictionaryValueType = itemTypeGenericArguments.Length == 2 ? itemTypeGenericArguments[1] : null; 101Type elementType = collectionContract.GetCollectionElementType(); 144private static bool ReflectionTryWritePrimitiveArray(JsonWriterDelegator jsonWriter, object obj, Type itemType, XmlDictionaryString collectionItemName) 152switch (Type.GetTypeCode(itemType)) 215Type memberType = member.MemberType;
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (3)
74internal IList<Type>? SerializerKnownTypeList 264internal override DataContract GetDataContract(RuntimeTypeHandle typeHandle, Type? type) 273internal override DataContract GetDataContractSkipValidation(int typeId, RuntimeTypeHandle typeHandle, Type? type)
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (13)
39internal IList<Type>? SerializerKnownTypeList 173protected override void SerializeWithXsiType(XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle objectTypeHandle, Type? objectType, int declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type declaredType) 206private void HandleCollectionAssignedToObject(Type declaredType, ref DataContract dataContract, ref object obj, ref bool verifyKnownType) 242internal override void SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType) 245Type declaredType = rootTypeDataContract!.UnderlyingType; 264private void VerifyType(DataContract dataContract, Type declaredType) 294Type dataType = dataNode.DataType; 320internal static void VerifyObjectCompatibilityWithInterface(DataContract contract, object graph, Type declaredType) 322Type contractType = contract.GetType(); 339Type objType = obj.GetType(); 369internal override DataContract GetDataContract(RuntimeTypeHandle typeHandle, Type? type) 378internal override DataContract GetDataContractSkipValidation(int typeId, RuntimeTypeHandle typeHandle, Type? type)
System\Runtime\Serialization\KnownTypeDataContractResolver.cs (4)
23public override bool TryResolveType(Type type, Type? declaredType, DataContractResolver knownTypeResolver, out XmlDictionaryString? typeName, out XmlDictionaryString? typeNamespace) 55public override Type? ResolveName(string typeName, string? typeNamespace, Type? declaredType, DataContractResolver knownTypeResolver)
System\Runtime\Serialization\PrimitiveDataContract.cs (9)
25Type type, XmlDictionaryString name, XmlDictionaryString ns) : base(new PrimitiveDataContractCriticalHelper(type, name, ns)) 32internal static PrimitiveDataContract? GetPrimitiveDataContract(Type type) 70_helper.XmlFormatWriterMethod = typeof(XmlWriterDelegator).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) })!; 72_helper.XmlFormatWriterMethod = typeof(XmlObjectSerializerWriteContext).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) })!; 86_helper.XmlFormatContentWriterMethod = typeof(XmlWriterDelegator).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { UnderlyingType })!; 88_helper.XmlFormatContentWriterMethod = typeof(XmlObjectSerializerWriteContext).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), UnderlyingType })!; 128Type thisType = GetType(); 129Type otherType = other.GetType(); 143Type type,
System\Runtime\Serialization\ReflectionClassWriter.cs (5)
46public static void ReflectionWriteValue(XmlWriterDelegator xmlWriter, XmlObjectSerializerWriteContext context, Type type, object? value, bool writeXsiType, PrimitiveDataContract? primitiveContractForParamType) 48Type memberType = type; 75MethodInfo getValue = memberType.GetMethod("get_Value", Type.EmptyTypes)!; 154Type type = obj.GetType(); 168private static void ReflectionInternalSerialize(XmlWriterDelegator xmlWriter, XmlObjectSerializerWriteContext context, object obj, bool isDeclaredType, bool writeXsiType, Type memberType, bool isNullableOfT = false)
System\Runtime\Serialization\ReflectionReader.cs (25)
20private delegate object? CollectionReadItemDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, CollectionDataContract collectionContract, Type itemType, string itemName, string itemNs); 27private static readonly Type[] s_arrayConstructorParameters = new Type[] { Globals.TypeOfInt }; 140object? GetReadDictionaryItemDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, CollectionDataContract collectionContract, Type itemType, string itemName, string itemNs) 152Type itemType = collectionContract.ItemType; 249protected object? ReflectionReadValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, Type type, string name, string ns, PrimitiveDataContract? primitiveContractForOriginalType = null) 277private object? ReadItemOfPrimitiveType(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, Type type, string name, string ns, PrimitiveDataContract? primitiveContract, int nullables) 345private CollectionReadItemDelegate GetReflectionReadValueDelegate(Type type) 365object? GetReadItemOfPrimitiveTypeDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, CollectionDataContract collectionContract, Type itemType, string itemName, string itemNs) 385Type type = dataMember.MemberType; 393private object? ReflectionInternalDeserialize(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, CollectionDataContract? collectionContract, Type type, string name, string ns) 432Type classType = classContract.UnderlyingType; 441Type objType = obj.GetType(); 482Type arrayType = collectionContract.ItemType.MakeArrayType(); 489Type type = Globals.TypeOfDictionaryGeneric.MakeGenericType(collectionContract.ItemType.GetGenericArguments()); 490ConstructorInfo ci = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes)!; 553Type keyType = collectionContract.ItemType.GenericTypeArguments[0]; 554Type valueType = collectionContract.ItemType.GenericTypeArguments[1]; 584Type collectionType = resultCollectionObject.GetType(); 585Type genericCollectionType = typeof(ICollection<T>); 586Type typeIList = Globals.TypeOfIList; 621static MethodInfo MakeGenericMethod(MethodInfo method, Type keyType, Type valueType) => method.MakeGenericMethod(keyType, valueType); 626private static bool ReflectionTryReadPrimitiveArray(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString collectionItemName, XmlDictionaryString collectionItemNamespace, Type itemType, int arraySize, [NotNullWhen(true)] out object? resultArray) 634switch (Type.GetTypeCode(itemType))
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (7)
41Type itemType = collectionDataContract.ItemType; 72Type elementType = collectionDataContract.GetCollectionElementType(); 96private static bool ReflectionTryWritePrimitiveArray(XmlWriterDelegator xmlWriter, object obj, Type itemType, XmlDictionaryString collectionItemName, XmlDictionaryString itemNamespace) 102switch (Type.GetTypeCode(itemType)) 150Type memberType = member.MemberType; 206public static void ReflectionWriteStartElement(XmlWriterDelegator xmlWriter, Type type, XmlDictionaryString ns, string namespaceLocal, string nameLocal) 225private static bool NeedsPrefix(Type type, XmlDictionaryString? ns)
System\Runtime\Serialization\SchemaExporter.cs (11)
250private XmlElement ExportGenericInfo(Type clrType, string elementName, string elementNs) 252Type? itemType; 265Type[]? genericArguments = null; 347Collection<Type> knownTypes = new Collection<Type>(); 510Type clrType = dataContract.UnderlyingType; 592internal static void GetXmlTypeInfo(Type type, out XmlQualifiedName xmlName, out XmlSchemaType? xsdType, out bool hasRoot) 605private static bool InvokeSchemaProviderMethod(Type clrType, XmlSchemaSet schemas, out XmlQualifiedName xmlName, out XmlSchemaType? xsdType, out bool hasRoot) 631MethodInfo? getMethod = clrType.GetMethod(methodName, /*BindingFlags.DeclaredOnly |*/ BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, new Type[] { typeof(XmlSchemaSet) }); 694Type clrType, 746internal static bool IsSpecialXmlType(Type type, [NotNullWhen(true)] out XmlQualifiedName? typeName, [NotNullWhen(true)] out XmlSchemaType? xsdType, out bool hasRoot)
System\Runtime\Serialization\SchemaImporter.cs (6)
187Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>(); 502Type? referencedType; 739Type? referencedType; 1336Collection<Type> knownTypes = new Collection<Type>();
System\Runtime\Serialization\SpecialTypeDataContract.cs (2)
15Type type, 27Type type,
System\Runtime\Serialization\XmlDataContract.cs (8)
30internal XmlDataContract(Type type) : base(new XmlDataContractCriticalHelper(type)) 138Type type) : base(type) 252ConstructorInfo? ctor = UnderlyingType.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes); 273Type type = this.UnderlyingType; 305Type? xName = type.Assembly.GetType("System.Xml.Linq.XName"); 311new Type[] { typeof(string) } 315new Type[] { xName } 362internal IXmlSerializable ReflectionCreateXmlSerializable(Type type)
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (24)
22s_writeStartElementMethod2 = typeof(XmlWriterDelegator).GetMethod("WriteStartElement", Globals.ScanAllMembers, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 36s_writeStartElementMethod3 = typeof(XmlWriterDelegator).GetMethod("WriteStartElement", Globals.ScanAllMembers, new Type[] { typeof(string), typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 50s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Type.EmptyTypes); 64s_writeNamespaceDeclMethod = typeof(XmlWriterDelegator).GetMethod("WriteNamespaceDecl", Globals.ScanAllMembers, new Type[] { typeof(XmlDictionaryString) }); 84s_dictionaryEnumeratorCtor = typeof(CollectionDataContract.DictionaryEnumerator).GetConstructor(Globals.ScanAllMembers, new Type[] { Globals.TypeOfIDictionaryEnumerator }); 141s_isStartElementMethod2 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }); 155s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Type.EmptyTypes); 170s_getUninitializedObjectMethod = typeof(XmlFormatReaderGenerator).GetMethod("UnsafeGetUninitializedObject", Globals.ScanAllMembers, new Type[] { typeof(int) })!; 209internal static ConstructorInfo SerializationExceptionCtor => s_serializationExceptionCtor ??= typeof(SerializationException).GetConstructor(new Type[] { typeof(string) })!; 212internal static ConstructorInfo ExtensionDataObjectCtor => s_extensionDataObjectCtor ??= typeof(ExtensionDataObject).GetConstructor(Globals.ScanAllMembers, Type.EmptyTypes)!; 223s_hashtableCtor = Globals.TypeOfHashtable.GetConstructor(Globals.ScanAllMembers, Type.EmptyTypes); 265s_storeCollectionMemberInfoMethod = typeof(XmlObjectSerializerReadContext).GetMethod("StoreCollectionMemberInfo", Globals.ScanAllMembers, new Type[] { typeof(object) }); 279s_resetCollectionMemberInfoMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ResetCollectionMemberInfo", Globals.ScanAllMembers, Type.EmptyTypes); 364s_internalDeserializeMethod = typeof(XmlObjectSerializerReadContext).GetMethod("InternalDeserialize", Globals.ScanAllMembers, new Type[] { typeof(XmlReaderDelegator), typeof(int), typeof(RuntimeTypeHandle), typeof(string), typeof(string) }); 451s_readIfNullOrRefMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ReadIfNullOrRef", Globals.ScanAllMembers, new Type[] { typeof(XmlReaderDelegator), typeof(Type), typeof(bool) }); 663s_createUnexpectedStateExceptionMethod = typeof(XmlObjectSerializerReadContext).GetMethod("CreateUnexpectedStateException", Globals.ScanAllMembers, new Type[] { typeof(XmlNodeType), typeof(XmlReaderDelegator) }); 708s_writeNullMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("WriteNull", Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), typeof(Type), typeof(bool) }); 736s_incrementCollectionCountMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("IncrementCollectionCount", Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), typeof(ICollection) }); 774internal static object? GetDefaultValue(Type type) 1025s_getTypeHandleMethod = typeof(Type).GetMethod("get_TypeHandle"); 1053s_throwInvalidDataContractExceptionMethod = typeof(DataContract).GetMethod("ThrowInvalidDataContractException", Globals.ScanAllMembers, new Type[] { typeof(string), typeof(Type) });
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (20)
64private Type? _objectType; 256Type type = _objectType = classContract.UnderlyingType; 426Type memberType = dataMember.MemberType; 504private LocalBuilder ReadValue(Type type, string name, string ns) 595private void InternalDeserialize(LocalBuilder value, Type type, string name, string ns) 599Type declaredType = type.IsPointer ? Globals.TypeOfReflectionPointer : type; 618Type innerType = innerValue.LocalType, outerType = outerValue.LocalType; 623Type type = Globals.TypeOfNullable.MakeGenericType(innerType); 624_ilg.New(type.GetConstructor(new Type[] { innerType })!); 627_ilg.Call(outerType.GetConstructor(new Type[] { innerType })!); 635Type type = collectionContract.UnderlyingType; 636Type itemType = collectionContract.ItemType; 647constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes)!; 777Type type = collectionContract.UnderlyingType; 778Type itemType = collectionContract.ItemType; 839private bool TryReadPrimitiveArray(Type itemType, LocalBuilder size) 848switch (Type.GetTypeCode(itemType)) 890private LocalBuilder ReadCollectionItem(CollectionDataContract collectionContract, Type itemType, string itemName, string itemNs) 997Type type) 1010var type = DataContract.GetDataContractForInitialization(id).TypeForInitialization;
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (27)
154private void InitArgs(Type objType) 313Type memberType = member.MemberType; 396Type itemType = collectionContract.ItemType; 442Type? enumeratorType; 443Type[]? keyValueTypes = null; 453keyValueTypes = new Type[] { Globals.TypeOfObject, Globals.TypeOfObject }; 460MethodInfo? moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 461MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 471Type ienumeratorInterface = Globals.TypeOfIEnumerator; 475Type[] interfaceTypes = enumeratorType.GetInterfaces(); 476foreach (Type interfaceType in interfaceTypes) 492Type elementType = getCurrentMethod.ReturnType; 504Type ctorParam = Globals.TypeOfIEnumeratorGeneric.MakeGenericType(Globals.TypeOfKeyValuePair.MakeGenericType(keyValueTypes!)); 505ConstructorInfo dictEnumCtor = enumeratorType.GetConstructor(Globals.ScanAllMembers, new Type[] { ctorParam })!; 541private bool TryWritePrimitive(Type type, LocalBuilder? value, MemberInfo? memberInfo, LocalBuilder? arrayItemIndex, LocalBuilder ns, LocalBuilder? name, int nameIndex) 589private bool TryWritePrimitiveArray(Type type, Type itemType, LocalBuilder value, LocalBuilder itemName, LocalBuilder itemNamespace) 596switch (Type.GetTypeCode(itemType)) 628_ilg.Call(typeof(XmlWriterDelegator).GetMethod(writeArrayMethod, Globals.ScanAllMembers, new Type[] { type, typeof(XmlDictionaryString), typeof(XmlDictionaryString) })!); 638Type memberType = memberValue.LocalType; 711private void InternalSerialize(MethodInfo methodInfo, LocalBuilder memberValue, Type memberType, bool writeXsiType) 718_ilg.Call(null, typeof(Type).GetMethod("GetTypeHandle")!, memberValue); 722_ilg.Call(typeof(RuntimeTypeHandle).GetMethod("Equals", new Type[] { typeof(RuntimeTypeHandle) })!); 734Type memberType = memberValue.LocalType; 740Type innerType = memberType.GetGenericArguments()[0]; 760private static bool NeedsPrefix(Type type, XmlDictionaryString ns) 765private void WriteStartElement(Type type, XmlDictionaryString ns, LocalBuilder namespaceLocal, LocalBuilder? nameLocal, int nameIndex)
System\Runtime\Serialization\XmlObjectSerializer.cs (3)
456internal static string GetTypeInfoError(string errorMessage, Type? type, Exception innerException) 463internal virtual Type? GetSerializeType(object? graph) 468internal virtual Type? GetDeserializeType()
System\Runtime\Serialization\XmlObjectSerializerContext.cs (18)
24protected IList<Type>? serializerKnownTypeList; 100internal DataContract GetDataContract(Type type) 107internal virtual DataContract GetDataContract(RuntimeTypeHandle typeHandle, Type? type) 121internal virtual DataContract GetDataContractSkipValidation(int typeId, RuntimeTypeHandle typeHandle, Type? type) 149internal virtual void CheckIfTypeSerializable(Type memberType, bool isMemberTypeSerializable) 157internal virtual Type GetSurrogatedType(Type type) 190internal static DataContractDictionary? GetDataContractsForKnownTypes(IList<Type> knownTypeList) 194Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 197Type knownType = knownTypeList[i]; 208internal bool IsKnownType(DataContract dataContract, DataContractDictionary? knownDataContracts, Type? declaredType) 228internal bool IsKnownType(DataContract dataContract, Type? declaredType) 236internal Type? ResolveNameFromKnownTypes(XmlQualifiedName typeName) 251protected DataContract? ResolveDataContractFromKnownTypes(string typeName, string? typeNs, DataContract? memberTypeContract, Type? declaredType) 261Type? dataContractType = _dataContractResolver.ResolveName(typeName, typeNs, declaredType, KnownTypeResolver);
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (13)
58internal static void ThrowNullValueReturnedForGetOnlyCollectionException(Type type) 64internal static void ThrowArrayExceededSizeException(int arraySize, Type type) 92return InternalDeserialize(xmlReader, name, ns, Type.GetTypeFromHandle(declaredTypeHandle)!, ref dataContract); 97internal virtual object? InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, string? name, string? ns) 105internal virtual object? InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract? dataContract, string? name, string? ns) 113protected bool TryHandleNullOrRef(XmlReaderDelegator reader, string? name, string? ns, Type declaredType, ref object? retObj) 140protected object? InternalDeserialize(XmlReaderDelegator reader, string? name, string? ns, Type declaredType, ref DataContract dataContract) 294internal string ReadIfNullOrRef(XmlReaderDelegator xmlReader, Type memberType, bool isMemberTypeSerializable) 380internal object? GetExistingObject(string id, Type? type, string? name, string? ns) 424private object? DeserializeFromExtensionData(IDataNode dataNode, Type type, string? name, string? ns) 543public SerializationInfo ReadSerializationInfo(XmlReaderDelegator xmlReader, Type type) 749Type valueType = xmlReader.ValueType; 777private IDataNode ReadUnknownPrimitiveData(XmlReaderDelegator xmlReader, Type type, string? dataContractName, string? dataContractNamespace)
System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (8)
36return InternalDeserializeWithSurrogate(xmlReader, Type.GetTypeFromHandle(declaredTypeHandle)!, null /*surrogateDataContract*/, name, ns); 41internal override object? InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, string? name, string? ns) 51internal override object? InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract? dataContract, string? name, string? ns) 61private object? InternalDeserializeWithSurrogate(XmlReaderDelegator xmlReader, Type declaredType, DataContract? surrogateDataContract, string? name, string? ns) 82internal override void CheckIfTypeSerializable(Type memberType, bool isMemberTypeSerializable) 99internal override Type GetSurrogatedType(Type type) 108Type surrogateType = DataContractSerializer.GetSurrogatedType(_serializationSurrogateProvider, type);
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (22)
99Type declaredType = Globals.TypeOfObject; 119SerializeWithXsiType(xmlWriter, obj, objTypeHandle, null /*type*/, declaredTypeID, declaredTypeHandle, Type.GetTypeFromHandle(declaredTypeHandle)!); 144internal virtual void SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType) 149Type declaredType = rootTypeDataContract.OriginalUnderlyingType; 167protected virtual void SerializeWithXsiType(XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle objectTypeHandle, Type? objectType, int declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type declaredType) 179objectType ??= Type.GetTypeFromHandle(objectTypeHandle)!; 232protected void SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, object obj, bool verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType) 271internal virtual bool WriteClrTypeInfo(XmlWriterDelegator xmlWriter, Type dataContractType, string? clrTypeName, string? clrAssemblyName) 276internal virtual bool WriteClrTypeInfo(XmlWriterDelegator xmlWriter, Type dataContractType, SerializationInfo serInfo) 401internal void WriteNull(XmlWriterDelegator xmlWriter, Type memberType, bool isMemberTypeSerializable) 409internal void WriteNull(XmlWriterDelegator xmlWriter, Type memberType, bool isMemberTypeSerializable, XmlDictionaryString name, XmlDictionaryString? ns) 441internal static bool IsMemberTypeSameAsMemberValue(object obj, Type memberType) 460internal static void ThrowRequiredMemberMustBeEmitted(string memberName, Type type) 517Type objType = obj.GetType(); 535internal void WriteSerializationInfo(XmlWriterDelegator xmlWriter, Type objType, SerializationInfo serInfo) 589private void WriteResolvedTypeInfo(XmlWriterDelegator writer, Type objectType, Type declaredType) 600private bool ResolveType(Type objectType, Type declaredType, [NotNullWhen(true)] out XmlDictionaryString? typeName, [NotNullWhen(true)] out XmlDictionaryString? typeNamespace) 712Type dataType = dataNode.DataType; 748Type declaredType = (dataNode.DataContractName == null) ? o.GetType() : Globals.TypeOfObject;
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (9)
41internal override bool WriteClrTypeInfo(XmlWriterDelegator xmlWriter, Type dataContractType, string? clrTypeName, string? clrAssemblyName) 180internal override void CheckIfTypeSerializable(Type memberType, bool isMemberTypeSerializable) 197internal override Type GetSurrogatedType(Type type) 206Type surrogateType = DataContractSerializer.GetSurrogatedType(_serializationSurrogateProvider, type); 226Type objType = Type.GetTypeFromHandle(objTypeHandle)!; 227Type declaredType = GetSurrogatedType(Type.GetTypeFromHandle(declaredTypeHandle)!);
System\Runtime\Serialization\XmlReaderDelegator.cs (7)
209private static InvalidDataContractException CreateInvalidPrimitiveTypeException(Type type) 216public object ReadElementContentAsAnyType(Type valueType) 224internal object ReadContentAsAnyType(Type valueType) 226switch (Type.GetTypeCode(valueType)) 280internal IDataNode ReadExtensionData(Type valueType) 282switch (Type.GetTypeCode(valueType)) 1096internal Type ValueType { get { return reader.ValueType; } }
System\Runtime\Serialization\XmlSerializableReader.cs (2)
86public override Type ValueType { get { return InnerReader.ValueType; } } 123public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver) { return InnerReader.ReadContentAs(returnType, namespaceResolver); }
System\Runtime\Serialization\XmlWriterDelegator.cs (5)
272private static InvalidDataContractException CreateInvalidPrimitiveTypeException(Type type) 282internal void WriteAnyType(object value, Type valueType) 285switch (Type.GetTypeCode(valueType)) 361Type valueType = dataNode.DataType; 362switch (Type.GetTypeCode(valueType))
System\Runtime\Serialization\XPathQueryGenerator.cs (2)
24public static string CreateFromDataContractSerializer(Type type, MemberInfo[] pathToMember, out XmlNamespaceManager namespaces) 32public static string CreateFromDataContractSerializer(Type type, MemberInfo[] pathToMember, StringBuilder? rootElementXpath, out XmlNamespaceManager namespaces)
System\Runtime\Serialization\XsdDataContractExporter.cs (25)
92private static void EnsureTypeNotGeneric(Type type) 116Type[] types = assembly.GetTypes(); 133/// <param name="types">A <see cref="ICollection{T}"/> (of <see cref="Type"/>) that contains the types to export.</param> 136public void Export(ICollection<Type> types) 143foreach (Type type in types) 162/// <param name="type">The <see cref="Type"/> to transform into an XML schema.</param> 165public void Export(Type type) 183/// Returns the contract name and contract namespace for the <see cref="Type"/>. 185/// <param name="type">The <see cref="Type"/> that was exported.</param> 189public XmlQualifiedName GetSchemaTypeName(Type type) 208public XmlSchemaType? GetSchemaType(Type type) 221/// Returns the top-level name and namespace for the <see cref="Type"/>. 223/// <param name="type">The <see cref="Type"/> to query.</param> 227public XmlQualifiedName? GetRootElementName(Type type) 246private Type GetSurrogatedType(Type type) 256private void CheckAndAddType(Type type) 265private void AddType(Type type) 285Collection<Type> knownTypes = Options.KnownTypes; 291Type type = knownTypes[i]; 319Type[] types = assembly.GetTypes(); 345public bool CanExport(ICollection<Type> types) 352foreach (Type type in types) 376/// <param name="type">The <see cref="Type"/> to export.</param> 380public bool CanExport(Type type)
System\Xml\ValueHandle.cs (1)
155public Type ToType()
System\Xml\XmlBaseReader.cs (3)
1676public override object ReadContentAs(Type type, IXmlNamespaceResolver? namespaceResolver) 1745public override Type ValueType 1751Type type = _node.Value.ToType();
System\Xml\XmlBinaryReader.cs (1)
1158public override bool IsStartArray([NotNullWhen(true)] out Type? type)
System\Xml\XmlBinaryWriter.cs (1)
1171Type type = reader.ValueType;
System\Xml\XmlDictionaryReader.cs (4)
588public override object ReadContentAs(Type type, IXmlNamespaceResolver? namespaceResolver) 1017public virtual bool IsStartArray([NotNullWhen(true)] out Type? type) 1647public override Type ValueType 1792public override object ReadContentAs(Type type, IXmlNamespaceResolver? namespaceResolver)
System\Xml\XmlDictionaryWriter.cs (4)
290private void WriteArrayNode(XmlDictionaryReader reader, string prefix, string localName, string namespaceUri, Type type) 319private void WriteArrayNode(XmlDictionaryReader reader, string prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri, Type type) 348private void WriteArrayNode(XmlDictionaryReader reader, Type type) 391Type? type;
System.Private.Uri (1)
System\UriSyntax.cs (1)
232Type type = this.GetType();
System.Private.Xml (1223)
System\Xml\BinaryXml\XmlBinaryReader.cs (16)
19private static volatile Type?[] s_tokenTypeMap = null!; 298private System.Type _valueType; 613public override System.Type ValueType 1757public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver) 3266private static Type?[] GenerateTokenTypeMap() 3268Type?[] map = new Type[256]; 3280Type TypeOfInt32 = typeof(int); 3283Type TypeOfDecimal = typeof(decimal); 3289Type TypeOfDateTime = typeof(System.DateTime); 3298Type TypeOfDateTimeOffset = typeof(System.DateTimeOffset); 3302Type TypeOfByteArray = typeof(byte[]); 3309Type TypeOfString = typeof(string); 3320private System.Type GetValueType(BinXmlToken token) 3322Type? t = s_tokenTypeMap[(int)token]; 4182private object ValueAs(BinXmlToken token, Type returnType, IXmlNamespaceResolver? namespaceResolver)
System\Xml\Core\XmlAsyncCheckReader.cs (6)
217public override System.Type ValueType 280public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver) 400public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 406public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver, string localName, string namespaceURI) 803public override Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver) 827public override Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
System\Xml\Core\XmlReader.cs (4)
139public virtual Type ValueType => typeof(string); 318public virtual object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver) 530public virtual object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 544public virtual object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver, string localName, string namespaceURI)
System\Xml\Core\XmlReaderAsync.cs (2)
46public virtual async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver) 98public virtual async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
System\Xml\Core\XmlSubtreeReader.cs (1)
801public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver)
System\Xml\Core\XmlSubtreeReaderAsync.cs (1)
215public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver)
System\Xml\Core\XmlWrappingReader.cs (1)
47public override System.Type ValueType { get { return reader.ValueType; } }
System\Xml\Core\XsdValidatingReader.cs (4)
123private static volatile Type s_typeOfString = null!; 415public override System.Type ValueType 730public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver) 1063public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver)
System\Xml\Core\XsdValidatingReaderAsync.cs (2)
75public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver) 174public override async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
System\Xml\Resolvers\XmlPreloadedResolver.cs (4)
37internal virtual bool SupportsType(Type? type) 114internal override bool SupportsType(Type? type) 225public override object? GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) 265public override bool SupportsType(Uri absoluteUri, Type? type)
System\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
19Type? ofObjectToReturn)
System\Xml\Schema\DataTypeImplementation.cs (54)
431Type derivedType = this.GetType(); 432Type baseType = datatype.GetType(); 480public override Type ValueType { get { return typeof(string); } } 989public override Type ValueType { get { return ListValueType; } } 993internal override Type ListValueType { get { return _itemType.ListValueType; } } 1100Type arrayType; 1189public override Type ValueType { get { return typeof(object); } } 1195internal override Type ListValueType { get { return typeof(object[]); } } 1357public override Type ValueType { get { return typeof(string); } } 1361internal override Type ListValueType { get { return typeof(string[]); } } 1507public override Type ValueType { get { return typeof(bool); } } 1509internal override Type ListValueType { get { return typeof(bool[]); } } 1584public override Type ValueType { get { return typeof(float); } } 1586internal override Type ListValueType { get { return typeof(float[]); } } 1670public override Type ValueType { get { return typeof(double); } } 1672internal override Type ListValueType { get { return typeof(double[]); } } 1760public override Type ValueType { get { return typeof(decimal); } } 1762internal override Type ListValueType { get { return typeof(decimal[]); } } 1849public override Type ValueType { get { return typeof(TimeSpan); } } 1851internal override Type ListValueType { get { return typeof(TimeSpan[]); } } 1998public override Type ValueType { get { return typeof(DateTime); } } 2000internal override Type ListValueType { get { return typeof(DateTime[]); } } 2388public override Type ValueType { get { return typeof(byte[]); } } 2390internal override Type ListValueType { get { return typeof(byte[][]); } } 2486public override Type ValueType { get { return typeof(byte[]); } } 2488internal override Type ListValueType { get { return typeof(byte[][]); } } 2583public override Type ValueType { get { return typeof(Uri); } } 2592internal override Type ListValueType { get { return typeof(Uri[]); } } 2693public override Type ValueType { get { return typeof(XmlQualifiedName); } } 2695internal override Type ListValueType { get { return typeof(XmlQualifiedName[]); } } 3026public override Type ValueType { get { return typeof(XmlQualifiedName); } } 3028internal override Type ListValueType { get { return typeof(XmlQualifiedName[]); } } 3224public override Type ValueType { get { return typeof(long); } } 3226internal override Type ListValueType { get { return typeof(long[]); } } 3278public override Type ValueType { get { return typeof(int); } } 3280internal override Type ListValueType { get { return typeof(int[]); } } 3333public override Type ValueType { get { return typeof(short); } } 3335internal override Type ListValueType { get { return typeof(short[]); } } 3387public override Type ValueType { get { return typeof(sbyte); } } 3389internal override Type ListValueType { get { return typeof(sbyte[]); } } 3473public override Type ValueType { get { return typeof(ulong); } } 3475internal override Type ListValueType { get { return typeof(ulong[]); } } 3527public override Type ValueType { get { return typeof(uint); } } 3529internal override Type ListValueType { get { return typeof(uint[]); } } 3581public override Type ValueType { get { return typeof(ushort); } } 3583internal override Type ListValueType { get { return typeof(ushort[]); } } 3634public override Type ValueType { get { return typeof(byte); } } 3636internal override Type ListValueType { get { return typeof(byte[]); } } 3757public override Type ValueType { get { return typeof(XmlQualifiedName); } } 3759internal override Type ListValueType { get { return typeof(XmlQualifiedName[]); } } 3769public override Type ValueType { get { return typeof(char); } } 3771internal override Type ListValueType { get { return typeof(char[]); } } 3866public override Type ValueType { get { return typeof(Guid); } } 3868internal override Type ListValueType { get { return typeof(Guid[]); } }
System\Xml\Schema\Preprocessor.cs (1)
350Type returnType = obj.GetType();
System\Xml\Schema\XmlAtomicValue.cs (2)
211public override Type ValueType 354public override object ValueAs(Type type, IXmlNamespaceResolver? nsResolver)
System\Xml\Schema\XmlSchemaDataType.cs (5)
16public abstract Type ValueType { get; } 24internal abstract Type ListValueType { get; } 28public virtual object ChangeType(object value, Type targetType) 36public virtual object ChangeType(object value, Type targetType, IXmlNamespaceResolver namespaceResolver) 174Type t = value.GetType();
System\Xml\Schema\XmlValueConverter.cs (160)
213public abstract object ChangeType(bool value, Type destinationType); 214public abstract object ChangeType(int value, Type destinationType); 215public abstract object ChangeType(long value, Type destinationType); 216public abstract object ChangeType(decimal value, Type destinationType); 217public abstract object ChangeType(double value, Type destinationType); 218public abstract object ChangeType(DateTime value, Type destinationType); 219public abstract object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver); 220public abstract object ChangeType(object value, Type destinationType); 221public abstract object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver); 228private readonly Type? _clrTypeDefault; 229private readonly Type? _clrListTypeDefault; 287protected XmlBaseConverter(XmlBaseConverter converterAtomic, Type clrTypeDefault, Type clrListTypeDefault) 295protected static readonly Type ICollectionType = typeof(ICollection); 296protected static readonly Type IEnumerableType = typeof(IEnumerable); 297protected static readonly Type IListType = typeof(IList); 298protected static readonly Type ObjectArrayType = typeof(object[]); 299protected static readonly Type StringArrayType = typeof(string[]); 300protected static readonly Type StringArrayArrayType = typeof(string[][]); 301protected static readonly Type XmlAtomicValueArrayType = typeof(XmlAtomicValue[]); 302protected static readonly Type XPathItemArrayType = typeof(XPathItem[]); 303protected static readonly Type XPathNavigatorArrayType = typeof(XPathNavigator[]); 306protected static readonly Type DecimalType = typeof(decimal); 307protected static readonly Type Int32Type = typeof(int); 308protected static readonly Type Int64Type = typeof(long); 309protected static readonly Type StringType = typeof(string); 310protected static readonly Type XmlAtomicValueType = typeof(XmlAtomicValue); 311protected static readonly Type ObjectType = typeof(object); 312protected static readonly Type ByteType = typeof(byte); 313protected static readonly Type Int16Type = typeof(short); 314protected static readonly Type SByteType = typeof(sbyte); 315protected static readonly Type UInt16Type = typeof(ushort); 316protected static readonly Type UInt32Type = typeof(uint); 317protected static readonly Type UInt64Type = typeof(ulong); 318protected static readonly Type XPathItemType = typeof(XPathItem); 319protected static readonly Type DoubleType = typeof(double); 320protected static readonly Type SingleType = typeof(float); 321protected static readonly Type DateTimeType = typeof(DateTime); 322protected static readonly Type DateTimeOffsetType = typeof(DateTimeOffset); 323protected static readonly Type BooleanType = typeof(bool); 324protected static readonly Type ByteArrayType = typeof(byte[]); 325protected static readonly Type XmlQualifiedNameType = typeof(XmlQualifiedName); 326protected static readonly Type UriType = typeof(Uri); 327protected static readonly Type TimeSpanType = typeof(TimeSpan); 328protected static readonly Type XPathNavigatorType = typeof(XPathNavigator); 384public override object ChangeType(bool value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 385public override object ChangeType(DateTime value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 386public override object ChangeType(decimal value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 387public override object ChangeType(double value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 388public override object ChangeType(int value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 389public override object ChangeType(long value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); } 390public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) { return (object)ChangeType((object)value, destinationType, nsResolver); } 391public override object ChangeType(object value, Type destinationType) { return this.ChangeType(value, destinationType, null); } 443protected Type? DefaultClrType 451protected Type? DefaultClrListType 459protected static bool IsDerivedFrom(Type? derivedType, Type baseType) 475protected Exception CreateInvalidClrMappingException(Type sourceType, Type destinationType) 512protected virtual object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 906Type sourceType = value.GetType(); 931Type sourceType = value.GetType(); 956Type sourceType = value.GetType(); 996Type sourceType = value.GetType(); 1012public override object ChangeType(decimal value, Type destinationType) 1027public override object ChangeType(int value, Type destinationType) 1042public override object ChangeType(long value, Type destinationType) 1057public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1073public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1078Type sourceType = value.GetType(); 1122private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1124Type sourceType = value.GetType(); 1135private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1172Type sourceType = value.GetType(); 1216Type sourceType = value.GetType(); 1245Type sourceType = value.GetType(); 1260public override object ChangeType(double value, Type destinationType) 1274public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1289public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1294Type sourceType = value.GetType(); 1358Type sourceType = value.GetType(); 1398Type sourceType = value.GetType(); 1477Type sourceType = value.GetType(); 1492public override object ChangeType(DateTime value, Type destinationType) 1506public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1521public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1526Type sourceType = value.GetType(); 1574Type sourceType = value.GetType(); 1638Type sourceType = value.GetType(); 1652public override object ChangeType(bool value, Type destinationType) 1665public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1679public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1684Type sourceType = value.GetType(); 1723Type sourceType = value.GetType(); 1761public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1799public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1804Type sourceType = value.GetType(); 1918private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1920Type sourceType = value.GetType(); 1927private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1952Type sourceType = value.GetType(); 1965public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1978public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 1983Type sourceType = value.GetType(); 2036Type sourceType = value.GetType(); 2058Type sourceType = value.GetType(); 2080Type sourceType = value.GetType(); 2101Type sourceType = value.GetType(); 2123Type sourceType = value.GetType(); 2145Type sourceType = value.GetType(); 2167Type sourceType = value.GetType(); 2189Type sourceType = value.GetType(); 2237Type sourceType = value.GetType(); 2268public override object ChangeType(bool value, Type destinationType) 2278public override object ChangeType(DateTime value, Type destinationType) 2288public override object ChangeType(decimal value, Type destinationType) 2298public override object ChangeType(double value, Type destinationType) 2308public override object ChangeType(int value, Type destinationType) 2318public override object ChangeType(long value, Type destinationType) 2328public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2359public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2364Type sourceType = value.GetType(); 2462private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2464Type sourceType = value.GetType(); 2470private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2484protected override object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2486Type sourceType = value.GetType(); 2504private static bool SupportsType(Type clrType) 2548Type sourceType = value.GetType(); 2564Type sourceType = value.GetType(); 2579Type sourceType = value.GetType(); 2595Type sourceType = value.GetType(); 2611Type sourceType = value.GetType(); 2627Type sourceType = value.GetType(); 2643Type sourceType = value.GetType(); 2659Type sourceType = value.GetType(); 2678public override object ChangeType(bool value, Type destinationType) 2688public override object ChangeType(DateTime value, Type destinationType) 2698public override object ChangeType(decimal value, Type destinationType) 2708public override object ChangeType(double value, Type destinationType) 2718public override object ChangeType(int value, Type destinationType) 2728public override object ChangeType(long value, Type destinationType) 2738public override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2749public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2754Type sourceType = value.GetType(); 2832private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2834Type sourceType = value.GetType(); 2840private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2874public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2899protected XmlListConverter(XmlBaseConverter atomicConverter, Type clrTypeDefault, Type clrListTypeDefault) : base(atomicConverter, clrTypeDefault, clrListTypeDefault) 2930public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2943protected override object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 2945Type sourceType = value.GetType(); 2972Type? itemTypeDst = destinationType.GetElementType(); 3022private static bool IsListType(Type type) 3125private new InvalidCastException CreateInvalidClrMappingException(Type sourceType, Type destinationType) 3172public override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver? nsResolver) 3177Type sourceType = value.GetType();
System\Xml\Serialization\CodeGenerator.cs (83)
40private Dictionary<(Type, string), Queue<LocalBuilder>>? _freeLocals; 50internal static bool IsNullableGenericType(Type type) 58internal static void AssertHasInterface(Type type, Type iType) 61foreach (Type iFace in type.GetInterfaces()) 69internal void BeginMethod(Type returnType, string methodName, Type[] argTypes, string[] argNames, MethodAttributes methodAttributes) 76internal void BeginMethod(Type returnType, MethodBuilderInfo methodBuilderInfo, Type[] argTypes, string[] argNames, MethodAttributes methodAttributes) 86private void InitILGeneration(Type[] argTypes, string[] argNames, bool isStatic) 93_freeLocals = new Dictionary<(Type, string), Queue<LocalBuilder>>(); 149private readonly Dictionary<Type, LocalBuilder> _tmpLocals = new Dictionary<Type, LocalBuilder>(); 150internal LocalBuilder GetTempLocal(Type type) 161internal static Type GetVariableType(object var) 217private bool TryDequeueLocal(Type type, string name, [NotNullWhen(true)] out LocalBuilder? local) 224(Type, string) key = (type, name); 241internal LocalBuilder DeclareLocal(Type type, string name) 253internal LocalBuilder DeclareOrGetLocal(Type type, string name) 291Type varType = GetVariableType(forState.End); 304Type.EmptyTypes 384internal void BeginCatchBlock(Type exception) 421internal void InitObj(Type valueType) 426internal void NewArray(Type elementType, object len) 432internal void StackallocSpan(Type elementType, int len) 438_ilGen!.Emit(OpCodes.Newobj, typeof(Span<>).MakeGenericType(elementType).GetConstructor(new Type[] { typeof(void*), typeof(int) })!); 443Type objType = GetVariableType(obj).GetElementType()!; 457Type arrayType = GetVariableType(obj); 461Call(typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) })!); 465Type objType = arrayType.GetElementType()!; 479private static bool IsStruct(Type objType) 485internal Type LoadMember(object obj, MemberInfo memberInfo) 499Type? currentType = propertyInfo.DeclaringType!.BaseType; 534internal Type LoadMember(MemberInfo memberInfo) 536Type? memberType; 567internal Type LoadMemberAddress(MemberInfo memberInfo) 569Type? memberType; 654internal void ConvertAddress(Type source, Type target) 659internal void ConvertValue(Type source, Type target) 664internal void Castclass(Type target) 669internal void Box(Type type) 674internal void Unbox(Type type) 707internal void Ldobj(Type type) 709OpCode opCode = GetLdindOpCode(Type.GetTypeCode(type)); 730internal void Stobj(Type type) 762internal void Ldtoken(Type t) 769Type valueType = o.GetType(); 770if (o is Type) 772Ldtoken((Type)o); 773Call(typeof(Type).GetMethod("GetTypeFromHandle", BindingFlags.Static | BindingFlags.Public, new Type[] { typeof(RuntimeTypeHandle) })!); 781switch (Type.GetTypeCode(valueType)) 819new Type[] { typeof(int), typeof(int), typeof(int), typeof(bool), typeof(byte) } 832new Type[] { typeof(long) } 846new Type[] { typeof(long) }, 858new Type[] { typeof(long), typeof(TimeSpan) }, 934internal void Stloc(Type type, string name) 950internal void Ldloc(Type type, string name) 1029internal void Ldelem(Type arrayElementType) 1037OpCode opCode = GetLdelemOpCode(Type.GetTypeCode(arrayElementType)); 1044internal void Ldelema(Type arrayElementType) 1077internal void Stelem(Type arrayElementType) 1083OpCode opCode = GetStelemOpCode(Type.GetTypeCode(arrayElementType)); 1189private void InternalConvert(Type source, Type target, bool isAddress) 1197OpCode opCode = GetConvOpCode(Type.GetTypeCode(target)); 1266[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type parent, 1267Type[] interfaces) 1334internal void IsInst(Type type) 1428internal Type ArgType; 1429internal ArgBuilder(string name, int index, Type argType) 1578public void AddToFreeLocals(Dictionary<(Type, string), Queue<LocalBuilder>> freeLocals) 1582(Type, string) key = (item.Value.LocalType, item.Key); 1603public readonly Type[] ParameterTypes; 1604public MethodBuilderInfo(MethodBuilder methodBuilder, Type[] parameterTypes) 1611public void Validate(Type? returnType, Type[] parameterTypes, MethodAttributes attributes) 1625private readonly Type _sourceType; 1626private readonly Type _targetType; 1630public CodeGeneratorConversionException(Type sourceType, Type targetType, bool isAddress, string reason)
System\Xml\Serialization\CodeIdentifier.cs (5)
183private static int GetCSharpName(Type t, Type[] parameters, int index, StringBuilder sb) 218internal static string GetCSharpName(Type t) 240Type[] arguments = t.IsGenericType || t.ContainsGenericParameters ? t.GetGenericArguments() : Type.EmptyTypes;
System\Xml\Serialization\CodeIdentifiers.cs (1)
170public object ToArray(Type type)
System\Xml\Serialization\Compilation.cs (21)
50internal TempAssembly(XmlMapping[] xmlMappings, Type?[] types, string? defaultNamespace, string? location) 137internal static Assembly? LoadGeneratedAssembly(Type type, string? defaultNamespace, out XmlSerializerImplementation? contract) 213Type contractType = GetTypeFromAssembly(serializer, "XmlSerializerContract"); 226private static Assembly? LoadAssemblyByPath(Type type, string assemblyName) 264private static bool IsSerializerVersionMatch(Assembly serializer, Type type, string? defaultNamespace) 278private static string GenerateAssemblyId(Type type) 300internal static bool GenerateSerializerToStream(XmlMapping[] xmlMappings, Type?[] types, string? defaultNamespace, Assembly? assembly, Hashtable assemblies, Stream stream) 314foreach (Type t in scope.Types) 342Type? type = types[i]; 436internal static Assembly GenerateRefEmitAssembly(XmlMapping[] xmlMappings, Type?[] types) 438var mainType = (types.Length > 0) ? types[0] : null; 461new Type[] { typeof(string) } 493Type writerType = writerCodeGen.GenerateEnd(); 526[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type type, string methodName) 538internal static Type GetTypeFromAssembly(Assembly assembly, string typeName) 541Type? type = assembly.GetType(typeName); 587internal static void VerifyLoadContext(Type? t, Assembly? assembly) 666private readonly Type _type; 668internal TempAssemblyCacheKey(string? ns, Type type) 693internal TempAssembly? this[string? ns, Type t] 710internal void Add(string? ns, Type t, TempAssembly assembly)
System\Xml\Serialization\Compiler.cs (5)
24internal static void AddImport(Type? type, Hashtable types) 33Type? baseType = type.BaseType; 37Type? declaringType = type.DeclaringType; 41foreach (Type intf in type.GetInterfaces()) 56Type[] arguments = type.GetGenericArguments();
System\Xml\Serialization\ContextAwareTables.cs (4)
15private readonly ConditionalWeakTable<Type, T> _collectibleTable; 20_collectibleTable = new ConditionalWeakTable<Type, T>(); 23internal T GetOrCreateValue(Type t, Func<Type, T> f)
System\Xml\Serialization\ImportContext.cs (1)
259Type t = item.GetType();
System\Xml\Serialization\Mappings.cs (2)
1040private Type? _type; 1156internal Type? Type
System\Xml\Serialization\Models.cs (22)
21private readonly Dictionary<Type, TypeModel> _models = new Dictionary<Type, TypeModel>(); 22private readonly Dictionary<Type, TypeModel> _arrayModels = new Dictionary<Type, TypeModel>(); 35internal TypeModel GetTypeModel(Type type) 41internal TypeModel GetTypeModel(Type type, bool directReference) 77internal ArrayModel GetArrayModel(Type type) 98private readonly Type _type; 102[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 112internal Type Type 131[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 143[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 149[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 156[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 203private static void CheckSupportedMember(TypeDesc? typeDesc, MemberInfo member, Type type) 275private readonly Type _fieldType; 279internal FieldModel(string name, Type fieldType, TypeDesc fieldTypeDesc, bool checkSpecified, bool checkShouldPersist) : 283internal FieldModel(string name, Type fieldType, TypeDesc fieldTypeDesc, bool checkSpecified, bool checkShouldPersist, bool readOnly) 294internal FieldModel(MemberInfo memberInfo, Type fieldType, TypeDesc fieldTypeDesc) 300_checkShouldPersistMethodInfo = memberInfo.DeclaringType!.GetMethod($"ShouldSerialize{memberInfo.Name}", Type.EmptyTypes); 345internal Type FieldType 422Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { }
System\Xml\Serialization\NameTable.cs (1)
97internal Array ToArray(Type type)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (16)
564[DynamicallyAccessedMembers(TrimmerConstants.AllMethods)] Type collectionType) 594[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type targetCollectionType) 627Type type = o.GetType(); 638Type memberType; 772Type elementType; 1061private static Type GetMemberType(MemberInfo memberInfo) 1063Type memberType; 1141Type collectionType = memberMapping.TypeDesc!.Type!; 1230MethodInfo? method = typeof(XmlSerializationReader).GetMethod(methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, new Type[] { typeof(string) }); 1314[DynamicallyAccessedMembers(TrimmerConstants.AllMethods)] Type type) 1339| DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type) => 1341type.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly, null, Type.EmptyTypes, null); 1499private XmlSerializationCollectionFixupCallback GetCreateCollectionOfObjectsCallback(Type collectionType) 1998Type memberType = GetMemberType(memberInfo); 2017private static void AddItemInArrayMember(object o, MemberInfo memberInfo, Type memberType, object item) 2084public Type? Type { get; set; }
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (8)
675Type objType = o.GetType(); 922Type t = o.GetType(); 1349public static MemberInfo? GetMember(Type declaringType, string memberName, bool throwOnNotFound) 1355Type? currentType = declaringType.BaseType; 1397public static MemberInfo GetEffectiveGetInfo(Type declaringType, string memberName) 1406var parent = declaringType.BaseType; 1425public static MemberInfo GetEffectiveSetInfo(Type declaringType, string memberName) 1434var parent = declaringType.BaseType;
System\Xml\Serialization\SchemaImporter.cs (1)
78internal void MakeDerived(StructMapping structMapping, Type? baseType, bool baseTypeCanBeIndirect)
System\Xml\Serialization\SchemaObjectWriter.cs (2)
336System.Type t = o.GetType(); 1054System.Type t = o.GetType();
System\Xml\Serialization\SoapAttributeOverrides.cs (4)
17public void Add(Type type, SoapAttributes? attributes) 22public void Add(Type type, string member, SoapAttributes? attributes) 37public SoapAttributes? this[Type type] 45public SoapAttributes? this[Type type, string member]
System\Xml\Serialization\SoapIncludeAttribute.cs (3)
9private Type _type; 11public SoapIncludeAttribute(Type type) 16public Type Type
System\Xml\Serialization\SoapReflectionImporter.cs (12)
65public void IncludeType(Type type) 71private void IncludeType(Type type, RecursionLimiter limiter) 77public XmlTypeMapping ImportTypeMapping(Type type) 83public XmlTypeMapping ImportTypeMapping(Type type, string? defaultNamespace) 142private SoapAttributes GetAttributes(Type type) 258[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 685Type accessorType = model.FieldType; 762internal string XsdTypeName(Type type) 772internal string XsdTypeName(Type type, SoapAttributes a, string name) 780Type genType = type.GetGenericTypeDefinition(); 781Type[] names = genType.GetGenericArguments(); 782Type[] types = type.GetGenericArguments();
System\Xml\Serialization\SourceInfo.cs (17)
30new Type[] { typeof(int) } 39public readonly Type? Type; 43[DynamicallyAccessedMembers(TrimmerConstants.AllMethods)] Type? type, CodeGenerator ilg) 58public void LoadAddress(Type? elementType) 64public void Load(Type? elementType) 70private void InternalLoad(Type? elementType, bool asAddress = false) 76Type varType = CodeGenerator.GetVariableType(varA); 82Type eType = varType.GetElementType()!; 111new Type[] { typeof(int) } 121Type eType = get_Item.ReturnType; 146Type varType; 178Type memberType = (MemberInfo is FieldInfo) ? 209private void Convert(Type sourceType, Type? targetType, bool asAddress) 222| DynamicallyAccessedMemberTypes.NonPublicMethods)] Type nullableType, Type targetType) 230Type.EmptyTypes
System\Xml\Serialization\TypeExtensions.cs (2)
16this Type targetType, 28Type sourceType = data.GetType();
System\Xml\Serialization\Types.cs (43)
91private Type? _type; 125[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, bool isXsdType, XmlSchemaType dataType, string formatterName, TypeFlags flags) 132[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? type, string name, string fullName, TypeKind kind, TypeDesc? baseTypeDesc, TypeFlags flags, TypeDesc? arrayElementTypeDesc) 178internal Type? Type 361[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 550internal static bool IsKnownType(Type type) 557switch (Type.GetTypeCode(type)) 633[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 646[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 666[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 696internal TypeDesc GetTypeDesc(Type type) 702internal TypeDesc GetTypeDesc(Type type, MemberInfo? source, bool directReference) 708internal TypeDesc GetTypeDesc(Type type, MemberInfo? source, bool directReference, bool throwOnError) 727internal TypeDesc GetArrayTypeDesc(Type type) 751internal Type? GetTypeFromTypeDesc(TypeDesc typeDesc) 758return de.Key as Type; 764private TypeDesc ImportTypeDesc(Type type, MemberInfo? memberInfo, bool directReference) 768Type? arrayElementType = null; 769Type? baseType = null; 953for (Type? t = type.DeclaringType; t != null && !t.ContainsGenericParameters && !(t.IsAbstract && t.IsSealed); t = t.DeclaringType) 959private static bool IsArraySegment(Type t) 964internal static bool IsOptionalValue(Type type) 982internal static string TypeName(Type t) 1000Type[] arguments = t.GetGenericArguments(); 1018internal static Type? GetArrayElementType(Type type, string? memberInfo) 1169[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type derivedType, 1173Type currentType = derivedType; 1174Type typeToBeReplaced = memberInfoToBeReplaced.DeclaringType!; 1229| DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type) 1231ConstructorInfo? ctor = type.GetConstructor(BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic, Type.EmptyTypes); 1255private static Type? GetEnumeratorElementType(Type type, ref TypeFlags flags) 1259MethodInfo? enumerator = type.GetMethod("GetEnumerator", Type.EmptyTypes); 1283enumerator = type.GetMethod("System.Collections.IEnumerable.GetEnumerator", BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic, Type.EmptyTypes); 1294Type currentType = (p == null ? typeof(object) : p.PropertyType); 1296MethodInfo? addMethod = type.GetMethod("Add", new Type[] { currentType }); 1301addMethod = type.GetMethod("Add", new Type[] { currentType }); 1316[DynamicallyAccessedMembers(TrimmerConstants.PublicMembers)] Type type, string? memberInfo) 1334for (Type? t = type; t != null; t = t.BaseType) 1358MethodInfo? addMethod = type.GetMethod("Add", new Type[] { indexer.PropertyType }); 1365private static Type GetCollectionElementType( 1366[DynamicallyAccessedMembers(TrimmerConstants.PublicMembers)] Type type,
System\Xml\Serialization\XmlArrayItemAttribute.cs (4)
17private Type? _type; 43public XmlArrayItemAttribute(Type? type) 51public XmlArrayItemAttribute(string? elementName, Type? type) 60public Type? Type
System\Xml\Serialization\XmlAttributeAttribute.cs (4)
17private Type? _type; 40public XmlAttributeAttribute(Type? type) 48public XmlAttributeAttribute(string? attributeName, Type? type) 57public Type? Type
System\Xml\Serialization\XmlAttributeOverrides.cs (6)
19private readonly Dictionary<Type, Dictionary<string, XmlAttributes?>> _types = new Dictionary<Type, Dictionary<string, XmlAttributes?>>(); 24public void Add(Type type, XmlAttributes attributes) 32public void Add(Type type, string member, XmlAttributes? attributes) 50public XmlAttributes? this[Type type] 61public XmlAttributes? this[Type type, string member]
System\Xml\Serialization\XmlAttributes.cs (1)
176internal static object? GetAttr(MemberInfo memberInfo, Type attrType)
System\Xml\Serialization\Xmlcustomformatter.cs (1)
40Type type = value.GetType();
System\Xml\Serialization\XmlElementAttribute.cs (4)
17private Type? _type; 43public XmlElementAttribute(Type? type) 51public XmlElementAttribute(string? elementName, Type? type) 60public Type? Type
System\Xml\Serialization\XmlIncludeAttribute.cs (3)
14private Type? _type; 19public XmlIncludeAttribute(Type? type) 27public Type? Type
System\Xml\Serialization\XmlMapping.cs (1)
114internal static string GenerateKey(Type type, XmlRootAttribute? root, string? ns)
System\Xml\Serialization\XmlReflectionImporter.cs (43)
98Type type = ((XmlIncludeAttribute)attrs[i]).Type!; 107public void IncludeType(Type type) 113private void IncludeType(Type type, RecursionLimiter limiter) 137public XmlTypeMapping ImportTypeMapping(Type type) 146public XmlTypeMapping ImportTypeMapping(Type type, string? defaultNamespace) 155public XmlTypeMapping ImportTypeMapping(Type type, XmlRootAttribute? root) 164public XmlTypeMapping ImportTypeMapping(Type type, XmlRootAttribute? root, string? defaultNamespace) 236private XmlAttributes GetAttributes(Type type, bool canBeSimpleType) 472[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type type) 483MethodInfo? getMethod = getMethod = type.GetMethod(provider.MethodName, /* BindingFlags.DeclaredOnly | */ BindingFlags.Static | BindingFlags.Public, new Type[] { typeof(XmlSchemaSet) }); 494private SpecialMapping ImportSpecialMapping(Type type, TypeDesc typeDesc, string? ns, ImportContext context) 607private static InvalidOperationException InvalidAttributeUseException(Type type) 631[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 696private TypeMapping? GetTypeMapping(string? typeName, string? ns, TypeDesc typeDesc, NameTable typeLib, Type? type) 939internal string XsdTypeName(Type type) 949internal string XsdTypeName(Type type, XmlAttributes a, string name) 957Type genType = type.GetGenericTypeDefinition(); 958Type[] names = genType.GetGenericArguments(); 959Type[] types = type.GetGenericArguments(); 986private void SetArrayMappingType(ArrayMapping mapping, string? defaultNs, Type type) 1366Type? choiceIdentifierType = null; 1396Type? choiceIdentifierType = null; 1405private static Type CheckChoiceIdentifierType(Type type, bool isArrayLike, string identifierName, string memberName) 1430private static Type GetChoiceIdentifierType(XmlChoiceIdentifierAttribute choice, XmlReflectionMember[] xmlReflectionMembers, bool isArrayLike, string accessorName) 1444private static Type GetChoiceIdentifierType(XmlChoiceIdentifierAttribute choice, StructModel structModel, bool isArrayLike, string accessorName) 1474Type enumType = member.FieldType; 1480private void CreateArrayElementsFromAttributes(ArrayMapping arrayMapping, XmlArrayItemAttributes attributes, Type arrayElementType, string? arrayElementNs, RecursionLimiter limiter) 1489Type targetType = xmlArrayItem.Type ?? arrayElementType; 1505private void ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, string? ns, Type? choiceIdentifierType, bool rpc, bool openModel, RecursionLimiter limiter) 1515Type accessorType = model.FieldType; 1547Type arrayElementType = TypeScope.GetArrayElementType(accessorType, $"{model.FieldTypeDesc.FullName}.{model.Name}")!; 1574Type targetType = a.XmlAttribute!.Type == null ? arrayElementType : a.XmlAttribute.Type!; 1604Type targetType = a.XmlText.Type ?? arrayElementType; 1619Type targetType = xmlElement.Type ?? arrayElementType; 1660Type targetType = typeof(IXmlSerializable).IsAssignableFrom(arrayElementType) ? arrayElementType : typeof(XmlNode).IsAssignableFrom(arrayElementType) ? arrayElementType : typeof(XmlElement); 1861Type targetType = xmlElement.Type ?? accessorType; 1901Type targetType = typeof(IXmlSerializable).IsAssignableFrom(accessorType) ? accessorType : typeof(XmlNode).IsAssignableFrom(accessorType) ? accessorType : typeof(XmlElement); 2052private void CheckAmbiguousChoice(XmlAttributes a, Type accessorType, string accessorName) 2061Type type = elements[i]!.Type == null ? accessorType : elements[i]!.Type!; 2086Type type = items[i]!.Type == null ? accessorType : items[i]!.Type!; 2120private static object? GetDefaultValue(TypeDesc fieldTypeDesc, Type t, XmlAttributes a) 2235internal static XmlTypeMapping GetTopLevelMapping(Type type, string? defaultNamespace)
System\Xml\Serialization\XmlReflectionMember.cs (2)
16private Type? _type; 25public Type? MemberType
System\Xml\Serialization\XmlSchemaExporter.cs (2)
923Type formatter = typeof(XmlConvert); 924System.Reflection.MethodInfo? format = formatter.GetMethod("ToString", new Type[] { pm.TypeDesc.Type! });
System\Xml\Serialization\XmlSchemaImporter.cs (18)
28public XmlTypeMapping ImportDerivedTypeMapping(XmlQualifiedName name, Type? baseType) 48public XmlTypeMapping ImportDerivedTypeMapping(XmlQualifiedName name, Type? baseType, bool baseTypeCanBeIndirect) 80public XmlTypeMapping ImportSchemaType(XmlQualifiedName typeName, Type? baseType) 86public XmlTypeMapping ImportSchemaType(XmlQualifiedName typeName, Type? baseType, bool baseTypeCanBeIndirect) 182public XmlMembersMapping ImportMembersMapping(XmlQualifiedName[] names, Type? baseType, bool baseTypeCanBeIndirect) 235private ElementAccessor ImportElement(XmlQualifiedName name, Type desiredMappingType, Type? baseType) 251private ElementAccessor ImportElement(XmlSchemaElement element, string identifier, Type desiredMappingType, Type? baseType, string? ns, bool topLevelElement) 310private TypeMapping ImportElementType(XmlSchemaElement element, string identifier, Type desiredMappingType, Type? baseType, string? ns) 397private TypeMapping? ImportType(XmlQualifiedName name, Type desiredMappingType, Type? baseType, TypeFlags flags, bool addref) 425private TypeMapping? ImportType(XmlSchemaComplexType type, string? typeNs, string identifier, Type desiredMappingType, Type? baseType) 474private StructMapping ImportStructType(XmlSchemaType type, string? typeNs, string identifier, Type? baseType, bool arrayLike) 584private StructMapping ImportStructDataType(XmlSchemaSimpleType dataType, string? typeNs, string identifier, Type baseType) 1625private TypeMapping? ImportDataType(XmlSchemaSimpleType dataType, string? typeNs, string identifier, Type? baseType, TypeFlags flags, bool isList)
System\Xml\Serialization\XmlSchemas.cs (3)
209public object? Find(XmlQualifiedName name, Type type) 213internal object? Find(XmlQualifiedName name, Type type, bool checkCache) 599Type type = o.GetType();
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (6)
167internal void GenerateSupportedTypes(Type?[] types) 172_writer.Write(typeof(Type).FullName); 178Type? type = types[i]; 338_writer.Write(typeof(Type).FullName); 346Type? type = xmlMappings[i].Accessor.Mapping!.TypeDesc!.Type; 367internal void GenerateSerializerContract(XmlMapping[] xmlMappings, Type?[] types, string readerType, string?[] readMethods, string writerType, string?[] writerMethods, Hashtable serializers)
System\Xml\Serialization\XmlSerializationILGen.cs (45)
21internal Dictionary<string, Type> CreatedTypes = new Dictionary<string, Type>(); 72private static readonly Type[] s_typeType = new Type[] { typeof(Type) }; 73private static readonly Type[] s_xmlReaderType = new Type[] { typeof(XmlReader) }; 74private static readonly Type[] s_objectXmlSerializationWriterType = new Type[] { typeof(object), typeof(XmlSerializationWriter) }; 75private static readonly Type[] s_xmlSerializationReaderType = new Type[] { typeof(XmlSerializationReader) }; 78MethodAttributes attributes, Type? returnType, Type[] parameterTypes) 165Type.EmptyTypes, 178Type.EmptyTypes 218new Type[] { typeof(object), typeof(object) } 234internal void GenerateSupportedTypes(Type[] types, TypeBuilder serializerContractTypeBuilder) 243var uniqueTypes = new HashSet<Type>(); 246Type type = types[i]; 282Type.EmptyTypes); 286Type.EmptyTypes 291Type.EmptyTypes, 299Type.EmptyTypes 303Type.EmptyTypes, 311Type baseSerializerType = baseSerializerTypeBuilder.CreateType(); 328Type.EmptyTypes 351new Type[] { typeof(string), typeof(string) } 376new Type[] { (mapping is XmlMembersMapping) ? typeof(object[]) : typeof(object) } 400Type.EmptyTypes 408Type typedSerializerType = typedSerializerTypeBuilder.CreateType(); 422new Type[] { typeof(object), typeof(object) } 429Type.EmptyTypes 456Type? type = xmlMappings[i].Accessor.Mapping!.TypeDesc!.Type; 470Type.EmptyTypes 488internal void GenerateSerializerContract(XmlMapping[] xmlMappings, Type[] types, string readerType, string[] readMethods, string writerType, string[] writerMethods, Dictionary<string, string> serializers) 495Type.EmptyTypes 507Type.EmptyTypes, 513Type.EmptyTypes 527Type.EmptyTypes, 533Type.EmptyTypes 547Type.EmptyTypes 553Type.EmptyTypes, 570Type serializerContractType = serializerContractTypeBuilder.CreateType(); 588internal void ILGenLoad(string source, Type? type) 597Type memType = (memInfo is FieldInfo) ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType;
System\Xml\Serialization\XmlSerializationReader.cs (16)
270private Type? GetPrimitiveType(XmlQualifiedName typeName, bool throwOnUnknown) 1313protected Exception CreateUnknownConstantException(string? value, Type enumType) 1318protected Exception CreateInvalidCastException(Type type, object? value) 1323protected Exception CreateInvalidCastException(Type type, object? value, string? id) 1344protected Array EnsureArrayIndex(Array? a, int index, Type elementType) 1353protected Array? ShrinkArray(Array? a, int length, Type elementType, bool isNullable) 1554Type? fallbackElementType = null; 1559Type? arrayType = (Type?)_types[new XmlQualifiedName(typeName, typeNs)]; 1584Type? elementType = null; 1589elementType = (Type?)_types[qname]; 1712Type? itemType = null; 1718Type currItemType = currItem.GetType(); 1846protected void AddReadCallback(string name, string ns, Type type, XmlSerializationReadCallback read) 5018Writer.Write(typeof(Type).FullName); 5080private void WriteCatchException(Type exceptionType)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (171)
30private static readonly Type[] s_boolType = new Type[] { typeof(bool) }; 190Type.EmptyTypes); 229ilg.BeginMethod(typeof(void), "InitIDs", Type.EmptyTypes, Array.Empty<string>(), 234Type.EmptyTypes 239Type.EmptyTypes 244new Type[] { typeof(string) } 261Type readerType = this.typeBuilder.CreateType(); 288Type.EmptyTypes 293new Type[] { typeof(string), typeof(string) } 312List<Type> argTypes = new List<Type>(); 347ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(), 398Type.EmptyTypes, 407Type.EmptyTypes 412Type.EmptyTypes 527Type.EmptyTypes 542Type.EmptyTypes 552Type.EmptyTypes 567Type.EmptyTypes 596Type.EmptyTypes 643Type.EmptyTypes, 658Type.EmptyTypes 663Type.EmptyTypes 700new Type[] { typeof(string) } 708Type.EmptyTypes 713Type.EmptyTypes 724Type.EmptyTypes 729Type.EmptyTypes 758Type.EmptyTypes 763Type.EmptyTypes 774Type.EmptyTypes 779Type.EmptyTypes 812new Type[] { typeof(string) }, 823Type.EmptyTypes 828Type.EmptyTypes 840new Type[] { typeof(string) } 848Type argType = source == "false" ? typeof(bool) : typeof(string); 865new Type[] { argType } 873new Type[] { argType } 881Type.EmptyTypes 886Type.EmptyTypes 897Type.EmptyTypes 902Type.EmptyTypes 974Type.EmptyTypes, 985Type.EmptyTypes 995new Type[] { typeof(object), typeof(object) } 1034List<Type> argTypes = new List<Type>(); 1036Type returnType; 1037Type underlyingType; 1058new Type[] { typeof(string), typeof(Hashtable), typeof(string) } 1101new Type[] { typeof(string), typeof(string) } 1122new Type[] { typeof(string), typeof(Type) } 1156List<Type> argTypes = new List<Type>(); 1196Type.EmptyTypes 1201Type.EmptyTypes 1216new Type[] { typeof(string) } 1221new Type[] { typeof(string) } 1226Type.EmptyTypes 1240Type.EmptyTypes 1306Type.EmptyTypes)!; 1345List<Type> argTypes = new List<Type>(); 1366Type.EmptyTypes 1371Type.EmptyTypes 1410new Type[] { locXsiType.LocalType } 1453new Type[] { typeof(string), typeof(string) } 1458new Type[] { typeof(XmlQualifiedName) } 1476new Type[] { locXsiType.LocalType } 1489new Type[] { typeof(XmlQualifiedName) } 1516new Type[] { typeof(string), typeof(string) } 1630Type.EmptyTypes 1635Type.EmptyTypes 1645Type.EmptyTypes 1654Type.EmptyTypes 1668Type.EmptyTypes 1684Type.EmptyTypes 1697Type.EmptyTypes 1719Type.EmptyTypes 1724Type.EmptyTypes 1764Type.EmptyTypes 1769Type.EmptyTypes 1774Type.EmptyTypes 1830Type.EmptyTypes 1835Type.EmptyTypes 1889new Type[] { typeof(string) } 1894Type.EmptyTypes 1899Type.EmptyTypes 1904Type.EmptyTypes 1920Type.EmptyTypes 1931new Type[] { typeof(string), typeof(string) } 1936Type.EmptyTypes 1964new Type[] { typeof(string) } 1969Type.EmptyTypes 1985Type.EmptyTypes 1990new Type[] { typeof(XmlReader) } 2002new Type[] { localAttr.LocalType } 2011List<Type> argTypes = new List<Type>(); 2094new Type[] { typeof(char[]) } 2099Type.EmptyTypes 2104Type.EmptyTypes 2193new Type[] { typeof(string) } 2260Type.EmptyTypes 2265Type.EmptyTypes 2293Type.EmptyTypes 2298Type.EmptyTypes 2350Type.EmptyTypes 2355Type.EmptyTypes 2360Type.EmptyTypes 2365new Type[] { typeof(string) } 2394Type.EmptyTypes 2399Type.EmptyTypes 2409new Type[] { typeof(string) } 2422new Type[] { typeof(string), typeof(bool) } 2536Type.EmptyTypes 2667new Type[] { typeof(Array), typeof(int), typeof(Type), typeof(bool) } 2721Type varType = CodeGenerator.GetVariableType(variable); 2745Type arrayElementType = localA.LocalType.GetElementType()!; 2749new Type[] { typeof(Array), typeof(int), typeof(Type) } 2794private void WriteSourceEnd(string source, Type elementType) 2799private void WriteSourceEnd(string source, Type elementType, Type stackType) 2804Type varType = CodeGenerator.GetVariableType(variable); 2832Type arrayElementType = CodeGenerator.GetVariableType(oVar).GetElementType()!; 2853new Type[] { elementType } 2856Type addParameterType = Add.GetParameters()[0].ParameterType; 2867Type varType = CodeGenerator.GetVariableType(ilg.GetVariable(match.Groups["a"].Value)); 2869Type varElementType = varType.GetElementType()!; 2883Type.EmptyTypes 2919Type.EmptyTypes 2924Type.EmptyTypes 2940Type.EmptyTypes 2950Type.EmptyTypes 2962Type.EmptyTypes 2973Type.EmptyTypes 3034Type.EmptyTypes 3057Type.EmptyTypes 3062Type.EmptyTypes 3071Type.EmptyTypes 3088Type.EmptyTypes 3093Type.EmptyTypes 3103Type.EmptyTypes 3127Type.EmptyTypes 3168Type.EmptyTypes 3173Type.EmptyTypes 3184List<Type> argTypes = new List<Type>(); 3233Type.EmptyTypes 3258isWrappedAny ? new Type[] { typeof(IXmlSerializable), typeof(bool) } : new Type[] { typeof(IXmlSerializable) } 3330isWrappedAny ? new Type[] { typeof(IXmlSerializable), typeof(bool) } : new Type[] { typeof(IXmlSerializable) } 3349new Type[] { typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string) } 3367new Type[] { typeof(string), typeof(string), typeof(string) } 3387Type.EmptyTypes 3392Type.EmptyTypes 3412Type.EmptyTypes 3417Type.EmptyTypes 3484new Type[] { typeof(string) } 3495new Type[] { typeof(string) } 3506private void WriteCatchException(Type exceptionType) 3519private void WriteCreateInstance(string source, bool ctorInaccessible, Type type) 3550new Type[] { typeof(object) } 3555new Type[] { typeof(object), typeof(string) } 3638Type.EmptyTypes
System\Xml\Serialization\XmlSerializationWriter.cs (50)
186private XmlQualifiedName GetPrimitiveTypeName(Type type) 192private XmlQualifiedName? GetPrimitiveTypeName(Type type, bool throwIfUnknown) 200internal static XmlQualifiedName? GetPrimitiveTypeNameInternal(Type type) 205switch (Type.GetTypeCode(type)) 262Type t = o.GetType(); 267switch (Type.GetTypeCode(t)) 816protected Exception CreateUnknownTypeException(Type type) 856protected Exception CreateInvalidAnyTypeException(Type type) 1173protected void AddWriteCallback(Type type, string typeName, string? typeNs, XmlSerializationWriteCallback callback) 1184private void WriteArray(string name, string? ns, object o, Type type) 1186Type elementType = TypeScope.GetArrayElementType(type, null)!; 1223Type? elementBaseType = elementType.BaseType; 1315protected void WritePotentiallyReferencingElement(string? n, string? ns, object? o, Type? ambientType) 1321protected void WritePotentiallyReferencingElement(string n, string? ns, object? o, Type? ambientType, bool suppressReference) 1327protected void WritePotentiallyReferencingElement(string? n, string? ns, object? o, Type? ambientType, bool suppressReference, bool isNullable) 1334Type t = o.GetType(); 1335if (Type.GetTypeCode(t) == TypeCode.Object && !(o is Guid) && (t != typeof(XmlQualifiedName)) && !(o is XmlNode[]) && (t != typeof(byte[]))) 1376private void WriteReferencedElement(object o, Type? ambientType) 1382private void WriteReferencedElement(string? name, string? ns, object o, Type? ambientType) 1385Type t = o.GetType(); 1403private TypeEntry? GetTypeEntry(Type t) 1476internal Type? type; 1492internal static bool IsTypeDynamic(Type type) 1506Type[] parameterTypes = type.GetGenericArguments(); 1511Type parameterType = parameterTypes[i]; 1527internal static bool IsTypeDynamic(Type[] arguments) 1529foreach (Type t in arguments) 1608foreach (Type type in scope.Types) 1617private string WriteTypeInfo(TypeScope scope, TypeDesc typeDesc, Type type) 1632_writer.WriteLine($"static {typeof(Type).FullName} {typeVariable} = {elementTypeVariable}.MakeArrayType();"); 1637_writer.Write($"static {typeof(Type).FullName} {typeVariable} = {assemblyVariable}.GetType("); 1646Type? parameterType = Nullable.GetUnderlyingType(type); 1650_writer.WriteLine($"static {typeof(Type).FullName} {typeVariable} = typeof(System.Nullable<>).MakeGenericType(new {typeof(Type).FullName}[] {{{parameterTypeVariable}}});"); 1655_writer.Write($"static {typeof(Type).FullName} {typeVariable} = {assemblyVariable}.GetType("); 1684"object", "string", typeof(Type).FullName, 1692[DynamicallyAccessedMembers(TrimmerConstants.PublicMembers)] Type type) 1729[DynamicallyAccessedMembers(TrimmerConstants.PublicMembers)] Type type) 1752private string WriteAssemblyInfo(Type type) 1771[DynamicallyAccessedMembers(TrimmerConstants.PublicMembers)] Type type, string escapedName, string typeVariable, string memberName) 1820_writer.Write($"new {typeof(Type).FullName}[] {{ "); 1833[DynamicallyAccessedMembers(TrimmerConstants.PublicMembers)] Type type, string escapedName, bool collectionUseReflection, bool elementUseReflection) 1847_writer.Write(typeof(Type[]).FullName); 3112Writer.Write(typeof(Type).FullName); 4174private void WriteElementCall(string func, Type cast, string source, string name, string? ns, bool isNullable, bool isAny) 4214Type? type = Type.GetType(mapping.TypeDesc!.Type!.FullName!); 4222Type? type = Type.GetType(mapping.TypeDesc!.Type!.FullName!); 4264Type type = value.GetType();
System\Xml\Serialization\XmlSerializationWriterILGen.cs (125)
33Type.EmptyTypes); 65internal Type GenerateEnd() 92ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(), 105List<Type> argTypes = new List<Type>(); 126private void WriteEnumValue(EnumMapping mapping, SourceInfo source, out Type returnType) 141new Type[] { mapping.TypeDesc!.Type! }); 149private void WritePrimitiveValue(TypeDesc typeDesc, SourceInfo source, out Type returnType) 160Type argType = typeDesc.Type!; 170new Type[] { argType } 188new Type[] { typeDesc.Type! } 237List<Type> argTypes = new List<Type>(); 246Type argType; 264new Type[] { typeof(string), typeof(string) } 290new Type[] { typeof(string), typeof(string) } 304new Type[] { typeof(string), typeof(string), typeof(object), typeof(bool) } 325Type.EmptyTypes 358private static readonly Type[] s_objectArrayType = new Type[] { typeof(object[]) }; 359private static readonly Type[] s_objectType = new Type[] { typeof(object) }; 381Type.EmptyTypes 389Type.EmptyTypes 573Type.EmptyTypes 593Type.EmptyTypes 614List<Type> argTypes = new List<Type>(); 697new Type[] { typeof(long), typeof(string[]), typeof(long[]), typeof(string) } 717Type.EmptyTypes 722new Type[] { typeof(IFormatProvider) } 727new Type[] { typeof(object), typeof(string) } 765List<Type> argTypes = new List<Type>(); 772Type oType = CodeGenerator.GetVariableType(oVar); 819Type.EmptyTypes 824new Type[] { typeof(string), typeof(string) } 834new Type[] { typeof(string), typeof(string) } 844new Type[] { mapping.TypeDesc.Type! } 849new Type[] { typeof(string) } 862Type.EmptyTypes 885Type.EmptyTypes 890new Type[] { typeof(string), typeof(string) } 900new Type[] { typeof(string), typeof(string) } 912Type.EmptyTypes 931List<Type> argTypes = new List<Type>(5); 960new Type[] { typeof(string), typeof(string) } 974LocalBuilder tLoc = ilg.DeclareLocal(typeof(Type), "t"); 978Type.EmptyTypes 997new Type[] { typeof(string), typeof(string), typeof(object), typeof(bool) } 1030new Type[] { typeof(bool) } 1065new Type[] { typeof(string), typeof(string), typeof(object), typeof(bool), typeof(XmlSerializerNamespaces) } 1075new Type[] { typeof(string), typeof(string) } 1194Type.EmptyTypes 1199new Type[] { typeof(string), typeof(string), typeof(string) } 1213Type.EmptyTypes 1234Type methodType; 1235Type argType; 1245Type.EmptyTypes 1250new Type[] { typeof(string) } 1266new Type[] { typeof(string) } 1287new Type[] { argType } 1309Type.EmptyTypes 1314Type.EmptyTypes 1325Type.EmptyTypes 1332List<Type> argTypes = new List<Type>(); 1345Type.EmptyTypes 1384new Type[] { typeof(XmlNode), typeof(object) } 1405Type? targetType, 1476new Type[] { typeof(string), typeof(string) } 1508Type typeIEnumerable = typeof(IEnumerable); 1513Type.EmptyTypes)!; 1519Type typeIEnumerable = typeof(IEnumerable<>).MakeGenericType(arrayElementTypeDesc.Type!); 1524Type.EmptyTypes)!; 1532Type.EmptyTypes)!; 1551Type.EmptyTypes)!; 1736Type.EmptyTypes 1741Type.EmptyTypes 1749new Type[] { typeof(string), typeof(string) } 1772new Type[] { typeof(string), typeof(string), typeof(string), typeof(string) } 1799new Type[] { typeof(string), typeof(string) } 1806Type.EmptyTypes 1811Type.EmptyTypes 1876Type argType; 1889new Type[] { argType } 1901new Type[] { typeof(XmlWriter) } 1906Type.EmptyTypes 1931Type.EmptyTypes 2020List<Type> argTypes = new List<Type>(); 2089private void WriteElementCall(string func, Type cast, SourceInfo source, string? name, string? ns, bool isNullable, bool isAny) 2094new Type[] { cast, typeof(string), typeof(string), typeof(bool), typeof(bool) } 2124Type.EmptyTypes 2160Type valueType = value.GetType(); 2166new Type[] { valueType, valueType } 2197new Type[] { typeof(string), typeof(string), typeof(string) } 2226new Type[] { typeof(XmlSerializerNamespaces) } 2245private void WriteLocalDecl(string variableName, string initValue, Type type) 2255private void WriteTypeCompare(string variable, Type type) 2261private void WriteInstanceOf(SourceInfo source, Type type) 2265private void WriteArrayTypeCompare(string variable, Type arrayType) 2342foreach (Type type in scope.Types) 2372internal static void ILGenForEnumMember(CodeGenerator ilg, Type type, string memberName) 2386internal static void ILGenForCreateInstance(CodeGenerator ilg, Type type, bool ctorInaccessible, bool cast) 2392Type.EmptyTypes 2410internal static void ILGenForCreateInstance(CodeGenerator ilg, Type type, Type? cast) 2424Type? xName = type.Assembly.GetType("System.Xml.Linq.XName"); 2430new Type[] { typeof(string) } 2434new Type[] { xName } 2455new[] { typeof(Type) } 2489MethodInfo constructorInvoke = typeof(ConstructorInfo).GetMethod("Invoke", new Type[] { typeof(object[]) })!; 2500Type.EmptyTypes)!; 2509new Type[] { typeof(Type) } 2521Type localType = initValue.Type!; 2561internal static void WriteCreateInstance(string source, bool ctorInaccessible, Type type, CodeGenerator ilg) 2569internal static void WriteInstanceOf(SourceInfo source, Type type, CodeGenerator ilg) 2581Type localType = (typeName == arrayTypeDesc.CSharpName) ? arrayTypeDesc.Type! : arrayTypeDesc.Type!.MakeArrayType(); 2587internal static void WriteTypeCompare(string variable, Type type, CodeGenerator ilg) 2591ilg.Ldloc(typeof(Type), variable); 2595internal static void WriteArrayTypeCompare(string variable, Type arrayType, CodeGenerator ilg) 2599ilg.Ldloc(typeof(Type), variable);
System\Xml\Serialization\XmlSerializer.cs (35)
95public virtual bool CanSerialize(Type type) { throw new NotSupportedException(); } 97public virtual XmlSerializer GetSerializer(Type type) { throw new NotSupportedException(); } 134private readonly Type? _primitiveType; 138private Type? _rootType; 170public XmlSerializer(Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace) : 176public XmlSerializer(Type type, XmlRootAttribute? root) : this(type, null, Type.EmptyTypes, root, null, null) 181public XmlSerializer(Type type, Type[]? extraTypes) : this(type, null, extraTypes, null, null, null) 186public XmlSerializer(Type type, XmlAttributeOverrides? overrides) : this(type, overrides, Type.EmptyTypes, null, null, null) 203public XmlSerializer(Type type) : this(type, (string?)null) 208public XmlSerializer(Type type, string? defaultNamespace) 267public XmlSerializer(Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace, string? location) 281private static XmlTypeMapping GenerateXmlTypeMapping(Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace) 300internal static TempAssembly? GenerateTempAssembly(XmlMapping xmlMapping, Type? type, string? defaultNamespace) 306internal static TempAssembly? GenerateTempAssembly(XmlMapping xmlMapping, Type? type, string? defaultNamespace, string? location) 316return new TempAssembly(new XmlMapping[] { xmlMapping }, new Type?[] { type }, defaultNamespace, location); 542return FromMappings(mappings, (Type?)null); 546public static XmlSerializer?[] FromMappings(XmlMapping[]? mappings, Type? type) 584tempAssembly = new TempAssembly(mappings, new Type?[] { type }, null, null); 617private static XmlSerializer[] GetReflectionBasedSerializers(XmlMapping[] mappings, Type? type) 634internal static bool GenerateSerializer(Type[]? types, XmlMapping[] mappings, Stream stream) 650Type type = types[i]; 673private static XmlSerializer[] GetSerializersFromCache(XmlMapping[] mappings, Type type) 702TempAssembly tempAssembly = new TempAssembly(pendingMappings, new Type[] { type }, null, null); 720public static XmlSerializer?[] FromTypes(Type[]? types) 734public static string GetXmlSerializerAssemblyName(Type type) 739public static string GetXmlSerializerAssemblyName(Type type, string? defaultNamespace) 809private static XmlTypeMapping? GetKnownMapping(Type type, string? ns) 827switch (Type.GetTypeCode(_primitiveType)) 909switch (Type.GetTypeCode(_primitiveType))
System\Xml\Serialization\XmlSerializerFactory.cs (12)
22public XmlSerializer CreateSerializer(Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace) 28public XmlSerializer CreateSerializer(Type type, XmlRootAttribute? root) 30return CreateSerializer(type, null, Type.EmptyTypes, root, null, null); 34public XmlSerializer CreateSerializer(Type type, Type[]? extraTypes) 40public XmlSerializer CreateSerializer(Type type, XmlAttributeOverrides? overrides) 42return CreateSerializer(type, overrides, Type.EmptyTypes, null, null, null); 52public XmlSerializer CreateSerializer(Type type) 58public XmlSerializer CreateSerializer(Type type, string? defaultNamespace) 64public XmlSerializer CreateSerializer(Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace, string? location)
System\Xml\Serialization\XmlSerializerVersionAttribute.cs (3)
14private Type? _type; 20public XmlSerializerVersionAttribute(Type? type) 44public Type? Type
System\Xml\Serialization\XmlTextAttribute.cs (3)
15private Type? _type; 28public XmlTextAttribute(Type? type) 36public Type? Type
System\Xml\XmlResolver.cs (3)
29Type? ofObjectToReturn); 33Type? ofObjectToReturn) 79public virtual bool SupportsType(Uri absoluteUri, Type? type)
System\Xml\XmlResolver.FileSystemResolver.cs (2)
29public override object? GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) 40public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System\Xml\XmlResolver.ThrowingResolver.cs (2)
38public override object GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) 43public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System\Xml\XmlSecureResolver.cs (2)
24public override object? GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) => XmlResolver.ThrowingResolver.GetEntity(absoluteUri, role, ofObjectToReturn); 27public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn) => XmlResolver.ThrowingResolver.GetEntityAsync(absoluteUri, role, ofObjectToReturn);
System\Xml\XmlUrlResolver.cs (2)
39public override object? GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) 50public override async Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System\Xml\XPath\XPathItem.cs (3)
28public abstract Type ValueType { get; } 34public virtual object ValueAs(Type returnType) { return ValueAs(returnType, null); } 35public abstract object ValueAs(Type returnType, IXmlNamespaceResolver? nsResolver);
System\Xml\XPath\XPathNavigator.cs (2)
136public override Type ValueType 344public override object ValueAs(Type returnType, IXmlNamespaceResolver? nsResolver)
System\Xml\XPath\XPathNavigatorReader.cs (1)
188public override System.Type ValueType
System\Xml\Xsl\IlGen\GenerateHelper.cs (25)
43public readonly Type SeqType; 51public readonly Type IListType; 61public XmlILStorageMethods(Type storageType) 64Type? aggType = null; 98Type sequenceType; 124Type listType = typeof(IList<>).MakeGenericType(storageType); 160public static readonly ConstructorInfo NonUserCode = typeof(DebuggerNonUserCodeAttribute).GetConstructor(Type.EmptyTypes)!; 162public static readonly ConstructorInfo StepThrough = typeof(DebuggerStepThroughAttribute).GetConstructor(Type.EmptyTypes)!; 163public static readonly ConstructorInfo Transparent = typeof(SecurityTransparentAttribute).GetConstructor(Type.EmptyTypes)!; 270public static readonly MethodInfo ChangeTypeXsltArg = typeof(XmlQueryRuntime).GetMethod("ChangeTypeXsltArgument", new[] { typeof(int), typeof(object), typeof(Type) })!; 321public static readonly MethodInfo ValueAsAny = typeof(XPathItem).GetMethod("ValueAs", new[] { typeof(Type), typeof(IXmlNamespaceResolver) })!; 438public static readonly MethodInfo GetTypeFromHandle = typeof(Type).GetMethod("GetTypeFromHandle")!; 440public static readonly Dictionary<Type, XmlILStorageMethods> StorageMethods = new Dictionary<Type, XmlILStorageMethods>(13) 646public void LoadType(Type clrTyp) 661public LocalBuilder DeclareLocal(string name, Type type) 887public void TreatAs(Type clrTypeSrc, Type clrTypeDst) 1061public void CallGetEarlyBoundObject(int idxObj, Type clrType) 1103public void CallGetGlobalValue(int idxValue, Type clrType) 1111public void CallSetGlobalValue(Type clrType) 1358public void CallCacheCount(Type itemStorageType) 1364public void CallCacheItem(Type itemStorageType) 1374public void CallValueAs(Type clrType) 1684public void Emit(OpCode opcode, Type typVal)
System\Xml\Xsl\IlGen\IteratorDescriptor.cs (9)
53private Type _itemStorageType; 72public static StorageDescriptor Stack(Type itemStorageType, bool isCached) 84public static StorageDescriptor Parameter(int paramIndex, Type itemStorageType, bool isCached) 97public static StorageDescriptor Local(LocalBuilder loc, Type itemStorageType, bool isCached) 114public static StorageDescriptor Current(LocalBuilder locIter, MethodInfo currentMethod, Type itemStorageType) 129public static StorageDescriptor Global(MethodInfo methGlobal, Type itemStorageType, bool isCached) 167public StorageDescriptor ToStorageType(Type itemStorageType) 226public Type ItemStorageType 672public void EnsureItemStorageType(XmlQueryType xmlType, Type storageTypeDest)
System\Xml\Xsl\IlGen\StaticDataManager.cs (1)
166public int DeclareEarlyBound(string namespaceUri, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type ebType)
System\Xml\Xsl\IlGen\XmlILModule.cs (7)
118public MethodInfo DefineMethod(string name, Type returnType, Type[] paramTypes, string?[] paramNames, XmlILMethodAttributes xmlAttrs) 123Type[] paramTypesNew; 137paramTypesNew = new Type[paramTypes.Length + 1]; 218public FieldInfo DefineField(string fieldName, Type type) 239Type typBaked; 262public Delegate CreateDelegate(string name, Type typDelegate)
System\Xml\Xsl\IlGen\XmlIlTypeHelper.cs (4)
24public static Type GetStorageType(XmlQueryType qyTyp) 26Type storageType; 48private static readonly Type[] s_typeCodeToStorage = { 106private static readonly Type[] s_typeCodeToCachedStorage = {
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (23)
908Type itemStorageType = GetItemStorageType(ndCond); 977private void ConditionalBranch(QilNode ndBranch, Type itemStorageType, LocalBuilder? locResult) 1164Type itemStorageType = GetItemStorageType(ndSeq); 1274private QilBinary CreateSetIterator(QilBinary ndSet, string iterName, Type iterType, MethodInfo methCreate, MethodInfo methNext, MethodInfo methCurrent) 1385Type typAgg = methAgg.DeclaringType!; 2262Type itemStorageType = GetItemStorageType(ndSort); 3611Type? clrTypeRetSrc; 3612Type clrTypeRetDst; 3641Type clrTypeActualArg, clrTypeFormalArg; 3658Type itemType = GetItemStorageType(ndActualArg); 3922private void CreateSimpleIterator(QilNode ndCtxt, string iterName, Type iterType, MethodInfo methCreate, MethodInfo methNext, MethodInfo methCurrent) 3945private void CreateFilteredIterator(QilNode ndCtxt, string iterName, Type iterType, MethodInfo methCreate, MethodInfo methNext, MethodInfo methCurrent, 3981private void CreateContainerIterator(QilUnary ndDod, string iterName, Type iterType, MethodInfo methCreate, MethodInfo methNext, MethodInfo methCurrent, 4018private void GenerateSimpleIterator(Type itemStorageType, LocalBuilder locIter, MethodInfo methNext, MethodInfo methCurrent) 4050MethodInfo methNext, MethodInfo methCurrent, Type itemStorageType) 4732private void NestedVisit(QilNode nd, Type itemStorageType, bool isCached) 4803private void NestedVisitEnsureStack(QilNode nd, Type itemStorageType, bool isCached) 4837private void NestedVisitEnsureCache(QilNode nd, Type itemStorageType) 4843Type cacheType; 4961private static Type GetStorageType(QilNode nd) 4969private static Type GetStorageType(XmlQueryType typ) 4977private static Type GetItemStorageType(QilNode nd) 4985private static Type GetItemStorageType(XmlQueryType typ)
System\Xml\Xsl\QIL\QilTypeChecker.cs (4)
998private static void CheckLiteralValue(QilNode node, Type clrTypeValue) 1002Type clrType = ((QilLiteral)node).Value!.GetType(); 1007private static void CheckClass(QilNode node, Type clrTypeClass) 1013private static void CheckClassAndNodeType(QilNode node, Type clrTypeClass, QilNodeType nodeType)
System\Xml\Xsl\Runtime\EarlyBoundInfo.cs (4)
18private readonly Type _ebType; 20public EarlyBoundInfo(string namespaceUri, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type ebType) 27_constrInfo = ebType.GetConstructor(Type.EmptyTypes)!; 40public Type EarlyBoundType
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (12)
33[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type objectType, 65private Type? _objectType; // Type of the object which will be searched for matching methods 70private Type[]? _argClrTypes; // Type array for extension function arguments 71private Type? _retClrType; // Type for extension function return value 95public XmlExtensionFunction(string name, string namespaceUri, int numArgs, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicMethods)] Type objectType, BindingFlags flags) 103public void Init(string name, string namespaceUri, int numArgs, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicMethods)] Type objectType, BindingFlags flags) 132public Type GetClrArgumentType(int index) 141public Type? ClrReturnType 238_argClrTypes = new Type[paramInfo.Length]; 327private Type GetClrType(Type clrType) 341private static XmlQueryType InferXmlType(Type clrType)
System\Xml\Xsl\Runtime\XmlQueryContext.cs (1)
260Type clrTypeFormalArg;
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (3)
469public object ChangeTypeXsltArgument(int indexType, object value, Type destinationType) 478internal static object ChangeTypeXsltArgument(XmlQueryType xmlType, object value, Type destinationType) 629Type sourceType = value.GetType();
System\Xml\Xsl\Runtime\XmlQueryStaticData.cs (4)
55Type[]? ebTypes; 75public XmlQueryStaticData(byte[] data, Type[]? ebTypes) 191public void GetObjectData(out byte[] data, out Type[]? ebTypes) 315ebTypes = new Type[_earlyBound.Length];
System\Xml\Xsl\Runtime\XsltConvert.cs (3)
35Type itemType = item.ValueType; 81Type itemType = item.ValueType; 348internal static XmlQueryType InferXsltType(Type clrType)
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
329Type itemType = item.ValueType;
System\Xml\Xsl\Runtime\XsltLibrary.cs (1)
342Type itemType = item.ValueType;
System\Xml\Xsl\XmlIlGenerator.cs (12)
132MethodInfo methExec = _module.DefineMethod("Execute", typeof(void), Type.EmptyTypes, Array.Empty<string>(), XmlILMethodAttributes.NonUser); 138MethodInfo methRoot = _module.DefineMethod("Root", typeof(void), Type.EmptyTypes, Array.Empty<string>(), methAttrs); 196Type[] paramTypes; 198Type typReturn; 203paramTypes = new Type[ndFunc.Arguments.Count]; 253Type typReturn; 261methInfo = _module!.DefineMethod(ndRef.DebugName!.ToString(), typReturn, Type.EmptyTypes, Array.Empty<string>(), methAttrs); 300new Type[] { typeof(XPathNavigator), typeof(XPathNavigator) }, 356Type[]? ebTypes; 363fldTypes = _module.DefineField(XmlQueryStaticData.TypesFieldName, typeof(Type[])); 379LocalBuilder locTypes = _helper.DeclareLocal("$$$types", typeof(Type[])); 381_helper.Emit(OpCodes.Newarr, typeof(Type));
System\Xml\Xsl\Xslt\QilGenerator.cs (1)
202Type? value = scriptClasses[key];
System\Xml\Xsl\Xslt\Scripts.cs (5)
34Type? type; 51private readonly Dictionary<string, Type?> _backingDictionary = new Dictionary<string, Type?>(); 53public Type? this[string key] 70public bool TryGetValue(string key, [MaybeNullWhen(false)] out Type value) => _backingDictionary.TryGetValue(key, out value);
System\Xml\Xsl\XsltOld\NumberAction.cs (1)
372if (Type.GetTypeCode(value.GetType()) == TypeCode.Object)
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (6)
544public static XPathResultType GetXPathType(Type type) 546switch (Type.GetTypeCode(type)) 708private static object ToNumeric(object argument, Type type) 713public static object ConvertToXPathType(object val, XPathResultType xt, Type type) 958private readonly Type[] _types; 971_types = new Type[parameters.Length];
System\Xml\Xslt\XslCompiledTransform.cs (4)
180public void Load(Type compiledStylesheet) 207Type[]? earlyBoundTypes = (Type[]?)fldTypes.GetValue(null); 224public void Load(MethodInfo executeMethod, byte[] queryData, Type[]? earlyBoundTypes)
System.Private.Xml.Linq (6)
System\Xml\Linq\XHelper.cs (1)
11internal static bool IsInstanceOfType(object? o, Type type)
System\Xml\Linq\XObject.cs (5)
118public object? Annotation(Type type) 142private object? AnnotationForSealedType(Type type) 198public IEnumerable<object> Annotations(Type type) 205private IEnumerable<object> AnnotationsIterator(Type type) 259public void RemoveAnnotations(Type type)
System.Reflection.Context (280)
System\Reflection\Context\CollectionServices.cs (2)
38public static object[] ConvertListToArray(List<object> list, Type arrayType) 52public static object[] IEnumerableToArray(IEnumerable<object> enumerable, Type arrayType)
System\Reflection\Context\Custom\AttributeUtils.cs (14)
11public static object[] GetCustomAttributes(CustomReflectionContext context, CustomType type, Type attributeFilterType, bool inherit) 51public static object[] GetCustomAttributes(CustomReflectionContext context, CustomMethodInfo method, Type attributeFilterType, bool inherit) 91public static object[] GetCustomAttributes(CustomReflectionContext context, CustomConstructorInfo constructor, Type attributeFilterType) 99public static object[] GetCustomAttributes(CustomReflectionContext context, CustomPropertyInfo property, Type attributeFilterType) 107public static object[] GetCustomAttributes(CustomReflectionContext context, CustomEventInfo evnt, Type attributeFilterType) 115public static object[] GetCustomAttributes(CustomReflectionContext context, CustomFieldInfo field, Type attributeFilterType) 123public static object[] GetCustomAttributes(CustomReflectionContext context, CustomParameterInfo parameter, Type attributeFilterType) 131public static bool IsDefined(ICustomAttributeProvider provider, Type attributeType, bool inherit) 137private static IEnumerable<object> GetFilteredAttributes(CustomReflectionContext context, MemberInfo member, Type attributeFilterType) 144private static IEnumerable<object> GetFilteredAttributes(CustomReflectionContext context, ParameterInfo parameter, Type attributeFilterType) 151private static void CombineCustomAttributes(List<object> declaredAttributes, IEnumerable<object> inheritedAttributes, Type attributeFilterType, bool inherited, bool allowMultiple) 158Type attributeType = newAttribute.GetType(); 177private static void GetAttributeUsage(Type attributeFilterType, out bool inherited, out bool allowMultiple) 197internal static IEnumerable<object> FilterCustomAttributes(IEnumerable<object> attributes, Type attributeFilterType)
System\Reflection\Context\Custom\CustomConstructorInfo.cs (2)
25public override object[] GetCustomAttributes(Type attributeType, bool inherit) 30public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Custom\CustomEventInfo.cs (2)
25public override object[] GetCustomAttributes(Type attributeType, bool inherit) 30public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Custom\CustomFieldInfo.cs (2)
25public override object[] GetCustomAttributes(Type attributeType, bool inherit) 30public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Custom\CustomMethodInfo.cs (2)
25public override object[] GetCustomAttributes(Type attributeType, bool inherit) 30public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Custom\CustomParameterInfo.cs (2)
25public override object[] GetCustomAttributes(Type attributeType, bool inherit) 30public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Custom\CustomPropertyInfo.cs (2)
25public override object[] GetCustomAttributes(Type attributeType, bool inherit) 30public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Custom\CustomType.cs (10)
16public CustomType(Type template, CustomReflectionContext context) 31public override object[] GetCustomAttributes(Type attributeType, bool inherit) 36public override bool IsDefined(Type attributeType, bool inherit) 43Type objectType = ReflectionContext.GetTypeForObject(o!); 85protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 137binder ??= Type.DefaultBinder; 184protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 272Type? declaringType = match.DeclaringType; 279binder ??= Type.DefaultBinder;
System\Reflection\Context\CustomReflectionContext.cs (5)
65protected virtual IEnumerable<PropertyInfo> AddProperties(Type type) 72Type propertyType, 89Type propertyType, 136internal IEnumerable<object> GetCustomAttributesOnMember(MemberInfo member, IEnumerable<object> declaredAttributes, Type attributeFilterType) 142internal IEnumerable<object> GetCustomAttributesOnParameter(ParameterInfo parameter, IEnumerable<object> declaredAttributes, Type attributeFilterType)
System\Reflection\Context\CustomReflectionContext.Projector.cs (3)
50public override TypeInfo? ProjectType(Type? value) 231output = ProjectType((Type)value); 263Type? argumentType = ProjectType(value.ArgumentType);
System\Reflection\Context\Delegation\DelegatingAssembly.cs (6)
45public override object[] GetCustomAttributes(Type attributeType, bool inherit) 60public override bool IsDefined(Type attributeType, bool inherit) 108public override Type[] GetExportedTypes() 153public override Stream? GetManifestResourceStream(Type type, string name) 193public override Type? GetType(string name, bool throwOnError, bool ignoreCase) 198public override Type[] GetTypes()
System\Reflection\Context\Delegation\DelegatingConstructorInfo.cs (5)
34public override Type? DeclaringType 84public override Type? ReflectedType 91public override object[] GetCustomAttributes(Type attributeType, bool inherit) 106public override Type[] GetGenericArguments() 136public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Delegation\DelegatingEventInfo.cs (5)
23public override Type? DeclaringType 28public override Type? EventHandlerType 53public override Type? ReflectedType 85public override object[] GetCustomAttributes(Type attributeType, bool inherit) 100public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Delegation\DelegatingExceptionHandlingClause.cs (1)
19public override Type? CatchType
System\Reflection\Context\Delegation\DelegatingFieldInfo.cs (7)
24public override Type? DeclaringType 34public override Type FieldType 69public override Type? ReflectedType 76public override object[] GetCustomAttributes(Type attributeType, bool inherit) 91public override Type[] GetOptionalCustomModifiers() 101public override Type[] GetRequiredCustomModifiers() 116public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Delegation\DelegatingLocalVariableInfo.cs (1)
27public override Type LocalType
System\Reflection\Context\Delegation\DelegatingMethodInfo.cs (9)
36public override Type? DeclaringType 86public override Type? ReflectedType 101public override Type ReturnType 113public override object[] GetCustomAttributes(Type attributeType, bool inherit) 128public override Type[] GetGenericArguments() 158public override bool IsDefined(Type attributeType, bool inherit) 164public override MethodInfo MakeGenericMethod(params Type[] typeArguments) 169public override Delegate CreateDelegate(Type delegateType) 174public override Delegate CreateDelegate(Type delegateType, object? target)
System\Reflection\Context\Delegation\DelegatingModule.cs (15)
64public override Type[] FindTypes(TypeFilter? filter, object? filterCriteria) 74public override object[] GetCustomAttributes(Type attributeType, bool inherit) 94protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 119public override Type? GetType(string className, bool throwOnError, bool ignoreCase) 124public override Type[] GetTypes() 129public override bool IsDefined(Type attributeType, bool inherit) 139public override FieldInfo? ResolveField(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 144public override MemberInfo? ResolveMember(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 149public override MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 164public override Type ResolveType(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments)
System\Reflection\Context\Delegation\DelegatingParameterInfo.cs (5)
43public override Type ParameterType 60public override object[] GetCustomAttributes(Type attributeType, bool inherit) 75public override Type[] GetOptionalCustomModifiers() 80public override Type[] GetRequiredCustomModifiers() 85public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (7)
34public override Type? DeclaringType 54public override Type PropertyType 59public override Type? ReflectedType 106public override object[] GetCustomAttributes(Type attributeType, bool inherit) 131public override Type[] GetOptionalCustomModifiers() 136public override Type[] GetRequiredCustomModifiers() 141public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Delegation\DelegatingType.cs (32)
16public DelegatingType(Type type) 37public override Type? BaseType 57public override Type? DeclaringType 140public override Type? ReflectedType 155public override Type UnderlyingSystemType 160public Type UnderlyingType 195public override Type GetEnumUnderlyingType() 200public override object[] GetCustomAttributes(Type attributeType, bool inherit) 220public override Type[] GetGenericArguments() 225public override Type[] GetGenericParameterConstraints() 230public override Type GetGenericTypeDefinition() 235public override InterfaceMapping GetInterfaceMap(Type interfaceType) 247return Type.GetTypeCode(_typeInfo); 250public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) 260public override bool IsDefined(Type attributeType, bool inherit) 270public override bool IsEquivalentTo([NotNullWhen(true)] Type? other) 288public override bool IsSubclassOf(Type c) 303protected override ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 313public override Type? GetElementType() 338public override Type? GetInterface(string name, bool ignoreCase) 343public override Type[] GetInterfaces() 353protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 366public override Type? GetNestedType(string name, BindingFlags bindingAttr) 371public override Type[] GetNestedTypes(BindingFlags bindingAttr) 381protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 446public override Type MakeArrayType() 451public override Type MakeArrayType(int rank) 456public override Type MakePointerType() 462public override Type MakeGenericType(params Type[] typeArguments) 467public override Type MakeByRefType()
System\Reflection\Context\Projection\ProjectingAssembly.cs (5)
30public override object[] GetCustomAttributes(Type attributeType, bool inherit) 42public override bool IsDefined(Type attributeType, bool inherit) 54public override Type[] GetExportedTypes() 89public override Type? GetType(string name, bool throwOnError, bool ignoreCase) 94public override Type[] GetTypes()
System\Reflection\Context\Projection\ProjectingConstructorInfo.cs (5)
23public override Type? DeclaringType 33public override Type? ReflectedType 38public override object[] GetCustomAttributes(Type attributeType, bool inherit) 50public override bool IsDefined(Type attributeType, bool inherit) 57public override Type[] GetGenericArguments()
System\Reflection\Context\Projection\ProjectingEventInfo.cs (5)
24public override Type? DeclaringType 29public override Type? EventHandlerType 38public override Type? ReflectedType 63public override object[] GetCustomAttributes(Type attributeType, bool inherit) 75public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Projection\ProjectingExceptionHandlingClause.cs (1)
22public override Type? CatchType
System\Reflection\Context\Projection\ProjectingFieldInfo.cs (7)
24public override Type? DeclaringType 29public override Type FieldType 39public override Type? ReflectedType 44public override object[] GetCustomAttributes(Type attributeType, bool inherit) 56public override bool IsDefined(Type attributeType, bool inherit) 63public override Type[] GetOptionalCustomModifiers() 68public override Type[] GetRequiredCustomModifiers()
System\Reflection\Context\Projection\ProjectingLocalVariableInfo.cs (1)
22public override Type LocalType
System\Reflection\Context\Projection\ProjectingMethodInfo.cs (9)
24public override Type? DeclaringType 34public override Type? ReflectedType 58public override Type ReturnType 68public override object[] GetCustomAttributes(Type attributeType, bool inherit) 80public override bool IsDefined(Type attributeType, bool inherit) 87public override Type[] GetGenericArguments() 108public override MethodInfo MakeGenericMethod(params Type[] typeArguments) 113public override Delegate CreateDelegate(Type delegateType) 118public override Delegate CreateDelegate(Type delegateType, object? target)
System\Reflection\Context\Projection\ProjectingModule.cs (14)
29public override object[] GetCustomAttributes(Type attributeType, bool inherit) 41public override bool IsDefined(Type attributeType, bool inherit) 58protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 69public override Type? GetType(string className, bool throwOnError, bool ignoreCase) 74public override Type[] GetTypes() 79public override FieldInfo? ResolveField(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 87public override MemberInfo? ResolveMember(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 95public override MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 103public override Type ResolveType(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments)
System\Reflection\Context\Projection\ProjectingParameterInfo.cs (5)
29public override Type ParameterType 34public override object[] GetCustomAttributes(Type attributeType, bool inherit) 46public override bool IsDefined(Type attributeType, bool inherit) 53public override Type[] GetOptionalCustomModifiers() 58public override Type[] GetRequiredCustomModifiers()
System\Reflection\Context\Projection\ProjectingPropertyInfo.cs (7)
24public override Type? DeclaringType 34public override Type PropertyType 39public override Type? ReflectedType 64public override object[] GetCustomAttributes(Type attributeType, bool inherit) 76public override bool IsDefined(Type attributeType, bool inherit) 83public override Type[] GetOptionalCustomModifiers() 88public override Type[] GetRequiredCustomModifiers()
System\Reflection\Context\Projection\ProjectingType.cs (31)
16public ProjectingType(Type type, Projector projector) 34public override Type? BaseType 44public override Type? DeclaringType 54public override Type? ReflectedType 64public override Type GetEnumUnderlyingType() 69public override object[] GetCustomAttributes(Type attributeType, bool inherit) 86public override Type[] GetGenericArguments() 91public override Type[] GetGenericParameterConstraints() 96public override Type GetGenericTypeDefinition() 101public override InterfaceMapping GetInterfaceMap(Type interfaceType) 138public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) 147public override bool IsDefined(Type attributeType, bool inherit) 154public override bool IsEquivalentTo([NotNullWhen(true)] Type? other) 165Type? objectType = _projector.ProjectType(o?.GetType()); 173public override bool IsSubclassOf(Type c) 182protected override ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 194public override Type? GetElementType() 219public override Type? GetInterface(string name, bool ignoreCase) 224public override Type[] GetInterfaces() 236Type[] nestedTypes = GetNestedTypes(bindingAttr); 260protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 272public override Type? GetNestedType(string name, BindingFlags bindingAttr) 277public override Type[] GetNestedTypes(BindingFlags bindingAttr) 287protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 295public override Type MakeArrayType() 300public override Type MakeArrayType(int rank) 305public override Type MakePointerType() 311public override Type MakeGenericType(params Type[] typeArguments) 318public override Type MakeByRefType()
System\Reflection\Context\Projection\Projector.cs (7)
46public abstract TypeInfo? ProjectType(Type? value); 82public static Type[]? Unproject(Type[]? values) 87Type[] newTypes = new Type[values.Length]; 97public static Type? Unproject(Type? value)
System\Reflection\Context\Virtual\InheritedMethodInfo.cs (3)
13private readonly Type _reflectedType; 15public InheritedMethodInfo(MethodInfo baseMethod, Type reflectedType) 28public override Type ReflectedType
System\Reflection\Context\Virtual\InheritedPropertyInfo.cs (3)
13private readonly Type _reflectedType; 15public InheritedPropertyInfo(PropertyInfo baseProperty, Type reflectedType) 28public override Type ReflectedType
System\Reflection\Context\Virtual\VirtualMethodBase.cs (9)
14protected abstract Type[] GetParameterTypes(); 51public sealed override Type? ReflectedType 71public sealed override Type[] GetGenericArguments() 73return CollectionServices.Empty<Type>(); 92public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) 97public override object[] GetCustomAttributes(Type attributeType, bool inherit) 112public override bool IsDefined(Type attributeType, bool inherit) 143Type[] parameterTypes = GetParameterTypes(); 147foreach (Type t in parameterTypes)
System\Reflection\Context\Virtual\VirtualParameter.cs (1)
11public VirtualParameter(MemberInfo member, Type parameterType, string? name, int position)
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (13)
14private readonly Type _propertyType; 15private Type? _declaringType; 18protected VirtualPropertyBase(Type propertyType, string name, CustomReflectionContext context) 43public sealed override Type? DeclaringType 53public sealed override Type PropertyType 78public sealed override Type? ReflectedType 147public sealed override Type[] GetOptionalCustomModifiers() 149return CollectionServices.Empty<Type>(); 152public sealed override Type[] GetRequiredCustomModifiers() 154return CollectionServices.Empty<Type>(); 157public override object[] GetCustomAttributes(Type attributeType, bool inherit) 172public override bool IsDefined(Type attributeType, bool inherit) 201internal void SetDeclaringType(Type declaringType)
System\Reflection\Context\Virtual\VirtualPropertyBase.FuncPropertyAccessorBase.cs (1)
29public sealed override Type? DeclaringType
System\Reflection\Context\Virtual\VirtualPropertyBase.PropertyGetterBase.cs (3)
20public sealed override Type ReturnType 25protected override Type[] GetParameterTypes() 27return CollectionServices.Empty<Type>();
System\Reflection\Context\Virtual\VirtualPropertyBase.PropertySetterBase.cs (4)
10private Type[]? _parameterTypes; 22public sealed override Type ReturnType 27protected override Type[] GetParameterTypes() 29return _parameterTypes ??= new Type[1] { DeclaringProperty.PropertyType };
System\Reflection\Context\Virtual\VirtualPropertyInfo.cs (3)
19Type propertyType, 58public override object[] GetCustomAttributes(Type attributeType, bool inherit) 73public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertyGetter.cs (2)
40public override object[] GetCustomAttributes(Type attributeType, bool inherit) 55public override bool IsDefined(Type attributeType, bool inherit)
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertySetter.cs (2)
57public override object[] GetCustomAttributes(Type attributeType, bool inherit) 72public override bool IsDefined(Type attributeType, bool inherit)
System.Reflection.DispatchProxy (52)
src\libraries\Common\src\System\Reflection\Emit\IgnoreAccessChecksToAttributeBuilder.cs (1)
35new Type[] { assemblyNameField.FieldType });
System\Reflection\DispatchProxy.cs (2)
58public static object Create([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type proxyType)
System\Reflection\DispatchProxyGenerator.cs (49)
52private static readonly MethodInfo s_getTypeFromHandleMethod = typeof(Type).GetMethod("GetTypeFromHandle", new Type[] { typeof(RuntimeTypeHandle) })!; 59typeof(MethodInfo).GetMethod("MakeGenericMethod", new Type[] { typeof(Type[]) })!; 64[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type baseType, 65[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType, 82[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type generatedType, 90public Type GeneratedType { get; } 109private readonly Dictionary<Type, Dictionary<Type, GeneratedTypeInfo>> _baseTypeAndInterfaceToGeneratedProxyType = new Dictionary<Type, Dictionary<Type, GeneratedTypeInfo>>(); 145[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type baseType, 146[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType, 151if (!_baseTypeAndInterfaceToGeneratedProxyType.TryGetValue(baseType, out Dictionary<Type, GeneratedTypeInfo>? interfaceToProxy)) 153interfaceToProxy = new Dictionary<Type, GeneratedTypeInfo>(); 171[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type baseType, 172[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType, 197if (baseType.GetConstructor(Type.EmptyTypes) == null) 205foreach (Type t in interfaceType.GetInterfaces()) 221[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type proxyBaseType) 244internal void EnsureTypeIsVisible(Type type) 262private readonly Type _proxyBaseType; 269[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type proxyBaseType) 285Type[] args = new Type[_fields.Count]; 295ConstructorInfo baseCtor = _proxyBaseType.GetConstructor(Type.EmptyTypes)!; 318internal void AddInterfaceImpl([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type iface) 419Type[] paramTypes = new Type[parameters.Length]; 420Type[][] paramReqMods = new Type[paramTypes.Length][]; 438Type[] ts = mi.GetGenericArguments(); 496Type[] genericTypes = mi.GetGenericArguments(); 497GenericArray<Type> typeArr = new GenericArray<Type>(il, genericTypes.Length); 503typeArr.EndSet(typeof(Type)); 553private static int GetTypeCode(Type type) => (int)Type.GetTypeCode(type); 621private static void Convert(ILGenerator il, Type source, Type target, bool isAddress) 630Type argType = source.GetElementType()!; 674private static void Ldind(ILGenerator il, Type type) 687private static void Stind(ILGenerator il, Type type) 703private readonly Type[] _paramTypes; 704internal ParametersArray(ILGenerator il, Type[] paramTypes) 720internal void EndSet(int i, Type stackType) 723Type argType = _paramTypes[i].GetElementType()!; 761internal void EndSet(Type stackType)
System.Reflection.Emit (356)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (10)
12internal static MethodInfo MakeGenericMethod(MethodInfo method, Type[] inst) 24private readonly Type[] _inst; 28internal MethodBuilderInstantiation(MethodInfo method, Type[] inst) 45public override Type? DeclaringType => _method.DeclaringType; 46public override Type? ReflectedType => _method.ReflectedType; 48public override object[] GetCustomAttributes(Type attributeType, bool inherit) { return _method.GetCustomAttributes(attributeType, inherit); } 49public override bool IsDefined(Type attributeType, bool inherit) { return _method.IsDefined(attributeType, inherit); } 63public override Type[] GetGenericArguments() { return _inst; } 89public override MethodInfo MakeGenericMethod(params Type[] arguments) 99public override Type ReturnType => _method.ReturnType;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (26)
24internal Type _baseType = null!; 43internal static Type? FormCompoundType(string? format, Type baseType, int curIndex) 215internal SymbolType(Type baseType, TypeKind typeKind) 264public override Type MakePointerType() 269public override Type MakeByRefType() 275public override Type MakeArrayType() 281public override Type MakeArrayType(int rank) 319Type baseType; 330Type baseType; 344Type baseType; 365public override Type BaseType => typeof(Array); 369CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 382CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 407public override Type GetInterface(string name, bool ignoreCase) 413public override Type[] GetInterfaces() 432Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 444public override Type[] GetNestedTypes(BindingFlags bindingAttr) 450public override Type GetNestedType(string name, BindingFlags bindingAttr) 474public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) 488Type baseType; 525public override Type? GetElementType() 535public override Type UnderlyingSystemType => this; 542public override object[] GetCustomAttributes(Type attributeType, bool inherit) 547public override bool IsDefined(Type attributeType, bool inherit)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (8)
251internal static string? ToString(Type type, Format format) 264private void AddElementType(Type type) 281private void AddAssemblyQualifiedName(Type type, Format format) 283Type rootType = type; 289var nestings = new List<Type>(); 290for (Type? t = rootType; t != null; t = t.IsGenericParameter ? null : t.DeclaringType) 295Type enclosingType = nestings[i]; 307Type[] genericArguments = rootType.GetGenericArguments();
System\Reflection\Emit\ArrayMethod.cs (14)
12private readonly Type _containingType; 15private readonly Type _returnType; 16private readonly Type[] _parameterTypes; 21internal ArrayMethod(ModuleBuilder module, Type arrayClass, string methodName, 22CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes) 27_parameterTypes = new Type[parameterTypes.Length]; 35_parameterTypes = Type.EmptyTypes; 46internal Type[] ParameterTypes => _parameterTypes; 52public override Type? ReflectedType => _containingType; 56public override Type? DeclaringType => _containingType; 72public override Type ReturnType => _returnType; 85public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SymbolMethod); 87public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SymbolMethod);
System\Reflection\Emit\ConstructorBuilderImpl.cs (7)
13public ConstructorBuilderImpl(string name, MethodAttributes attributes, CallingConventions callingConvention, Type[]? parameterTypes, 14Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers, ModuleBuilderImpl module, TypeBuilderImpl type) 64public override Type DeclaringType => _methodBuilder.DeclaringType!; 70public override Type? ReflectedType => _methodBuilder.ReflectedType; 76public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_DynamicModule); 82public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_DynamicModule);
System\Reflection\Emit\CustomAttributeWrapper.cs (4)
83Type fieldType = dataType == EnumType ? typeof(int) : ElementTypeToType((SerializationTypeCode)dataType); 121private static object? DecodeCustomAttributeValue(Type t, ReadOnlySpan<byte> data, int pos, out int rpos) 123switch (Type.GetTypeCode(t)) 157private static Type ElementTypeToType(SerializationTypeCode elementType) =>
System\Reflection\Emit\EnumBuilderImpl.cs (19)
14internal EnumBuilderImpl(string name, Type underlyingType, TypeAttributes visibility, ModuleBuilderImpl module) 60public override Type? BaseType => _typeBuilder.BaseType; 70public override Type? DeclaringType => _typeBuilder.DeclaringType; 72public override Type? ReflectedType => _typeBuilder.ReflectedType; 74public override Type UnderlyingSystemType => GetEnumUnderlyingType(); 76public override Type GetEnumUnderlyingType() => _underlyingField.FieldType; 90public override Type? GetElementType() => _typeBuilder.GetElementType(); 97public override Type[] GetInterfaces() => EmptyTypes; 99public override bool IsDefined(Type attributeType, bool inherit) => throw new NotImplementedException(); 101public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotImplementedException(); 107CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 120CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 127public override Type? GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(); 132Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 134public override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(); 136public override Type? GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(); 139public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) 143public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) => throw new NotSupportedException();
System\Reflection\Emit\EventBuilderImpl.cs (3)
14private readonly Type _eventType; 23public EventBuilderImpl(string name, EventAttributes attributes, Type eventType, TypeBuilderImpl typeBuilder) 33internal Type EventType => _eventType;
System\Reflection\Emit\FieldBuilderImpl.cs (18)
17private readonly Type _fieldType; 18private readonly Type[]? _requiredCustomModifiers; 19private readonly Type[]? _optionalCustomModifiers; 29internal FieldBuilderImpl(TypeBuilderImpl typeBuilder, string fieldName, Type type, FieldAttributes attributes, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers) 48internal static void ValidateDefaultValueType(object? defaultValue, Type destinationType) 60Type sourceType = defaultValue.GetType(); 72Type underlyingType; 163public override Type? DeclaringType => _typeBuilder._isHiddenGlobalType ? null : _typeBuilder; 165public override Type? ReflectedType => DeclaringType; 170public override Type FieldType => _fieldType; 180public override Type[] GetRequiredCustomModifiers() => _requiredCustomModifiers ?? Type.EmptyTypes; 182public override Type[] GetOptionalCustomModifiers() => _optionalCustomModifiers ?? Type.EmptyTypes; 189public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_DynamicModule); 191public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_DynamicModule);
System\Reflection\Emit\GenericTypeParameterBuilderImpl.cs (25)
18private Type? _parent; 21internal List<Type>? _interfaces; 40protected override void SetBaseTypeConstraintCore([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? baseTypeConstraint) 46_interfaces ??= new List<Type>(); 60protected override void SetInterfaceConstraintsCore(params Type[]? interfaceConstraints) 64_interfaces ??= new List<Type>(interfaceConstraints.Length); 69public override Type[] GetGenericParameterConstraints() => 81public override Type UnderlyingSystemType => this; 88public override Type? BaseType => _parent; 98public override Type? GetElementType() => null; 100public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(); 101public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(); 103protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 107protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 116public override Type GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(); 118public override Type[] GetInterfaces() => throw new NotSupportedException(); 124protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 128public override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(); 130public override Type GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(); 133public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => throw new NotSupportedException(); 141public override Type MakePointerType() => 144public override Type MakeByRefType() => 148public override Type MakeArrayType() => 152public override Type MakeArrayType(int rank) =>
System\Reflection\Emit\ILGeneratorImpl.cs (13)
59public override void BeginCatchBlock(Type? exceptionType) 216public override LocalBuilder DeclareLocal(Type localType, bool pinned) 586public override void Emit(OpCode opcode, Type cls) 594public override void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes) 612new KeyValuePair<MethodInfo, Type[]>(methodInfo, optionalParameterTypes)); 616private static int GetStackChange(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes) 657Type? returnType, Type[]? parameterTypes, Type[]? optionalParameterTypes) 686public override void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes) 694private static int GetStackChange(Type? returnType, Type[]? parameterTypes)
System\Reflection\Emit\LocalBuilderImpl.cs (3)
10private readonly Type _localType; 17internal LocalBuilderImpl(int index, Type type, MethodInfo method, bool isPinned) 45public override Type LocalType => _localType;
System\Reflection\Emit\MethodBuilderImpl.cs (29)
16private Type _returnType; 17internal Type[]? _parameterTypes; 27internal Type[]? _returnTypeRequiredModifiers; 28internal Type[]? _returnTypeOptionalCustomModifiers; 29internal Type[][]? _parameterTypeRequiredCustomModifiers; 30internal Type[][]? _parameterTypeOptionalCustomModifiers; 39Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, 40Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, 67_parameterTypes = new Type[parameterTypes.Length]; 86internal Type[]? ParameterTypes => _parameterTypes; 217protected override void SetSignatureCore(Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, 218Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 229_parameterTypes = new Type[parameterTypes.Length]; 244public override Type? DeclaringType => _declaringType._isHiddenGlobalType ? null : _declaringType; 254public override Type? ReflectedType => DeclaringType; 270public override Type ReturnType => _returnType; 277public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_DynamicModule); 279public override Type[] GetGenericArguments() => _typeParameters ?? Type.EmptyTypes; 318public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_DynamicModule); 322public override MethodInfo MakeGenericMethod(params Type[] typeArguments) =>
System\Reflection\Emit\ModuleBuilderImpl.cs (55)
23private readonly Dictionary<Type, EntityHandle> _typeReferences = new(); 38private Type?[]? _coreTypes; 40private static readonly Type[] s_coreTypes = { typeof(void), typeof(object), typeof(bool), typeof(char), typeof(sbyte), typeof(byte), typeof(short), typeof(ushort), typeof(int), 54internal Type GetTypeFromCoreAssembly(CoreTypeId typeId) 66_coreTypes = new Type[s_coreTypes.Length]; 75internal CoreTypeId? GetTypeIdFromCoreTypes(Type type) 87_coreTypes = new Type[s_coreTypes.Length]; 204foreach (Type iface in typeBuilder._interfaces) 369Type[] gParams = method.GetGenericArguments(); 614if (pair.Key is KeyValuePair<MethodInfo, Type[]> pair2) 687private EntityHandle GetTypeReferenceOrSpecificationHandle(Type type) 714private TypeSpecificationHandle AddTypeSpecification(Type type) => 718private MethodSpecificationHandle AddMethodSpecification(EntityHandle methodHandle, Type[] genericArgs) => 732Type declaringType = field.DeclaringType!; 771private EntityHandle GetMethodReference(MethodInfo methodInfo, Type[] optionalParameterTypes) 786private BlobBuilder GetMethodSignature(MethodInfo method, Type[]? optionalParameterTypes) => 810Type declaringType = methodBase.DeclaringType!; 821private static Type[] ParameterTypes(ParameterInfo[] parameterInfos) 825return Type.EmptyTypes; 828Type[] parameterTypes = new Type[parameterInfos.Length]; 871foreach (Type constraint in gParam.GetGenericParameterConstraints()) 881Type type = defaultValue.GetType(); 989internal EntityHandle GetTypeHandle(Type type) 1020if (member is Type type) 1048internal TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, 1049Type[]? interfaces, PackingSize packingSize, int typesize, TypeBuilderImpl? enclosingType) 1061public override bool IsDefined(Type attributeType, bool inherit) => throw new NotImplementedException(); 1095private static bool IsConstructedFromTypeBuilder(Type type) 1102Type? elementType = type.GetElementType(); 1111internal static bool ContainsTypeBuilder(Type[] genericArguments) 1113foreach (Type type in genericArguments) 1129internal EntityHandle TryGetTypeHandle(Type type) 1185internal EntityHandle TryGetMethodHandle(MethodInfo method, Type[] optionalParameterTypes) 1223public override int GetTypeMetadataToken(Type type) => GetTokenForHandle(TryGetTypeHandle(type)); 1236protected override EnumBuilder DefineEnumCore(string name, TypeAttributes visibility, Type underlyingType) 1244Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, Type[]? parameterTypes, 1245Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers) 1278CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) 1293[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, PackingSize packingSize, int typesize) 1312protected override MethodInfo GetArrayMethodCore(Type arrayClass, string methodName, 1313CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes) 1336CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 1355internal int GetSignatureToken(CallingConventions callingConventions, Type? returnType, Type[]? parameterTypes, Type[]? optionalParameterTypes) => 1360internal int GetSignatureToken(CallingConvention callingConvention, Type? returnType, Type[]? parameterTypes) =>
System\Reflection\Emit\ParameterBuilderImpl.cs (4)
35Type parameterType = _position == 0 ? _methodBuilder.ReturnType : _methodBuilder.ParameterTypes![_position - 1]; 73private readonly Type _type 75public ParameterInfoWrapper(ParameterBuilderImpl pb, Type type) 87public override Type ParameterType => _type;
System\Reflection\Emit\PropertyBuilderImpl.cs (18)
14private readonly Type _propertyType; 15private readonly Type[]? _parameterTypes; 21internal readonly Type[]? _returnTypeRequiredCustomModifiers; 22internal readonly Type[]? _returnTypeOptionalCustomModifiers; 23internal readonly Type[][]? _parameterTypeRequiredCustomModifiers; 24internal readonly Type[][]? _parameterTypeOptionalCustomModifiers; 29internal PropertyBuilderImpl(string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, TypeBuilderImpl containingType) 45internal Type[]? ParameterTypes => _parameterTypes; 96public override Type PropertyType => _propertyType; 106public override Type? DeclaringType => _containingType; 108public override Type? ReflectedType => _containingType; 150public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_DynamicModule); 152public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_DynamicModule);
System\Reflection\Emit\SignatureHelper.cs (25)
27internal static BlobBuilder GetFieldSignature(Type fieldType, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, ModuleBuilderImpl module) 54internal static BlobBuilder GetTypeSpecificationSignature(Type type, ModuleBuilderImpl module) 62internal static BlobBuilder GetMethodSpecificationSignature(Type[] genericArguments, ModuleBuilderImpl module) 67foreach (Type argument in genericArguments) 75internal static BlobBuilder GetMethodSignature(ModuleBuilderImpl module, Type[]? parameters, Type? returnType, SignatureCallingConvention convention, 76int genParamCount = 0, bool isInstance = false, Type[]? optionalParameterTypes = null, Type[]? returnTypeRequiredModifiers = null, 77Type[]? returnTypeOptionalModifiers = null, Type[][]? parameterRequiredModifiers = null, Type[][]? parameterOptionalModifiers = null) 108Type[]? requiredModifiers, Type[]? optionalModifiers, ModuleBuilderImpl module) 121private static void WriteCustomModifiers(CustomModifiersEncoder encoder, Type[] customModifiers, bool isOptional, ModuleBuilderImpl module) 123foreach (Type modifier in customModifiers) 129private static void WriteParametersSignature(ModuleBuilderImpl module, Type[]? parameters, 130ParametersEncoder parameterEncoder, Type[][]? requiredModifiers = null, Type[][]? optionalModifiers = null) 168private static void WriteSignatureForType(SignatureTypeEncoder signature, Type type, ModuleBuilderImpl module) 172Type elementType = type.GetElementType()!; 196Type[] genericArguments = type.GetGenericArguments(); 200foreach (Type gType in genericArguments) 230private static void WriteSimpleSignature(SignatureTypeEncoder signature, Type type, ModuleBuilderImpl module)
System\Reflection\Emit\TypeBuilderImpl.cs (75)
20private Type? _typeParent; 26private Type? _enumUnderlyingType; 38internal List<Type>? _interfaces; 42internal Dictionary<Type, List<(MethodInfo ifaceMethod, MethodInfo targetMethod)>>? _methodOverrides; 54[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, ModuleBuilderImpl module, 55Type[]? interfaces, PackingSize packingSize, int typeSize, TypeBuilderImpl? enclosingType) 75_interfaces = new List<Type>(); 78Type @interface = interfaces[i]; 90protected override void AddInterfaceImplementationCore([DynamicallyAccessedMembers((DynamicallyAccessedMemberTypes.All))] Type interfaceType) 94_interfaces ??= new List<Type>(); 172Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers) 243protected override EventBuilder DefineEventCore(string name, EventAttributes attributes, Type eventtype) 253protected override FieldBuilder DefineFieldCore(string fieldName, Type type, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers, FieldAttributes attributes) 303Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, 304Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 323Type baseType = methodInfoDeclaration.DeclaringType!; 343private bool IsInterfaceImplemented(Type interfaceType) 347foreach (Type iface in _interfaces) 358foreach (Type @interface in _typeParent.GetInterfaces()) 374[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, PackingSize packSize, int typeSize) 381CallingConventions callingConvention, Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, 382Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, CallingConvention nativeCallConv, CharSet nativeCharSet) 411Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, 412Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers) 559protected override void SetParentCore([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent) 591public override Type? DeclaringType => _declaringType; 592public override Type? ReflectedType => _declaringType; 597public override Type[] GenericTypeParameters => _typeParameters ?? EmptyTypes; 598public override Type[] GetGenericArguments() => _typeParameters ?? EmptyTypes; 599public override Type GetGenericTypeDefinition() 608public override bool IsDefined(Type attributeType, bool inherit) => throw new NotImplementedException(); 610public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotImplementedException(); 612public override Type GetElementType() => throw new NotSupportedException(SR.NotSupported_DynamicModule); 618public override Type UnderlyingSystemType 639public override Type? BaseType => _typeParent; 665CallingConventions callConvention, Type[] types, ParameterModifier[]? _) 695private static bool MatchesTheFilter(MethodBuilderImpl method, BindingFlags methodFlags, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes) 721Type[] parameterTypes = method.ParameterTypes ?? EmptyTypes; 729Type? argType = argumentTypes[i]; 730Type? paramType = parameterTypes[i]; 802CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 896public override Type? GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(); 899public override Type[] GetInterfaces() => _interfaces == null ? EmptyTypes : _interfaces.ToArray(); 905Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 908public override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(); 911public override Type? GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(); 917public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) 965private static Type[] GetParameterTypes(ParameterInfo[] parameterInfos) 967Type[] parameterTypes = new Type[parameterInfos.Length]; 975private void ValidateInterfaceType(Type interfaceType) 999public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) 1019Type[] interfaces = tb.GetInterfaces(); 1038internal static bool AreTypesEqual(Type t1, Type? t2) 1056public override bool IsSubclassOf(Type c) 1058Type? p = this;
System.Reflection.Metadata (8)
System\Reflection\Metadata\BlobWriterImpl.cs (2)
156var type = value.GetType(); 229var type = value.GetType();
System\Reflection\Metadata\Decoding\ICustomAttributeTypeProvider.cs (3)
9/// Gets the TType representation for <see cref="Type"/>. 14/// Returns true if the given type represents <see cref="Type"/>. 20/// The serialized type name is in so-called "reflection notation" (i.e. as understood by <see cref="Type.GetType(string)"/>.)
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (1)
611/// Encodes literal of type <see cref="Type"/> (possibly null).
System\Reflection\Metadata\TypeName.cs (2)
194/// Managed pointer types are sometimes called byref types (<seealso cref="Type.IsByRef"/>) 211/// Unmanaged pointer types are often just called pointers (<seealso cref="Type.IsPointer"/>)
System.Reflection.MetadataLoadContext (491)
System\CoreRtBridge.cs (3)
17internal static RoType CastToRuntimeTypeInfo(this Type t) => (RoType)t; 19internal static Type[] GetGenericTypeParameters(this Type t)
System\Reflection\DefaultBinder.CanConvert.cs (6)
10private static bool CanChangePrimitive(Type source, Type target) 15private static bool CanPrimitiveWiden(Type source, Type target) 17Primitives widerCodes = s_primitiveConversions[(int)(Type.GetTypeCode(source))]; 18Primitives targetCode = (Primitives)(1 << (int)(Type.GetTypeCode(target)));
System\Reflection\DefaultBinder.cs (30)
14private readonly Type? _objectType; 22private bool IsImplementedByMetadataLoadContext(Type type) => type is RoType roType && roType.Loader == _loader; 47public sealed override MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers) 52Type[] realTypes = new Type[types.Length]; 77Type pCls = par[j].ParameterType; 83Type? type = types[j]; 147public sealed override PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, 148Type[]? indexes, ParameterModifier[]? modifiers) 153foreach (Type index in indexes) 180Type pCls = par[j].ParameterType; 268public override object ChangeType(object value, Type type, CultureInfo? cultureInfo) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 274public static MethodBase? ExactBinding(MethodBase[] match, Type[] types) 294Type pCls = par[j].ParameterType; 319public static PropertyInfo? ExactPropertyBinding(PropertyInfo[] match, Type? returnType, Type[]? types) 334Type pCls = par[j].ParameterType; 353private static int FindMostSpecific(ParameterInfo[] p1, int[] paramOrder1, Type? paramArrayType1, 354ParameterInfo[] p2, int[] paramOrder2, Type? paramArrayType2, 355Type[] types, object[]? args) 368if (args != null && args[i] == Type.Missing) 371Type c1, c2; 430private static int FindMostSpecificType(Type c1, Type c2, Type t) 504private static int FindMostSpecificMethod(MethodBase m1, int[] paramOrder1, Type? paramArrayType1, 505MethodBase m2, int[] paramOrder2, Type? paramArrayType2, 506Type[] types, object[]? args) 582private static int GetHierarchyDepth(Type t) 586Type? currentType = t;
System\Reflection\MetadataLoadContext.KnownConstructors.cs (3)
38Type? attributeType = TryGetCoreType(attributeCoreType); 41Type?[] parameterTypes = new Type[count];
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (10)
97Type parameterType1 = p1[i].ParameterType; 98Type parameterType2 = p2[i].ParameterType; 111Type parameterType1 = p1[i].ParameterType; 112Type parameterType2 = p2[i].ParameterType; 126private static bool GenericMethodAwareAreParameterTypesEqual(Type t1, Type t2) 159Type[] ga1 = t1.GenericTypeArguments; 160Type[] ga2 = t2.GenericTypeArguments; 188Type t = typeof(M); 214else if (t.Equals(typeof(Type)))
System\Reflection\Runtime\BindingFlagSupport\NestedTypePolicies.cs (10)
19internal sealed class NestedTypePolicies : MemberPolicies<Type> 21public sealed override IEnumerable<Type> GetDeclaredMembers(TypeInfo typeInfo) 26public sealed override IEnumerable<Type> CoreGetDeclaredMembers(RuntimeTypeInfo type, NameFilter? filter, RuntimeTypeInfo reflectedType) 34public sealed override void GetMemberAttributes(Type member, out MethodAttributes visibility, out bool isStatic, out bool isVirtual, out bool isNewSlot) 45public sealed override bool ImplicitlyOverrides(Type? baseMember, Type? derivedMember) => false; 47public sealed override bool IsSuppressedByMoreDerivedMember(Type member, Type[] priorMembers, int startIndex, int endIndex) 59public sealed override bool OkToIgnoreAmbiguity(Type m1, Type m2)
System\Reflection\Runtime\BindingFlagSupport\Shared.cs (1)
23public static bool QualifiesBasedOnParameterCount(this MethodBase methodBase, BindingFlags bindingFlags, CallingConventions callConv, Type[] argumentTypes)
System\Reflection\Runtime\SignatureTypeExtensions.cs (26)
18public static bool MatchesParameterTypeExactly(this Type pattern, ParameterInfo parameter) 33internal static bool MatchesExactly(this Type pattern, Type actual) 59Type[] patternGenericTypeArguments = pattern.GenericTypeArguments; 60Type[] actualGenericTypeArguments = actual.GenericTypeArguments; 66Type patternGenericTypeArgument = patternGenericTypeArguments[i]; 105internal static Type? TryResolveAgainstGenericMethod(this Type signatureType, MethodInfo genericMethod) 111private static Type? TryResolve(this Type signatureType, Type[] genericMethodParameters) 133Type[] genericTypeArguments = signatureType.GenericTypeArguments; 135Type?[] newGenericTypeArguments = new Type[count]; 138Type genericTypeArgument = genericTypeArguments[i]; 165private static Type? TryMakeArrayType(this Type type) 177private static Type? TryMakeArrayType(this Type type, int rank) 189private static Type? TryMakeByRefType(this Type type) 201private static Type? TryMakePointerType(this Type type) 213private static Type? TryMakeGenericType(this Type type, Type[] instantiation)
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (10)
64public sealed override Type[] GetTypes() => IsSingleModule ? ManifestModule.GetTypes() : base.GetTypes(); 80public sealed override Type[] GetExportedTypes() 83List<Type> list = new List<Type>(ExportedTypes); 87public sealed override IEnumerable<Type> ExportedTypes 100public sealed override Type? GetType(string name, bool throwOnError, bool ignoreCase) 175public sealed override Stream? GetManifestResourceStream(Type type, string name) 190sb.Append(Type.Delimiter); 213public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 214public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA);
System\Reflection\TypeLoading\Assemblies\RoAssembly.GetForwardedTypes.cs (8)
14public sealed override Type[] GetForwardedTypes() 16List<Type> types = new List<Type>(); 22Type? type = null; 57types.AddRange(new Type[numExceptions]); // add one null Type for each exception. 65private static void AddPublicNestedTypes(Type type, List<Type> types) 67foreach (Type nestedType in type.GetNestedTypes(BindingFlags.Public))
System\Reflection\TypeLoading\Constructors\RoConstructor.cs (4)
19public sealed override Type DeclaringType => GetRoDeclaringType(); 22public sealed override Type ReflectedType => DeclaringType; 38public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 39public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\CustomAttributes\CustomAttributeHelpers.cs (4)
15public static CustomAttributeNamedArgument ToCustomAttributeNamedArgument(this Type attributeType, string name, Type? argumentType, object? value) 59Type type = cat.ArgumentType; 110Type attributeType = ci.DeclaringType!;
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeData.cs (3)
48protected sealed override Type ComputeAttributeType() 74Type[] parameterTypes = sig.ParameterTypes.ToArray(); 75Type declaringType = mr.Parent.ResolveTypeDefRefOrSpec(_module, typeContext);
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (3)
123private static CustomAttributeTypedArgument ToApiForm(Type type, object? value) 137public static IList<CustomAttributeNamedArgument> ToApiForm(this IList<CustomAttributeNamedArgument<RoType>> cangs, Type attributeType) 152public static CustomAttributeNamedArgument ToApiForm(this CustomAttributeNamedArgument<RoType> cang, Type attributeType)
System\Reflection\TypeLoading\CustomAttributes\RoCustomAttributeData.cs (3)
15public sealed override Type AttributeType => _lazyAttributeType ??= ComputeAttributeType()!; 16protected abstract Type? ComputeAttributeType(); 17private volatile Type? _lazyAttributeType;
System\Reflection\TypeLoading\CustomAttributes\RoPseudoCustomAttributeData.cs (1)
38protected sealed override Type? ComputeAttributeType() => _constructor.DeclaringType;
System\Reflection\TypeLoading\Events\Ecma\EcmaEvent.cs (2)
21internal EcmaEvent(RoInstantiationProviderType declaringType, EventDefinitionHandle handle, Type reflectedType) 61protected sealed override Type ComputeEventHandlerType() => EventDefinition.Type.ResolveTypeDefRefOrSpec(_module, TypeContext);
System\Reflection\TypeLoading\Events\RoEvent.cs (9)
15private readonly Type _reflectedType; 17protected RoEvent(RoInstantiationProviderType declaringType, Type reflectedType) 30public sealed override Type DeclaringType => GetRoDeclaringType(); 33public sealed override Type ReflectedType => _reflectedType; 53public sealed override Type EventHandlerType => _lazyEventType ??= ComputeEventHandlerType(); 54protected abstract Type ComputeEventHandlerType(); 55private volatile Type? _lazyEventType; 79public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 80public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Fields\Ecma\EcmaField.cs (4)
20internal EcmaField(RoInstantiationProviderType declaringType, FieldDefinitionHandle handle, Type reflectedType) 63protected sealed override Type ComputeFieldType() => FieldDefinition.DecodeSignature(_module, TypeContext); 65public sealed override Type[] GetOptionalCustomModifiers() => ModifiedType.GetOptionalCustomModifiers(); 66public sealed override Type[] GetRequiredCustomModifiers() => ModifiedType.GetRequiredCustomModifiers();
System\Reflection\TypeLoading\Fields\RoField.cs (14)
17private readonly Type _reflectedType; 19protected RoField(RoInstantiationProviderType declaringType, Type reflectedType) 32public sealed override Type DeclaringType => GetRoDeclaringType(); 35public sealed override Type ReflectedType => _reflectedType; 61Type int32Type = Loader.GetCoreType(CoreType.Int32); // Since we got the constructor, we know the Int32 exists. 85public sealed override Type FieldType 104public sealed override Type GetModifiedFieldType() 113Type type = ComputeFieldType(); 126protected abstract Type ComputeFieldType(); 127private volatile Type? _lazyFieldType; 133public abstract override Type[] GetOptionalCustomModifiers(); 134public abstract override Type[] GetRequiredCustomModifiers(); 143public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 144public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\General\Assignability.cs (43)
11public static bool IsAssignableFrom(Type toTypeInfo, Type fromTypeInfo, CoreTypes coreTypes) 47Type nullableUnderlyingType = toTypeInfo.GenericTypeArguments[0]; 55private static bool CanCastTo(this Type fromTypeInfo, Type toTypeInfo, CoreTypes coreTypes) 86Type toElementTypeInfo = toTypeInfo.GetElementType()!; 87Type fromElementTypeInfo = fromTypeInfo.GetElementType()!; 96Type toElementTypeInfo = toTypeInfo.GetElementType()!; 97Type fromElementTypeInfo = fromTypeInfo.GetElementType()!; 112Type toElementTypeInfo = toTypeInfo.GetElementType()!; 113Type fromElementTypeInfo = fromTypeInfo.GetElementType()!; 135foreach (Type constraintType in fromTypeInfo.GetGenericParameterConstraints()) 152foreach (Type ifc in fromTypeInfo.GetInterfaces()) 165Type walk = fromTypeInfo; 168Type? baseType = walk.BaseType; 182private static bool MatchesWithVariance(this Type fromTypeInfo, Type toTypeInfo, CoreTypes coreTypes) 193Type genericTypeDefinition = fromTypeInfo.GetGenericTypeDefinition(); 197Type[] fromTypeArguments = fromTypeInfo.GenericTypeArguments; 198Type[] toTypeArguments = toTypeInfo.GenericTypeArguments; 199Type[] genericTypeParameters = genericTypeDefinition.GetGenericTypeParameters(); 202Type fromTypeArgumentInfo = fromTypeArguments[i]; 203Type toTypeArgumentInfo = toTypeArguments[i]; 240private static bool IsElementTypeCompatibleWith(this Type fromTypeInfo, Type toTypeInfo, CoreTypes coreTypes) 245Type reducedFromType = fromTypeInfo.ReducedType(coreTypes); 246Type reducedToType = toTypeInfo.ReducedType(coreTypes); 253private static Type ReducedType(this Type t, CoreTypes coreTypes) 278private static bool IsGcReferenceTypeAndCastableTo(this Type fromTypeInfo, Type toTypeInfo, CoreTypes coreTypes) 292private static bool ProvablyAGcReferenceType(this Type t, CoreTypes coreTypes) 304private static bool ProvablyAGcReferenceTypeHelper(this Type t, CoreTypes coreTypes) 318foreach (Type constraintType in t.GetGenericParameterConstraints()) 333private static bool CanCastArrayToInterface(this Type fromTypeInfo, Type toTypeInfo, CoreTypes coreTypes) 340Type[] toTypeGenericTypeArguments = toTypeInfo.GenericTypeArguments; 343Type toElementTypeInfo = toTypeGenericTypeArguments[0]; 345Type toTypeGenericTypeDefinition = toTypeInfo.GetGenericTypeDefinition(); 346Type? fromElementTypeInfo = fromTypeInfo.GetElementType(); 347foreach (Type ifc in fromTypeInfo.GetInterfaces()) 351Type ifcGenericTypeDefinition = ifc.GetGenericTypeDefinition(); 363foreach (Type ifc in fromTypeInfo.GetInterfaces())
System\Reflection\TypeLoading\General\Ecma\EcmaHelpers.cs (4)
59public static PrimitiveTypeCode GetEnumUnderlyingPrimitiveTypeCode(this Type enumType, MetadataLoadContext loader) 61Type type = enumType.GetEnumUnderlyingType(); 118public static RoMethod? ToMethodOrNull(this MethodDefinitionHandle handle, RoInstantiationProviderType declaringType, Type reflectedType) 126public static RoMethod ToMethod(this MethodDefinitionHandle handle, RoInstantiationProviderType declaringType, Type reflectedType)
System\Reflection\TypeLoading\General\Helpers.cs (10)
41public static Type[]? CloneArrayToUnmodifiedTypes(this Type[]? original) 47return Type.EmptyTypes; 49Type[] copy = new Type[original.Length]; 250Type[]? genericMethodArguments = typeContext.GenericMethodArguments; 311Func<Assembly?, string, bool, Type?> typeResolver = 321Type? type = roAssembly.GetTypeCore(ns, simpleName, ignoreCase: ignoreCase2, out Exception? e); 329return (RoType?)Type.GetType(name, assemblyResolver: assemblyResolver, typeResolver: typeResolver, throwOnError: throwOnError, ignoreCase: ignoreCase); 341public static bool IsVisibleOutsideAssembly(this Type type)
System\Reflection\TypeLoading\General\Sentinels.cs (1)
41public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw null!;
System\Reflection\TypeLoading\General\TypeExtensions.net.cs (8)
12public static bool IsSignatureType(this Type type) => type.IsSignatureType; 13public static bool IsSZArray(this Type type) => type.IsSZArray; 14public static bool IsVariableBoundArray(this Type type) => type.IsVariableBoundArray; 15public static bool IsGenericMethodParameter(this Type type) => type.IsGenericMethodParameter; 16public static Type MakeSignatureGenericType(this Type genericTypeDefinition, Type[] typeArguments) => Type.MakeGenericSignatureType(genericTypeDefinition, typeArguments);
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodDecoder.cs (2)
82Type parameterType = position == -1 ? sig.ReturnType : sig.ParameterTypes[position]; 88Type parameterType = position == -1 ? sig.ReturnType : sig.ParameterTypes[position];
System\Reflection\TypeLoading\MethodBase\RoExceptionHandlingClause.cs (3)
8private readonly Type? _catchType; 16internal RoExceptionHandlingClause(Type? catchType, ExceptionHandlingClauseOptions flags, int filterOffset, int tryOffset, int tryLength, int handlerOffset, int handlerLength) 27public sealed override Type? CatchType => _flags == ExceptionHandlingClauseOptions.Clause ? _catchType : throw new InvalidOperationException(SR.NotAClause);
System\Reflection\TypeLoading\MethodBase\RoLocalVariableInfo.cs (3)
10private readonly Type _localType; 12internal RoLocalVariableInfo(int localIndex, bool isPinned, Type localType) 21public sealed override Type LocalType => _localType;
System\Reflection\TypeLoading\Methods\RoConstructedGenericMethod.cs (2)
52public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this)); 77foreach (Type genericMethodArgument in _genericMethodArguments)
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (4)
16protected RoDefinitionMethod(Type reflectedType) 36internal RoDefinitionMethod(RoInstantiationProviderType declaringType, Type reflectedType, TMethodDecoder decoder) 101public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) 113Type typeArgument = typeArguments[i];
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.DllImport.cs (1)
36Type attributeType = ctor.DeclaringType!;
System\Reflection\TypeLoading\Methods\RoMethod.cs (13)
16private readonly Type _reflectedType; 18protected RoMethod(Type reflectedType) 27public sealed override Type DeclaringType => GetRoDeclaringType(); 30public sealed override Type ReflectedType => _reflectedType; 46public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 47public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 78Type[] pis = GetGenericArgumentsOrParametersNoCopy(); 98public sealed override Type ReturnType => ReturnParameter.ParameterType; 102public sealed override Type[] GetGenericArguments() => GetGenericArgumentsOrParametersNoCopy().CloneArray<Type>(); 111public abstract override MethodInfo MakeGenericMethod(params Type[] typeArguments); 125public sealed override Delegate CreateDelegate(Type delegateType) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 126public sealed override Delegate CreateDelegate(Type delegateType, object? target) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Methods\RoSyntheticMethod.cs (1)
88public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs (3)
115protected sealed override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => GetModuleType().InternalGetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers); 118public sealed override Type[] GetTypes() 124return TypeDefTable.ToArray<Type>(skip: 1); // 0x02000001 is the <Module> type which is always skipped by this api.
System\Reflection\TypeLoading\Modules\RoModule.cs (15)
67public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 68public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 73protected abstract override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers); 82public abstract override Type[] GetTypes(); 86public sealed override FieldInfo ResolveField(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) => throw new NotSupportedException(SR.NotSupported_ResolvingTokens); 87public sealed override MemberInfo ResolveMember(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) => throw new NotSupportedException(SR.NotSupported_ResolvingTokens); 88public sealed override MethodBase ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) => throw new NotSupportedException(SR.NotSupported_ResolvingTokens); 91public sealed override Type ResolveType(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) => throw new NotSupportedException(SR.NotSupported_ResolvingTokens); 93public sealed override Type? GetType(string className, bool throwOnError, bool ignoreCase) 101Type type = Assembly.GetType(className, throwOnError: throwOnError, ignoreCase: ignoreCase)!;
System\Reflection\TypeLoading\Modules\RoResourceModule.cs (3)
49protected sealed override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => null; 53public sealed override Type[] GetTypes() => Type.EmptyTypes;
System\Reflection\TypeLoading\Parameters\Ecma\EcmaFatMethodParameter.cs (1)
20internal EcmaFatMethodParameter(IRoMethodBase roMethodBase, int position, Type parameterType, ParameterHandle handle)
System\Reflection\TypeLoading\Parameters\RoFatMethodParameter.cs (1)
15protected RoFatMethodParameter(IRoMethodBase roMethodBase, int position, Type parameterType)
System\Reflection\TypeLoading\Parameters\RoMethodParameter.cs (6)
13private readonly Type _parameterType; 16protected RoMethodParameter(IRoMethodBase roMethodBase, int position, Type parameterType) 33public sealed override Type ParameterType => _parameterType; 44public sealed override Type[] GetOptionalCustomModifiers() => ModifiedType.GetOptionalCustomModifiers(); 45public sealed override Type[] GetRequiredCustomModifiers() => ModifiedType.GetRequiredCustomModifiers(); 47public sealed override Type GetModifiedParameterType()
System\Reflection\TypeLoading\Parameters\RoParameter.cs (5)
30public abstract override Type ParameterType { get; } 39public abstract override Type[] GetOptionalCustomModifiers(); 40public abstract override Type[] GetRequiredCustomModifiers(); 62public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 63public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Parameters\RoPropertyIndexParameter.cs (4)
28public sealed override Type ParameterType => _backingParameter.ParameterType; 33public sealed override Type[] GetOptionalCustomModifiers() => _backingParameter.GetOptionalCustomModifiers(); 34public sealed override Type[] GetRequiredCustomModifiers() => _backingParameter.GetRequiredCustomModifiers(); 35public sealed override Type GetModifiedParameterType() => _backingParameter.GetModifiedParameterType();
System\Reflection\TypeLoading\Parameters\RoThinMethodParameter.cs (1)
15internal RoThinMethodParameter(IRoMethodBase roMethodBase, int position, Type parameterType)
System\Reflection\TypeLoading\Properties\Ecma\EcmaProperty.cs (5)
20internal EcmaProperty(RoInstantiationProviderType declaringType, PropertyDefinitionHandle handle, Type reflectedType) 60protected sealed override Type ComputePropertyType() => PropertyDefinition.DecodeSignature(_module, TypeContext).ReturnType; 64public sealed override Type GetModifiedPropertyType() 69public sealed override Type[] GetOptionalCustomModifiers() => ModifiedType.GetOptionalCustomModifiers(); 70public sealed override Type[] GetRequiredCustomModifiers() => ModifiedType.GetRequiredCustomModifiers();
System\Reflection\TypeLoading\Properties\RoProperty.cs (12)
16private readonly Type _reflectedType; 18protected RoProperty(RoInstantiationProviderType declaringType, Type reflectedType) 31public sealed override Type DeclaringType => GetRoDeclaringType(); 34public sealed override Type ReflectedType => _reflectedType; 54public sealed override Type PropertyType 77Type type = ComputePropertyType(); 90protected abstract Type ComputePropertyType(); 91private volatile Type? _lazyPropertyType; 163public abstract override Type[] GetOptionalCustomModifiers(); 164public abstract override Type[] GetRequiredCustomModifiers(); 168public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 169public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\RuntimeTypeInfo.BindingFlags.cs (10)
14protected sealed override ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 54protected sealed override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 59protected sealed override MethodInfo? GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 64private MethodInfo? GetMethodImplCommon(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 103public sealed override Type[] GetNestedTypes(BindingFlags bindingAttr) => Query<Type>(bindingAttr).ToArray(); 104public sealed override Type? GetNestedType(string name, BindingFlags bindingAttr) => Query<Type>(name, bindingAttr).Disambiguate(); 108protected sealed override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers)
System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs (1)
59if ((results = QuerySpecificMemberTypeIfRequested(type, optionalName, bindingAttr, predicate, MemberTypes.NestedType, out QueryResult<Type> nestedTypes)) != null)
System\Reflection\TypeLoading\RuntimeTypeInfo.TypeComponentsCache.cs (1)
92perNameCaches[MemberTypeIndex.NestedType] = new PerNameQueryCache<Type>(type, ignoreCase: ignoreCase, immediateTypeOnly: immediateTypeOnly);
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.BindingFlags.cs (4)
32internal sealed override IEnumerable<MethodInfo> SpecializeMethods(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) 46internal sealed override IEnumerable<EventInfo> SpecializeEvents(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) 56internal sealed override IEnumerable<FieldInfo> SpecializeFields(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) 66internal sealed override IEnumerable<PropertyInfo> SpecializeProperties(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType)
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.cs (1)
44Type? declaringType = DeclaringType;
System\Reflection\TypeLoading\Types\RoArrayType.cs (1)
152internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType)
System\Reflection\TypeLoading\Types\RoByRefType.cs (1)
36internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (12)
58public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 59public sealed override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 114protected sealed override TypeCode GetTypeCodeImpl() => Type.GetTypeCode(_genericTypeDefinition); 120public sealed override Type GetGenericTypeDefinition() => _genericTypeDefinition; 124public sealed override Type[] GetGenericArguments() => _genericTypeArguments.CloneArrayToUnmodifiedTypes(); 126public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 136public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 140internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => _genericTypeDefinition.SpecializeMethods(filter, reflectedType, this); 141internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => _genericTypeDefinition.SpecializeEvents(filter, reflectedType, this); 142internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => _genericTypeDefinition.SpecializeFields(filter, reflectedType, this); 143internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => _genericTypeDefinition.SpecializeProperties(filter, reflectedType, this);
System\Reflection\TypeLoading\Types\RoConstructedGenericType.Key.cs (2)
33Type t1 = GenericTypeArguments[i]; 34Type t2 = other.GenericTypeArguments[i];
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (17)
44Type? declaringType = DeclaringType; 81public sealed override Type GetGenericTypeDefinition() => IsGenericTypeDefinition ? this : throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 90public sealed override Type MakeGenericType(params Type[] typeArguments) 106Type typeArgument = typeArguments[i]; 186Type t = IsEnum ? GetEnumUnderlyingType() : this; 229public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 231public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 232public sealed override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 234internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => SpecializeMethods(filter, reflectedType, this); 235internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => SpecializeEvents(filter, reflectedType, this); 236internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => SpecializeFields(filter, reflectedType, this); 237internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => SpecializeProperties(filter, reflectedType, this); 241internal abstract IEnumerable<MethodInfo> SpecializeMethods(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType); 242internal abstract IEnumerable<EventInfo> SpecializeEvents(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType); 243internal abstract IEnumerable<FieldInfo> SpecializeFields(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType); 244internal abstract IEnumerable<PropertyInfo> SpecializeProperties(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType);
System\Reflection\TypeLoading\Types\RoExceptionType.cs (4)
46internal sealed override IEnumerable<MethodInfo> SpecializeMethods(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) => throw null!; 47internal sealed override IEnumerable<EventInfo> SpecializeEvents(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) => throw null!; 48internal sealed override IEnumerable<FieldInfo> SpecializeFields(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) => throw null!; 49internal sealed override IEnumerable<PropertyInfo> SpecializeProperties(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) => throw null!;
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (17)
23internal readonly Type _returnType; 24internal readonly Type[] _parameterTypes; 49public sealed override Type GetFunctionPointerReturnType() => _returnType.UnderlyingSystemType; 50public sealed override Type[] GetFunctionPointerParameterTypes() => _parameterTypes.CloneArrayToUnmodifiedTypes(); 78Type t = _returnType; 109public sealed override bool Equals([NotNullWhen(true)] Type? type) => Equals((object?)type); 124Type[] args = GetFunctionPointerParameterTypes(); 125Type[] otherArgs = other.GetFunctionPointerParameterTypes(); 158foreach (Type parameterType in _parameterTypes) 183public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 188public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 192public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 199internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 200internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 201internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>(); 211internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoGenericParameterType.cs (11)
44public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 49public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 55public sealed override Type[] GetGenericParameterConstraints() => GetGenericParameterConstraintsNoCopy().CloneArray<Type>(); 60public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 61public sealed override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 89internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>(); 90internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 91internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 92internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>();
System\Reflection\TypeLoading\Types\RoHasElementType.cs (9)
62public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 67public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 71public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 73public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 74public sealed override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 82internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 83internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 84internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>();
System\Reflection\TypeLoading\Types\RoModifiedFunctionPointerType.cs (14)
17private readonly Type[] _callingConventions; 25Type[] parameterUnmodifiedTypes = functionPointerType._parameterTypes; 38Type[] returnTypeOptionalModifiers = _returnType.GetOptionalCustomModifiers(); 42public override Type GetFunctionPointerReturnType() => _returnType; 43public override Type[] GetFunctionPointerParameterTypes() => Helpers.CloneArray(_parameterTypes); 44public override Type[] GetFunctionPointerCallingConventions() => Helpers.CloneArray(_callingConventions); 46private Type CDeclType => Loader.GetCoreType(CoreType.CallConvCdecl); 47private Type StdCallType => Loader.GetCoreType(CoreType.CallConvStdcall); 48private Type ThisCallType => Loader.GetCoreType(CoreType.CallConvThiscall); 49private Type FastCallType => Loader.GetCoreType(CoreType.CallConvFastcall); 51private Type[] CreateCallingConventions(Type[] returnTypeOptionalModifiers, RoFunctionPointerType functionPointerType) 53List<Type> builder = new(returnTypeOptionalModifiers.Length + 1); 73Type type = returnTypeOptionalModifiers[i];
System\Reflection\TypeLoading\Types\RoModifiedGenericType.cs (1)
20Type[] unmodifiedTypes = genericType.GetGenericTypeArgumentsNoCopy();
System\Reflection\TypeLoading\Types\RoModifiedType.cs (22)
18private List<Type>? _requiredModifiersBuilder; 19private List<Type>? _optionalModifiersBuilder; 20private Type[]? _requiredModifiers; 21private Type[]? _optionalModifiers; 58public void AddRequiredModifier(Type type) 61_requiredModifiersBuilder ??= new List<Type>(); 65public void AddOptionalModifier(Type type) 68_optionalModifiersBuilder ??= new List<Type>(); 75public override Type[] GetRequiredCustomModifiers() 93public override Type[] GetOptionalCustomModifiers() 111public override Type UnderlyingSystemType => _unmodifiedType; 116public override bool Equals(Type? other) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 169public override Type GetGenericTypeDefinition() => throw new NotSupportedException(SR.NotSupported_ModifiedType); 176public override Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 178public override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 179public override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 183public override Type[] GetGenericParameterConstraints() => throw new NotSupportedException(SR.NotSupported_ModifiedType); 193internal override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 194internal override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 195internal override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 196internal override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
System\Reflection\TypeLoading\Types\RoPointerType.cs (1)
36internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoStubType.cs (10)
56public sealed override Type GetGenericTypeDefinition() => throw null!; 61public sealed override Type MakeGenericType(params Type[] typeArguments) => throw null!; 65public sealed override Type[] GetGenericParameterConstraints() => throw null!; 66public sealed override Type GetFunctionPointerReturnType() => throw null!; 67public sealed override Type[] GetFunctionPointerParameterTypes() => throw null!; 78internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => throw null!; 79internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => throw null!; 80internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => throw null!; 81internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => throw null!;
System\Reflection\TypeLoading\Types\RoType.cs (40)
20public sealed override Type AsType() => this; 21public override Type UnderlyingSystemType => this; 58public override Type[] GetFunctionPointerCallingConventions() 69public abstract override Type GetFunctionPointerReturnType(); 70public abstract override Type[] GetFunctionPointerParameterTypes(); 73public override Type[] GetOptionalCustomModifiers() => EmptyTypes; 74public override Type[] GetRequiredCustomModifiers() => EmptyTypes; 79public sealed override Type[] GenericTypeParameters => GetGenericTypeParametersNoCopy().CloneArray<Type>(); 83public sealed override Type? GetElementType() => GetRoElementType(); 90public abstract override Type GetGenericTypeDefinition(); 91public sealed override Type[] GenericTypeArguments => GetGenericTypeArgumentsNoCopy().CloneArray<Type>(); 97public abstract override Type[] GetGenericParameterConstraints(); 103public override Type[] GetGenericArguments() => GetGenericArgumentsNoCopy().CloneArray(); 139public sealed override Type? DeclaringType => GetRoDeclaringType(); 148public sealed override Type? ReflectedType => DeclaringType; 159public sealed override Type? BaseType => GetRoBaseType(); 195public sealed override Type[] GetInterfaces() => GetInterfacesNoCopy().CloneArray<Type>(); 197public sealed override IEnumerable<Type> ImplementedInterfaces 201foreach (Type ifc in GetInterfacesNoCopy()) 248public sealed override InterfaceMapping GetInterfaceMap(Type interfaceType) => throw new NotSupportedException(SR.NotSupported_InterfaceMapping); 251public sealed override bool IsAssignableFrom(TypeInfo? typeInfo) => IsAssignableFrom((Type?)typeInfo); 252public sealed override bool IsAssignableFrom(Type? c) 314public sealed override Type MakeArrayType() => this.GetUniqueArrayType(); 315public sealed override Type MakeArrayType(int rank) 323public sealed override Type MakeByRefType() => this.GetUniqueByRefType(); 324public sealed override Type MakePointerType() => this.GetUniquePointerType(); 326public abstract override Type MakeGenericType(params Type[] typeArguments); 329public sealed override Type GetEnumUnderlyingType() => _lazyUnderlyingEnumType ??= ComputeEnumUnderlyingType(); 344Array ret = Type.GetTypeCode(GetEnumUnderlyingType()) switch 374public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 375public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 381internal abstract IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType); 382internal abstract IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType); 383internal abstract IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType); 384internal abstract IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType); 388internal MethodInfo? InternalGetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers)
System\Reflection\TypeLoading\Types\RoType.GetInterface.cs (3)
11public sealed override Type? GetInterface(string name, bool ignoreCase) 20Type? match = null; 21foreach (Type ifc in ImplementedInterfaces)
System\Reflection\TypeLoading\Types\RoType.TypeClassification.cs (3)
49Type? baseType = BaseType; 54Type? enumType = coreTypes[CoreType.Enum]; 55Type? valueType = coreTypes[CoreType.ValueType];
System\ThrowHelper.cs (1)
21Type? declaringType = memberInfo.DeclaringType;
System.Reflection.TypeExtensions (45)
System\Reflection\TypeExtensions.cs (45)
11[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] this Type type, 12Type[] types) 20[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] this Type type) 28[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] this Type type, 43| DynamicallyAccessedMemberTypes.PublicNestedTypes)] this Type type) 51[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicEvents)] this Type type, 60[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicEvents | DynamicallyAccessedMemberTypes.NonPublicEvents)] this Type type, 70[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicEvents)] this Type type) 78[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicEvents | DynamicallyAccessedMemberTypes.NonPublicEvents)] this Type type, 87[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] this Type type, 96[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields)] this Type type, 106[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] this Type type) 114[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields)] this Type type, 122public static Type[] GetGenericArguments(this Type type) 129public static Type[] GetInterfaces( 130[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] this Type type) 144| DynamicallyAccessedMemberTypes.PublicNestedTypes)] this Type type, 153[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] this Type type, 169| DynamicallyAccessedMemberTypes.PublicNestedTypes)] this Type type) 177[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] this Type type, 186[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] this Type type, 195[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] this Type type, 205[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] this Type type, 207Type[] types) 215[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] this Type type) 223[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] this Type type, 231public static Type? GetNestedType( 232[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicNestedTypes | DynamicallyAccessedMemberTypes.NonPublicNestedTypes)] this Type type, 241public static Type[] GetNestedTypes( 242[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicNestedTypes | DynamicallyAccessedMemberTypes.NonPublicNestedTypes)] this Type type, 251[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this Type type) 259[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] this Type type, 268[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this Type type, 277[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] this Type type, 287[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this Type type, 289Type? returnType) 297[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this Type type, 299Type? returnType, 300Type[] types) 307public static bool IsAssignableFrom(this Type type, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] Type? c) 314public static bool IsInstanceOfType(this Type type, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object? o) 325public static Type[] GetExportedTypes(this Assembly assembly) 340public static Type[] GetTypes(this Assembly assembly)
System.Resources.Extensions (95)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
443Type type = value.GetType();
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (7)
82private Type?[] _typeTable; // Lazy array of Types for resource values. 567Type type = FindType(typeIndex); 864_typeTable = new Type[numTypes]; 968private Type FindType(int typeIndex) 984Type UseReflectionToGetTypeLocal(int typeIndex) => UseReflectionToGetType(typeIndex); 991private Type UseReflectionToGetType(int typeIndex) 1000_typeTable[typeIndex] = Type.GetType(typeName, true);
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArrayOfClassesRecord.cs (1)
83internal override bool IsElementType(Type typeElement)
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArrayRecord.cs (5)
71public Array GetArray(Type expectedArrayType, bool allowNulls = true) 92private protected abstract Array Deserialize(Type arrayType, bool allowNulls); 94public override bool IsTypeNameMatching(Type type) 107internal abstract bool IsElementType(Type typeElement); 165private protected override Array Deserialize(Type arrayType, bool allowNulls) => GetArray(allowNulls);
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArraySingleObjectRecord.cs (2)
30public override bool IsTypeNameMatching(Type type) => type == typeof(object[]); 32internal override bool IsElementType(Type typeElement) => typeElement == typeof(object);
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArraySinglePrimitiveRecord.cs (2)
42public override bool IsTypeNameMatching(Type type) => typeof(T[]) == type; 44internal override bool IsElementType(Type typeElement) => typeElement == typeof(T);
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArraySingleStringRecord.cs (2)
30public override bool IsTypeNameMatching(Type type) => type == typeof(string[]); 32internal override bool IsElementType(Type typeElement) => typeElement == typeof(string);
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\BinaryArrayRecord.cs (10)
20private static HashSet<Type> PrimitiveTypes { get; } = 53private protected override Array Deserialize(Type arrayType, bool allowNulls) 57Type elementType = MapElementType(arrayType, out bool isClassRecord); 58Type actualElementType = arrayType.GetElementType()!; 202internal override bool IsElementType(Type typeElement) 214private static Type MapElementType(Type arrayType, out bool isClassRecord) 216Type elementType = arrayType; 225if (PrimitiveTypes.Contains(elementType) || (Nullable.GetUnderlyingType(elementType) is Type nullable && PrimitiveTypes.Contains(nullable))) 233Type complexType = typeof(ClassRecord);
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ClassWithMembersAndTypesRecord.cs (1)
24public override bool IsTypeNameMatching(Type type)
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\MemberReferenceRecord.cs (1)
34public override bool IsTypeNameMatching(Type type) => GetReferencedRecord().IsTypeNameMatching(type);
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\MemberTypeInfo.cs (1)
104internal bool IsElementType(Type typeElement)
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\PrimitiveTypeRecord.cs (1)
35public override bool IsTypeNameMatching(Type type) => type == typeof(T);
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\RectangularOrCustomOffsetArrayRecord.cs (7)
20private RectangularOrCustomOffsetArrayRecord(Type elementType, ArrayInfo arrayInfo, 49private Type ElementType { get; } 55internal override bool IsElementType(Type typeElement) 59private protected override Array Deserialize(Type arrayType, bool allowNulls) 160Type elementType = binaryType switch 208private static Type MapPrimitive(PrimitiveType primitiveType) 228private static Type MapPrimitiveArray(PrimitiveType primitiveType)
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\SerializationRecord.cs (1)
52public virtual bool IsTypeNameMatching(Type type) => false;
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\SystemClassWithMembersAndTypesRecord.cs (1)
24public override bool IsTypeNameMatching(Type type)
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\Utils\TypeExtensions.cs (6)
12internal static string GetAssemblyNameIncludingTypeForwards(this Type type) 15Type attributedType = type; 29internal static string GetTypeFullNameIncludingTypeForwards(this Type type) 36private static string GetClrTypeFullNameForArray(Type type) 46private static string GetClrTypeFullNameForNonArrayTypes(Type type) 55foreach (Type genericArgument in type.GetGenericArguments())
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.ITypeResolver.cs (1)
21Type GetType(TypeName typeName);
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.TypeResolver.cs (8)
25private readonly Dictionary<string, Type> _types = []; 38Type ITypeResolver.GetType(TypeName typeName) 42if (_types.TryGetValue(typeName.AssemblyQualifiedName, out Type? cachedType)) 47if (_binder?.BindToType(typeName.AssemblyName.FullName, typeName.FullName) is Type binderType) 79Type? type = _assemblyMatching != FormatterAssemblyStyle.Simple 88private static Type? GetSimplyNamedTypeFromAssembly(Assembly assembly, TypeName typeName) 103return Type.GetType(typeName.FullName, ResolveSimpleAssemblyName, new TopLevelAssemblyTypeResolver(assembly).ResolveType, throwOnError: false); 130public Type? ResolveType(Assembly? assembly, string simpleTypeName, bool ignoreCase)
System\Resources\Extensions\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (8)
14private readonly Type _elementType; 30Type expectedArrayType = arrayRecord.ArrayType switch 39Type elementType = _arrayOfClassRecords.GetType(); 132Type arrayRecordElementType = typeResolver.GetType(arrayRecord.ElementTypeName); 133Type elementType = arrayRecordElementType; 140|| (Nullable.GetUnderlyingType(elementType) is Type nullable && HasBuiltInSupport(nullable)))) 145Type expectedArrayType = arrayRecord.ArrayType switch 153static bool HasBuiltInSupport(Type elementType)
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordDeserializer.cs (2)
33Type type = deserializer.TypeResolver.GetType(classRecord.TypeName); 86Type type = value.GetType();
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordFieldInfoDeserializer.cs (1)
30Type type,
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordSerializationInfoDeserializer.cs (1)
31Type type,
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (4)
50/// <see cref="SerializationInfo.SetType(Type)"/> will get that type info serialized into the stream. 67private readonly Dictionary<Type, ISerializationSurrogate?>? _surrogates; 266ISerializationSurrogate? IDeserializer.GetSurrogate(Type type) 351Type type = _typeResolver.GetType(classRecord.TypeName);
System\Resources\Extensions\BinaryFormat\Deserializer\IDeserializer.cs (1)
70ISerializationSurrogate? GetSurrogate(Type type);
System\Resources\Extensions\BinaryFormat\Deserializer\PendingSerializationInfo.cs (2)
33Type type = @object.GetType(); 66[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type)
System\Resources\Extensions\BinaryFormat\SerializationEvents.cs (8)
14private static readonly ConcurrentDictionary<Type, SerializationEvents> s_cache = new(); 34[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type t) => 37private static SerializationEvents CreateSerializationEvents([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 48Type attribute, 50[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? type) 55Type? baseType = type; 78[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 83[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type,
System\Resources\Extensions\BinaryFormat\SerializationInfoExtensions.cs (3)
12private static readonly Action<SerializationInfo, string, object, Type> s_updateValue = 16.CreateDelegate<Action<SerializationInfo, string, object, Type>>(); 23internal static void UpdateValue(this SerializationInfo si, string name, object value, Type type) =>
System\Resources\Extensions\DeserializingResourceReader.cs (4)
60public override Type? BindToType(string assemblyName, string typeName) 62Type? type = null; 71type = Type.GetType(typeName, throwOnError: false, ignoreCase: false); 115Type type = FindType(typeIndex);
System\Resources\Extensions\PreserializedResourceWriter.cs (3)
39private static readonly Dictionary<string, Type> s_primitiveTypes = new Dictionary<string, Type>(16, TypeNameComparer.Instance) 87if (s_primitiveTypes.TryGetValue(typeName, out Type? primitiveType))
System.Resources.Writer (2)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
443Type type = value.GetType();
System\Resources\ResourceWriter.core.cs (1)
20public Func<Type, string>? TypeNameConverter { get; set; }
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net9.0\System.Runtime.Forwards.cs (1)
832[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Type))]
System.Runtime.CompilerServices.VisualC (2)
System\Runtime\CompilerServices\Attributes.cs (2)
117public RequiredAttributeAttribute(Type requiredContract) => RequiredContract = requiredContract; 119public Type RequiredContract { get; }
System.Runtime.InteropServices (38)
System\Runtime\InteropServices\ComAwareEventInfo.cs (6)
21public ComAwareEventInfo([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicEvents)] Type type, string eventName) 73public override Type? DeclaringType => _innerEventInfo.DeclaringType; 75public override object[] GetCustomAttributes(Type attributeType, bool inherit) 87public override bool IsDefined(Type attributeType, bool inherit) 98public override Type? ReflectedType => _innerEventInfo.ReflectedType; 116Type sourceInterface = interfaceAttribute.SourceInterface;
System\Runtime\InteropServices\ManagedToNativeComInteropStubAttribute.cs (2)
9public ManagedToNativeComInteropStubAttribute(Type classType, string methodName) 15public Type ClassType { get; }
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (19)
55private readonly ConditionalWeakTable<Type, Type> _forwarderInterfaceCache = new(); 62Type runtimeType = Type.GetTypeFromHandle(type)!; 68Type implementationType = _forwarderInterfaceCache.GetValue(runtimeType, runtimeType => 79implementation.SetCustomAttribute(new CustomAttributeBuilder(typeof(DynamicInterfaceCastableImplementationAttribute).GetConstructor(Array.Empty<Type>())!, Array.Empty<object>())); 81foreach (Type iface in implementation.GetInterfaces()) 86Type[] returnTypeOptionalModifiers = method.ReturnParameter.GetOptionalCustomModifiers(); 87Type[] returnTypeRequiredModifiers = method.ReturnParameter.GetRequiredCustomModifiers(); 89var parameterTypes = new Type[parameters.Length]; 90var parameterOptionalModifiers = new Type[parameters.Length][]; 91var parameterRequiredModifiers = new Type[parameters.Length][]; 122Type attributeType = EmitIgnoresAccessChecksToAttribute(moduleBuilder); 123return attributeType.GetConstructor(new Type[] { typeof(string) })!; 127private static Type EmitIgnoresAccessChecksToAttribute(ModuleBuilder moduleBuilder) 147new Type[] { typeof(string) }); 166private static readonly ConstructorInfo s_attributeUsageCtor = typeof(AttributeUsageAttribute).GetConstructor(new Type[] { typeof(AttributeTargets) })!; 173private sealed class ComImportDetails(Guid iid, Type implementation) : IIUnknownDerivedDetails 177public Type Implementation { get; } = implementation;
System\Runtime\InteropServices\Marshalling\ComObject.cs (1)
151VirtualMethodTableInfo IUnmanagedVirtualMethodTableProvider.GetVirtualMethodTableInfoForKey(Type type)
System\Runtime\InteropServices\Marshalling\GeneratedComInterfaceAttribute.cs (2)
32/// Gets or sets the <see cref="Type"/> used to control how string arguments are marshalled for all methods on the interface. 40public Type? StringMarshallingCustomType { get; set; }
System\Runtime\InteropServices\Marshalling\IComExposedDetails.cs (2)
23var type = Type.GetTypeFromHandle(handle);
System\Runtime\InteropServices\Marshalling\IIUnknownDerivedDetails.cs (3)
25public Type Implementation { get; } 34var type = Type.GetTypeFromHandle(handle);
System\Runtime\InteropServices\Marshalling\IUnknownDerivedAttribute.cs (1)
27public Type Implementation => typeof(TImpl);
System\Runtime\InteropServices\Marshalling\IUnmanagedVirtualMethodTableProvider.cs (1)
18public VirtualMethodTableInfo GetVirtualMethodTableInfoForKey(Type type);
System\Runtime\InteropServices\TypeLibImportClassAttribute.cs (1)
9public TypeLibImportClassAttribute(Type importClass) => Value = importClass.ToString();
System.Runtime.Serialization.BinaryFormat (41)
System\Runtime\Serialization\BinaryFormat\ArrayOfClassesRecord.cs (1)
83internal override bool IsElementType(Type typeElement)
System\Runtime\Serialization\BinaryFormat\ArrayRecord.cs (5)
71public Array GetArray(Type expectedArrayType, bool allowNulls = true) 92private protected abstract Array Deserialize(Type arrayType, bool allowNulls); 94public override bool IsTypeNameMatching(Type type) 107internal abstract bool IsElementType(Type typeElement); 165private protected override Array Deserialize(Type arrayType, bool allowNulls) => GetArray(allowNulls);
System\Runtime\Serialization\BinaryFormat\ArraySingleObjectRecord.cs (2)
30public override bool IsTypeNameMatching(Type type) => type == typeof(object[]); 32internal override bool IsElementType(Type typeElement) => typeElement == typeof(object);
System\Runtime\Serialization\BinaryFormat\ArraySinglePrimitiveRecord.cs (2)
42public override bool IsTypeNameMatching(Type type) => typeof(T[]) == type; 44internal override bool IsElementType(Type typeElement) => typeElement == typeof(T);
System\Runtime\Serialization\BinaryFormat\ArraySingleStringRecord.cs (2)
30public override bool IsTypeNameMatching(Type type) => type == typeof(string[]); 32internal override bool IsElementType(Type typeElement) => typeElement == typeof(string);
System\Runtime\Serialization\BinaryFormat\BinaryArrayRecord.cs (10)
20private static HashSet<Type> PrimitiveTypes { get; } = 53private protected override Array Deserialize(Type arrayType, bool allowNulls) 57Type elementType = MapElementType(arrayType, out bool isClassRecord); 58Type actualElementType = arrayType.GetElementType()!; 202internal override bool IsElementType(Type typeElement) 214private static Type MapElementType(Type arrayType, out bool isClassRecord) 216Type elementType = arrayType; 225if (PrimitiveTypes.Contains(elementType) || (Nullable.GetUnderlyingType(elementType) is Type nullable && PrimitiveTypes.Contains(nullable))) 233Type complexType = typeof(ClassRecord);
System\Runtime\Serialization\BinaryFormat\ClassWithMembersAndTypesRecord.cs (1)
24public override bool IsTypeNameMatching(Type type)
System\Runtime\Serialization\BinaryFormat\MemberReferenceRecord.cs (1)
34public override bool IsTypeNameMatching(Type type) => GetReferencedRecord().IsTypeNameMatching(type);
System\Runtime\Serialization\BinaryFormat\MemberTypeInfo.cs (1)
104internal bool IsElementType(Type typeElement)
System\Runtime\Serialization\BinaryFormat\PrimitiveTypeRecord.cs (1)
35public override bool IsTypeNameMatching(Type type) => type == typeof(T);
System\Runtime\Serialization\BinaryFormat\RectangularOrCustomOffsetArrayRecord.cs (7)
20private RectangularOrCustomOffsetArrayRecord(Type elementType, ArrayInfo arrayInfo, 49private Type ElementType { get; } 55internal override bool IsElementType(Type typeElement) 59private protected override Array Deserialize(Type arrayType, bool allowNulls) 160Type elementType = binaryType switch 208private static Type MapPrimitive(PrimitiveType primitiveType) 228private static Type MapPrimitiveArray(PrimitiveType primitiveType)
System\Runtime\Serialization\BinaryFormat\SerializationRecord.cs (1)
52public virtual bool IsTypeNameMatching(Type type) => false;
System\Runtime\Serialization\BinaryFormat\SystemClassWithMembersAndTypesRecord.cs (1)
24public override bool IsTypeNameMatching(Type type)
System\Runtime\Serialization\BinaryFormat\Utils\TypeExtensions.cs (6)
12internal static string GetAssemblyNameIncludingTypeForwards(this Type type) 15Type attributedType = type; 29internal static string GetTypeFullNameIncludingTypeForwards(this Type type) 36private static string GetClrTypeFullNameForArray(Type type) 46private static string GetClrTypeFullNameForNonArrayTypes(Type type) 55foreach (Type genericArgument in type.GetGenericArguments())
System.Runtime.Serialization.Formatters (197)
System\Runtime\Serialization\Formatter.cs (4)
68protected abstract void WriteArray(object obj, string name, Type memberType); 88protected abstract void WriteObjectRef(object? obj, string name, Type memberType); 98Type varType = data.GetType(); 186protected abstract void WriteValueType(object obj, string name, Type memberType);
System\Runtime\Serialization\FormatterConverter.cs (1)
11public object Convert(object value, Type type)
System\Runtime\Serialization\Formatters\Binary\BinaryFormatter.cs (3)
11private static readonly ConcurrentDictionary<Type, TypeInformation> s_typeNameCache = new ConcurrentDictionary<Type, TypeInformation>(); 38internal static TypeInformation GetTypeInformation(Type type) =>
System\Runtime\Serialization\Formatters\Binary\BinaryFormatterEventSource.cs (2)
45public void SerializingObject(Type type) 80public void DeserializingObject(Type type)
System\Runtime\Serialization\Formatters\Binary\BinaryFormatterWriter.cs (5)
114internal void WriteObject(NameInfo nameInfo, NameInfo? typeNameInfo, int numMembers, string[] memberNames, Type[] memberTypes, WriteObjectInfo[] memberObjectInfos) 412internal void WriteAssembly(Type? type, string assemblyString, int assemId, bool isNew) 456private readonly Type[] _memberTypes; 458internal ObjectMapInfo(int objectId, int numMembers, string[] memberNames, Type[] memberTypes) 466internal bool IsCompatible(int numMembers, string[] memberNames, Type[]? memberTypes)
System\Runtime\Serialization\Formatters\Binary\BinaryObjectInfo.cs (31)
20internal Type? _objectType; 125[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, 139[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, 220_cache._memberTypes = new Type[count]; 234private static void CheckTypeForwardedFrom(SerObjectInfoCache? cache, Type objectType, string? binderAssemblyString) 259_cache._memberTypes = new Type[count]; 288internal void GetMemberInfo(out string[]? outMemberNames, out Type[]? outMemberTypes, out object?[]? outMemberData) 328internal Type? _objectType; 341internal Type[]? _wireMemberTypes; 349internal List<Type>? _memberTypesList; 363[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, 377[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, 396[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? objectType, 398Type[]? memberTypes, 412[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? objectType, 414Type[]? memberTypes, 440private void InitReadConstructor(Type objectType, ISurrogateSelector? surrogateSelector, StreamingContext context) 478_memberTypesList = new List<Type>(20); 493_cache._memberTypes = new Type[_count]; 528internal Type? GetType(string name) 536Type type = _isTyped ? _cache!._memberTypes![position] : _memberTypesList![position]; 658internal Type[]? GetMemberTypes(string[] inMemberNames, Type? objectType) 673_cache._memberTypes = new Type[_count]; 686Type[] outMemberTypes = new Type[_cache._memberInfos.Length]; 725internal Type GetMemberType(MemberInfo objMember) 746internal readonly Dictionary<Type, SerObjectInfoCache> _seenBeforeTable = new Dictionary<Type, SerObjectInfoCache>(); 759internal Type[]? _memberTypes; 768internal SerObjectInfoCache(Type type)
System\Runtime\Serialization\Formatters\Binary\BinaryObjectReader.cs (17)
133private bool HasSurrogate(Type t) 138private void CheckSerializable(Type t) 162[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType) 168[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? objectType, 170Type[]? memberTypes) 947internal Type? Bind(string assemblyString, string typeString) 949Type? type = null; 963public Type? Type; 968internal Type? FastBindToType(string? assemblyName, string typeName) 970Type? type = null; 1058private static void GetSimplyNamedTypeFromAssembly(Assembly assm, string typeName, ref Type? type) 1073type = Type.GetType(typeName, ResolveSimpleAssemblyName, new TopLevelAssemblyTypeResolver(assm).ResolveType, throwOnError: false); 1079private Type? _previousType; 1082internal Type? GetType(BinaryAssemblyInfo assemblyInfo, string name) 1084Type? objectType; 1121private static void CheckTypeForwardedTo(Assembly sourceAssembly, Assembly destAssembly, Type resolvedType) 1136public Type? ResolveType(Assembly? assembly, string simpleTypeName, bool ignoreCase)
System\Runtime\Serialization\Formatters\Binary\BinaryObjectWriter.cs (19)
39private Type? _previousType; 116Type? objType = objectInfo._objectType; 134objectInfo.GetMemberInfo(out string[]? memberNames, out Type[]? memberTypes, out object?[]? memberData); 157Type type = 202Type[] memberTypes, 253Type memberType, 292Type? memberType = memberNameInfo._type; 319Type? outType = null; 417Type arrayType = objectInfo._objectType!; 420Type arrayElemType = arrayType.GetElementType()!; 583Type? dataType = null; 751private long InternalGetId(object obj, bool assignUniqueIdToValueType, Type? type, out bool isNew) 782private long Schedule(object obj, bool assignUniqueIdToValueType, Type? type) => 785private long Schedule(object obj, bool assignUniqueIdToValueType, Type? type, WriteObjectInfo? objectInfo) 900private NameInfo TypeToNameInfo(Type? type, WriteObjectInfo? objectInfo, InternalPrimitiveTypeE code, NameInfo? nameInfo) 925private NameInfo TypeToNameInfo(Type type) => 934private void TypeToNameInfo(Type type, NameInfo nameInfo) => 944internal InternalPrimitiveTypeE ToCode(Type? type) 1005private Type GetType(object obj) => obj.GetType();
System\Runtime\Serialization\Formatters\Binary\BinaryParser.cs (1)
450Type? objectType = _objectReader.GetType(assemblyInfo!, record._name);
System\Runtime\Serialization\Formatters\Binary\BinaryTypeConverter.cs (3)
13internal static BinaryTypeEnum GetBinaryTypeInfo(Type type, WriteObjectInfo? objectInfo, string? typeName, ObjectWriter objectWriter, out object? typeInformation, out int assemId) 87internal static BinaryTypeEnum GetParserBinaryTypeInfo(Type type, out object? typeInformation) 201out Type? type,
System\Runtime\Serialization\Formatters\Binary\BinaryUtilClasses.cs (3)
30internal Type? _dtType; 43internal Type? _arrayElementType; 443internal Type? _type;
System\Runtime\Serialization\Formatters\Binary\Converter.cs (49)
13internal static readonly Type s_typeofISerializable = typeof(ISerializable); 14internal static readonly Type s_typeofString = typeof(string); 15internal static readonly Type s_typeofConverter = typeof(Converter); 16internal static readonly Type s_typeofBoolean = typeof(bool); 17internal static readonly Type s_typeofByte = typeof(byte); 18internal static readonly Type s_typeofChar = typeof(char); 19internal static readonly Type s_typeofDecimal = typeof(decimal); 20internal static readonly Type s_typeofDouble = typeof(double); 21internal static readonly Type s_typeofInt16 = typeof(short); 22internal static readonly Type s_typeofInt32 = typeof(int); 23internal static readonly Type s_typeofInt64 = typeof(long); 24internal static readonly Type s_typeofSByte = typeof(sbyte); 25internal static readonly Type s_typeofSingle = typeof(float); 26internal static readonly Type s_typeofTimeSpan = typeof(TimeSpan); 27internal static readonly Type s_typeofDateTime = typeof(DateTime); 28internal static readonly Type s_typeofUInt16 = typeof(ushort); 29internal static readonly Type s_typeofUInt32 = typeof(uint); 30internal static readonly Type s_typeofUInt64 = typeof(ulong); 31internal static readonly Type s_typeofObject = typeof(object); 32internal static readonly Type s_typeofSystemVoid = typeof(void); 45internal static readonly Type s_typeofTypeArray = typeof(Type[]); 46internal static readonly Type s_typeofObjectArray = typeof(object[]); 47internal static readonly Type s_typeofStringArray = typeof(string[]); 48internal static readonly Type s_typeofBooleanArray = typeof(bool[]); 49internal static readonly Type s_typeofByteArray = typeof(byte[]); 50internal static readonly Type s_typeofCharArray = typeof(char[]); 51internal static readonly Type s_typeofDecimalArray = typeof(decimal[]); 52internal static readonly Type s_typeofDoubleArray = typeof(double[]); 53internal static readonly Type s_typeofInt16Array = typeof(short[]); 54internal static readonly Type s_typeofInt32Array = typeof(int[]); 55internal static readonly Type s_typeofInt64Array = typeof(long[]); 56internal static readonly Type s_typeofSByteArray = typeof(sbyte[]); 57internal static readonly Type s_typeofSingleArray = typeof(float[]); 58internal static readonly Type s_typeofTimeSpanArray = typeof(TimeSpan[]); 59internal static readonly Type s_typeofDateTimeArray = typeof(DateTime[]); 60internal static readonly Type s_typeofUInt16Array = typeof(ushort[]); 61internal static readonly Type s_typeofUInt32Array = typeof(uint[]); 62internal static readonly Type s_typeofUInt64Array = typeof(ulong[]); 63internal static readonly Type s_typeofMarshalByRefObject = typeof(MarshalByRefObject); 67private static volatile Type?[]? s_typeA; 68private static volatile Type?[]? s_arrayTypeA; 73internal static InternalPrimitiveTypeE ToCode(Type? type) => 75type.IsPrimitive ? ToPrimitiveTypeEnum(Type.GetTypeCode(type)) : 121internal static Type? ToArrayType(InternalPrimitiveTypeE code) 132var typeATemp = new Type?[PrimitiveTypeEnumLength]; 154var arrayTypeATemp = new Type?[PrimitiveTypeEnumLength]; 174internal static Type? ToType(InternalPrimitiveTypeE code) 204internal static bool IsPrimitiveArray(Type? type, [NotNullWhen(true)] out object? typeInformation)
System\Runtime\Serialization\Formatters\Binary\ObjectMap.cs (6)
13internal Type? _objectType; 17internal Type?[] _memberTypes; 27[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, 71_memberTypes = new Type[memberNames.Length]; 77out _, out _, out Type? type, out _); 107[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType,
System\Runtime\Serialization\Formatters\Binary\ObjectProgress.cs (2)
25internal Type? _dtType; 37internal Type?[]? _memberTypes;
System\Runtime\Serialization\Formatters\IFieldInfo.cs (1)
10Type[]? FieldTypes { get; set; }
System\Runtime\Serialization\FormatterServices.cs (20)
25[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 45Type? parentType = type.BaseType; 48bool classNamesUnique = GetParentTypes(parentType, out Type[]? parentTypes, out int parentTypeCount); 89[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields)] Type type) 127private static bool GetParentTypes(Type parentType, out Type[]? parentTypes, out int parentTypeCount) 135Type objectType = typeof(object); 136for (Type t1 = parentType; t1 != objectType; t1 = t1.BaseType!) 167[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 173[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, 185public static void CheckTypeSecurity(Type t, TypeFilterLevel securityLevel) 197Type type) => RuntimeHelpers.GetUninitializedObject(type); 201Type type) => RuntimeHelpers.GetUninitializedObject(type); 291public static Type? GetTypeFromAssembly(Assembly assem, string name) 313internal static string GetClrAssemblyName(Type type, out bool hasTypeForwardedFrom) 318Type attributedType = type; 334internal static string GetClrTypeFullName(Type type) 341private static string GetClrTypeFullNameForArray(Type type) 351private static string GetClrTypeFullNameForNonArrayTypes(Type type) 361foreach (Type genericArgument in type.GetGenericArguments())
System\Runtime\Serialization\ISurrogateSelector.cs (1)
10ISerializationSurrogate? GetSurrogate(Type type, StreamingContext context, out ISurrogateSelector selector);
System\Runtime\Serialization\MemberHolder.cs (2)
11internal readonly Type _memberType; 15[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type,
System\Runtime\Serialization\ObjectManager.cs (7)
389private static FieldInfo? GetNullableValueField(Type type) 681Type selectorType = CanCallGetType(obj) ? 783Type t = obj.GetType(); 797[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type t) 1626private static readonly Action<SerializationInfo, string, object, Type> s_updateValue = 1629.CreateDelegate<Action<SerializationInfo, string, object, Type>>(); 1631public static void UpdateValue(this SerializationInfo si, string name, object value, Type type) =>
System\Runtime\Serialization\SerializationBinder.cs (2)
8public virtual void BindToName(Type serializedType, out string? assemblyName, out string? typeName) 14public abstract Type? BindToType(string assemblyName, string typeName);
System\Runtime\Serialization\SerializationEventsCache.cs (8)
19internal SerializationEvents([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? t) 28Type attribute, 30[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? t) 35Type? baseType = t; 98private static readonly ConcurrentDictionary<Type, SerializationEvents> s_cache = new ConcurrentDictionary<Type, SerializationEvents>(); 101[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type t) => 106private static SerializationEvents CreateSerializationEvents(Type t) => new SerializationEvents(t);
System\Runtime\Serialization\SerializationFieldInfo.cs (5)
35public override Type? DeclaringType => m_field.DeclaringType; 37public override Type? ReflectedType => m_field.ReflectedType; 41public override object[] GetCustomAttributes(Type attributeType, bool inherit) => m_field.GetCustomAttributes(attributeType, inherit); 43public override bool IsDefined(Type attributeType, bool inherit) => m_field.IsDefined(attributeType, inherit); 45public override Type FieldType => m_field.FieldType;
System\Runtime\Serialization\SurrogateSelector.cs (5)
15public virtual void AddSurrogate(Type type, StreamingContext context, ISerializationSurrogate surrogate) 145public virtual ISerializationSurrogate? GetSurrogate(Type type, StreamingContext context, out ISurrogateSelector selector) 166public virtual void RemoveSurrogate(Type type, StreamingContext context) 177internal readonly Type _type; 180internal SurrogateKey(Type type, StreamingContext context)
System.Runtime.Serialization.Primitives (16)
System\Runtime\Serialization\ISerializationSurrogateProvider.cs (7)
19/// <returns>The <see cref="Type"/> to substitute for the type value. This type must be serializable by the DataContractSerializer. For example, 21Type GetSurrogateType(Type type); 27/// <param name="targetType">The <see cref="Type"/> that the substituted object should be assigned to.</param> 30object GetObjectToSerialize(object obj, Type targetType); 36/// <param name="targetType">The <see cref="Type"/> that the substituted object should be assigned to.</param> 39object GetDeserializedObject(object obj, Type targetType);
System\Runtime\Serialization\ISerializationSurrogateProvider2.cs (7)
23object? GetCustomDataToExport(MemberInfo memberInfo, Type dataContractType); 31object? GetCustomDataToExport(Type runtimeType, Type dataContractType); 36/// <param name="customDataTypes">A <see cref="Collection{T}"/> of <see cref="Type"/> to add known types to.</param> 37void GetKnownCustomDataTypes(Collection<Type> customDataTypes); 45/// <returns>The <see cref="Type"/> to use for the referenced type.</returns> 46Type? GetReferencedTypeOnImport(string typeName, string typeNamespace, object? customData);
System\Runtime\Serialization\KnownTypeAttribute.cs (2)
9public KnownTypeAttribute(Type type) 21public Type? Type { get; }
System.Runtime.Serialization.Schema (36)
System\Runtime\Serialization\Schema\CodeExporter.cs (19)
318private CodeTypeReference GetCodeTypeReference(Type type) 325private CodeTypeReference? GetCodeTypeReference(Type type, IList? parameters) 341else if (param is Tuple<Type, object[]?> typeParameters) 541Type? type = _dataContractSet.GetReferencedType(dataContract.XmlName, dataContract, out DataContract? referencedContract, out object[]? parameters, SupportsGenericTypeReference); 578type = (Type?)typeReference.UserData[s_codeUserDataActualTypeKey]; 655Type? type = _dataContractSet.GetReferencedType(GenericDictionaryName, GenericDictionaryContract, out DataContract? _, out object[]? _) ?? typeof(Dictionary<,>); 685Type? type = _dataContractSet.GetReferencedType(GenericListName, GenericListContract, out DataContract? _, out object[]? _); 700Type? type = GetReferencedTypeOnImport(dataContract); 711private Type? GetReferencedTypeOnImport(DataContract dataContract) 713Type? type = null; 826Type? actualType = (Type?)baseContractCodeDomInfo.TypeReference?.UserData[s_codeUserDataActualTypeKey]; 1051private static void ThrowIfReferencedBaseTypeSealed(Type baseType, DataContract dataContract) 1071Type baseType = enumDataContract.BaseContract!.UnderlyingType; 1158Type? actualType = (Type?)baseContractCodeDomInfo.TypeReference?.UserData[s_codeUserDataActualTypeKey]; 1434internal static string GetClrTypeFullName(Type type) 1612Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>();
System\Runtime\Serialization\Schema\ImportGlobals.cs (10)
96private static Type? s_typeOfXmlElement; 97internal static Type TypeOfXmlElement => s_typeOfXmlElement ??= typeof(XmlElement); 99private static Type? s_typeOfXmlNodeArray; 100internal static Type TypeOfXmlNodeArray => s_typeOfXmlNodeArray ??= typeof(XmlNode[]); 102private static Type? s_typeOfXmlQualifiedName; 103internal static Type TypeOfXmlQualifiedName => s_typeOfXmlQualifiedName ??= typeof(XmlQualifiedName); 105private static Type? s_typeOfXmlSchemaProviderAttribute; 106internal static Type TypeOfXmlSchemaProviderAttribute => s_typeOfXmlSchemaProviderAttribute ??= typeof(XmlSchemaProviderAttribute); 108private static Type? s_typeOfXmlSchemaType; 109internal static Type TypeOfXmlSchemaType => s_typeOfXmlSchemaType ??= typeof(XmlSchemaType);
System\Runtime\Serialization\Schema\ImportOptions.cs (6)
19private ICollection<Type>? _referencedTypes; 20private ICollection<Type>? _referencedCollectionTypes; 65public ICollection<Type> ReferencedCollectionTypes => _referencedCollectionTypes ??= new List<Type>(); 70public ICollection<Type> ReferencedTypes => _referencedTypes ??= new List<Type>();
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (1)
59internal static bool IsTypeNullable(Type type)
System.Security.AccessControl (11)
artifacts\obj\System.Security.AccessControl\Debug\net9.0\System.Security.AccessControl.notsupported.cs (11)
165public System.Security.AccessControl.AuthorizationRuleCollection GetAccessRules(bool includeExplicit, bool includeInherited, System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 166public System.Security.AccessControl.AuthorizationRuleCollection GetAuditRules(bool includeExplicit, bool includeInherited, System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 372public abstract System.Type AccessRightType { get; } 374public abstract System.Type AccessRuleType { get; } 380public abstract System.Type AuditRuleType { get; } 388public System.Security.Principal.IdentityReference? GetGroup(System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 389public System.Security.Principal.IdentityReference? GetOwner(System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 422public override System.Type AccessRightType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 423public override System.Type AccessRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 424public override System.Type AuditRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 568public void RemoveType(System.Type t) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); }
System.Security.Cryptography (66)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (22)
92Type? socketsHttpHandlerType = Type.GetType("System.Net.Http.SocketsHttpHandler, System.Net.Http", throwOnError: false); 93Type? httpMessageHandlerType = Type.GetType("System.Net.Http.HttpMessageHandler, System.Net.Http", throwOnError: false); 94Type? httpClientType = Type.GetType("System.Net.Http.HttpClient, System.Net.Http", throwOnError: false); 95Type? httpRequestMessageType = Type.GetType("System.Net.Http.HttpRequestMessage, System.Net.Http", throwOnError: false); 96Type? httpResponseMessageType = Type.GetType("System.Net.Http.HttpResponseMessage, System.Net.Http", throwOnError: false); 97Type? httpResponseHeadersType = Type.GetType("System.Net.Http.Headers.HttpResponseHeaders, System.Net.Http", throwOnError: false); 98Type? httpContentType = Type.GetType("System.Net.Http.HttpContent, System.Net.Http", throwOnError: false); 99Type? taskOfHttpResponseMessageType = Type.GetType("System.Threading.Tasks.Task`1[[System.Net.Http.HttpResponseMessage, System.Net.Http]], System.Runtime", throwOnError: false); 109ConstructorInfo? socketsHttpHandlerCtor = socketsHttpHandlerType.GetConstructor(Type.EmptyTypes); 112ConstructorInfo? httpClientCtor = httpClientType.GetConstructor(new Type[] { httpMessageHandlerType }); 114ConstructorInfo? httpRequestMessageCtor = httpRequestMessageType.GetConstructor(Type.EmptyTypes); 115MethodInfo? sendMethod = httpClientType.GetMethod("Send", new Type[] { httpRequestMessageType, typeof(CancellationToken) }); 116MethodInfo? sendAsyncMethod = httpClientType.GetMethod("SendAsync", new Type[] { httpRequestMessageType, typeof(CancellationToken) }); 122MethodInfo? readAsStreamMethod = httpContentType.GetMethod("ReadAsStream", Type.EmptyTypes);
System\Security\Cryptography\AsymmetricKeyExchangeFormatter.cs (1)
16public abstract byte[] CreateKeyExchange(byte[] data, Type? symAlgType);
System\Security\Cryptography\CapiHelper.Unix.cs (2)
17Type hashAlgType => HashAlgorithmTypeToHashAlgorithmName(hashAlgType), 66private static HashAlgorithmName HashAlgorithmTypeToHashAlgorithmName(Type hashAlgType)
System\Security\Cryptography\CryptoConfig.cs (30)
36private static readonly ConcurrentDictionary<string, Type> appNameHT = new ConcurrentDictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 115Type HMACMD5Type = typeof(System.Security.Cryptography.HMACMD5); 116Type HMACSHA1Type = typeof(System.Security.Cryptography.HMACSHA1); 117Type HMACSHA256Type = typeof(System.Security.Cryptography.HMACSHA256); 118Type HMACSHA384Type = typeof(System.Security.Cryptography.HMACSHA384); 119Type HMACSHA512Type = typeof(System.Security.Cryptography.HMACSHA512); 121Type RijndaelManagedType = typeof(System.Security.Cryptography.RijndaelManaged); 124Type AesManagedType = typeof(System.Security.Cryptography.AesManaged); 125Type SHA256DefaultType = typeof(System.Security.Cryptography.SHA256Managed); 126Type SHA384DefaultType = typeof(System.Security.Cryptography.SHA384Managed); 127Type SHA512DefaultType = typeof(System.Security.Cryptography.SHA512Managed); 128Type SHA1CryptoServiceProviderType = typeof(SHA1CryptoServiceProvider); 129Type MD5CryptoServiceProviderType = typeof(MD5CryptoServiceProvider); 130Type RSACryptoServiceProviderType = typeof(RSACryptoServiceProvider); 131Type DSACryptoServiceProviderType = typeof(DSACryptoServiceProvider); 132Type DESCryptoServiceProviderType = typeof(DESCryptoServiceProvider); 133Type TripleDESCryptoServiceProviderType = typeof(TripleDESCryptoServiceProvider); 134Type RC2CryptoServiceProviderType = typeof(RC2CryptoServiceProvider); 135Type AesCryptoServiceProviderType = typeof(AesCryptoServiceProvider); 138Type RNGCryptoServiceProviderType = typeof(RNGCryptoServiceProvider); 141Type ECDsaCngType = typeof(ECDsaCng); 303public static void AddAlgorithm(Type algorithm, params string[] names) 378appNameHT.TryGetValue(name, out Type? retvalType); 385retvalType = retvalObj as Type; 391retvalType = Type.GetType(retvalString, false, false); 422retvalType = Type.GetType(name, false, false); 462ConstructorInfo? rci = Type.DefaultBinder.BindToMethod( 478object retval = rci.Invoke(ConstructorDefault, Type.DefaultBinder, args, null); 483Type.DefaultBinder.ReorderArgumentArray(ref args, state);
System\Security\Cryptography\CryptoConfigForwarder.cs (2)
32Type t = Type.GetType(CryptoConfigTypeName, throwOnError: true)!;
System\Security\Cryptography\RSAOAEPKeyExchangeFormatter.cs (1)
62public override byte[] CreateKeyExchange(byte[] rgbData, Type? symAlgType)
System\Security\Cryptography\RSAPKCS1KeyExchangeFormatter.cs (1)
43public override byte[] CreateKeyExchange(byte[] rgbData, Type? symAlgType)
System\Security\Cryptography\XmlKeyHelper.cs (7)
273Type xDocument = Type.GetType("System.Xml.Linq.XDocument" + XmlLinqAssemblyString)!; 282Type xElement = Type.GetType("System.Xml.Linq.XElement" + XmlLinqAssemblyString)!; 286Type.EmptyTypes)!; 291Type xName = Type.GetType("System.Xml.Linq.XName" + XmlLinqAssemblyString)!;
System.Security.Cryptography.Xml (49)
System\Security\Cryptography\Xml\KeyInfo.cs (1)
134public IEnumerator GetEnumerator(Type requestedObjectType)
System\Security\Cryptography\Xml\SignedXml.cs (4)
1034Type ta = Type.GetType(signatureDescription.KeyAlgorithm!)!; 1116private static bool IsKeyTheCorrectAlgorithm(AsymmetricAlgorithm key, Type expectedType) 1118Type actualType = key.GetType();
System\Security\Cryptography\Xml\Transform.cs (4)
89public abstract Type[] InputTypes 94public abstract Type[] OutputTypes 99internal bool AcceptsType(Type inputType) 152public abstract object GetOutput(Type type);
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (5)
18private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlDocument) }; 19private readonly Type[] _outputTypes = { typeof(XmlDocument) }; 69public override Type[] InputTypes 74public override Type[] OutputTypes 273public override object GetOutput(Type type)
System\Security\Cryptography\Xml\XmlDsigBase64Transform.cs (5)
13private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlNodeList), typeof(XmlDocument) }; 14private readonly Type[] _outputTypes = { typeof(Stream) }; 22public override Type[] InputTypes 27public override Type[] OutputTypes 124public override object GetOutput(Type type)
System\Security\Cryptography\Xml\XmlDsigC14NTransform.cs (5)
11private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlDocument), typeof(XmlNodeList) }; 12private readonly Type[] _outputTypes = { typeof(Stream) }; 27public override Type[] InputTypes 32public override Type[] OutputTypes 76public override object GetOutput(Type type)
System\Security\Cryptography\Xml\XmlDsigEnvelopedSignatureTransform.cs (5)
11private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlNodeList), typeof(XmlDocument) }; 12private readonly Type[] _outputTypes = { typeof(XmlNodeList), typeof(XmlDocument) }; 36public override Type[] InputTypes 41public override Type[] OutputTypes 178public override object GetOutput(Type type)
System\Security\Cryptography\Xml\XmlDsigExcC14NTransform.cs (5)
11private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlDocument), typeof(XmlNodeList) }; 12private readonly Type[] _outputTypes = { typeof(Stream) }; 36public override Type[] InputTypes 41public override Type[] OutputTypes 113public override object GetOutput(Type type)
System\Security\Cryptography\Xml\XmlDsigXPathTransform.cs (5)
14private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlNodeList), typeof(XmlDocument) }; 15private readonly Type[] _outputTypes = { typeof(XmlNodeList) }; 25public override Type[] InputTypes 30public override Type[] OutputTypes 191public override object GetOutput(Type type)
System\Security\Cryptography\Xml\XmlDsigXsltTransform.cs (5)
15private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlDocument), typeof(XmlNodeList) }; 16private readonly Type[] _outputTypes = { typeof(Stream) }; 33public override Type[] InputTypes 41public override Type[] OutputTypes 143public override object GetOutput(Type type)
System\Security\Cryptography\Xml\XmlLicenseTransform.cs (5)
14private readonly Type[] _inputTypes = { typeof(XmlDocument) }; 15private readonly Type[] _outputTypes = { typeof(XmlDocument) }; 32public override Type[] InputTypes 37public override Type[] OutputTypes 114public override object GetOutput(Type type)
System.Security.Permissions (5)
System\Security\HostSecurityManager.cs (4)
19public virtual EvidenceBase GenerateAppDomainEvidence(Type evidenceType) { return null; } 20public virtual EvidenceBase GenerateAssemblyEvidence(Type evidenceType, Assembly assembly) { return null; } 21public virtual Type[] GetHostSuppliedAppDomainEvidenceTypes() { return null; } 22public virtual Type[] GetHostSuppliedAssemblyEvidenceTypes(Assembly assembly) { return null; }
System\Security\Permissions\ResourcePermissionBase.cs (1)
20protected Type PermissionAccessType { get; set; }
System.Security.Principal.Windows (8)
artifacts\obj\System.Security.Principal.Windows\Debug\net9.0\System.Security.Principal.Windows.notsupported.cs (8)
36public abstract bool IsValidTargetType(System.Type targetType); 40public abstract System.Security.Principal.IdentityReference Translate(System.Type targetType); 56public System.Security.Principal.IdentityReferenceCollection Translate(System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 57public System.Security.Principal.IdentityReferenceCollection Translate(System.Type targetType, bool forceSuccess) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 66public override bool IsValidTargetType(System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 70public override System.Security.Principal.IdentityReference Translate(System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 90public override bool IsValidTargetType(System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 95public override System.Security.Principal.IdentityReference Translate(System.Type targetType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); }
System.ServiceModel.Http (7)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
523Type channelType = typeof(TChannel);
System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (6)
23private static readonly Type s_delegatingHandlerType = typeof(DelegatingHandler); 25private Type[] _httpMessageHandlers; 40public HttpMessageHandlerFactory(params Type[] handlers) 55Type handler = handlers[cnt]; 70ConstructorInfo ctorInfo = handler.GetConstructor(Array.Empty<Type>()); 156instances[cnt] = (DelegatingHandler)_handlerCtors[cnt].Invoke(Array.Empty<Type>());
System.ServiceModel.NetNamedPipe.Tests (1)
NetNamedPipeBindingTest.cs (1)
19Type t = Assembly.GetAssembly(typeof(NamedPipeTransportBindingElement))
System.ServiceModel.Primitives (510)
Extensions\ReflectionExtensions.cs (36)
15public static Assembly Assembly(this Type type) 19public static Type BaseType(this Type type) 23public static bool ContainsGenericParameters(this Type type) 27public static ConstructorInfo GetConstructor(this Type type, Type[] types) 31public static ConstructorInfo GetConstructor(this Type type, BindingFlags bindingAttr, object binder, Type[] types, object[] modifiers) 35public static PropertyInfo GetProperty(this Type type, string name, BindingFlags bindingAttr) 39public static Type[] GetGenericArguments(this Type type) 43public static Type[] GetInterfaces(this Type type) 47public static bool IsAbstract(this Type type) 51public static bool IsAssignableFrom(this Type type, Type otherType) 55public static bool IsClass(this Type type) 59public static bool IsDefined(this Type type, Type attributeType, bool inherit) 63public static bool IsEnum(this Type type) 67public static bool IsGenericType(this Type type) 71public static bool IsInterface(this Type type) 75public static bool IsInstanceOfType(this Type type, object o) 79public static bool IsMarshalByRef(this Type type) 83public static bool IsNotPublic(this Type type) 87public static bool IsSealed(this Type type) 91public static bool IsValueType(this Type type) 95public static InterfaceMapping GetInterfaceMap(this Type type, Type interfaceType) 99public static MemberInfo[] GetMember(this Type type, string name, BindingFlags bindingAttr) 103public static MemberInfo[] GetMembers(this Type type, BindingFlags bindingAttr) 107public static MethodInfo GetMethod(this Type type, string name) 112public static MethodInfo GetMethod(this Type type, string name, Type[] types) 119public static TypeCode GetTypeCode(this Type type) 230public static Type ReflectedType(this MethodInfo mi)
Internals\System\Runtime\Fx.cs (13)
32private static Type[] s_breakOnExceptionTypesCache; 237internal static Type[] BreakOnExceptionTypes 250List<Type> types = new List<Type>(typeNames.Length); 253types.Add(Type.GetType(typeNames[i], false)); 619public CacheAttribute(Type elementType, CacheAttrition cacheAttrition) 629public Type ElementType { get; } 648public QueueAttribute(Type elementType) 656public Type ElementType { get; } 769public Type CancelDeclaringType { get; set; } 806public ThrowsAttribute(Type exceptionType, string diagnosis) 817public Type ExceptionType { get; } 836public Type FromDeclaringType { get; set; }
Internals\System\Runtime\GeneratedXmlSerializers.cs (3)
12private static Dictionary<string, Type> s_generatedSerializers = new Dictionary<string, Type>(); 14public static Dictionary<string, Type> GetGeneratedSerializers()
Internals\System\Xml\XmlMtomReader.cs (3)
773public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver) 995public override Type ValueType 1730public override Type ValueType
Internals\System\Xml\XmlMtomWriter.cs (1)
789Type type = reader.ValueType;
System\IdentityModel\CryptoHelper.cs (1)
307Type algorithmType = algorithmObject.GetType();
System\IdentityModel\Security\WSTrust.cs (2)
49protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(BinarySecretSecurityToken) }; }
System\IdentityModel\Selectors\SecurityTokenSerializer.cs (7)
179public abstract Type GetTokenType(SecurityKeyIdentifierClause clause); 213private Type[] _tokenTypes = null; 217public Type TokenType { get { return GetTokenTypes()[0]; } } 221public bool SupportsCore(Type tokenType) 223Type[] tokenTypes = GetTokenTypes(); 234protected abstract Type[] GetTokenTypesCore(); 236public Type[] GetTokenTypes()
System\IdentityModel\Tokens\KeyInfoSerializer.cs (2)
335internal Type[] GetTokenTypes(string tokenTypeUri) 352protected internal virtual string GetTokenTypeUri(Type tokenType)
System\IdentityModel\Tokens\LocalIdKeyIdentifierClause.cs (12)
13private readonly Type[] _ownerTypes; 16: this(localId, (Type[])null) 20public LocalIdKeyIdentifierClause(string localId, Type ownerType) 21: this(localId, ownerType == null ? (Type[])null : new Type[] { ownerType }) 25public LocalIdKeyIdentifierClause(string localId, byte[] derivationNonce, int derivationLength, Type ownerType) 26: this(null, derivationNonce, derivationLength, ownerType == null ? (Type[])null : new Type[] { ownerType }) 30internal LocalIdKeyIdentifierClause(string localId, Type[] ownerTypes) 35internal LocalIdKeyIdentifierClause(string localId, byte[] derivationNonce, int derivationLength, Type[] ownerTypes) 52public Type OwnerType 63public bool Matches(string localId, Type ownerType)
System\IdentityModel\Tokens\WSSecurityJan2004.cs (15)
114protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(GenericXmlSecurityToken) }; } 123protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(UserNameSecurityToken) }; } 137protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(X509SecurityToken) }; } 257protected abstract Type ClauseType { get; } 259public abstract Type TokenType { get; } 280public override Type GetTokenType(SecurityKeyIdentifierClause clause) 354protected override Type ClauseType { get { return typeof(X509SubjectKeyIdentifierClause); } } 355public override Type TokenType { get { return typeof(X509SecurityToken); } } 384public override Type GetTokenType(SecurityKeyIdentifierClause clause) 392Type tokenType = GetTokenType(clause); 417Type[] tokenTypes = null; 459public override Type GetTokenType(SecurityKeyIdentifierClause clause)
System\IdentityModel\Tokens\WSSecurityXXX2005.cs (2)
119protected override Type ClauseType { get { return typeof(X509ThumbprintKeyIdentifierClause); } } 120public override Type TokenType { get { return typeof(X509SecurityToken); } }
System\ServiceModel\ChannelFactory.cs (4)
345private Type _channelType; 349protected ChannelFactory(Type channelType) 430internal Type CallbackType { get; set; } 532Type implementationType = implementation.GetType();
System\ServiceModel\Channels\AddressHeader.cs (2)
36Type type = GetObjectType(value); 70private static Type GetObjectType(object value)
System\ServiceModel\Channels\BindingElementCollection.cs (1)
68public bool Contains(Type bindingElementType)
System\ServiceModel\Channels\ChannelManagerBase.cs (1)
47internal Exception CreateChannelTypeNotSupportedException(Type type)
System\ServiceModel\Channels\ChannelRequirements.cs (28)
61public static Type[] ComputeRequiredChannels(ref ChannelRequirements requirements) 68return new Type[] { 74return new Type[] { 79return new Type[] { 89return new Type[] { 97return new Type[] { 103return new Type[] { 113return new Type[] { 123return new Type[] { 130return new Type[] { 142return new Type[] { 150return new Type[] { 156return new Type[] { 167return new Type[] { 177return new Type[] { 184return new Type[] { 194public static bool IsSessionful(Type channelType) 203public static bool IsOneWay(Type channelType) 211public static bool IsRequestReply(Type channelType) 219public static bool IsDuplex(Type channelType) 225public static Exception CantCreateListenerException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels, string bindingName) 243public static Exception CantCreateChannelException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels, string bindingName) 260public static Exception BindingContractMismatchException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels, 270foreach (Type channelType in requiredChannels) 313foreach (Type channelType in supportedChannels)
System\ServiceModel\Channels\ClientReliableChannelBinder.cs (1)
83Type type = typeof(TChannel);
System\ServiceModel\Channels\CommunicationObject.cs (1)
817protected virtual Type GetCommunicationObjectType()
System\ServiceModel\Channels\Message.cs (1)
111private static Type GetObjectType(object value)
System\ServiceModel\Channels\RequestReplyCorrelator.cs (4)
25Type stateType = typeof(T); 45Type stateType = typeof(T); 241internal Type StateType; 243internal Key(UniqueId messageId, Type stateType)
System\ServiceModel\Channels\ServiceChannel.cs (1)
391internal bool CanCastTo(Type t)
System\ServiceModel\Channels\ServiceChannelFactory.cs (7)
113Type[] requiredChannels = ChannelRequirements.ComputeRequiredChannels(ref requirements); 120foreach (Type type in requiredChannels) 167foreach (Type type in requiredChannels) 190Dictionary<Type, byte> supportedChannels = new Dictionary<Type, byte>(); 360internal static object CreateProxy(Type interfaceType, Type proxiedType, MessageDirection direction, ServiceChannel serviceChannel)
System\ServiceModel\Channels\ServiceChannelProxy.cs (13)
21private Type _proxiedType; 64Type declaringType = method.DeclaringType; 257public TaskCompletionSourceProxy(Type resultType) 283private static ConcurrentDictionary<Type, TaskCompletionSourceInfo> s_cache = new ConcurrentDictionary<Type, TaskCompletionSourceInfo>(); 287public TaskCompletionSourceInfo(Type resultType) 290Type tcsType = typeof(TaskCompletionSource<>); 291GenericType = tcsType.MakeGenericType(new Type[] { resultType }); 294TrySetExceptionMethod = GenericType.GetRuntimeMethod("TrySetException", new Type[] { typeof(Exception) }); 295TrySetCanceledMethod = GenericType.GetRuntimeMethod("TrySetCanceled", Array.Empty<Type>()); 298public Type ResultType { get; private set; } 299public Type GenericType { get; private set; } 321public static TaskCompletionSourceInfo GetTaskCompletionSourceInfo(Type resultType)
System\ServiceModel\Description\ContractDescription.cs (8)
49public Type ContractType { get; set; } 51public Type CallbackContractType { get; set; } 125public KeyedCollection<Type, IContractBehavior> ContractBehaviors 133public static ContractDescription GetContract(Type contractType) 144public static ContractDescription GetContract(Type contractType, Type serviceType) 161public static ContractDescription GetContract(Type contractType, object serviceImplementation) 174Type serviceType = serviceImplementation.GetType();
System\ServiceModel\Description\DataContractSerializerOperationBehavior.cs (4)
75public virtual XmlObjectSerializer CreateSerializer(Type type, string name, string ns, IList<Type> knownTypes) 89public virtual XmlObjectSerializer CreateSerializer(Type type, XmlDictionaryString name, XmlDictionaryString ns, IList<Type> knownTypes)
System\ServiceModel\Description\FaultDescription.cs (1)
27public Type DetailType { get; set; }
System\ServiceModel\Description\MessageDescription.cs (3)
18private static Type s_typeOfUntypedMessage; 114internal static Type TypeOfUntypedMessage 131public Type MessageType { get; set; }
System\ServiceModel\Description\MessagePartDescription.cs (1)
75public Type Type { get; set; }
System\ServiceModel\Description\OperationDescription.cs (4)
41KnownTypes = new Collection<Type>(); 50public KeyedCollection<Type, IOperationBehavior> OperationBehaviors 133public Collection<Type> KnownTypes { get; } 152internal Type TaskTResult
System\ServiceModel\Description\ServiceEndpoint.cs (1)
40public KeyedCollection<Type, IEndpointBehavior> EndpointBehaviors
System\ServiceModel\Description\ServiceEndpointCollection.cs (3)
17public ServiceEndpoint Find(Type contractType) 53public ServiceEndpoint Find(Type contractType, XmlQualifiedName bindingName) 120public Collection<ServiceEndpoint> FindAll(Type contractType)
System\ServiceModel\Description\ServiceReflector.cs (49)
50internal static string TypeName(Type t) 52Type[] args = null; 84internal static XmlQualifiedName GetContractName(Type contractType, string name, string ns) 385internal static readonly Type VoidType = typeof(void); 387internal static readonly Type taskType = typeof(Task); 388internal static readonly Type taskTResultType = typeof(Task<>); 389internal static readonly Type CancellationTokenType = typeof(CancellationToken); 390internal static readonly Type IProgressType = typeof(IProgress<>); 391private static readonly Type s_asyncCallbackType = typeof(AsyncCallback); 392private static readonly Type s_asyncResultType = typeof(IAsyncResult); 393private static readonly Type s_objectType = typeof(object); 394private static readonly Type s_OperationContractAttributeType = typeof(OperationContractAttribute); 396static internal Type GetOperationContractProviderType(MethodInfo method) 411static internal List<Type> GetInterfaces(Type service) 413List<Type> types = new List<Type>(); 422Type t = GetAncestorImplicitContractClass(service); 429Type operationContractProviderType = GetOperationContractProviderType(method); 436foreach (Type t in service.GetInterfaces()) 451private static Type GetAncestorImplicitContractClass(Type service) 463static internal List<Type> GetInheritedContractTypes(Type service) 465List<Type> types = new List<Type>(); 466foreach (Type t in service.GetInterfaces()) 483static internal object[] GetCustomAttributes(ICustomAttributeProvider attrProvider, Type attrType) 488static internal object[] GetCustomAttributes(ICustomAttributeProvider attrProvider, Type attrType, bool inherit) 518Type type = attrProvider as Type; 551Type attrType = typeof(T); 566Type attrType = typeof(T); 591static internal T GetSingleAttribute<T>(ICustomAttributeProvider attrProvider, Type[] attrTypeGroup) 597Type attrType = typeof(T); 598foreach (Type otherType in attrTypeGroup) 613static internal T GetRequiredSingleAttribute<T>(ICustomAttributeProvider attrProvider, Type[] attrTypeGroup) 623static internal Type GetContractType(Type interfaceType) 629static internal Type GetContractTypeAndAttribute(Type interfaceType, out ServiceContractAttribute contractAttribute) 637List<Type> types = new List<Type>(GetInheritedContractTypes(interfaceType)); 644foreach (Type potentialContractRoot in types) 647foreach (Type t in types) 664private static List<MethodInfo> GetMethodsInternal(Type interfaceType) 899static internal bool IsTask(MethodInfo method, out Type taskTResult) 902Type methodReturnType = method.ReturnType; 997static internal bool IsParameterDisposable(Type type)
System\ServiceModel\Description\TypedMessageConverter.cs (7)
14public static TypedMessageConverter Create(Type messageContract, string action) 19public static TypedMessageConverter Create(Type messageContract, string action, string defaultNamespace) 24public static TypedMessageConverter Create(Type messageContract, string action, XmlSerializerFormatAttribute formatterAttribute) 29public static TypedMessageConverter Create(Type messageContract, string action, DataContractFormatAttribute formatterAttribute) 34public static TypedMessageConverter Create(Type messageContract, string action, string defaultNamespace, XmlSerializerFormatAttribute formatterAttribute) 45public static TypedMessageConverter Create(Type messageContract, string action, string defaultNamespace, DataContractFormatAttribute formatterAttribute) 63private static OperationFormatter GetOperationFormatter(Type t, Attribute formatAttribute, string defaultNS, string action)
System\ServiceModel\Description\TypeLoader.cs (87)
22private static Type[] s_messageContractMemberAttributes = { 28private static Type[] s_formatterAttributes = { 33private static Type[] s_knownTypesMethodParamType = new Type[] { typeof(ICustomAttributeProvider) }; 38private static readonly Type s_OperationContractAttributeType = typeof(OperationContractAttribute); 46private readonly Dictionary<Type, ContractDescription> _contracts; 47private readonly Dictionary<Type, MessageDescriptionItems> _messages; 52_contracts = new Dictionary<Type, ContractDescription>(); 53_messages = new Dictionary<Type, MessageDescriptionItems>(); 56private ContractDescription LoadContractDescriptionHelper(Type contractType, Type serviceType, object serviceImplementation) 70Type actualContractType = ServiceReflector.GetContractTypeAndAttribute(contractType, out actualContractAttribute); 102private void EnsureNoInheritanceWithContractClasses(Type actualContractType) 107for (Type service = actualContractType.BaseType(); service != null; service = service.BaseType()) 118private void EnsureNoOperationContractsOnNonServiceContractTypes(Type actualContractType) 120foreach (Type t in actualContractType.GetInterfaces()) 124for (Type u = actualContractType.BaseType(); u != null; u = u.BaseType()) 130private void EnsureNoOperationContractsOnNonServiceContractTypes_Helper(Type aParentType) 138Type operationContractProviderType = ServiceReflector.GetOperationContractProviderType(methodInfo); 156public ContractDescription LoadContractDescription(Type contractType) 163public ContractDescription LoadContractDescription(Type contractType, Type serviceType) 171public ContractDescription LoadContractDescription(Type contractType, Type serviceType, object serviceImplementation) 182Type channelType = typeof(IOutputChannel); 197Type channelType = typeof(IRequestChannel); 212private void AddBehaviors(ContractDescription contractDesc, Type implType, bool implIsCallback, ContractReflectionInfo reflectionInfo) 230Type targetIface = implIsCallback ? opDesc.DeclaringContract.CallbackContractType : opDesc.DeclaringContract.ContractType; 246delegate (Type currentType, KeyedByTypeCollection<IOperationBehavior> behaviors) 260delegate (Type currentType, KeyedByTypeCollection<IOperationBehavior> behaviors) 273Type targetInterface = implIsCallback ? reflectionInfo.callbackiface : reflectionInfo.iface; 305private void GetIContractBehaviorsFromInterfaceType(Type interfaceType, KeyedByTypeCollection<IContractBehavior> behaviors) 315private static void UpdateContractDescriptionWithAttributesFromServiceType(ContractDescription description, Type serviceType) 319delegate (Type currentType, KeyedByTypeCollection<IContractBehavior> behaviors) 331IEnumerable<Type> knownTypes = GetKnownTypes(customAttributes, reflectionInfo.iface); 332foreach (Type knownType in knownTypes) 347foreach (Type knownType in knownTypes) 360private IEnumerable<Type> GetKnownTypes(object[] knownTypeAttributes, ICustomAttributeProvider provider) 367Type type = knownTypeAttribute.DeclaringType; 370type = provider as Type; 382if (!typeof(IEnumerable<Type>).IsAssignableFrom(method.ReturnType)) 387return (IEnumerable<Type>)method.Invoke(null, new object[] { provider }); 391List<Type> knownTypes = new List<Type>(); 405private KeyedByTypeCollection<IOperationBehavior> GetIOperationBehaviorAttributesFromType(OperationDescription opDesc, Type targetIface, Type implType) 440Type ifaceType, Type implType, bool useImplAttrs) 515private static MethodInfo GetCorrespondingMethodFromType(Type type, MethodInfo methodInfo) 594internal void AddBehaviorsSFx(ServiceEndpoint serviceEndpoint, Type contractType) 606internal void AddBehaviorsFromImplementationType(ServiceEndpoint serviceEndpoint, Type implementationType) 623Type targetIface = serviceEndpoint.Contract.CallbackContractType; 631delegate (Type currentType, KeyedByTypeCollection<IOperationBehavior> behaviors) 644Type t = behavior.GetType(); 686Type contractToGetMethodsFrom, 714internal static void EnsureCallbackType(Type callbackType) 723internal static void EnsureSubcontract(ServiceContractAttribute svcContractAttr, Type contractType) 725Type callbackType = svcContractAttr.CallbackContract; 727List<Type> types = ServiceReflector.GetInheritedContractTypes(contractType); 730Type inheritedContractType = types[i]; 751private ContractDescription CreateContractDescription(ServiceContractAttribute contractAttr, Type contractType, Type serviceType, out ContractReflectionInfo reflectionInfo, object serviceImplementation) 763Type callbackType = contractAttr.CallbackContract; 778List<Type> types = ServiceReflector.GetInheritedContractTypes(contractType); 779List<Type> inheritedCallbackTypes = new List<Type>(); 782Type inheritedContractType = types[i]; 876Type taskTResult; 1003IEnumerable<Type> knownTypes = GetKnownTypes(methodAttributes, methodInfo); 1004foreach (Type knownType in knownTypes) 1145Type taskTResult, 1184Type responseType = isTask ? taskTResult : methodInfo.ReturnType; 1229Type returnType, 1282private static MessagePartDescription CreateParameterPartDescription(XmlName defaultName, string defaultNS, int index, ICustomAttributeProvider attrProvider, Type type) 1295internal MessageDescription CreateTypedMessageDescription(Type typedMessageType, 1325for (Type baseType = typedMessageType; baseType != null && baseType != typeof(object) && baseType != typeof(ValueType); baseType = baseType.BaseType()) 1396Type memberType; 1458private MessagePartDescription CreateMessagePartDescription(Type bodyType, 1494private MessageHeaderDescription CreateMessageHeaderDescription(Type headerParameterType, 1574internal static Type GetParameterType(ParameterInfo parameterInfo) 1576Type parameterType = parameterInfo.ParameterType; 2015internal Type iface; 2016internal Type callbackiface; 2032Type serviceType, 2040for (Type currentType = serviceType; currentType != null; currentType = currentType.BaseType()) 2046public delegate void ServiceInheritanceCallback<IBehavior, TBehaviorCollection>(Type currentType, KeyedByTypeCollection<IBehavior> behaviors); 2058Type type,
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (20)
209internal Reflector(string defaultNs, Type type) 229Type contractType = operation.DeclaringContract != null ? operation.DeclaringContract.ContractType : null; 383foreach (Type knownType in Operation.KnownTypes) 582Type bodyObjectType = bodyPart.Type; 603Type bodyObjectType = bodyPart.Type; 712private HashSet<Type> _includedTypes; 758private HashSet<Type> IncludedTypes 764_includedTypes = new HashSet<Type>(); 801internal XmlTypeMapping ImportTypeMapping(Type type, bool isEncoded) 813internal void IncludeType(Type knownType, bool isEncoded) 847private Type _type; 850internal SerializerGenerationContext(Type type) 918private XmlSerializer[] CreateSerializersFromMappings(XmlMapping[] mappings, Type type) 1058static internal XmlReflectionMember GetXmlReflectionMember(XmlName memberName, XmlName elementName, string ns, Type type, ICustomAttributeProvider additionalAttributesProvider, bool isMultiple, bool isEncoded, bool isWrapped) 1098Type invalidAttributeType = null; 1131Type invalidAttributeType = null; 1242public static XmlSerializer[] FromMappings(XmlMapping[] mappings, Type type) 1252private static XmlSerializer[] FromMappingsViaReflection(XmlMapping[] mappings, Type type) 1262private static XmlSerializer[] FromMappingsViaInjection(XmlMapping[] mappings, Type type) 1269Type t;
System\ServiceModel\Diagnostics\SecurityTraceRecordHelper.cs (4)
33internal static void TraceIdentityVerificationSuccess(EventTraceActivity eventTraceActivity, EndpointIdentity identity, Claim claim, Type identityVerifier) 41internal static void TraceIdentityVerificationFailure(EndpointIdentity identity, AuthorizationContext authContext, Type identityVerifier) 45internal static void TraceIdentityDeterminationSuccess(EndpointAddress epr, EndpointIdentity identity, Type identityVerifier) 49internal static void TraceIdentityDeterminationFailure(EndpointAddress epr, Type identityVerifier)
System\ServiceModel\Dispatcher\ChannelHandler.cs (2)
473Type contractType = clientRuntime.ContractClientType; 474Type callbackType = clientRuntime.CallbackClientType;
System\ServiceModel\Dispatcher\ClientOperation.cs (2)
44private Type _taskTResult; 241public Type TaskTResult
System\ServiceModel\Dispatcher\ClientRuntime.cs (4)
51private Type _callbackProxyType; 54private Type _contractProxyType; 114public Type CallbackClientType 139public Type ContractClientType
System\ServiceModel\Dispatcher\DataContractSerializerFaultFormatter.cs (1)
12internal DataContractSerializerFaultFormatter(Type[] detailTypes)
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (26)
21internal static DataContractSerializer CreateSerializer(Type type, int maxItems) 26internal static DataContractSerializer CreateSerializer(Type type, IList<Type> knownTypes, int maxItems) 33internal static DataContractSerializer CreateSerializer(Type type, string rootName, string rootNs, int maxItems) 38internal static DataContractSerializer CreateSerializer(Type type, IList<Type> knownTypes, string rootName, string rootNs, int maxItems) 47internal static DataContractSerializer CreateSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNs, int maxItems) 52internal static DataContractSerializer CreateSerializer(Type type, IList<Type> knownTypes, XmlDictionaryString rootName, XmlDictionaryString rootNs, int maxItems) 64private static Type s_typeOfIQueryable = typeof(IQueryable); 65private static Type s_typeOfIQueryableGeneric = typeof(IQueryable<>); 66private static Type s_typeOfIEnumerable = typeof(IEnumerable); 67private static Type s_typeOfIEnumerableGeneric = typeof(IEnumerable<>); 71private IList<Type> _knownTypes; 84foreach (Type type in description.KnownTypes) 88_knownTypes = new List<Type>(); 154private void ValidateDataContractType(Type type) 309KeyValuePair<Type, ArrayList>[] multipleHeaderValues = null; 350multipleHeaderValues = new KeyValuePair<Type, ArrayList>[parameters.Length]; 355multipleHeaderValues[headerDescription.Index] = new KeyValuePair<Type, ArrayList>(headerDescription.TypedHeader ? TypedHeaderManager.GetMessageHeaderType(headerDescription.Type) : headerDescription.Type, new ArrayList()); 400Type dataContractType = DataContractSerializerOperationFormatter.GetSubstituteDataContractType(headerDescription.Type, out isQueryable); 553internal static Type GetSubstituteDataContractType(Type type, out bool isQueryable) 609private IList<Type> _knownTypes; 614IList<Type> knownTypes, DataContractSerializerOperationBehavior behavior) 626public Type ContractType { get; }
System\ServiceModel\Dispatcher\DispatchRuntime.cs (2)
27private Type _type; 185public Type Type
System\ServiceModel\Dispatcher\FaultContractInfo.cs (5)
17public FaultContractInfo(string action, Type detail) 21internal FaultContractInfo(string action, Type detail, XmlName elementName, string ns, IList<Type> knownTypes) 36public Type Detail { get; } 42internal IList<Type> KnownTypes { get; }
System\ServiceModel\Dispatcher\FaultFormatter.cs (10)
21internal FaultFormatter(Type[] detailTypes) 47Type detailType = null; 50Type faultExceptionOfT = null; 51for (Type faultType = faultException.GetType(); faultType != typeof(FaultException); faultType = faultType.BaseType()) 77protected virtual XmlObjectSerializer GetSerializer(Type detailType, string faultExceptionAction, out string action) 123Type detailType = null; 152object detailObj, Type detailType, XmlDictionaryReader detailReader) 173Type knownFaultType = typeof(FaultException<>).MakeGenericType(detailType); 198private static MessageFault CreateMessageFault(XmlObjectSerializer serializer, FaultException faultException, Type detailType) 211Type operationFaultType = typeof(OperationFault<>).MakeGenericType(detailType);
System\ServiceModel\Dispatcher\InvokerUtil.cs (2)
122List<(Type ParameterType, ParameterExpression OutputExpression)> outputVariables = new(); 128Type variableType = parameters[i].ParameterType.IsByRef
System\ServiceModel\Dispatcher\OperationFormatter.cs (1)
165private static object CreateTypedMessageInstance(Type messageContractType)
System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (4)
249private static string GetArrayItemName(Type type) 274Type type = part.Type; 373Type type = bodyDescription.Type; 418private static bool IsArrayTypeSupported(Type type)
System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (2)
118internal Type TaskTResult 246internal static object GetDefaultParameterValue(Type parameterType)
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (2)
25public TaskMethodInvoker(MethodInfo taskMethod, Type taskType) 114returnVal = _taskTResultGetMethod.Invoke(task, Type.EmptyTypes);
System\ServiceModel\Dispatcher\XmlSerializerFaultFormatter.cs (3)
18internal XmlSerializerFaultFormatter(Type[] detailTypes, 37protected override XmlObjectSerializer GetSerializer(Type detailType, string faultExceptionAction, out string action) 85Type detailType = null;
System\ServiceModel\Dispatcher\XmlSerializerObjectSerializer.cs (4)
16private Type _rootType; 21internal XmlSerializerObjectSerializer(Type type) 26internal XmlSerializerObjectSerializer(Type type, XmlQualifiedName qualifiedName, XmlSerializer xmlSerializer) 35private void Initialize(Type type, string rootName, string rootNamespace, XmlSerializer xmlSerializer)
System\ServiceModel\DuplexChannelFactory.cs (9)
15public DuplexChannelFactory(Type callbackInstanceType) 18public DuplexChannelFactory(Type callbackInstanceType, Binding binding, String remoteAddress) 21public DuplexChannelFactory(Type callbackInstanceType, Binding binding, EndpointAddress remoteAddress) 24public DuplexChannelFactory(Type callbackInstanceType, Binding binding) 27public DuplexChannelFactory(Type callbackInstanceType, ServiceEndpoint endpoint) 131if (callbackInstance is Type) 133CallbackType = (Type)callbackInstance; 191Type userObjectType = callbackInstance.UserObject.GetType(); 192Type callbackType = Endpoint.Contract.CallbackContractType;
System\ServiceModel\FaultContractAttribute.cs (2)
20public FaultContractAttribute(Type detailType) 25public Type DetailType { get; }
System\ServiceModel\FaultException.cs (5)
161public static FaultException CreateFault(MessageFault messageFault, params Type[] faultDetailTypes) 166public static FaultException CreateFault(MessageFault messageFault, string action, params Type[] faultDetailTypes) 428private static Type[] s_knownTypes = new Type[] { typeof(TDetail) }; 429internal static IEnumerable<Type> GetKnownTypes()
System\ServiceModel\KeyedByTypeCollection.cs (2)
11public class KeyedByTypeCollection<TItem> : KeyedCollection<Type, TItem> 91protected override Type GetKeyForItem(TItem item)
System\ServiceModel\MessageHeaderT.cs (13)
47internal Type GetGenericArgument() 67private static Dictionary<Type, TypedHeaderManager> s_cache = new Dictionary<Type, TypedHeaderManager>(); 69private static Type s_GenericAdapterType = typeof(GenericAdapter<>); 71internal static object Create(Type t, object content, bool mustUnderstand, bool relay, string actor) 76internal static object GetContent(Type t, object typedHeaderInstance, out bool mustUnderstand, out bool relay, out string actor) 81internal static Type GetMessageHeaderType(Type contentType) 85internal static Type GetHeaderType(Type headerParameterType) 96private static TypedHeaderManager GetTypedHeaderManager(Type t) 138protected abstract Type GetMessageHeaderType(); 174protected override Type GetMessageHeaderType()
System\ServiceModel\Security\RequestSecurityToken.cs (2)
37private Type _appliesToType; 347internal Type AppliesToType
System\ServiceModel\Security\RequestSecurityTokenResponse.cs (2)
46private Type _appliesToType; 408internal Type AppliesToType
System\ServiceModel\Security\WrapperSecurityCommunicationObject.cs (1)
25protected override Type GetCommunicationObjectType()
System\ServiceModel\Security\WSKeyInfoSerializer.cs (7)
97public override Type GetTokenType(SecurityKeyIdentifierClause clause) 181private Type[] _tokenTypes; 192protected override Type[] GetTokenTypesCore() 196_tokenTypes = new Type[] { typeof(SecurityContextSecurityToken) }; 210private Type[] _tokenTypes; 219protected override Type[] GetTokenTypesCore() 223_tokenTypes = new Type[] { typeof(DerivedKeySecurityToken) };
System\ServiceModel\Security\WSSecureConversation.cs (5)
82protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(DerivedKeySecurityToken) }; } 306public SecurityContextTokenEntry(WSSecureConversation parent, SecurityStateEncoder securityStateEncoder, IList<Type> knownClaimTypes) 315protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(SecurityContextSecurityToken) }; }
System\ServiceModel\Security\WSSecureConversationDec2005.cs (5)
17IList<Type> _knownClaimTypes; 19public WSSecureConversationDec2005(WSSecurityTokenSerializer tokenSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes, 33_knownClaimTypes = new List<Type>(); 37foreach (Type knownType in knownTypes) 65public SecurityContextTokenEntryDec2005(WSSecureConversationDec2005 parent, SecurityStateEncoder securityStateEncoder, IList<Type> knownClaimTypes)
System\ServiceModel\Security\WSSecureConversationFeb2005.cs (5)
15IList<Type> _knownClaimTypes; 17public WSSecureConversationFeb2005(WSSecurityTokenSerializer tokenSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes, 26_knownClaimTypes = new List<Type>(); 30foreach (Type knownType in knownTypes) 50public SecurityContextTokenEntryFeb2005(WSSecureConversationFeb2005 parent, SecurityStateEncoder securityStateEncoder, IList<Type> knownClaimTypes)
System\ServiceModel\Security\WSSecurityJan2004.cs (6)
192protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(GenericXmlSecurityToken) }; } 251protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(UserNameSecurityToken) }; } 380protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(X509SecurityToken) }; }
System\ServiceModel\Security\WSSecurityTokenSerializer.cs (13)
55public WSSecurityTokenSerializer(SecurityVersion securityVersion, bool emitBspRequiredAttributes, SamlSerializer samlSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes) 60public WSSecurityTokenSerializer(SecurityVersion securityVersion, TrustVersion trustVersion, SecureConversationVersion secureConversationVersion, bool emitBspRequiredAttributes, SamlSerializer samlSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes) 65public WSSecurityTokenSerializer(SecurityVersion securityVersion, bool emitBspRequiredAttributes, SamlSerializer samlSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes, 71public WSSecurityTokenSerializer(SecurityVersion securityVersion, TrustVersion trustVersion, SecureConversationVersion secureConversationVersion, bool emitBspRequiredAttributes, SamlSerializer samlSerializer, SecurityStateEncoder securityStateEncoder, IEnumerable<Type> knownTypes, 341internal Type[] GetTokenTypes(string tokenTypeUri) 358protected internal virtual string GetTokenTypeUri(Type tokenType) 428private Type[] _tokenTypes = null; 431public Type TokenType { get { return GetTokenTypes()[0]; } } 435protected abstract Type[] GetTokenTypesCore(); 437public Type[] GetTokenTypes() 447public bool SupportsCore(Type tokenType) 449Type[] tokenTypes = GetTokenTypes(); 465protected static SecurityKeyIdentifierClause CreateDirectReference(XmlElement issuedTokenXml, string idAttributeLocalName, string idAttributeNamespace, Type tokenType)
System\ServiceModel\Security\WSTrust.cs (3)
71protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(BinarySecretSecurityToken) }; } 914private void WriteAppliesTo(object appliesTo, Type appliesToType, XmlObjectSerializer serializer, XmlWriter xmlWriter)
System\ServiceModel\ServiceContractAttribute.cs (1)
105public Type CallbackContract { get; set; } = null;
System\ServiceModel\ServiceKnownTypeAttribute.cs (5)
11private Type _type; 18public ServiceKnownTypeAttribute(Type type) 28public ServiceKnownTypeAttribute(string methodName, Type declaringType) 34public Type DeclaringType { get; } 38public Type Type
System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
272Type type = (value == null) ? typeof(Object) : value.GetType();
System.ServiceModel.Primitives.Tests (20)
Channels\CustomChannelTest.cs (10)
33Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 123Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 217Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 268Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 325Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) =>
Description\ContractDescriptionTest.cs (1)
184Assert.Equal<Type>(typeof(IHelloCallbackContract), contract.CallbackContractType);
Description\OperationBehaviorTest.cs (5)
101DataContractSerializer dcs = (DataContractSerializer)behavior.CreateSerializer(typeof(SurrogateTestType), nameof(SurrogateTestType), "ns", new List<Type>()); 151public object GetDeserializedObject(object obj, Type targetType) 163public object GetObjectToSerialize(object obj, Type targetType) 181public Type GetSurrogateType(Type type)
ServiceModel\MessageContractTest.4.4.0.cs (4)
151Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 251Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) =>
System.ServiceModel.Syndication (16)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (2)
38public Atom10FeedFormatter(Type feedTypeToCreate) : base() 72protected Type FeedType { get; }
System\ServiceModel\Syndication\Atom10ItemFormatter.cs (2)
22public Atom10ItemFormatter(Type itemTypeToCreate) : base() 64protected Type ItemType { get; }
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (4)
14private readonly Type _inlineDocumentType; 16private readonly Type _referencedDocumentType; 22public AtomPub10CategoriesDocumentFormatter(Type inlineDocumentType, Type referencedDocumentType) : base()
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (2)
18private readonly Type _documentType; 25public AtomPub10ServiceDocumentFormatter(Type documentTypeToCreate) : base()
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (2)
31public Rss20FeedFormatter(Type feedTypeToCreate) : base() 72protected Type FeedType { get; }
System\ServiceModel\Syndication\Rss20ItemFormatter.cs (2)
23public Rss20ItemFormatter(Type itemTypeToCreate) : base() 87protected Type ItemType { get; }
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (1)
500internal static SyndicationFeed CreateFeedInstance(Type feedType)
System\ServiceModel\Syndication\SyndicationItemFormatter.cs (1)
51internal static SyndicationItem CreateItemInstance(Type itemType)
System.Speech (1)
artifacts\obj\System.Speech\Debug\net9.0\System.Speech.notsupported.cs (1)
144public static System.Speech.Recognition.Grammar LoadLocalizedGrammarFromType(System.Type type, params object[] onInitParameters) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
System.Text.Json (550)
src\libraries\System.Text.Json\Common\JsonSerializableAttribute.cs (1)
28public JsonSerializableAttribute(Type type) { }
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (1)
56public Type[]? Converters { get; set; }
src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (25)
42public static Type? GetCompatibleGenericBaseClass(this Type type, Type? baseType) 53Type? baseTypeToCheck = type; 59Type genericTypeToCheck = baseTypeToCheck.GetGenericTypeDefinition(); 79public static Type? GetCompatibleGenericInterface(this Type type, Type? interfaceType) 90Type interfaceToCheck = type; 102foreach (Type typeToCheck in type.GetInterfaces()) 106Type genericInterfaceToCheck = typeToCheck.GetGenericTypeDefinition(); 117public static bool IsImmutableDictionaryType(this Type type) 135public static bool IsImmutableEnumerableType(this Type type) 160public static string? GetImmutableDictionaryConstructingTypeName(this Type type) 181public static string? GetImmutableEnumerableConstructingTypeName(this Type type) 213private static string GetBaseNameFromGenericType(Type genericType) 215Type genericTypeDef = genericType.GetGenericTypeDefinition(); 224public static bool IsKeyValuePair(this Type type) 229this Type type, 290Type parameterType = parameterInfo.ParameterType; 311if (Nullable.GetUnderlyingType(parameterType) is Type underlyingType && underlyingType.IsEnum) 324public static Type[] GetSortedTypeHierarchy(this Type type) 330var results = new List<Type>(); 331for (Type? current = type; current != null; current = current.BaseType)
System\ReflectionExtensions.cs (11)
15private static readonly Type s_nullableType = typeof(Nullable<>); 21public static bool IsNullableOfT(this Type type) => 24public static bool IsNullableType(this Type type) => !type.IsValueType || IsNullableOfT(type); 30public static bool IsAssignableFromInternal(this Type type, Type from) 43public static bool IsInSubtypeRelationshipWith(this Type type, Type other) => 98[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicConstructors)] this Type type, 99Type[] parameterTypes, 136if (member is Type type) 147Type genericTypeDef = member.DeclaringType.GetGenericTypeDefinition();
System\Text\Json\Document\JsonProperty.cs (3)
41/// This value's <see cref="Type"/> is not <see cref="JsonTokenType.PropertyName"/>. 61/// This value's <see cref="Type"/> is not <see cref="JsonTokenType.PropertyName"/>. 81/// This value's <see cref="Type"/> is not <see cref="JsonTokenType.PropertyName"/>.
System\Text\Json\Serialization\Attributes\JsonConverterAttribute.cs (4)
25public JsonConverterAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type converterType) 36/// The type of the converter to create, or null if <see cref="CreateConverter(Type)"/> should be used to obtain the converter. 39public Type? ConverterType { get; } 47public virtual JsonConverter? CreateConverter(Type typeToConvert)
System\Text\Json\Serialization\Attributes\JsonDerivedTypeAttribute.cs (4)
16public JsonDerivedTypeAttribute(Type derivedType) 26public JsonDerivedTypeAttribute(Type derivedType, string typeDiscriminator) 37public JsonDerivedTypeAttribute(Type derivedType, int typeDiscriminator) 46public Type DerivedType { get; }
System\Text\Json\Serialization\Converters\CastingConverter.cs (6)
16internal override Type? KeyType => _sourceConverter.KeyType; 17internal override Type? ElementType => _sourceConverter.ElementType; 42public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 48internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value) 58public override T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 61internal override T ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableConverterFactory.cs (7)
20public override bool CanConvert(Type typeToConvert) => GetAsyncEnumerableInterface(typeToConvert) is not null; 22public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) 24Type? asyncEnumerableInterface = GetAsyncEnumerableInterface(typeToConvert); 27Type elementType = asyncEnumerableInterface.GetGenericArguments()[0]; 28Type converterType = typeof(IAsyncEnumerableOfTConverter<,>).MakeGenericType(typeToConvert, elementType); 32private static Type? GetAsyncEnumerableInterface(Type type)
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (1)
15internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out TAsyncEnumerable value)
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (8)
27public override bool CanConvert(Type typeToConvert) 34public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) 36Type converterType; 37Type[] genericArgs; 38Type? elementType = null; 39Type? dictionaryKeyType = null; 40Type? actualTypeToConvert; 180Type genericType;
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactoryHelpers.cs (16)
22public static MethodInfo GetImmutableEnumerableCreateRangeMethod(this Type type, Type elementType) 24Type? constructingType = GetImmutableEnumerableConstructingType(type); 46public static MethodInfo GetImmutableDictionaryCreateRangeMethod(this Type type, Type keyType, Type valueType) 48Type? constructingType = GetImmutableDictionaryConstructingType(type); 70private static Type? GetImmutableEnumerableConstructingType(Type type) 83private static Type? GetImmutableDictionaryConstructingType(Type type) 94public static bool IsNonGenericStackOrQueue(this Type type) 105Type? stackType = GetTypeIfExists(stackTypeName); 111Type? queueType = GetTypeIfExists(queueTypeName); 125private static Type? GetTypeIfExists(string name) => Type.GetType(name, false);
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (2)
19internal override Type ElementType => typeof(TElement); 59Type typeToConvert,
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (3)
59internal override Type ElementType => typeof(TValue); 61internal override Type KeyType => typeof(TKey); 74Type typeToConvert,
System\Text\Json\Serialization\Converters\Collection\MemoryConverter.cs (1)
16Type typeToConvert,
System\Text\Json\Serialization\Converters\Collection\MemoryConverterFactory.cs (5)
13public override bool CanConvert(Type typeToConvert) 20Type typeDef = typeToConvert.GetGenericTypeDefinition(); 24public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) 28Type converterType = typeToConvert.GetGenericTypeDefinition() == typeof(Memory<>) ? 31Type elementType = typeToConvert.GetGenericArguments()[0];
System\Text\Json\Serialization\Converters\Collection\ReadOnlyMemoryConverter.cs (1)
16Type typeToConvert,
System\Text\Json\Serialization\Converters\FSharp\FSharpOptionConverter.cs (3)
14internal override Type? ElementType => typeof(TElement); 33internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out TOption? value) 83public override TOption? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\FSharp\FSharpTypeConverterFactory.cs (7)
21public override bool CanConvert(Type typeToConvert) => 29public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) 33Type elementType; 34Type converterFactoryType; 58Type[] genericArgs = typeToConvert.GetGenericArguments(); 59Type keyType = genericArgs[0]; 60Type valueType = genericArgs[1];
System\Text\Json\Serialization\Converters\FSharp\FSharpValueOptionConverter.cs (3)
14internal override Type? ElementType => typeof(TElement); 33internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out TValueOption value) 85public override TValueOption Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\JsonMetadataServicesConverter.cs (3)
21internal override Type? KeyType => Converter.KeyType; 22internal override Type? ElementType => Converter.ElementType; 46internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value)
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (1)
22public override JsonArray? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
38public override JsonNode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverterFactory.cs (2)
12public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) 33public override bool CanConvert(Type typeToConvert) => typeof(JsonNode).IsAssignableFrom(typeToConvert);
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (1)
47public override JsonObject? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs (1)
22public override JsonValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Object\ObjectConverter.cs (6)
19public sealed override object ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal sealed override object ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 55Type runtimeType = value.GetType(); 80public override object? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 99public override object? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 110internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value)
System\Text\Json\Serialization\Converters\Object\ObjectConverterFactory.cs (6)
29public override bool CanConvert(Type typeToConvert) 41public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) 44Type converterType; 64Type placeHolderType = JsonTypeInfo.ObjectType; 65Type[] typeArguments = new Type[JsonConstants.UnboxedParameterCountThreshold + 1];
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (1)
20internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, [MaybeNullWhen(false)] out T value)
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
24internal sealed override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, [MaybeNullWhen(false)] out T value)
System\Text\Json\Serialization\Converters\Value\BooleanConverter.cs (2)
11public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 21internal override bool ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\ByteArrayConverter.cs (1)
8public override byte[]? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\ByteConverter.cs (2)
15public override byte Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override byte ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\CharConverter.cs (2)
13public override char Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 47internal override char ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\DateOnlyConverter.cs (2)
15public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override DateOnly ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\DateTimeConverter.cs (2)
10public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 20internal override DateTime ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\DateTimeOffsetConverter.cs (2)
10public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 20internal override DateTimeOffset ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\DecimalConverter.cs (2)
15public override decimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override decimal ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\DoubleConverter.cs (2)
15public override double Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override double ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (4)
16private static readonly TypeCode s_enumTypeCode = Type.GetTypeCode(typeof(T)); 43public override bool CanConvert(Type type) 97public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 271internal override T ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\EnumConverterFactory.cs (5)
16public override bool CanConvert(Type type) 21public override JsonConverter CreateConverter(Type type, JsonSerializerOptions options) 27internal static JsonConverter Create(Type enumType, EnumConverterOptions converterOptions, JsonNamingPolicy? namingPolicy, JsonSerializerOptions options) 38private static Type GetEnumConverterType(Type enumType) => typeof(EnumConverter<>).MakeGenericType(enumType);
System\Text\Json\Serialization\Converters\Value\GuidConverter.cs (2)
10public override Guid Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 20internal override Guid ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\HalfConverter.cs (2)
19public override Half Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 74internal override Half ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\Int128Converter.cs (2)
19public override Int128 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 79internal override Int128 ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\Int16Converter.cs (2)
15public override short Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26internal override short ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\Int32Converter.cs (2)
15public override int Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26internal override int ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\Int64Converter.cs (2)
15public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override long ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\JsonDocumentConverter.cs (1)
10public override JsonDocument Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\JsonElementConverter.cs (1)
8public override JsonElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\JsonPrimitiveConverter.cs (1)
23public sealed override T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\MemoryByteConverter.cs (1)
10public override Memory<byte> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\NullableConverter.cs (3)
10internal override Type? ElementType => typeof(T); 27internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value) 61public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\NullableConverterFactory.cs (6)
14public override bool CanConvert(Type typeToConvert) 19public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) 23Type valueTypeToConvert = typeToConvert.GetGenericArguments()[0]; 35public static JsonConverter CreateValueConverter(Type valueTypeToConvert, JsonConverter valueConverter) 50private static Type GetNullableConverterType(Type valueTypeToConvert) => typeof(NullableConverter<>).MakeGenericType(valueTypeToConvert);
System\Text\Json\Serialization\Converters\Value\ReadOnlyMemoryByteConverter.cs (1)
10public override ReadOnlyMemory<byte> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\SByteConverter.cs (2)
15public override sbyte Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override sbyte ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\SingleConverter.cs (2)
16public override float Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26internal override float ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\StringConverter.cs (2)
10public override string? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 28internal override string ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\TimeOnlyConverter.cs (2)
15public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override TimeOnly ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\TimeSpanConverter.cs (2)
15public override TimeSpan Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override TimeSpan ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UInt128Converter.cs (2)
19public override UInt128 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 78internal override UInt128 ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UInt16Converter.cs (2)
15public override ushort Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26internal override ushort ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UInt32Converter.cs (2)
15public override uint Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26internal override uint ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UInt64Converter.cs (2)
15public override ulong Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override ulong ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverter.cs (1)
14public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) =>
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverterFactory.cs (3)
14public override bool CanConvert(Type type) 33public override JsonConverter CreateConverter(Type type, JsonSerializerOptions options) 39internal static JsonConverter CreateUnsupportedConverterForType(Type type, string? errorMessage = null)
System\Text\Json\Serialization\Converters\Value\UriConverter.cs (2)
10public override Uri? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26internal override Uri ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\VersionConverter.cs (2)
18public override Version? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 101internal override Version ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonConverter.cs (9)
30public abstract Type? Type { get; } 37public abstract bool CanConvert(Type typeToConvert); 155internal virtual Type? ElementType => null; 157internal virtual Type? KeyType => null; 189internal abstract object? ReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options); 190internal abstract bool OnTryReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value); 191internal abstract bool TryReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value); 192internal abstract object? ReadAsPropertyNameAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options); 193internal abstract object? ReadAsPropertyNameCoreAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options);
System\Text\Json\Serialization\JsonConverter.MetadataHandling.cs (1)
83Type runtimeType = value.GetType();
System\Text\Json\Serialization\JsonConverterFactory.cs (10)
25/// Create a converter for the provided <see cref="System.Type"/>. 27/// <param name="typeToConvert">The <see cref="System.Type"/> being converted.</param> 33public abstract JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options); 35internal JsonConverter GetConverterInternal(Type typeToConvert, JsonSerializerOptions options) 53internal sealed override object? ReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 62Type typeToConvert, 74Type typeToConvert, 84internal sealed override object? ReadAsPropertyNameAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 91internal sealed override object? ReadAsPropertyNameCoreAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 142public sealed override Type? Type => null;
System\Text\Json\Serialization\JsonConverterOfT.cs (15)
14/// <typeparam name="T">The <see cref="System.Type"/> to convert.</typeparam> 48public override bool CanConvert(Type typeToConvert) 129internal virtual bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value) 142/// <param name="typeToConvert">The <see cref="System.Type"/> being converted.</param> 146public abstract T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options); 148internal bool TryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value, out bool isPopulatedValue) 282internal sealed override bool OnTryReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value) 289internal sealed override bool TryReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value) 296internal sealed override object? ReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 302internal sealed override object? ReadAsPropertyNameAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 308internal sealed override object? ReadAsPropertyNameCoreAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 497public sealed override Type Type { get; } = typeof(T); 583/// <param name="typeToConvert">The <see cref="System.Type"/> being converted.</param> 587public virtual T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 599internal virtual T ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonNumberEnumConverter.cs (2)
26public override bool CanConvert(Type typeToConvert) => typeToConvert == typeof(TEnum); 29public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonResumableConverterOfT.cs (1)
17public sealed override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (4)
32private static JsonTypeInfo GetTypeInfo(JsonSerializerOptions? options, Type inputType) 52private static JsonTypeInfo GetTypeInfo(JsonSerializerContext context, Type inputType) 67private static void ValidateInputType(object? value, Type inputType) 76Type runtimeType = value.GetType();
System\Text\Json\Serialization\JsonSerializer.Read.Document.cs (3)
62public static object? Deserialize(this JsonDocument document, Type returnType, JsonSerializerOptions? options = null) 173/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 176public static object? Deserialize(this JsonDocument document, Type returnType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Read.Element.cs (3)
54public static object? Deserialize(this JsonElement element, Type returnType, JsonSerializerOptions? options = null) 145/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 148public static object? Deserialize(this JsonElement element, Type returnType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (2)
121Type underlyingIDictionaryType = jsonPropertyInfo.PropertyType.GetCompatibleGenericInterface(typeof(IDictionary<,>))!; 122Type[] genericArgs = underlyingIDictionaryType.GetGenericArguments();
System\Text\Json\Serialization\JsonSerializer.Read.Node.cs (3)
52public static object? Deserialize(this JsonNode? node, Type returnType, JsonSerializerOptions? options = null) 136/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 139public static object? Deserialize(this JsonNode? node, Type returnType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Read.Span.cs (3)
58public static object? Deserialize(ReadOnlySpan<byte> utf8Json, Type returnType, JsonSerializerOptions? options = null) 133/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method on the provided <paramref name="context"/> 136public static object? Deserialize(ReadOnlySpan<byte> utf8Json, Type returnType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (6)
120Type returnType, 161Type returnType, 337/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method on the provided <paramref name="context"/> 342Type returnType, 384/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method on the provided <paramref name="context"/> 389Type returnType,
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (6)
119public static object? Deserialize([StringSyntax(StringSyntaxAttribute.Json)] string json, Type returnType, JsonSerializerOptions? options = null) 163public static object? Deserialize([StringSyntax(StringSyntaxAttribute.Json)] ReadOnlySpan<char> json, Type returnType, JsonSerializerOptions? options = null) 351/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 357public static object? Deserialize([StringSyntax(StringSyntaxAttribute.Json)] string json, Type returnType, JsonSerializerContext context) 405/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 411public static object? Deserialize([StringSyntax(StringSyntaxAttribute.Json)] ReadOnlySpan<char> json, Type returnType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (3)
112public static object? Deserialize(ref Utf8JsonReader reader, Type returnType, JsonSerializerOptions? options = null) 245/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method on the provided <paramref name="context"/> 271public static object? Deserialize(ref Utf8JsonReader reader, Type returnType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs (3)
54Type inputType, 123/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 126public static byte[] SerializeToUtf8Bytes(object? value, Type inputType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (3)
51public static JsonDocument SerializeToDocument(object? value, Type inputType, JsonSerializerOptions? options = null) 114/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 120public static JsonDocument SerializeToDocument(object? value, Type inputType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Write.Element.cs (3)
51public static JsonElement SerializeToElement(object? value, Type inputType, JsonSerializerOptions? options = null) 114/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 120public static JsonElement SerializeToElement(object? value, Type inputType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Write.Node.cs (3)
52public static JsonNode? SerializeToNode(object? value, Type inputType, JsonSerializerOptions? options = null) 115/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 121public static JsonNode? SerializeToNode(object? value, Type inputType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Write.Pipe.cs (2)
135Type inputType, 179Type inputType,
System\Text\Json\Serialization\JsonSerializer.Write.Stream.cs (4)
110Type inputType, 146Type inputType, 303Type inputType, 341Type inputType,
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (7)
54/// encoding since the implementation internally uses UTF-8. See also <see cref="SerializeToUtf8Bytes(object?, Type, JsonSerializerOptions?)"/> 55/// and <see cref="SerializeAsync(IO.Stream, object?, Type, JsonSerializerOptions?, Threading.CancellationToken)"/>. 61Type inputType, 133/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 140/// encoding since the implementation internally uses UTF-8. See also <see cref="SerializeToUtf8Bytes(object?, Type, JsonSerializerContext)"/> 141/// and <see cref="SerializeAsync(IO.Stream, object?, Type, JsonSerializerContext, Threading.CancellationToken)"/>. 143public static string Serialize(object? value, Type inputType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Write.Utf8JsonWriter.cs (3)
64Type inputType, 147/// The <see cref="JsonSerializerContext.GetTypeInfo(Type)"/> method of the provided 150public static void Serialize(Utf8JsonWriter writer, object? value, Type inputType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializerContext.cs (2)
108public abstract JsonTypeInfo? GetTypeInfo(Type type); 110JsonTypeInfo? IJsonTypeInfoResolver.GetTypeInfo(Type type, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (16)
55public JsonTypeInfo GetTypeInfo(Type type) 83public bool TryGetTypeInfo(Type type, [NotNullWhen(true)] out JsonTypeInfo? typeInfo) 104Type type, 138internal bool TryGetTypeInfoCached(Type type, [NotNullWhen(true)] out JsonTypeInfo? typeInfo) 153internal JsonTypeInfo GetTypeInfoForRootType(Type type, bool fallBackToNearestAncestorType = false) 169Type runtimeType = rootValue.GetType(); 215private readonly ConcurrentDictionary<Type, CacheEntry> _cache = new(); 235public JsonTypeInfo? GetOrAddTypeInfo(Type type, bool fallBackToNearestAncestorType = false) 243public bool TryGetTypeInfo(Type type, [NotNullWhen(true)] out JsonTypeInfo? typeInfo) 255private CacheEntry GetOrAddCacheEntry(Type type) 264private static CacheEntry CreateCacheEntry(Type type, CachingContext context) 278private JsonTypeInfo? FallBackToNearestAncestor(Type type, CacheEntry entry) 291private CacheEntry? DetermineNearestAncestor(Type type, CacheEntry entry) 307Type? candidateType = null; 309for (Type? current = type.BaseType; current != null; current = current.BaseType) 327foreach (Type interfaceType in type.GetInterfaces())
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (5)
41public JsonConverter GetConverter(Type typeToConvert) 64internal JsonConverter GetConverterInternal(Type typeToConvert) 70internal JsonConverter? GetConverterFromList(Type typeToConvert) 87internal JsonConverter? ExpandConverterFactory(JsonConverter? converter, Type typeToConvert) 97internal static void CheckConverterNullabilityIsSameAsPropertyType(JsonConverter converter, Type propertyType)
System\Text\Json\Serialization\JsonSerializerOptions.cs (1)
984private JsonTypeInfo? GetTypeInfoNoCaching(Type type)
System\Text\Json\Serialization\JsonSerializerOptionsUpdateHandler.cs (1)
18public static void ClearCache(Type[]? types)
System\Text\Json\Serialization\JsonStringEnumConverter.cs (4)
50public sealed override bool CanConvert(Type typeToConvert) => typeToConvert == typeof(TEnum); 53public sealed override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) 106public sealed override bool CanConvert(Type typeToConvert) 112public sealed override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (12)
15private static Dictionary<Type, JsonConverter>? s_defaultSimpleConverters; 41private static Dictionary<Type, JsonConverter> GetDefaultSimpleConverters() 44var converters = new Dictionary<Type, JsonConverter>(NumberOfSimpleConverters); 94private static JsonConverter GetBuiltInConverter(Type typeToConvert) 120internal static bool TryGetDefaultSimpleConverter(Type typeToConvert, [NotNullWhen(true)] out JsonConverter? converter) 133private static JsonConverter? GetCustomConverterForMember(Type typeToConvert, MemberInfo memberInfo, JsonSerializerOptions options) 144internal static JsonConverter GetConverterForType(Type typeToConvert, JsonSerializerOptions options, bool resolveJsonConverterAttribute = true) 175private static JsonConverter GetConverterFromAttribute(JsonConverterAttribute converterAttribute, Type typeToConvert, MemberInfo? memberInfo, JsonSerializerOptions options) 179Type declaringType = memberInfo?.DeclaringType ?? typeToConvert; 180Type? converterType = converterAttribute.ConverterType; 192ConstructorInfo? ctor = converterType.GetConstructor(Type.EmptyTypes); 204Type? underlyingType = Nullable.GetUnderlyingType(typeToConvert);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.cs (3)
51public virtual JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options) 86private static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonSerializerOptions options) 96/// The modifier list will be rendered immutable after the first <see cref="GetTypeInfo(Type, JsonSerializerOptions)"/> invocation.
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (10)
49private static JsonTypeInfo CreateTypeInfoCore(Type type, JsonConverter converter, JsonSerializerOptions options) 114foreach (Type currentType in typeInfo.Type.GetSortedTypeHierarchy()) 148Type currentType, 208Type typeToConvert, 230Type typeToConvert, 264private static JsonNumberHandling? GetNumberHandlingForType(Type type) 270private static JsonObjectCreationHandling? GetObjectCreationHandlingForType(Type type) 276private static JsonUnmappedMemberHandling? GetUnmappedMemberHandling(Type type) 457private static Func<object>? DetermineCreateObjectDelegate(Type type, JsonConverter converter) 469defaultCtor ??= type.GetConstructor(BindingFlags.Public | BindingFlags.Instance, binder: null, Type.EmptyTypes, modifiers: null);
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (13)
46private readonly Type _compilationMappingAttributeType; 49private readonly Type? _fsharpOptionType; 50private readonly Type? _fsharpValueOptionType; 51private readonly Type? _fsharpListType; 52private readonly Type? _fsharpSetType; 53private readonly Type? _fsharpMapType; 65public static bool IsFSharpType(Type type) 101Type compilationMappingAttributeType = fsharpCoreAssembly.GetType(CompilationMappingAttributeTypeName)!; 118public FSharpKind DetectFSharpKind(Type type) 129Type genericType = type.GetGenericTypeDefinition(); 206private Attribute? GetFSharpCompilationMappingAttribute(Type type) 213private static Assembly? GetFSharpCoreAssembly(Type type) 217Type attributeType = attr.GetType();
System\Text\Json\Serialization\Metadata\IJsonTypeInfoResolver.cs (1)
20JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options);
System\Text\Json\Serialization\Metadata\JsonDerivedType.cs (6)
17public JsonDerivedType(Type derivedType) 28public JsonDerivedType(Type derivedType, int typeDiscriminator) 39public JsonDerivedType(Type derivedType, string typeDiscriminator) 45internal JsonDerivedType(Type derivedType, object? typeDiscriminator) 55public Type DerivedType { get; } 62internal void Deconstruct(out Type derivedType, out object? typeDiscriminator)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (1)
34Type? declaringType = propertyInfo.DeclaringType;
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (2)
30public Type DeclaringType => MatchingProperty.DeclaringType; 40public Type ParameterType => MatchingProperty.PropertyType;
System\Text\Json\Serialization\Metadata\JsonParameterInfoValues.cs (1)
25public Type ParameterType { get; init; } = null!;
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (1)
101internal static JsonPolymorphismOptions? CreateFromAttributeDeclarations(Type baseType)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (5)
374internal JsonPropertyInfo(Type declaringType, Type propertyType, JsonTypeInfo? declaringTypeInfo, JsonSerializerOptions options) 402public Type DeclaringType { get; } 407public Type PropertyType { get; } 688Type potentialNumberType;
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (1)
19internal JsonPropertyInfo(Type declaringType, JsonTypeInfo? declaringTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonPropertyInfoValuesOfT.cs (1)
34public Type DeclaringType { get; init; } = null!;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.Cache.cs (7)
18internal static readonly Type ObjectType = typeof(object); 54internal JsonPropertyInfo CreatePropertyUsingReflection(Type propertyType, Type? declaringType) 69Type propertyInfoType = typeof(JsonPropertyInfo<>).MakeGenericType(propertyType); 71parameterTypes: new Type[] { typeof(Type), typeof(JsonTypeInfo), typeof(JsonSerializerOptions) }, 82private protected abstract JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (11)
42internal JsonTypeInfo(Type type, JsonConverter converter, JsonSerializerOptions options) 62public Type? ElementType { get; } 72public Type? KeyType { get; } 436public Type Type { get; } 969public static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonSerializerOptions options) 992internal static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonConverter converter, JsonSerializerOptions options) 1004Type jsonTypeInfoType = typeof(JsonTypeInfo<>).MakeGenericType(type); 1006parameterTypes: new Type[] { typeof(JsonConverter), typeof(JsonSerializerOptions) }, 1025public JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name) 1070private protected readonly struct ParameterLookupKey(Type type, string name) : IEquatable<ParameterLookupKey> 1072public Type Type { get; } = type;
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
150private protected override JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolver.cs (1)
105public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options) => null;
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverChain.cs (1)
13public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverWithAddedModifiers.cs (1)
29public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (1)
12public abstract Func<object>? CreateParameterlessConstructor(Type type, ConstructorInfo? constructorInfo);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (16)
18private readonly ConcurrentDictionary<Type, DerivedJsonTypeInfo?> _typeToDiscriminatorId = new(); 22public PolymorphicTypeResolver(JsonSerializerOptions options, JsonPolymorphismOptions polymorphismOptions, Type baseType, bool converterCanHaveMetadata) 35foreach ((Type derivedType, object? typeDiscriminator) in polymorphismOptions.DerivedTypes) 94public Type BaseType { get; } 101public bool TryGetDerivedJsonTypeInfo(Type runtimeType, [NotNullWhen(true)] out JsonTypeInfo? jsonTypeInfo, out object? typeDiscriminator) 167public static bool IsSupportedPolymorphicBaseType(Type? type) => 175public static bool IsSupportedDerivedType(Type baseType, Type? derivedType) => 181private DerivedJsonTypeInfo? CalculateNearestAncestor(Type type) 195for (Type? candidate = type.BaseType; BaseType.IsAssignableFrom(candidate); candidate = candidate.BaseType) 209foreach (Type interfaceTy in type.GetInterfaces()) 249for (Type? candidate = typeInfo.Type.BaseType; candidate != null; candidate = candidate.BaseType) 261foreach (Type interfaceType in typeInfo.Type.GetInterfaces()) 294static JsonTypeInfo? ResolveAncestorTypeInfo(Type type, JsonSerializerOptions options) 316public DerivedJsonTypeInfo(Type type, object? typeDiscriminator) 324public Type DerivedType { get; }
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (2)
14private readonly Cache<(string id, Type declaringType, MemberInfo? member)> _cache; 31public override Func<object>? CreateParameterlessConstructor(Type type, ConstructorInfo? ctorInfo) =>
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (31)
23public override Func<object>? CreateParameterlessConstructor(Type type, ConstructorInfo? constructorInfo) 41Type.EmptyTypes, 80Type? type = constructor.DeclaringType; 100Type paramType = parameters[i].ParameterType; 121private static DynamicMethod? CreateParameterizedConstructor(ConstructorInfo constructor, Type parameterType1, Type parameterType2, Type parameterType3, Type parameterType4) 123Type? type = constructor.DeclaringType; 168[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type collectionType) 198private static DynamicMethod CreateImmutableEnumerableCreateRangeDelegate(Type collectionType, Type elementType, Type enumerableType) 226private static DynamicMethod CreateImmutableDictionaryCreateRangeDelegate(Type collectionType, Type keyType, Type valueType, Type enumerableType) 249private static DynamicMethod CreatePropertyGetter(PropertyInfo propertyInfo, Type runtimePropertyType) 254Type? declaringType = propertyInfo.DeclaringType; 257Type declaredPropertyType = propertyInfo.PropertyType; 295private static DynamicMethod CreatePropertySetter(PropertyInfo propertyInfo, Type runtimePropertyType) 300Type? declaringType = propertyInfo.DeclaringType; 303Type declaredPropertyType = propertyInfo.PropertyType; 333private static DynamicMethod CreateFieldGetter(FieldInfo fieldInfo, Type runtimeFieldType) 335Type? declaringType = fieldInfo.DeclaringType; 338Type declaredFieldType = fieldInfo.FieldType; 367private static DynamicMethod CreateFieldSetter(FieldInfo fieldInfo, Type runtimeFieldType) 369Type? declaringType = fieldInfo.DeclaringType; 372Type declaredFieldType = fieldInfo.FieldType; 397private static DynamicMethod CreateGetterMethod(string memberName, Type memberType) => 407private static DynamicMethod CreateSetterMethod(string memberName, Type memberType) =>
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (5)
21public override Func<object>? CreateParameterlessConstructor(Type type, ConstructorInfo? ctorInfo) 43Type type = typeof(T); 78Type type = typeof(T); 119Type collectionType = typeof(TCollection); 120Type elementType = JsonTypeInfo.ObjectType;
System\Text\Json\Serialization\WriteStackFrame.cs (1)
118public JsonTypeInfo InitializePolymorphicReEntry(Type runtimeType, JsonSerializerOptions options)
System\Text\Json\ThrowHelper.cs (1)
57public static void ThrowArgumentOutOfRangeException_JsonConverterFactory_TypeNotSupported(Type typeToConvert)
System\Text\Json\ThrowHelper.Serialization.cs (73)
20public static void ThrowArgumentException_DeserializeWrongType(Type type, object value) 32public static void ThrowNotSupportedException_SerializationNotSupported(Type propertyType) 38public static void ThrowNotSupportedException_TypeRequiresAsyncSerialization(Type propertyType) 44public static void ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type keyType, JsonConverter converter) 50public static void ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType) 56public static void ThrowInvalidCastException_DeserializeUnableToAssignValue(Type typeOfValue, Type declaredType) 62public static void ThrowInvalidOperationException_DeserializeUnableToAssignNull(Type declaredType) 68public static void ThrowJsonException_PropertyGetterDisallowNull(string propertyName, Type declaringType) 74public static void ThrowJsonException_PropertySetterDisallowNull(string propertyName, Type declaringType) 80public static void ThrowJsonException_ConstructorParameterDisallowNull(string parameterName, Type declaringType) 152public static void ThrowArgumentException_CannotSerializeInvalidType(string paramName, Type typeToConvert, Type? declaringType, string? propertyName) 165public static void ThrowInvalidOperationException_CannotSerializeInvalidType(Type typeToConvert, Type? declaringType, MemberInfo? memberInfo) 178public static void ThrowInvalidOperationException_SerializationConverterNotCompatible(Type converterType, Type type) 184public static void ThrowInvalidOperationException_ResolverTypeNotCompatible(Type requestedType, Type actualType) 208public static void ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(Type classType, MemberInfo? memberInfo) 220public static void ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(Type classTypeAttributeIsOn, MemberInfo? memberInfo, Type typeToConvert) 267public static void ThrowInvalidOperationException_SerializerPropertyNameConflict(Type type, string propertyName) 337public static void ThrowInvalidOperationException_SerializerConverterFactoryReturnsNull(Type converterType) 343public static void ThrowInvalidOperationException_SerializerConverterFactoryReturnsJsonConverterFactorty(Type converterType) 350Type parentType, 365public static void ThrowInvalidOperationException_ConstructorParameterIncompleteBinding(Type parentType) 377public static void ThrowInvalidOperationException_JsonIncludeOnInaccessibleProperty(string memberName, Type declaringType) 383public static void ThrowInvalidOperationException_IgnoreConditionOnValueTypeInvalid(string clrPropertyName, Type propertyDeclaringType) 396public static void ThrowInvalidOperationException_ConverterCanConvertMultipleTypes(Type runtimePropertyType, JsonConverter jsonConverter) 422public static void ThrowInvalidOperationException_CreateObjectConverterNotCompatible(Type type) 479Type propertyType = state.Current.JsonPropertyInfo?.PropertyType ?? state.Current.JsonTypeInfo.Type; 522public static void ThrowInvalidOperationException_SerializationDuplicateAttribute(Type attribute, MemberInfo memberInfo) 524string location = memberInfo is Type type ? type.ToString() : $"{memberInfo.DeclaringType}.{memberInfo.Name}"; 529public static void ThrowInvalidOperationException_SerializationDuplicateTypeAttribute(Type classType, Type attribute) 535public static void ThrowInvalidOperationException_SerializationDuplicateTypeAttribute<TAttribute>(Type classType) 541public static void ThrowInvalidOperationException_ExtensionDataConflictsWithUnmappedMemberHandling(Type classType, JsonPropertyInfo jsonPropertyInfo) 573Type propertyType = state.Current.JsonPropertyInfo?.PropertyType ?? state.Current.JsonTypeInfo.Type; 601Type propertyType = state.Current.JsonPropertyInfo?.PropertyType ?? state.Current.JsonTypeInfo.Type; 621Type type = typeInfo.Type; 648public static void ThrowNotSupportedException_CannotPopulateCollection(Type type, ref Utf8JsonReader reader, scoped ref ReadStack state) 692public static void ThrowJsonException_UnmappedJsonProperty(Type type, string unmappedPropertyName) 746public static void ThrowJsonException_MetadataInvalidReferenceToValueType(Type propertyType) 752public static void ThrowJsonException_MetadataInvalidPropertyInArrayMetadata(scoped ref ReadStack state, Type propertyType, in Utf8JsonReader reader) 763public static void ThrowJsonException_MetadataPreservedArrayValuesNotFound(scoped ref ReadStack state, Type propertyType) 774public static void ThrowJsonException_MetadataCannotParsePreservedObjectIntoImmutable(Type propertyType) 780public static void ThrowInvalidOperationException_MetadataReferenceOfTypeCannotBeAssignedToType(string referenceId, Type currentType, Type typeToConvert) 811public static void ThrowNotSupportedException_NoMetadataForType(Type type, IJsonTypeInfoResolver? resolver) 816public static NotSupportedException GetNotSupportedException_AmbiguousMetadataForType(Type type, Type match1, Type match2) 822public static void ThrowNotSupportedException_ConstructorContainsNullParameterNames(Type declaringType) 828public static void ThrowInvalidOperationException_NoMetadataForType(Type type, IJsonTypeInfoResolver? resolver) 833public static Exception GetInvalidOperationException_NoMetadataForTypeProperties(IJsonTypeInfoResolver? resolver, Type type) 839public static void ThrowInvalidOperationException_NoMetadataForTypeProperties(IJsonTypeInfoResolver? resolver, Type type) 851public static void ThrowNotSupportedException_BaseConverterDoesNotSupportMetadata(Type derivedType) 857public static void ThrowNotSupportedException_DerivedConverterDoesNotSupportMetadata(Type derivedType) 863public static void ThrowNotSupportedException_RuntimeTypeNotSupported(Type baseType, Type runtimeType) 869public static void ThrowNotSupportedException_RuntimeTypeDiamondAmbiguity(Type baseType, Type runtimeType, Type derivedType1, Type derivedType2) 875public static void ThrowInvalidOperationException_TypeDoesNotSupportPolymorphism(Type baseType) 881public static void ThrowInvalidOperationException_DerivedTypeNotSupported(Type baseType, Type derivedType) 887public static void ThrowInvalidOperationException_DerivedTypeIsAlreadySpecified(Type baseType, Type derivedType) 893public static void ThrowInvalidOperationException_TypeDicriminatorIdIsAlreadySpecified(Type baseType, object typeDiscriminator) 905public static void ThrowInvalidOperationException_PolymorphicTypeConfigurationDoesNotSpecifyDerivedTypes(Type baseType) 911public static void ThrowInvalidOperationException_InvalidEnumTypeWithSpecialChar(Type enumType, string enumName)
System.Text.Json.SourceGeneration (6)
Helpers\KnownTypeSymbols.cs (1)
345private INamedTypeSymbol? GetOrResolveType(Type type, ref Option<INamedTypeSymbol?> field)
Helpers\RoslynExtensions.cs (1)
21public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, Type type)
JsonSourceGenerator.Parser.cs (1)
1818public required ITypeSymbol Type { get; init; }
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
88public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, Type type) =>
src\libraries\System.Text.Json\Common\JsonSerializableAttribute.cs (1)
28public JsonSerializableAttribute(Type type) { }
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (1)
56public Type[]? Converters { get; set; }
System.Text.RegularExpressions (88)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (13)
66Type runnerType = regexRunnerTypeBuilder.CreateType()!; 72Type regexRunnerFactoryType = regexRunnerFactoryTypeBuilder.CreateType()!; 76ConstructorBuilder defaultCtorBuilder = regexTypeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, Type.EmptyTypes); 85_ilg = regexTypeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, new Type[] { typeof(TimeSpan) }).GetILGenerator(); 92private void GenerateCreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type type) 95_ilg!.Emit(OpCodes.Newobj, type.GetConstructor(Type.EmptyTypes)!); 102[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type regexRunnerFactoryType, 113_ilg!.Emit(OpCodes.Call, typeof(Regex).GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, Array.Empty<ParameterModifier>())!); 121_ilg!.Emit(OpCodes.Newobj, regexRunnerFactoryType.GetConstructor(Type.EmptyTypes)!); 196_ilg!.Emit(OpCodes.Newobj, typeof(Hashtable).GetConstructor(Type.EmptyTypes)!); 245[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type inheritFromClass) 257private static ILGenerator DefineMethod(TypeBuilder typeBuilder, string methname, Type[]? parameterTypes, Type? returnType, out MethodBuilder builder)
System\Text\RegularExpressions\RegexCompiler.cs (71)
67private static readonly MethodInfo s_spanIndexOfChar = typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 68private static readonly MethodInfo s_spanIndexOfSpan = typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 70private static readonly MethodInfo s_spanIndexOfAnyCharChar = typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 71private static readonly MethodInfo s_spanIndexOfAnyCharCharChar = typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 72private static readonly MethodInfo s_spanIndexOfAnySpan = typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 73private static readonly MethodInfo s_spanIndexOfAnySearchValues = typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 75private static readonly MethodInfo s_spanIndexOfAnyExceptChar = typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 76private static readonly MethodInfo s_spanIndexOfAnyExceptCharChar = typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 77private static readonly MethodInfo s_spanIndexOfAnyExceptCharCharChar = typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 78private static readonly MethodInfo s_spanIndexOfAnyExceptSpan = typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 79private static readonly MethodInfo s_spanIndexOfAnyExceptSearchValues = typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 80private static readonly MethodInfo s_spanIndexOfAnyInRange = typeof(MemoryExtensions).GetMethod("IndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 81private static readonly MethodInfo s_spanIndexOfAnyExceptInRange = typeof(MemoryExtensions).GetMethod("IndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 82private static readonly MethodInfo s_spanLastIndexOfChar = typeof(MemoryExtensions).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 83private static readonly MethodInfo s_spanLastIndexOfAnyCharChar = typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 84private static readonly MethodInfo s_spanLastIndexOfAnyCharCharChar = typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 85private static readonly MethodInfo s_spanLastIndexOfAnySpan = typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 86private static readonly MethodInfo s_spanLastIndexOfAnySearchValues = typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 87private static readonly MethodInfo s_spanLastIndexOfSpan = typeof(MemoryExtensions).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 88private static readonly MethodInfo s_spanLastIndexOfAnyExceptChar = typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 89private static readonly MethodInfo s_spanLastIndexOfAnyExceptCharChar = typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 90private static readonly MethodInfo s_spanLastIndexOfAnyExceptCharCharChar = typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 91private static readonly MethodInfo s_spanLastIndexOfAnyExceptSpan = typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 92private static readonly MethodInfo s_spanLastIndexOfAnyExceptSearchValues = typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 93private static readonly MethodInfo s_spanLastIndexOfAnyInRange = typeof(MemoryExtensions).GetMethod("LastIndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 94private static readonly MethodInfo s_spanLastIndexOfAnyExceptInRange = typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 97private static readonly MethodInfo s_spanStartsWithSpan = typeof(MemoryExtensions).GetMethod("StartsWith", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 103private static readonly MethodInfo s_memoryMarshalGetArrayDataReferenceSearchValues = typeof(MemoryMarshal).GetMethod("GetArrayDataReference", [Type.MakeGenericMethodParameter(0).MakeArrayType()])!.MakeGenericMethod(typeof(SearchValues<char>))!;
System\Text\RegularExpressions\RegexLWCGCompiler.cs (4)
28private static readonly Type[] s_paramTypes = [typeof(RegexRunner), typeof(ReadOnlySpan<char>)]; 71private DynamicMethod DefineDynamicMethod(string methname, Type? returntype, Type hostType, Type[] paramTypes)
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
88public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, Type type) =>
System.Threading.AccessControl (9)
artifacts\obj\System.Threading.AccessControl\Debug\net9.0\System.Threading.AccessControl.notsupported.cs (9)
34public override System.Type AccessRightType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 35public override System.Type AccessRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 36public override System.Type AuditRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 77public override System.Type AccessRightType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 78public override System.Type AccessRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 79public override System.Type AuditRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 120public override System.Type AccessRightType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 121public override System.Type AccessRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } 122public override System.Type AuditRuleType { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } }
System.Transactions.Local (1)
System\Transactions\TransactionsEtwProvider.cs (1)
969internal void OleTxTransactionManagerCreate(Type tmType, string? nodeName)
System.Web.Services.Description (120)
System\Web\Services\Configuration\WebServicesSection.cs (8)
19internal Type[] GetAllFormatExtensionTypes() { 23private static XmlFormatExtensionPointAttribute GetExtensionPointAttribute(Type type) { 33internal static void LoadXmlFormatExtensions(Type[] extensionTypes, XmlAttributeOverrides overrides, XmlSerializerNamespaces namespaces) { 53foreach (Type extensionType in extensionTypes) { 63foreach (Type extensionPointType in extensionAttr.ExtensionPoints) { 86foreach (Type extensionPointType in table.Keys) { 96private Type[] _defaultFormatTypes = new Type[] {
System\Web\Services\Configuration\XmlFormatExtensionAttribute.cs (18)
8private Type[] _types; 15public XmlFormatExtensionAttribute(string elementName, string ns, Type extensionPoint1) : this(elementName, ns, new Type[] { extensionPoint1 }) { 18public XmlFormatExtensionAttribute(string elementName, string ns, Type extensionPoint1, Type extensionPoint2) : this(elementName, ns, new Type[] { extensionPoint1, extensionPoint2 }) { 21public XmlFormatExtensionAttribute(string elementName, string ns, Type extensionPoint1, Type extensionPoint2, Type extensionPoint3) : this(elementName, ns, new Type[] { extensionPoint1, extensionPoint2, extensionPoint3 }) { 24public XmlFormatExtensionAttribute(string elementName, string ns, Type extensionPoint1, Type extensionPoint2, Type extensionPoint3, Type extensionPoint4) : this(elementName, ns, new Type[] { extensionPoint1, extensionPoint2, extensionPoint3, extensionPoint4 }) { 27public XmlFormatExtensionAttribute(string elementName, string ns, Type[] extensionPoints) { 33public Type[] ExtensionPoints { 34get { return _types == null ? new Type[0] : _types; }
System\Web\Services\Description\ServiceDescription.cs (3)
1144public object Find(Type type) 1158public object[] FindAll(Type type) 2107private static string GetDuplicateMessage(Type type, string elemName)
System\Web\Services\Description\ServiceDescriptionSerializer.cs (88)
26System.Type t = o.GetType(); 123System.Type t = o.GetType(); 186System.Type t = o.GetType(); 262System.Type t = o.GetType(); 292System.Type t = o.GetType(); 322System.Type t = o.GetType(); 352System.Type t = o.GetType(); 436System.Type t = o.GetType(); 521System.Type t = o.GetType(); 593System.Type t = o.GetType(); 640System.Type t = o.GetType(); 687System.Type t = o.GetType(); 777System.Type t = o.GetType(); 814System.Type t = o.GetType(); 882System.Type t = o.GetType(); 919System.Type t = o.GetType(); 966System.Type t = o.GetType(); 996System.Type t = o.GetType(); 1027System.Type t = o.GetType(); 1066System.Type t = o.GetType(); 1105System.Type t = o.GetType(); 1146System.Type t = o.GetType(); 1186System.Type t = o.GetType(); 1227System.Type t = o.GetType(); 1267System.Type t = o.GetType(); 1363System.Type t = o.GetType(); 1392System.Type t = o.GetType(); 1421System.Type t = o.GetType(); 1464System.Type t = o.GetType(); 1494System.Type t = o.GetType(); 1540System.Type t = o.GetType(); 1573System.Type t = o.GetType(); 1603System.Type t = o.GetType(); 1636System.Type t = o.GetType(); 1699System.Type t = o.GetType(); 1786System.Type t = o.GetType(); 1842System.Type t = o.GetType(); 1898System.Type t = o.GetType(); 1954System.Type t = o.GetType(); 2017System.Type t = o.GetType(); 2074System.Type t = o.GetType(); 2136System.Type t = o.GetType(); 2250System.Type t = o.GetType(); 2308System.Type t = o.GetType(); 2364System.Type t = o.GetType(); 2419System.Type t = o.GetType(); 2474System.Type t = o.GetType(); 2544System.Type t = o.GetType(); 2599System.Type t = o.GetType(); 2699System.Type t = o.GetType(); 2747System.Type t = o.GetType(); 2788System.Type t = o.GetType(); 2836System.Type t = o.GetType(); 2885System.Type t = o.GetType(); 2943System.Type t = o.GetType(); 2983System.Type t = o.GetType(); 3074System.Type t = o.GetType(); 3116System.Type t = o.GetType(); 3158System.Type t = o.GetType(); 3200System.Type t = o.GetType(); 3242System.Type t = o.GetType(); 3284System.Type t = o.GetType(); 3326System.Type t = o.GetType(); 3368System.Type t = o.GetType(); 3410System.Type t = o.GetType(); 3452System.Type t = o.GetType(); 3494System.Type t = o.GetType(); 3536System.Type t = o.GetType(); 3578System.Type t = o.GetType(); 3669System.Type t = o.GetType(); 3774System.Type t = o.GetType(); 3816System.Type t = o.GetType(); 3887System.Type t = o.GetType(); 3926System.Type t = o.GetType(); 3967System.Type t = o.GetType(); 4015System.Type t = o.GetType(); 4085System.Type t = o.GetType(); 4137System.Type t = o.GetType(); 4217System.Type t = o.GetType(); 4297System.Type t = o.GetType(); 4348System.Type t = o.GetType(); 4461System.Type t = o.GetType(); 4522System.Type t = o.GetType(); 4563System.Type t = o.GetType(); 4624System.Type t = o.GetType(); 4663System.Type t = o.GetType(); 4703System.Type t = o.GetType(); 4771System.Type t = o.GetType();
System\Web\Services\Diagnostics\TraceUtility.cs (3)
193else if (o is Type) 195Type type = (Type)o;
System.Windows.Controls.Ribbon (54)
Microsoft\Windows\Controls\GenericValueConverters.cs (2)
29public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 56public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
Microsoft\Windows\Controls\KeyTipControl.cs (1)
23Type ownerType = typeof(KeyTipControl);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonScrollButtonVisibilityConverter.cs (2)
43public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 118public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonWindowSmallIconConverter.cs (2)
28public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 44public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (1)
96Type ownerType = typeof(Ribbon);
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (1)
80Type ownerType = typeof(RibbonApplicationMenu);
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
39Type ownerType = typeof(RibbonApplicationMenuItem);
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (1)
37Type ownerType = typeof(RibbonApplicationSplitMenuItem);
Microsoft\Windows\Controls\Ribbon\RibbonButton.cs (1)
45Type ownerType = typeof(RibbonButton);
Microsoft\Windows\Controls\Ribbon\RibbonCheckBox.cs (1)
44Type ownerType = typeof(RibbonCheckBox);
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (1)
49Type ownerType = typeof(RibbonComboBox);
Microsoft\Windows\Controls\Ribbon\RibbonContentPresenter.cs (1)
45Type ownerType = typeof(RibbonContentPresenter);
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (5)
47Type ownerType = typeof(RibbonContextMenu); 409public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 439public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 467public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 478public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Microsoft\Windows\Controls\Ribbon\RibbonContextualTabGroupItemsControl.cs (1)
33Type ownerType = typeof(RibbonContextualTabGroupItemsControl);
Microsoft\Windows\Controls\Ribbon\RibbonControl.cs (1)
50Type ownerType = typeof(RibbonControl);
Microsoft\Windows\Controls\Ribbon\RibbonControlGroup.cs (1)
37Type ownerType = typeof(RibbonControlGroup);
Microsoft\Windows\Controls\Ribbon\RibbonControlLengthConverter.cs (5)
46public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 49TypeCode tc = Type.GetTypeCode(sourceType); 71public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 117public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 132ConstructorInfo ci = typeof(RibbonControlLength).GetConstructor(new Type[] { typeof(double), typeof(RibbonControlLengthUnitType) });
Microsoft\Windows\Controls\Ribbon\RibbonFilterMenuButton.cs (1)
38Type ownerType = typeof(RibbonFilterMenuButton);
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (2)
61Type ownerType = typeof(RibbonGallery); 1132bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
Microsoft\Windows\Controls\Ribbon\RibbonGalleryCategory.cs (2)
54Type ownerType = typeof(RibbonGalleryCategory); 482bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
Microsoft\Windows\Controls\Ribbon\RibbonGalleryItem.cs (1)
42Type ownerType = typeof(RibbonGalleryItem);
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (1)
61Type ownerType = typeof(RibbonGroup);
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (2)
54Type ownerType = typeof(RibbonMenuButton); 1487Type type = typeof(MenuBase);
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (1)
53Type ownerType = typeof(RibbonMenuItem);
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (1)
106Type ownerType = typeof(RibbonQuickAccessToolBar);
Microsoft\Windows\Controls\Ribbon\RibbonRadioButton.cs (1)
44Type ownerType = typeof(RibbonRadioButton);
Microsoft\Windows\Controls\Ribbon\RibbonSeparator.cs (1)
38Type ownerType = typeof(RibbonSeparator);
Microsoft\Windows\Controls\Ribbon\RibbonSplitButton.cs (1)
43Type ownerType = typeof(RibbonSplitButton);
Microsoft\Windows\Controls\Ribbon\RibbonSplitMenuItem.cs (1)
36Type ownerType = typeof(RibbonSplitMenuItem);
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
43Type ownerType = typeof(RibbonTab);
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (1)
37Type ownerType = typeof(RibbonTabHeader);
Microsoft\Windows\Controls\Ribbon\RibbonTabHeaderItemsControl.cs (1)
34Type ownerType = typeof(RibbonTabHeaderItemsControl);
Microsoft\Windows\Controls\Ribbon\RibbonTextBox.cs (1)
46Type ownerType = typeof(RibbonTextBox);
Microsoft\Windows\Controls\Ribbon\RibbonToggleButton.cs (1)
45Type ownerType = typeof(RibbonToggleButton);
Microsoft\Windows\Controls\Ribbon\RibbonToolTip.cs (1)
40Type ownerType = typeof(RibbonToolTip);
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (1)
44Type ownerType = typeof(RibbonTwoLineText);
Microsoft\Windows\Controls\Ribbon\RibbonWindow.cs (1)
53Type ownerType = typeof(RibbonWindow);
Microsoft\Windows\Controls\Ribbon\StringCollectionConverter.cs (3)
28public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 39public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 100public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System.Windows.Extensions (1)
artifacts\obj\System.Windows.Extensions\Debug\net9.0\System.Windows.Extensions.notsupported.cs (1)
79public static System.Xaml.Permissions.XamlAccessLevel PrivateAccessTo(System.Type type) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions); }
System.Xaml (385)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (25)
86internal static Type GetQualifiedType(string typeName) 95return Type.GetType(nameFrags[0]); 125internal static bool IsNullableType(Type type) 130internal static bool IsInternalType(Type type) 132Type origType = type; 152internal static bool IsPublicType(Type type) 169internal static Type GetFrameworkType(string assemblyName, Type type) 193internal static Type GetSystemType(Type type) 219internal static string GetTypeConverterAttributeData(Type type, out Type converterType) 225internal static string GetTypeConverterAttributeData(MemberInfo mi, out Type converterType) 233private static string GetCustomAttributeData(MemberInfo mi, Type attrType, out Type typeValue) 256private static string GetCustomAttributeData(IList<CustomAttributeData> list, Type attrType, out Type typeValue, bool allowTypeAlso, bool allowZeroArgs) 277internal static string GetCustomAttributeData(Type t, 278Type attrType, 281out Type typeValue) 285Type currentType = t; 320Type attrType, 321out Type typeValue, 344if (attrValue == null && allowTypeAlso && tca.ArgumentType == typeof(Type)) 347typeValue = tca.Value as Type;
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\Replacements\TypeUriConverter.cs (4)
19public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 26public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 34public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 46ConstructorInfo constructor = typeof(Uri).GetConstructor(new Type[] { typeof(string), typeof(UriKind) });
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (11)
118internal static Type? GetConverterType(Type type) 123string? converterName = ReflectionHelper.GetTypeConverterAttributeData(type, out Type? converterType); 130private static Type? GetConverterTypeFromName(string? converterName) 132Type? converterType = null; 250private static TypeConverter? GetCoreConverterFromCoreType(Type type) 327else if (type == typeof(Type)) 344internal static TypeConverter? GetCoreConverterFromCustomType(Type type) 427else if (type == typeof(Type)) 453internal static TypeConverter GetTypeConverter(Type type) 461Type? converterType = GetConverterType(type);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlWrappingReader.cs (1)
56public override System.Type ValueType { get { return _reader.ValueType; } }
System\Windows\Markup\AcceptedMarkupExtensionExpressionTypeAttribute.cs (2)
13public Type Type { get; set; } 15public AcceptedMarkupExtensionExpressionTypeAttribute(Type type)
System\Windows\Markup\ArrayExtension.cs (2)
33public ArrayExtension(Type arrayType) 68public Type Type { get; set; }
System\Windows\Markup\ContentWrapperAttribute.cs (2)
23public ContentWrapperAttribute(Type contentWrapper) 32public Type ContentWrapper { get; }
System\Windows\Markup\IValueSerializerContext.cs (1)
24ValueSerializer GetValueSerializerFor(Type type);
System\Windows\Markup\IXamlTypeResolver.cs (1)
24Type Resolve(string qualifiedTypeName);
System\Windows\Markup\MarkupExtensionReturnTypeAttribute.cs (5)
17public MarkupExtensionReturnTypeAttribute(Type? returnType) 25public MarkupExtensionReturnTypeAttribute(Type? returnType, Type? expressionType) 31public Type? ReturnType { get; } 34public Type? ExpressionType { get; }
System\Windows\Markup\NameReferenceConverter.cs (3)
15public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 49public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 65public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Windows\Markup\NameScopePropertyAttribute.cs (2)
18public NameScopePropertyAttribute(string name, Type? type) : this(name) 24public Type? Type { get; }
System\Windows\Markup\StaticExtension.cs (5)
22private Type _memberType; 55Type type = MemberType; 119private bool GetFieldOrPropertyValue(Type type, string name, out object value) 121Type currentType = type; 164public Type MemberType
System\Windows\Markup\StaticExtensionsToInstanceDescriptorsConverter.cs (3)
18public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 28public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 38typeof(StaticExtension).GetConstructor(new Type[] { typeof(string) }),
System\Windows\Markup\TypeExtension.cs (4)
17[MarkupExtensionReturnType(typeof(Type))] 21private Type _type; 41public TypeExtension(Type type) 107public Type Type
System\Windows\Markup\TypeExtensionConverter.cs (4)
18public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 28public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 38typeof(TypeExtension).GetConstructor(new Type[] { typeof(Type) }),
System\Windows\Markup\ValueSerializer.cs (5)
97public virtual IEnumerable<Type> TypeReferences(object? value, IValueSerializerContext? context) 99return Array.Empty<Type>(); 107public static ValueSerializer? GetSerializerFor(Type type) 197public static ValueSerializer? GetSerializerFor(Type type, IValueSerializerContext? context) 236protected Exception GetConvertToException(object? value, Type destinationType)
System\Windows\Markup\XamlDeferLoadAttribute.cs (4)
10public XamlDeferLoadAttribute(Type loaderType, Type contentType) 30public Type? LoaderType { get; private set; } 31public Type? ContentType { get; private set; }
System\Xaml\AttachableMemberIdentifier.cs (3)
11readonly Type declaringType; 14public AttachableMemberIdentifier(Type declaringType, string memberName) 28public Type DeclaringType
System\Xaml\Context\ObjectWriterContext.cs (1)
161internal Type ServiceProvider_Resolve(string qName)
System\Xaml\Context\ServiceProviderContext.cs (3)
37object IServiceProvider.GetService(Type serviceType) 116Type IXamlTypeResolver.Resolve(string qName) 388public Type GetDestinationType()
System\Xaml\Context\XamlParserContext.cs (2)
119Type allowProtectedForType = null; 294Type allowProtectedForType = null;
System\Xaml\EventConverter.cs (3)
19public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 32GetRootObjectAndDelegateType(context, out object? rootObject, out Type? delegateType); 42internal static void GetRootObjectAndDelegateType(ITypeDescriptorContext? context, out object? rootObject, out Type? delegateType)
System\Xaml\IDestinationTypeProvider.cs (1)
11Type GetDestinationType();
System\Xaml\InfosetObjects\XamlObjectWriter.cs (5)
1061private XamlType GetXamlType(Type clrType) 1421private static bool IsBuiltInGenericDictionary(Type type) 1427Type openGeneric = type.GetGenericTypeDefinition(); 1814private bool Logic_WillParentCollectionAdd(ObjectWriterContext ctx, Type type, bool excludeObjectType) 2189Type rootInstanceType = (curInstance != null) ? curInstance.GetType() : ctx.CurrentType.UnderlyingType;
System\Xaml\RefOnly\LooseTypeExtensions.cs (12)
19internal static bool AssemblyQualifiedNameEquals(Type t1, Type t2) 66internal static bool IsAssemblyQualifiedNameAssignableFrom(Type t1, Type t2) 93Type[] genericParameterConstraints = t1.GetGenericParameterConstraints(); 105static bool LooselyImplementInterface(Type t, Type interfaceType) 107for (Type type = t; type != null; type = type.BaseType) 109Type[] interfaces = type.GetInterfaces(); 122static bool IsLooseSubClassOf(Type t1, Type t2) 134for(Type baseType = t1.BaseType; baseType != null; baseType = baseType.BaseType)
System\Xaml\Replacements\DateTimeConverter2.cs (3)
18public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) 28public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType) 41public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
System\Xaml\Replacements\DateTimeOffsetConverter2.cs (4)
17public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 27public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 37public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 48ConstructorInfo constructor = typeof(DateTimeOffset).GetConstructor(new Type[]
System\Xaml\Replacements\TypeListConverter.cs (4)
20public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 28Type[] types = new Type[tl.Length]; 31types[i] = (Type)s_typeTypeConverter.ConvertFrom(context, TypeConverterHelper.InvariantEnglishUS, tl[i]);
System\Xaml\Replacements\TypeTypeConverter.cs (5)
19public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 36public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 39public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) 41if (context != null && value is Type type && destinationType == typeof(string)) 53private static string ConvertTypeToString(ITypeDescriptorContext context, Type type)
System\Xaml\Runtime\ClrObjectRuntime.cs (12)
76Type type = xamlType.UnderlyingType; 105protected virtual object InvokeFactoryMethod(Type type, string methodName, object[] args) 111protected MethodInfo GetFactoryMethod(Type type, string methodName, object[] args, BindingFlags flags) 116factory = type.GetMethod(methodName, flags, null, Type.EmptyTypes, null); 136return Type.DefaultBinder.BindToMethod( 187public override bool CanConvertTo(ITypeDescriptorContext context, TypeConverter converter, Type type) 374Type keyType = dictionaryType.KeyType.UnderlyingType; 375Type itemType = dictionaryType.ItemType.UnderlyingType; 376Type genericKVP = typeof(KeyValuePair<,>).MakeGenericType(keyType, itemType); 377Type genericIEnumerator = typeof(IEnumerator<>).MakeGenericType(genericKVP); 382var method = openMethod.MakeGenericMethod(new Type[] { keyType, itemType }); 661protected virtual Delegate CreateDelegate(Type delegateType, object target, string methodName)
System\Xaml\Runtime\DynamicMethodRuntime.cs (41)
44delegate Delegate DelegateCreator(Type delegateType, object target, string methodName); 48Type _localType; 63Dictionary<Type, object> _converterInstances; 64Dictionary<Type, DelegateCreator> _delegateCreators; 103private Dictionary<Type, object> ConverterInstances 109_converterInstances = new Dictionary<Type, object>(); 115private Dictionary<Type, DelegateCreator> DelegateCreators 121_delegateCreators = new Dictionary<Type, DelegateCreator>(); 143Type clrType = ts.ConverterType; 169Type delegateType; 178protected override Delegate CreateDelegate(Type delegateType, object target, string methodName) 181Type targetType = target.GetType(); 195private object CreateInstanceWithCtor(Type type, object[] args) 200ctor = type.GetConstructor(BF_AllInstanceMembers, null, Type.EmptyTypes, null); 218protected override object InvokeFactoryMethod(Type type, string methodName, object[] args) 264private DelegateCreator CreateDelegateCreator(Type targetType) 273helperFlags, null, new Type[] { typeof(Type), typeof(string) }, null); 284typeof(Delegate), typeof(Type), typeof(object), typeof(string)); 301typeof(Delegate), typeof(Type), typeof(object), typeof(string)); 309new Type[] { typeof(Type), typeof(object), typeof(string) }, null); 357Type[] paramTypes = new Type[parameters.Length]; 361Type paramType = parameters[i].ParameterType; 369Type elementType = paramType.GetElementType(); 414Type targetType = getter.IsStatic ? getter.GetParameters()[0].ParameterType : GetTargetType(getter); 433Type targetType = setter.IsStatic ? parameters[0].ParameterType : GetTargetType(setter); 434Type valueType = setter.IsStatic ? parameters[1].ParameterType : parameters[0].ParameterType; 447private DynamicMethod CreateDynamicMethod(string name, Type returnType, params Type[] argTypes) 459private Type GetTargetType(MethodInfo instanceMethod) 461Type declaringType = instanceMethod.DeclaringType; 492private static void Emit_CastTo(ILGenerator ilGenerator, Type toType) 504private static void Emit_BoxIfValueType(ILGenerator ilGenerator, Type type) 552private void Emit_LateBoundInvoke(ILGenerator ilGenerator, Type targetType, string methodName, 582s_InvokeMemberMethod = typeof(Type).GetMethod(KnownStrings.InvokeMember, 583new Type[] { typeof(string), typeof(BindingFlags), typeof(Binder), typeof(object), typeof(object[]) }); 588private void Emit_TypeOf(ILGenerator ilGenerator, Type type) 593s_GetTypeFromHandleMethod = typeof(Type).GetMethod( 595null, new Type[] { typeof(RuntimeTypeHandle) }, null);
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (1)
122public override bool CanConvertTo(ITypeDescriptorContext context, TypeConverter converter, Type type)
System\Xaml\Schema\BuiltInValueConverter.cs (5)
20internal BuiltInValueConverter(Type converterType, Func<TConverterBase> factory) 71internal static XamlValueConverter<TypeConverter> GetTypeConverter(Type targetType) 141if (typeof(Type).IsAssignableFrom(targetType)) 145if (typeof(Type[]).IsAssignableFrom(targetType)) 206internal static XamlValueConverter<ValueSerializer> GetValueSerializer(Type targetType)
System\Xaml\Schema\CollectionReflector.cs (33)
16private static Type[] s_typeOfObjectArray; 17private static Type[] s_typeOfTwoObjectArray; 31internal static XamlCollectionKind LookupCollectionKind(Type type, out MethodInfo addMethod) 81internal static MethodInfo LookupAddMethod(Type type, XamlCollectionKind collectionKind) 106private static bool TryGetICollectionAdder(Type type, out MethodInfo addMethod) 109Type genericICollection = GetGenericInterface(type, typeof(ICollection<>), out hasMoreThanOneICollection); 124private static bool TryGetCollectionAdder(Type type, bool mayBeICollection, out MethodInfo addMethod) 170private static bool TryGetIDictionaryAdder(Type type, out MethodInfo addMethod) 173Type genericIDictionary = GetGenericInterface(type, typeof(IDictionary<,>), out hasMoreThanOneIDictionary); 188private static bool TryGetDictionaryAdder(Type type, bool mayBeIDictionary, out MethodInfo addMethod) 232internal static MethodInfo GetAddMethod(Type type, Type contentType) 234return GetMethod(type, KnownStrings.Add, new Type[] { contentType }); 237internal static MethodInfo GetEnumeratorMethod(Type type) 249internal static MethodInfo GetIsReadOnlyMethod(Type collectionType, Type itemType) 251Type genericICollection = typeof(ICollection<>).MakeGenericType(itemType); 260private static MethodInfo LookupEnumeratorMethod(Type type) 262MethodInfo result = GetMethod(type, KnownStrings.GetEnumerator, Type.EmptyTypes); 270private static Type GetGenericInterface(Type type, Type interfaceType, out bool hasMultiple) 272Type result = null; 278foreach (Type currentInterface in type.GetInterfaces()) 294private static MethodInfo GetAddMethod(Type type, int paramCount, out bool hasMoreThanOne) 325private static BindingFlags GetBindingFlags(Type type) 337private static MethodInfo GetMethod(Type type, string name, Type[] argTypes) 347private static MethodInfo GetPublicMethod(Type type, string name, int argCount) 361private static Type[] TypeOfObjectArray 367s_typeOfObjectArray = new Type[] { typeof(object) }; 373private static Type[] TypeOfTwoObjectArray 379s_typeOfTwoObjectArray = new Type[] { typeof(object), typeof(object) };
System\Xaml\Schema\MemberReflector.cs (2)
242internal static bool IsProtectedVisibleTo(MethodInfo method, Type derivedType, XamlSchemaContext schemaContext) 276foreach (Type typeArg in method.GetGenericArguments())
System\Xaml\Schema\Reflector.cs (33)
45public bool IsAttributePresent(Type attributeType) 64public string GetAttributeString(Type attributeType, out bool checkedInherited) 130public IReadOnlyDictionary<char,char> GetBracketCharacterAttributes(Type attributeType) 164public T? GetAttributeValue<T>(Type attributeType) where T : struct 202public Type GetAttributeType(Type attributeType) 214return Type.GetType(typeName); 243public Type[] GetAttributeTypes(Type attributeType, int count) 255Type converterType = Type.GetType(tca.LoaderTypeName); 256Type contentType = Type.GetType(tca.ContentTypeName); 257return new Type[] { converterType, contentType }; 275public List<T> GetAllAttributeContents<T>(Type attributeType) 379private static bool TypesAreEqual(Type userType, Type builtInType) 391private ReadOnlyDictionary<char, char> TokenizeBracketCharacters(Type attributeType) 412private Type ExtractType(CustomAttributeData cad) 414Type result = null; 421ThrowInvalidMetadata(cad, 1, typeof(Type)); 426private Type[] ExtractTypes(CustomAttributeData cad, int count) 430ThrowInvalidMetadata(cad, count, typeof(Type)); 432Type[] result = new Type[count]; 438ThrowInvalidMetadata(cad, count, typeof(Type)); 444private Type ExtractType(CustomAttributeTypedArgument arg) 446if (arg.ArgumentType == typeof(Type)) 448return (Type)arg.Value; 453return Type.GetType(typeName); 481private CustomAttributeData GetAttribute(Type attributeType) 494private void GetAttributes(Type attributeType, IList<CustomAttributeData> cads) 506protected void ThrowInvalidMetadata(CustomAttributeData cad, int expectedCount, Type expectedType)
System\Xaml\Schema\SafeReflectionInvoker.cs (4)
19public static bool IsInSystemXaml(Type type) 27foreach (Type typeArg in type.GetGenericArguments()) 43Type declaringType = method.DeclaringType; 50foreach (Type typeArg in method.GetGenericArguments())
System\Xaml\Schema\TypeReflector.cs (9)
103public TypeReflector(Type underlyingType) 123internal static bool IsVisibleTo(Type type, Assembly accessingAssembly, XamlSchemaContext schemaContext) 137foreach (Type typeArg in type.GetGenericArguments()) 152internal static bool IsInternal(Type type) 262internal Type UnderlyingType { get; set; } 407Type ownerType = nspAttr.Type; 1049private static object GetCustomAttribute(Type attrType, Type reflectedType) 1065private static TypeVisibility GetVisibility(Type type)
System\Xaml\Schema\XamlMemberInvoker.cs (4)
115Type declaringType = _member.UnderlyingMember.DeclaringType; 118Type[] args; 121args = new Type[] { _member.TargetType.UnderlyingType ?? typeof(object) }; 126args = Type.EmptyTypes;
System\Xaml\Schema\XamlNamespace.cs (17)
67Type[] clrTypeArgs = ConvertArrayOfXamlTypesToTypes(typeArgs); 81Type type = TryGetType(typeName); 97private XamlType TryGetXamlType(string typeName, Type[] typeArgs) 109Type openType = openXamlType?.UnderlyingType; 116Type closedType = openType.MakeGenericType(typeArgs); 130private static Type MakeArrayType(Type elementType, string subscript) 132Type type = elementType; 154private Type[] ConvertArrayOfXamlTypesToTypes(XamlType[] typeArgs) 156var clrTypeArgs = new Type[typeArgs.Length]; 175private Type TryGetType(string typeName) 177Type type = SearchAssembliesForShortName(typeName); 189Type currentType = type; 216Type[] types = asm.GetTypes(); 218foreach (Type t in types) 244private Type SearchAssembliesForShortName(string shortName) 256Type type = asm.GetType(longName);
System\Xaml\Schema\XamlTypeInvoker.cs (5)
237Type type = _xamlType.UnderlyingType.UnderlyingSystemType; 252Type type = _xamlType.UnderlyingType.UnderlyingSystemType; 276typeof(Action<object>).GetConstructor(new Type[] { typeof(Object), typeof(IntPtr) }); 322Type underlyingType = type._xamlType.UnderlyingType.UnderlyingSystemType; 324ConstructorInfo tConstInfo = underlyingType.GetConstructor(Type.EmptyTypes);
System\Xaml\Schema\XamlTypeTypeConverter.cs (3)
14public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 35public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) 40public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
System\Xaml\Schema\XamlValueConverter.cs (3)
22public Type ConverterType { get; } 25public XamlValueConverter(Type converterType, XamlType targetType) 30public XamlValueConverter(Type converterType, XamlType targetType, string name)
System\Xaml\XamlLanguage.cs (3)
250internal static string TypeAlias(Type type) 377internal static Type LookupClrNamespaceType(AssemblyNamespacePair nsPair, string typeName) 459private static XamlType GetXamlType(Type type)
System\Xaml\XamlMember.cs (8)
477internal bool IsReadVisibleTo(Assembly accessingAssembly, Type accessingType) 494internal bool IsWriteVisibleTo(Assembly accessingAssembly, Type accessingType) 530Type[] loaderTypes = _reflector.GetAttributeTypes(typeof(XamlDeferLoadAttribute), 2); 656Type result = parameters[0].ParameterType; 670Type converterType = _reflector.GetAttributeType(typeof(TypeConverterAttribute)); 689Type converterType = _reflector.GetAttributeType(typeof(ValueSerializerAttribute)); 722Type systemType = LookupSystemType(); 954private Type LookupSystemType()
System\Xaml\XamlObjectReader.cs (15)
1226void AddFactoryMethodAndValidateArguments(Type valueType, MemberInfo memberInfo, ICollection arguments, SerializerContext context, out ParameterInfo[] methodParams) 1246var declaringType = memberInfo.DeclaringType; 1433var valueType = value.GetType(); 1791static string ConvertTypeAndMethodToString(Type type, string methodName, SerializerContext context) 1972else if (value is Type type) 2558public Type RootType { get; set; } 2627public XamlType GetXamlType(Type clrType) 2638public XamlType LocalAssemblyAwareGetXamlType(Type clrType) 2641if(!result.IsVisibleTo(LocalAssembly) && !typeof(Type).IsAssignableFrom(clrType)) 2648public bool CanConvertTo(TypeConverter converter, Type type) 2774Type allowProtectedMemberOnType = null; 2784Type allowProtectedMemberOnType = null; 2817public object GetService(Type serviceType) 2846public ValueSerializer GetValueSerializerFor(Type type) 3224Type baseDeclaringType = accessor.GetBaseDefinition().DeclaringType;
System\Xaml\XamlRuntime.cs (1)
38abstract public bool CanConvertTo(ITypeDescriptorContext context, TypeConverter converter, Type type);
System\Xaml\XamlSchemaContext.cs (15)
469private ConcurrentDictionary<Type, XamlType> _masterTypeList; 470private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> _masterValueConverterList; 492private ConcurrentDictionary<Type, XamlType> MasterTypeList 497Interlocked.CompareExchange(ref _masterTypeList, CreateDictionary<Type, XamlType>(ReferenceEqualityComparer.Instance), null); 503private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> MasterValueConverterList 508Interlocked.CompareExchange(ref _masterValueConverterList, CreateDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object>(), null); 524public virtual XamlType GetXamlType(Type type) 531internal XamlType GetXamlType(Type type, string alias) 596Type converterType, XamlType targetType) 599var key = new ReferenceEqualityTuple<Type, XamlType, Type>(converterType, targetType, typeof(TConverterBase)); 894Type clrType = type.UnderlyingType;
System\Xaml\XamlType.cs (37)
35private NullableReference<Type> _underlyingType; 60public XamlType(Type underlyingType, XamlSchemaContext schemaContext) 65public XamlType(Type underlyingType, XamlSchemaContext schemaContext, XamlTypeInvoker invoker) 70internal XamlType(string alias, Type underlyingType, XamlSchemaContext schemaContext, XamlTypeInvoker invoker, TypeReflector reflector) 155public Type UnderlyingType 170internal NullableReference<Type> UnderlyingTypeInternal 418Type baseUnderlyingType = xamlType.UnderlyingType; 422Type curUnderlyingType = curType.UnderlyingType; 594Type underlyingType = UnderlyingType; 625internal ConstructorInfo GetConstructor(Type[] paramTypes) 637MethodBase result = Type.DefaultBinder.SelectMethod(ConstructorBindingFlags, ctorArray, paramTypes, null); 645Type attributeType = null; 708Type underlyingType = UnderlyingType; 738Type underlyingType = UnderlyingType; 748ConstructorInfo defaultCtor = underlyingType.GetConstructor(ConstructorBindingFlags, null, Type.EmptyTypes, null); 776List<Type> wrapperTypes = _reflector.GetAllAttributeContents<Type>(typeof(ContentWrapperAttribute)); 780foreach (Type wrapperType in wrapperTypes) 813Type[] loaderTypes = _reflector.GetAttributeTypes(typeof(XamlDeferLoadAttribute), 2); 828Type underlyingType = UnderlyingType; 935Type result = null; 968Type returnType = _reflector.GetAttributeType(typeof(MarkupExtensionReturnTypeAttribute)); 1107protected virtual Type LookupUnderlyingType() 1114Type underlyingType = UnderlyingType; 1154Type converterType = _reflector.GetAttributeType(typeof(TypeConverterAttribute)); 1170Type underlyingType = UnderlyingType; 1184Type[] typeArgs = underlyingType.GetGenericArguments(); 1198Type converterType = _reflector.GetAttributeType(typeof(ValueSerializerAttribute)); 1214Type underlyingType = UnderlyingType; 1224Type[] typeArgs = underlyingType.GetGenericArguments(); 1486private static ReadOnlyCollection<XamlType> GetTypeArguments(Type type, XamlSchemaContext schemaContext) 1488Type genericType = type; 1497Type[] types = genericType.GetGenericArguments(); 1506private static string GetTypeName(Type type) 1574XamlType typeOfType = SchemaContext.GetXamlType(typeof(Type)); 1588Type type = param.ParameterType; 1684private bool TryGetAttributeString(Type attributeType, out string result)
System\Xaml\XamlXmlWriter.cs (4)
1890Type objectClrType = objectXamlType.UnderlyingType; 1949Type[] paramClrTypes = new Type[numOfParameters]; 1954Type underlyingType = xamlType.UnderlyingType;
System.Xaml.Tests (53)
System\Windows\Markup\AcceptedMarkupExtensionExpressionTypeAttributeTests.cs (1)
17public void Ctor_Type(Type type)
System\Windows\Markup\ArrayExtensionTests.cs (4)
25public void Ctor_Type(Type type) 37Assert.Throws<ArgumentNullException>("arrayType", () => new ArrayExtension((Type)null!)); 53public void Ctor_Array(Array elements, Type expectedType) 123public void Type_Set_GetReturnsExpected(Type value)
System\Windows\Markup\ContentWrapperAttributeTests.cs (1)
15public void Ctor_Type(Type? contentWrapper)
System\Windows\Markup\MarkupExtensionReturnTypeAttributeTests.cs (3)
24public void Ctor_Type(Type returnType) 34public void Ctor_Type_Type(Type returnType, Type expressionType)
System\Windows\Markup\NameReferenceConverterTests.cs (4)
22public void CanConvertFrom_Invoke_ReturnsExpected(Type type, bool expected) 134public void CanConvertTo_Invoke_ReturnsExpected(ITypeDescriptorContext context, Type destinationType, bool expected) 205public Func<Type, object> GetServiceAction { get; set; } 207public object GetService(Type serviceType)
System\Windows\Markup\NameScopePropertyAttributeTests.cs (1)
26public void Ctor_String_Type(string name, Type type)
System\Windows\Markup\ReferenceTests.cs (2)
99public Func<Type, object> ServiceAction { get; set; } 101public object GetService(Type serviceType)
System\Windows\Markup\StaticExtensionTests.cs (7)
187public void MemberType_Set_GetReturnsExpected(Type value) 205public void StaticExtensionConverter_CanConvertTo_ReturnsExpected(Type type, bool expected) 218Assert.Equal(new Type[] { typeof(string) }, Assert.IsAssignableFrom<ConstructorInfo>(descriptor.MemberInfo).GetParameters().Select(p => p.ParameterType)); 249public Func<Type, object> ServiceAction { get; set; } 251public object GetService(Type serviceType) 264public Func<string, Type> ResolveAction { get; set; } 266public Type Resolve(string qualifiedTypeName)
System\Windows\Markup\TypeExtensionTests.cs (11)
42public void Ctor_Type(Type type) 52Assert.Throws<ArgumentNullException>("type", () => new TypeExtension((Type)null!)); 148public void Type_Set_GetReturnsExpected(Type value) 167public void TypeExtensionConverter_CanConvertTo_ReturnsExpected(Type type, bool expected) 180Assert.Equal(new Type[] { typeof(Type) }, Assert.IsAssignableFrom<ConstructorInfo>(descriptor.MemberInfo).GetParameters().Select(p => p.ParameterType)); 181Assert.Equal(new Type[] { typeof(int) }, descriptor.Arguments); 211public Func<Type, object> ServiceAction { get; set; } 213public object GetService(Type serviceType) 226public Func<string, Type> ResolveAction { get; set; } 228public Type Resolve(string qualifiedTypeName)
System\Windows\Markup\ValueSerializerTests.cs (15)
118yield return new object[] { typeof(Type) }; 127public void GetSerializerFor_WellKnownType_ReturnsExpected(Type type) 198public void GetSerializerFor_NoSuchTypeConverterAttribute_ReturnsNull(Type type) 229Assert.Throws<ArgumentNullException>("type", () => ValueSerializer.GetSerializerFor((Type)null!)); 230Assert.Throws<ArgumentNullException>("type", () => ValueSerializer.GetSerializerFor((Type)null!, null)); 284public void GetSerializerFor_DescriptorHasNoConverter_ReturnsNull(Type type) 442public ValueSerializer? GetValueSerializerFor(Type type) => SerializerResult; 452public object GetService(Type serviceType) => throw new NotImplementedException(); 462public override bool CanConvertTo(ITypeDescriptorContext? context, Type? sourceType) 468public override bool CanConvertFrom(ITypeDescriptorContext? context, Type? sourceType) 479public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) 487public override bool CanConvertTo(ITypeDescriptorContext? context, Type? sourceType) 492public override bool CanConvertFrom(ITypeDescriptorContext? context, Type? sourceType) 500public override bool CanConvertTo(ITypeDescriptorContext? context, Type? sourceType) 505public override bool CanConvertFrom(ITypeDescriptorContext? context, Type? sourceType)
System\Windows\Markup\XamlDeferLoadAttributeTests.cs (2)
15public void Ctor_Type_Type(Type loaderType, Type contentType)
System\Windows\Markup\XamlSetMarkupExtensionEventArgsTests.cs (1)
42public object GetService(Type serviceType) => throw new NotImplementedException();
System\Windows\Markup\XamlSetTypeConverterEventArgsTests.cs (1)
51public object GetService(Type serviceType) => throw new NotImplementedException();
UIAutomationClient (12)
MS\Internal\Automation\AutomationAttributeInfo.cs (3)
31Type type 51internal Type Type { get { return _type; } } 65private Type _type;
MS\Internal\Automation\AutomationPropertyInfo.cs (3)
30Type type, 53internal Type Type { get { return _type; } } 67private Type _type;
MS\Internal\Automation\Misc.cs (2)
79internal static Array CombineArrays(IEnumerable arrays, Type t) 104internal static Array RemoveDuplicates(Array a, Type t)
MS\Internal\Automation\ProxyManager.cs (2)
68Type t = a.GetType( typeName ); 354Type t = mb.ReflectedType;
System\Windows\Automation\ItemContainerPattern.cs (1)
139Type expectedType = info.Type;
System\Windows\Automation\PropertyCondition.cs (1)
136Type expectedType = info.Type;
UnitTests.Common (7)
MockTransportBindingElement.cs (3)
13BuildChannelFactoryOverride = (Type t, BindingContext bc) => DefaultBuildChannelFactory(t, bc); 17public Func<Type,BindingContext,IChannelFactory> BuildChannelFactoryOverride { get; set; } 52public IChannelFactory DefaultBuildChannelFactory(Type tChannel, BindingContext context)
TestHelpers.cs (4)
113public static string ValidateContractDescription(ContractDescription contract, Type expectedType, ContractDescriptionData expectedContract) 125Type contractType = contract.ContractType; 317public Type MessageType { get; set; } 329public Type Type { get; set; }
WasmAppBuilder (21)
IcallTableGenerator.cs (7)
42foreach (Type type in asm.GetTypes()) 132private void ProcessType(Type type) 177foreach (var nestedType in type.GetNestedTypes()) 190var t = par.ParameterType; 208void AddSignature(Type type, MethodInfo method) 222private void AppendType(StringBuilder sb, Type t) 268private static string MapType(Type t) => t.Name switch
PInvokeCollector.cs (2)
69public void CollectPInvokes(List<PInvoke> pinvokes, List<PInvokeCallback> callbacks, HashSet<string> signatures, Type type) 172public static bool IsBlittable(Type type, LogAdapter log) => PInvokeTableGenerator.IsBlittable(type, log);
PInvokeTableGenerator.cs (8)
39foreach (Type type in asm.GetTypes()) 189private static string MapType(Type t) => t.Name switch 209private static string PickCTypeNameForUnknownType(Type t) 274var realReturnType = method.ReturnType; 448private static readonly Dictionary<Type, bool> _blittableCache = new(); 450public static bool IsFunctionPointer(Type type) 456public static bool IsBlittable(Type type, LogAdapter log) 470static bool IsBlittableUncached(Type type, LogAdapter log)
SignatureMapper.cs (3)
14internal static char? TypeToChar(Type t, LogAdapter log, out bool isByRefStruct, int depth = 0) 63Type underlyingType = t.GetEnumUnderlyingType(); 73Type fieldType = fields[0].FieldType;
WasmAppBuilder.cs (1)
491private static bool TryConvert(string str, Type type, out object? value)
WindowsFormsIntegration (2)
System\Windows\Integration\PropertyMap.cs (1)
202return SourceObject.GetType().GetProperty(propertyName, Type.EmptyTypes);
System\Windows\Integration\WindowsFormsHost.cs (1)
1117MethodInfo methodInfo = typeof(SWF.Control).GetMethod("OnParentRightToLeftChanged", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(EventArgs) }, null);
XmlFileLogger (4)
LogProcessNode.cs (4)
23private readonly Dictionary<Type, List<ILogNode>> _childNodes; 31_childNodes = new Dictionary<Type, List<ILogNode>>(); 96var type = childNode.GetType(); 116var t = typeof(T);
XmlFormattersWebSite (2)
PersonWrapper.cs (1)
32public object Unwrap(Type declaredType)
PersonWrapperProvider.cs (1)
23public Type WrappingType
xunit.assert (77)
Assert.cs (3)
51 /// Safely perform <see cref="Type.GetGenericTypeDefinition"/>, returning <c>null</c> when the 59 static Type? SafeGetGenericTypeDefinition([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type? type)
EqualityAsserts.cs (11)
31 static Type typeofDictionary = typeof(Dictionary<,>); 32 static Type typeofHashSet = typeof(HashSet<>); 33 static Type typeofSet = typeof(ISet<>); 266 var expectedType = expected?.GetType(); 267 var actualType = actual?.GetType(); 311 var expectedType = expected?.GetType(); 312 var actualType = actual?.GetType(); 313 var expectedTypeDefinition = SafeGetGenericTypeDefinition(expectedType); 316 var actualTypeDefinition = SafeGetGenericTypeDefinition(actualType); 780 var expectedType = expected?.GetType(); 781 var actualType = actual?.GetType();
ExceptionAsserts.cs (6)
24 Type exceptionType, 49 Type exceptionType, 61 Type exceptionType, 73 Type exceptionType, 182 Type exceptionType, 251 Type exceptionType,
Sdk\ArgumentFormatter.cs (9)
66 static readonly Type[] EmptyTypes = new Type[0]; 143 public static string Format(Type? value) 172 var valueAsType = value as Type; 207 var type = value.GetType(); 281 DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, 416 Type type, 498 internal static Type? GetSetElementType(object? obj)
Sdk\AssertEqualityComparer.cs (9)
126 static readonly ConcurrentDictionary<Type, TypeInfo> cacheOfIComparableOfT = new ConcurrentDictionary<Type, TypeInfo>(); 127 static readonly ConcurrentDictionary<Type, TypeInfo> cacheOfIEquatableOfT = new ConcurrentDictionary<Type, TypeInfo>(); 129 static readonly Type typeKeyValuePair = typeof(KeyValuePair<,>); 321 var xKeyType = xKey.GetType(); 322 var yKeyType = yKey?.GetType(); 344 var xValueType = xValue.GetType(); 345 var yValueType = yValue?.GetType();
Sdk\AssertHelper.cs (12)
49 static ConcurrentDictionary<Type, Dictionary<string, Func<object?, object?>>> gettersByType = new ConcurrentDictionary<Type, Dictionary<string, Func<object?, object?>>>(); 56 static readonly Lazy<TypeInfo?> fileSystemInfoTypeInfo = new Lazy<TypeInfo?>(() => Type.GetType(fileSystemInfoFqn)?.GetTypeInfo()); 57 static readonly Lazy<PropertyInfo?> fileSystemInfoFullNameProperty = new Lazy<PropertyInfo?>(() => Type.GetType(fileSystemInfoFqn)?.GetTypeInfo().GetDeclaredProperty("FullName")); 99 | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type) => 112 | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type _type) => 165 internal static bool IsCompilerGenerated(Type type) => 280 Type targetType, 376 var expectedType = expected.GetType(); 378 var actualType = actual.GetType(); 515 var expectedType = expected.GetType(); 516 var actualType = actual.GetType();
Sdk\CollectionTracker.cs (4)
208 var valueXType = valueX.GetType(); 209 var valueYType = valueY.GetType(); 301 var elementTypeX = ArgumentFormatter.GetSetElementType(x.InnerEnumerable); 302 var elementTypeY = ArgumentFormatter.GetSetElementType(y.InnerEnumerable);
Sdk\CollectionTrackerExtensions.cs (2)
38 static readonly ConcurrentDictionary<Type, MethodInfo> cacheOfAsTrackerByType = new ConcurrentDictionary<Type, MethodInfo>();
Sdk\Exceptions\EquivalentException.cs (2)
213 Type expectedType, 214 Type actualType,
Sdk\Exceptions\IsAssignableFromException.cs (1)
34 Type expected,
Sdk\Exceptions\IsNotAssignableFromException.cs (1)
31 Type expected,
Sdk\Exceptions\IsNotTypeException.cs (1)
29 public static IsNotTypeException ForExactType(Type type)
Sdk\Exceptions\NotNullException.cs (1)
29 public static Exception ForNullStruct(Type type) =>
Sdk\Exceptions\NullException.cs (1)
40 Type type,
Sdk\Exceptions\RaisesAnyException.cs (1)
29 public static RaisesAnyException ForNoEvent(Type expected) =>
Sdk\Exceptions\RaisesException.cs (3)
31 Type expected, 32 Type actual) => 56 public static RaisesException ForNoEvent(Type expected) =>
Sdk\Exceptions\ThrowsAnyException.cs (2)
40 Type expected, 59 public static ThrowsAnyException ForNoException(Type expected) =>
Sdk\Exceptions\ThrowsException.cs (3)
40 Type expected, 62 Type expected, 88 public static ThrowsException ForNoException(Type expected) =>
TypeAsserts.cs (5)
53 Type expectedType, 87 Type expectedType, 122 Type expectedType, 161 Type expectedType, 173 var actualType = @object.GetType();
xunit.console (5)
common\AssemblyResolution\AssemblyHelper.cs (1)
103public static IDisposable SubscribeResolveForAssembly(Type typeInAssembly, IMessageSink internalDiagnosticsMessageSink = null)
ConsoleRunner.cs (4)
139Type[] types = new Type[0]; 155foreach (var type in types) 161var ctor = type.GetConstructor(new Type[0]);
Xunit.NetCore.Extensions (12)
AssemblyFixtureSupport\AssemblyFixtureAttribute.cs (2)
13public AssemblyFixtureAttribute(Type fixtureType) 18public Type FixtureType { get; private set; }
AssemblyFixtureSupport\XunitTestAssemblyRunnerWithAssemblyFixture.cs (2)
18private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>();
AssemblyFixtureSupport\XunitTestClassRunnerWithAssemblyFixture.cs (3)
18private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>(); 25CancellationTokenSource cancellationTokenSource, IDictionary<Type, object> collectionFixtureMappings)
AssemblyFixtureSupport\XunitTestCollectionRunnerWithAssemblyFixture.cs (3)
17private readonly Dictionary<Type, object> assemblyFixtureMappings; 21public XunitTestCollectionRunnerWithAssemblyFixture(Dictionary<Type, object> assemblyFixtureMappings, 41var combinedFixtures = new Dictionary<Type, object>(assemblyFixtureMappings);
AssemblyFixtureSupport\XunitTestMethodRunnerWithAssemblyFixture.cs (2)
17private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>();