186 references to UnderlyingType
PresentationFramework (84)
System\Windows\Controls\ItemsPresenter.cs (1)
321
type = xType.
UnderlyingType
;
System\Windows\FrameworkTemplate.cs (1)
579
if (typeof(ResourceDictionary).IsAssignableFrom(type.
UnderlyingType
))
System\Windows\Markup\Baml2006\Baml2006Reader.cs (18)
879
optimizedStaticResource.KeyValue = xamlType.
UnderlyingType
;
1058
!_context.CurrentFrame.Member.Type.
UnderlyingType
.IsAssignableFrom(typeof(String)))
1086
_xamlNodesWriter.WriteValue(BamlSchemaContext.GetXamlType(typeId).
UnderlyingType
);
1366
if (_context.CurrentFrame.XamlType.
UnderlyingType
== typeof(EventSetter))
1371
Type currentType = eventProperty.DeclaringType.
UnderlyingType
;
1381
eventProperty.DeclaringType.
UnderlyingType
);
1525
converter = new EnumConverter(_context.CurrentFrame.XamlType.
UnderlyingType
);
1543
Type type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16()).
UnderlyingType
;
1583
Type propertyType = property.Type.
UnderlyingType
;
1676
param = BamlSchemaContext.GetXamlType(valueId).
UnderlyingType
;
1692
param = BamlSchemaContext.GetXamlType(valueId).
UnderlyingType
;
1785
typeExtensionType = BamlSchemaContext.GetXamlType(valueId).
UnderlyingType
;
1821
value = BamlSchemaContext.GetXamlType(valueId).
UnderlyingType
;
1856
_xamlNodesWriter.WriteValue(type.
UnderlyingType
);
1935
_xamlNodesWriter.WriteValue(xamlType.
UnderlyingType
);
2516
return Enum.ToObject(type.
UnderlyingType
, bytes).ToString();
2590
Debug.Assert(property.Type.
UnderlyingType
== typeof(DependencyProperty));
2669
memberType = BamlSchemaContext.GetPropertyDeclaringType(valueId).
UnderlyingType
;
System\Windows\Markup\Baml2006\Baml2006ReaderInternal.cs (1)
49
property.DeclaringType.
UnderlyingType
== typeof(System.Windows.ResourceDictionary) &&
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
152
return xamlType.
UnderlyingType
;
System\Windows\Markup\Baml2006\WpfKnownType.cs (3)
360
return
UnderlyingType
.GetCustomAttributes(inherit);
378
return
UnderlyingType
.GetCustomAttributes(attributeType, inherit);
418
return
UnderlyingType
.IsDefined(attributeType, inherit);
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (4)
137
_masterTypeTable.Add(bamlType.
UnderlyingType
, bamlType);
222
if (xamlType != null && xamlType.
UnderlyingType
== type)
228
if (xamlType != null && xamlType.
UnderlyingType
== type)
312
return xamlType.
UnderlyingType
;
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (1)
31
if (xType == null || xType.
UnderlyingType
!= type)
System\Windows\Markup\Baml2006\WpfXamlType.cs (12)
95
if (
UnderlyingType
== typeof(ResourceDictionary))
99
else if (typeof(ResourceDictionary).IsAssignableFrom(
UnderlyingType
))
101
InterfaceMapping map =
UnderlyingType
.GetInterfaceMap(typeof(System.Windows.Markup.INameScope));
226
name,
UnderlyingType
);
297
if ((property = DependencyProperty.FromName(name, this.
UnderlyingType
)) != null)
483
if (
UnderlyingType
.IsArray)
487
if (typeof(IDictionary).IsAssignableFrom(
UnderlyingType
))
491
if (typeof(IList).IsAssignableFrom(
UnderlyingType
))
496
if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(
UnderlyingType
) ||
497
typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(
UnderlyingType
))
503
if (typeof(ICollection<System.Windows.Data.XmlNamespaceMapping>).IsAssignableFrom(
UnderlyingType
)
522
return typeof(System.Windows.Data.XmlNamespaceMappingCollection).IsAssignableFrom(
UnderlyingType
);
System\Windows\Markup\DependencyPropertyConverter.cs (2)
127
type = schemaContext.GetXamlType(reader.ReadInt16()).
UnderlyingType
;
255
return templateHolder.GetTypeForName(target).
UnderlyingType
;
System\Windows\Markup\RestrictiveXamlXmlReader.cs (1)
105
if ((NodeType == System.Xaml.XamlNodeType.StartObject && !IsAllowedType(Type.
UnderlyingType
)) ||
System\Windows\Markup\SetterTriggerConditionValueConverter.cs (3)
117
if (xamlProperty.Type.
UnderlyingType
.IsEnum && schemaContext is Baml2006.Baml2006SchemaContext)
119
typeConverter = XamlReader.BamlSharedSchemaContext.GetTypeConverter(xamlProperty.Type.
UnderlyingType
);
145
if (xamlProperty != null && xamlProperty.Type.
UnderlyingType
== typeof(Boolean))
System\Windows\Markup\WpfXamlLoader.cs (3)
278
FrameworkPropertyMetadata metadata = prop.GetMetadata(stack.CurrentFrame.Type.
UnderlyingType
) as FrameworkPropertyMetadata;
388
if (typeof(DependencyObject).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
401
typeof(Style).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
379
return result == null || result.IsPublic ? result : GetInternalType(result.
UnderlyingType
, result);
System\Windows\TemplateContent.cs (32)
123
(typeof(FrameworkTemplate).IsAssignableFrom(CurrentFrame.Type.
UnderlyingType
) ||
124
typeof(Style).IsAssignableFrom(CurrentFrame.Type.
UnderlyingType
)));
148
(typeof(FrameworkTemplate).IsAssignableFrom(CurrentFrame.Type.
UnderlyingType
) ||
149
typeof(Style).IsAssignableFrom(CurrentFrame.Type.
UnderlyingType
)));
316
OwnerTemplate.ChildTypeFromChildIndex.Add(childIndex, type.
UnderlyingType
);
413
if (xamlReader.Type.
UnderlyingType
== typeof(StaticResourceExtension))
433
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
434
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
461
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
462
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
486
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
487
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
503
if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
524
if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
553
if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
560
else if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
616
IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
618
IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
664
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
665
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
675
if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
)
730
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
731
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
753
Debug.Assert(xamlReader.Type.
UnderlyingType
== typeof(StaticResourceExtension));
821
if (!typeof(FrameworkElement).IsAssignableFrom(parentType.
UnderlyingType
) &&
822
!typeof(FrameworkContentElement).IsAssignableFrom(parentType.
UnderlyingType
))
895
Type typeofValue = xamlReader.Type.
UnderlyingType
;
901
if (!IsTypeShareable(xamlReader.Type.
UnderlyingType
))
917
if (typeof(FrameworkTemplate).IsAssignableFrom(xamlReader.Type.
UnderlyingType
))
922
else if (typeof(Style).IsAssignableFrom(xamlReader.Type.
UnderlyingType
))
945
if (typeof(StaticResourceExtension).IsAssignableFrom(xamlReader.Type.
UnderlyingType
))
1448
return _schemaContext.GetXamlType(XamlTypeName.Parse(qualifiedTypeName, this)).
UnderlyingType
;
System.Xaml (102)
System\Xaml\Context\ObjectWriterContext.cs (3)
155
if (xamlType is null || xamlType.
UnderlyingType
is null)
161
return xamlType.
UnderlyingType
;
889
if (xamlType.
UnderlyingType
is not null)
System\Xaml\Context\ServiceProviderContext.cs (1)
388
return _xamlContext.GetDestinationType().
UnderlyingType
;
System\Xaml\Context\XamlParserContext.cs (2)
120
allowProtectedForType = rootObjectType.
UnderlyingType
;
295
allowProtectedForType = CurrentType.
UnderlyingType
;
System\Xaml\InfosetObjects\XamlObjectWriter.cs (4)
1403
typeof(IDictionary).IsAssignableFrom(dictionaryType.
UnderlyingType
) &&
1404
!IsBuiltInGenericDictionary(dictionaryType.
UnderlyingType
))
1816
if (itemType.
UnderlyingType
.IsAssignableFrom(type))
2176
Type rootInstanceType = (curInstance is not null) ? curInstance.GetType() : ctx.CurrentType.
UnderlyingType
;
System\Xaml\Parser\MeScanner.cs (2)
298
(xamlType.
UnderlyingType
is not null &&
299
KS.Eq(xamlType.
UnderlyingType
.Name, typeName.Name + KnownStrings.Extension)))
System\Xaml\Runtime\ClrObjectRuntime.cs (5)
55
throw CreateException(SR.Format(SR.NoConstructor, xamlType.
UnderlyingType
), ex);
63
throw CreateException(SR.Format(SR.ConstructorInvocation, xamlType.
UnderlyingType
), UnwrapTargetInvocationException(ex));
74
Type type = xamlType.
UnderlyingType
;
372
Type keyType = dictionaryType.KeyType.
UnderlyingType
;
373
Type itemType = dictionaryType.ItemType.
UnderlyingType
;
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
188
return CreateInstanceWithCtor(xamlType.
UnderlyingType
, args);
System\Xaml\Schema\TypeReflector.cs (2)
395
if (xamlType.
UnderlyingType
is null)
401
object obj = GetCustomAttribute(typeof(XAML3.NameScopePropertyAttribute), xamlType.
UnderlyingType
);
System\Xaml\Schema\XamlMemberInvoker.cs (1)
119
args = new Type[] { _member.TargetType.
UnderlyingType
?? typeof(object) };
System\Xaml\Schema\XamlNamespace.cs (3)
107
Type openType = openXamlType?.
UnderlyingType
;
159
Debug.Assert(typeArgs[n].
UnderlyingType
is not null);
161
clrTypeArgs[n] = typeArgs[n].
UnderlyingType
;
System\Xaml\Schema\XamlTypeInvoker.cs (8)
124
if (!_xamlType.
UnderlyingType
.IsValueType && (arguments is null || arguments.Length == 0))
132
return Activator.CreateInstance(_xamlType.
UnderlyingType
, arguments);
165
_xamlType.
UnderlyingType
, type.
UnderlyingType
);
227
Type type = _xamlType.
UnderlyingType
.UnderlyingSystemType;
236
get { return _xamlType is null || _xamlType.
UnderlyingType
is null; }
266
object inst = FormatterServices.GetUninitializedObject(type._xamlType.
UnderlyingType
);
297
Type underlyingType = type._xamlType.
UnderlyingType
.UnderlyingSystemType;
System\Xaml\Schema\XamlValueConverter.cs (3)
74
TargetType.
UnderlyingType
is not null && TargetType.
UnderlyingType
.IsEnum)
76
return (TConverterBase)(object)new EnumConverter(TargetType.
UnderlyingType
);
System\Xaml\XamlObjectReader.cs (7)
1649
if ((potentialProperty.Type.
UnderlyingType
== paraminfo.ParameterType) &&
1689
if (member is null && !valueXamlType.
UnderlyingType
.IsValueType)
1706
if (((MemberMarkupInfo)property).IsFactoryMethod && !xamlType.
UnderlyingType
.IsNested)
1715
if (xamlType.
UnderlyingType
.IsNested)
2105
property.Type.
UnderlyingType
== parameter.ParameterType)
3220
if (member.DeclaringType.
UnderlyingType
== baseDeclaringType)
3241
if (baseType.
UnderlyingType
== baseDeclaringType)
System\Xaml\XamlSchemaContext.cs (3)
306
if (typeArg.
UnderlyingType
is null)
323
result = GetXamlType(result.
UnderlyingType
);
890
Type clrType = type.
UnderlyingType
;
System\Xaml\XamlType.cs (54)
415
Type baseUnderlyingType = xamlType.
UnderlyingType
;
419
Type curUnderlyingType = curType.
UnderlyingType
;
490
if (ItemType is null ||
UnderlyingType
is null)
498
if (
UnderlyingType
is not null && ItemType.
UnderlyingType
is not null)
501
GetIsReadOnlyMethod(
UnderlyingType
, ItemType.
UnderlyingType
);
541
if (
UnderlyingType
is null)
549
_reflector.AddMethod = CollectionReflector.LookupAddMethod(
UnderlyingType
, collectionKind);
559
if (GetCollectionKind() == XamlCollectionKind.None ||
UnderlyingType
is null)
566
_reflector.GetEnumeratorMethod = CollectionReflector.GetEnumeratorMethod(
UnderlyingType
);
591
Type underlyingType =
UnderlyingType
;
610
if (
UnderlyingType
is null)
616
return
UnderlyingType
.GetConstructors();
624
if (
UnderlyingType
is null)
705
Type underlyingType =
UnderlyingType
;
719
if (
UnderlyingType
is null)
725
XamlCollectionKind result = CollectionReflector.LookupCollectionKind(
UnderlyingType
, out addMethod);
735
Type underlyingType =
UnderlyingType
;
825
Type underlyingType =
UnderlyingType
;
859
return (
UnderlyingType
is not null) ? new XamlTypeInvoker(this) : null;
874
if (
UnderlyingType
is not null)
876
return !
UnderlyingType
.IsValueType || IsNullableGeneric();
887
return
UnderlyingType
is null;
923
else if (
UnderlyingType
is null && BaseType is not null)
946
else if (
UnderlyingType
is not null)
948
if (
UnderlyingType
.IsArray)
950
result =
UnderlyingType
.GetElementType();
981
if (
UnderlyingType
is null)
991
if (
UnderlyingType
is null)
1026
if (
UnderlyingType
is null)
1059
if (
UnderlyingType
is null)
1085
if (
UnderlyingType
is null)
1111
Type underlyingType =
UnderlyingType
;
1167
Type underlyingType =
UnderlyingType
;
1211
Type underlyingType =
UnderlyingType
;
1269
if (
UnderlyingType
is not null)
1279
typeof(EventHandler<XamlSetMarkupExtensionEventArgs>),
UnderlyingType
, methodName);
1291
if (
UnderlyingType
is not null)
1301
typeof(EventHandler<XamlSetTypeConverterEventArgs>),
UnderlyingType
, methodName);
1392
reflector = new TypeReflector(
UnderlyingType
);
1445
foreach (ConstructorInfo ctor in
UnderlyingType
.GetConstructors(ConstructorBindingFlags))
1525
return
UnderlyingType
is not null
1526
&& (KS.Eq(
UnderlyingType
.Name, KnownStrings.NullableOfT)
1527
&&
UnderlyingType
.Assembly == typeof(Nullable<>).Assembly
1528
&&
UnderlyingType
.Namespace == typeof(Nullable<>).Namespace);
1533
if (
UnderlyingType
is null)
1568
if (
UnderlyingType
== XamlLanguage.Type.
UnderlyingType
)
1593
throw new XamlSchemaException(SR.Format(SR.MarkupExtensionWithDuplicateArity,
UnderlyingType
, typeVector.Length));
1735
else if (
UnderlyingType
is not null)
1738
return
UnderlyingType
.GetHashCode() ^ 8;
1791
return xamlType1.
UnderlyingType
== xamlType2.
UnderlyingType
;
System\Xaml\XamlXmlWriter.cs (3)
1888
Type objectClrType = objectXamlType.
UnderlyingType
;
1913
if ((potentialProperty.Type.
UnderlyingType
== paraminfo.ParameterType) &&
1952
Type underlyingType = xamlType.
UnderlyingType
;