240 references to UnderlyingType
PresentationFramework (84)
System\Windows\Controls\ItemsPresenter.cs (1)
318
type = xType.
UnderlyingType
;
System\Windows\FrameworkTemplate.cs (1)
576
if (typeof(ResourceDictionary).IsAssignableFrom(type.
UnderlyingType
))
System\Windows\Markup\Baml2006\Baml2006Reader.cs (18)
882
optimizedStaticResource.KeyValue = xamlType.
UnderlyingType
;
1063
!_context.CurrentFrame.Member.Type.
UnderlyingType
.IsAssignableFrom(typeof(String)))
1091
_xamlNodesWriter.WriteValue(BamlSchemaContext.GetXamlType(typeId).
UnderlyingType
);
1373
if (_context.CurrentFrame.XamlType.
UnderlyingType
== typeof(EventSetter))
1378
Type currentType = eventProperty.DeclaringType.
UnderlyingType
;
1388
eventProperty.DeclaringType.
UnderlyingType
);
1532
converter = new EnumConverter(_context.CurrentFrame.XamlType.
UnderlyingType
);
1550
Type type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16()).
UnderlyingType
;
1590
Type propertyType = property.Type.
UnderlyingType
;
1683
param = BamlSchemaContext.GetXamlType(valueId).
UnderlyingType
;
1699
param = BamlSchemaContext.GetXamlType(valueId).
UnderlyingType
;
1794
typeExtensionType = BamlSchemaContext.GetXamlType(valueId).
UnderlyingType
;
1830
value = BamlSchemaContext.GetXamlType(valueId).
UnderlyingType
;
1865
_xamlNodesWriter.WriteValue(type.
UnderlyingType
);
1944
_xamlNodesWriter.WriteValue(xamlType.
UnderlyingType
);
2514
return Enum.ToObject(type.
UnderlyingType
, bytes).ToString();
2588
Debug.Assert(property.Type.
UnderlyingType
== typeof(DependencyProperty));
2667
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)
275
FrameworkPropertyMetadata metadata = prop.GetMetadata(stack.CurrentFrame.Type.
UnderlyingType
) as FrameworkPropertyMetadata;
385
if (typeof(DependencyObject).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
398
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
)));
318
OwnerTemplate.ChildTypeFromChildIndex.Add(childIndex, type.
UnderlyingType
);
412
if (xamlReader.Type.
UnderlyingType
== typeof(StaticResourceExtension))
432
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
433
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
460
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
461
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
485
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
486
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
502
if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
523
if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
552
if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
559
else if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
615
IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
617
IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
663
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
664
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
674
if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
)
729
if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
) ||
730
typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.
UnderlyingType
))
752
Debug.Assert(xamlReader.Type.
UnderlyingType
== typeof(StaticResourceExtension));
820
if (!typeof(FrameworkElement).IsAssignableFrom(parentType.
UnderlyingType
) &&
821
!typeof(FrameworkContentElement).IsAssignableFrom(parentType.
UnderlyingType
))
894
Type typeofValue = xamlReader.Type.
UnderlyingType
;
900
if (!IsTypeShareable(xamlReader.Type.
UnderlyingType
))
916
if (typeof(FrameworkTemplate).IsAssignableFrom(xamlReader.Type.
UnderlyingType
))
921
else if (typeof(Style).IsAssignableFrom(xamlReader.Type.
UnderlyingType
))
944
if (typeof(StaticResourceExtension).IsAssignableFrom(xamlReader.Type.
UnderlyingType
))
1458
return _schemaContext.GetXamlType(XamlTypeName.Parse(qualifiedTypeName, this)).
UnderlyingType
;
System.Xaml (102)
System\Xaml\Context\ObjectWriterContext.cs (3)
159
if (xamlType is null || xamlType.
UnderlyingType
is null)
166
return xamlType.
UnderlyingType
;
905
if (xamlType.
UnderlyingType
is not null)
System\Xaml\Context\ServiceProviderContext.cs (1)
390
return _xamlContext.GetDestinationType().
UnderlyingType
;
System\Xaml\Context\XamlParserContext.cs (2)
124
allowProtectedForType = rootObjectType.
UnderlyingType
;
299
allowProtectedForType = CurrentType.
UnderlyingType
;
System\Xaml\InfosetObjects\XamlObjectWriter.cs (4)
1443
typeof(IDictionary).IsAssignableFrom(dictionaryType.
UnderlyingType
) &&
1444
!IsBuiltInGenericDictionary(dictionaryType.
UnderlyingType
))
1864
if (itemType.
UnderlyingType
.IsAssignableFrom(type))
2238
Type rootInstanceType = (curInstance is not null) ? curInstance.GetType() : ctx.CurrentType.
UnderlyingType
;
System\Xaml\Parser\MeScanner.cs (2)
304
(xamlType.
UnderlyingType
is not null &&
305
KS.Eq(xamlType.
UnderlyingType
.Name, typeName.Name + KnownStrings.Extension)))
System\Xaml\Runtime\ClrObjectRuntime.cs (5)
58
throw CreateException(SR.Format(SR.NoConstructor, xamlType.
UnderlyingType
), ex);
67
throw CreateException(SR.Format(SR.ConstructorInvocation, xamlType.
UnderlyingType
), UnwrapTargetInvocationException(ex));
78
Type type = xamlType.
UnderlyingType
;
392
Type keyType = dictionaryType.KeyType.
UnderlyingType
;
393
Type itemType = dictionaryType.ItemType.
UnderlyingType
;
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
195
return CreateInstanceWithCtor(xamlType.
UnderlyingType
, args);
System\Xaml\Schema\TypeReflector.cs (2)
409
if (xamlType.
UnderlyingType
is null)
416
object obj = GetCustomAttribute(typeof(XAML3.NameScopePropertyAttribute), xamlType.
UnderlyingType
);
System\Xaml\Schema\XamlMemberInvoker.cs (1)
121
args = new Type[] { _member.TargetType.
UnderlyingType
?? typeof(object) };
System\Xaml\Schema\XamlNamespace.cs (3)
108
Type openType = openXamlType?.
UnderlyingType
;
160
Debug.Assert(typeArgs[n].
UnderlyingType
is not null);
162
clrTypeArgs[n] = typeArgs[n].
UnderlyingType
;
System\Xaml\Schema\XamlTypeInvoker.cs (8)
129
if (!_xamlType.
UnderlyingType
.IsValueType && (arguments is null || arguments.Length == 0))
138
return Activator.CreateInstance(_xamlType.
UnderlyingType
, arguments);
171
_xamlType.
UnderlyingType
, type.
UnderlyingType
);
235
Type type = _xamlType.
UnderlyingType
.UnderlyingSystemType;
245
get { return _xamlType is null || _xamlType.
UnderlyingType
is null; }
275
object inst = FormatterServices.GetUninitializedObject(type._xamlType.
UnderlyingType
);
309
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)
1658
if ((potentialProperty.Type.
UnderlyingType
== paraminfo.ParameterType) &&
1698
if (member is null && !valueXamlType.
UnderlyingType
.IsValueType)
1716
if (((MemberMarkupInfo)property).IsFactoryMethod && !xamlType.
UnderlyingType
.IsNested)
1725
if (xamlType.
UnderlyingType
.IsNested)
2118
property.Type.
UnderlyingType
== parameter.ParameterType)
3247
if (member.DeclaringType.
UnderlyingType
== baseDeclaringType)
3270
if (baseType.
UnderlyingType
== baseDeclaringType)
System\Xaml\XamlSchemaContext.cs (3)
323
if (typeArg.
UnderlyingType
is null)
340
result = GetXamlType(result.
UnderlyingType
);
924
Type clrType = type.
UnderlyingType
;
System\Xaml\XamlType.cs (54)
439
Type baseUnderlyingType = xamlType.
UnderlyingType
;
443
Type curUnderlyingType = curType.
UnderlyingType
;
519
if (ItemType is null ||
UnderlyingType
is null)
527
if (
UnderlyingType
is not null && ItemType.
UnderlyingType
is not null)
530
GetIsReadOnlyMethod(
UnderlyingType
, ItemType.
UnderlyingType
);
573
if (
UnderlyingType
is null)
582
_reflector.AddMethod = CollectionReflector.LookupAddMethod(
UnderlyingType
, collectionKind);
593
if (GetCollectionKind() == XamlCollectionKind.None ||
UnderlyingType
is null)
601
_reflector.GetEnumeratorMethod = CollectionReflector.GetEnumeratorMethod(
UnderlyingType
);
628
Type underlyingType =
UnderlyingType
;
648
if (
UnderlyingType
is null)
655
return
UnderlyingType
.GetConstructors();
664
if (
UnderlyingType
is null)
750
Type underlyingType =
UnderlyingType
;
766
if (
UnderlyingType
is null)
772
XamlCollectionKind result = CollectionReflector.LookupCollectionKind(
UnderlyingType
, out addMethod);
783
Type underlyingType =
UnderlyingType
;
880
Type underlyingType =
UnderlyingType
;
919
return (
UnderlyingType
is not null) ? new XamlTypeInvoker(this) : null;
934
if (
UnderlyingType
is not null)
936
return !
UnderlyingType
.IsValueType || IsNullableGeneric();
949
return
UnderlyingType
is null;
988
else if (
UnderlyingType
is null && BaseType is not null)
1012
else if (
UnderlyingType
is not null)
1014
if (
UnderlyingType
.IsArray)
1016
result =
UnderlyingType
.GetElementType();
1050
if (
UnderlyingType
is null)
1061
if (
UnderlyingType
is null)
1098
if (
UnderlyingType
is null)
1135
if (
UnderlyingType
is null)
1164
if (
UnderlyingType
is null)
1191
Type underlyingType =
UnderlyingType
;
1251
Type underlyingType =
UnderlyingType
;
1298
Type underlyingType =
UnderlyingType
;
1362
if (
UnderlyingType
is not null)
1373
typeof(EventHandler<XamlSetMarkupExtensionEventArgs>),
UnderlyingType
, methodName);
1387
if (
UnderlyingType
is not null)
1398
typeof(EventHandler<XamlSetTypeConverterEventArgs>),
UnderlyingType
, methodName);
1496
reflector = new TypeReflector(
UnderlyingType
);
1553
foreach (ConstructorInfo ctor in
UnderlyingType
.GetConstructors(ConstructorBindingFlags))
1642
return
UnderlyingType
is not null
1643
&& (KS.Eq(
UnderlyingType
.Name, KnownStrings.NullableOfT)
1644
&&
UnderlyingType
.Assembly == typeof(Nullable<>).Assembly
1645
&&
UnderlyingType
.Namespace == typeof(Nullable<>).Namespace);
1650
if (
UnderlyingType
is null)
1687
if (
UnderlyingType
== XamlLanguage.Type.
UnderlyingType
)
1713
throw new XamlSchemaException(SR.Format(SR.MarkupExtensionWithDuplicateArity,
UnderlyingType
, typeVector.Length));
1862
else if (
UnderlyingType
is not null)
1865
return
UnderlyingType
.GetHashCode() ^ 8;
1922
return xamlType1.
UnderlyingType
== xamlType2.
UnderlyingType
;
System\Xaml\XamlXmlWriter.cs (3)
1927
Type objectClrType = objectXamlType.
UnderlyingType
;
1952
if ((potentialProperty.Type.
UnderlyingType
== paraminfo.ParameterType) &&
1992
Type underlyingType = xamlType.
UnderlyingType
;
System.Xaml.Tests (54)
System\Xaml\XamlLanguageTests.cs (50)
34
Assert.Equal(typeof(ArrayExtension), type.
UnderlyingType
);
45
Assert.Equal(typeof(MemberDefinition), type.
UnderlyingType
);
56
Assert.Equal(typeof(NullExtension), type.
UnderlyingType
);
67
Assert.Equal(typeof(PropertyDefinition), type.
UnderlyingType
);
78
Assert.Equal(typeof(Reference), type.
UnderlyingType
);
89
Assert.Equal(typeof(StaticExtension), type.
UnderlyingType
);
100
Assert.Equal(typeof(TypeExtension), type.
UnderlyingType
);
111
Assert.Equal(typeof(string), type.
UnderlyingType
);
122
Assert.Equal(typeof(double), type.
UnderlyingType
);
133
Assert.Equal(typeof(int), type.
UnderlyingType
);
144
Assert.Equal(typeof(bool), type.
UnderlyingType
);
155
Assert.Equal(typeof(XData), type.
UnderlyingType
);
166
Assert.Equal(typeof(object), type.
UnderlyingType
);
177
Assert.Equal(typeof(char), type.
UnderlyingType
);
188
Assert.Equal(typeof(float), type.
UnderlyingType
);
199
Assert.Equal(typeof(byte), type.
UnderlyingType
);
210
Assert.Equal(typeof(short), type.
UnderlyingType
);
221
Assert.Equal(typeof(long), type.
UnderlyingType
);
232
Assert.Equal(typeof(decimal), type.
UnderlyingType
);
243
Assert.Equal(typeof(Uri), type.
UnderlyingType
);
254
Assert.Equal(typeof(TimeSpan), type.
UnderlyingType
);
274
Assert.Equal(typeof(List<object>), directive.Type.
UnderlyingType
);
275
Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.
UnderlyingType
));
287
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
300
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
313
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
326
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
339
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
352
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
365
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
378
Assert.Equal(typeof(List<object>), directive.Type.
UnderlyingType
);
379
Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.
UnderlyingType
));
391
Assert.Equal(typeof(object), directive.Type.
UnderlyingType
);
404
Assert.Equal(typeof(object), directive.Type.
UnderlyingType
);
417
Assert.Equal(typeof(List<MemberDefinition>), directive.Type.
UnderlyingType
);
418
Assert.Equal(new Type[] { typeof(MemberDefinition) }, directive.Type.TypeArguments.Select(t => t.
UnderlyingType
));
430
Assert.Equal(typeof(List<Attribute>), directive.Type.
UnderlyingType
);
431
Assert.Equal(new Type[] { typeof(Attribute) }, directive.Type.TypeArguments.Select(t => t.
UnderlyingType
));
443
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
456
Assert.Equal(typeof(List<object>), directive.Type.
UnderlyingType
);
457
Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.
UnderlyingType
));
469
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
482
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
495
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
508
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
521
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
534
Assert.Equal(typeof(object), directive.Type.
UnderlyingType
);
547
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
560
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
573
Assert.Equal(typeof(string), directive.Type.
UnderlyingType
);
System\Xaml\XamlSchemaContextTests.cs (1)
1001
Assert.Equal(underlyingType, type.
UnderlyingType
);
System\Xaml\XamlTypeTests.cs (3)
4431
Assert.Null(type.
UnderlyingType
);
4439
Assert.Equal(typeof(int), type.
UnderlyingType
);
4450
Assert.Equal(typeof(int), type.
UnderlyingType
);