155 references to Type
PresentationFramework (16)
System\Windows\FrameworkTemplate.cs (1)
1011Names.CurrentFrame.Type = Names.PreviousFrame.Property.Type;
System\Windows\Markup\Baml2006\Baml2006Reader.cs (6)
1061if (_context.CurrentFrame.Member.Type != null && 1062!_context.CurrentFrame.Member.Type.UnderlyingType.IsAssignableFrom(typeof(String))) 1589Type propertyType = property.Type.UnderlyingType; 2412XamlType parentPropertyType = parentProperty.Type; 2477EmitGoItemsPreamble(_context.CurrentFrame.Member.Type); 2587Debug.Assert(property.Type.UnderlyingType == typeof(DependencyProperty));
System\Windows\Markup\SetterTriggerConditionValueConverter.cs (4)
116if (xamlProperty.Type.UnderlyingType.IsEnum && schemaContext is Baml2006.Baml2006SchemaContext) 118typeConverter = XamlReader.BamlSharedSchemaContext.GetTypeConverter(xamlProperty.Type.UnderlyingType); 126typeConverter = xamlProperty.Type.TypeConverter; 144if (xamlProperty != null && xamlProperty.Type.UnderlyingType == typeof(Boolean))
System\Windows\Markup\WpfXamlLoader.cs (1)
231stack.CurrentFrame.Type = stack.PreviousFrame.Property.Type;
System\Windows\TemplateContent.cs (4)
470XamlType type = stack.CurrentFrame.Property.Type; 862else if (xamlProperty.Type.TypeConverter != null) 864converter = xamlProperty.Type.TypeConverter.ConverterInstance; 950XamlType type = frames.CurrentFrame.Property.Type;
System.Xaml (63)
System\Xaml\Context\ObjectWriterContext.cs (1)
304return frame.Member.Type;
System\Xaml\Context\XamlParserContext.cs (2)
134if (member.IsReadOnly || (member.Type is not null && member.Type.IsUsableAsReadOnly))
System\Xaml\InfosetObjects\XamlObjectWriter.cs (13)
301_context.CurrentType = parentProperty.Type; 305if (parentProperty.Type.IsCollection || parentProperty.Type.IsDictionary) 676XamlType propertyXamlType = property.Type; 679_context.CurrentCollection = Runtime.CreateInstance(property.Type, null); 777if (!property.Type.IsMarkupExtension || !valueXamlType.CanAssignTo(property.Type)) 789if (valueXamlType == XamlLanguage.String || !valueXamlType.CanAssignTo(property.Type)) 871XamlType parentXamlType = parentProperty.Type; 1335XamlType propertyType = property.Type; 1609if (prop.Type.IsXData) 1754ctx.CurrentType = ctx.ParentProperty.Type; 2008XamlType ppXamlType = parentProperty.Type;
System\Xaml\Parser\XamlPullParser.cs (9)
879XamlType memberXamlType = member.Type; 1026XamlType propertyType = currentProperty.Type; 1055propertyType = currentProperty.Type; 1139XamlType collectionType = _context.CurrentMember == XamlLanguage.Items ? _context.CurrentType : _context.CurrentMember.Type; 1159if (prop is not null && prop.Type is not null && prop.Type.IsWhitespaceSignificantCollection) 1191if (prop.Type == XamlLanguage.String) 1196if (prop.Type.IsWhitespaceSignificantCollection) 1231XamlType propertyType = property.Type;
System\Xaml\Runtime\ClrObjectRuntime.cs (1)
252value = CreateInstance(property.Type, null);
System\Xaml\Schema\TypeReflector.cs (1)
1019if (member.IsReadOnly && !member.Type.IsUsableAsReadOnly)
System\Xaml\Schema\XamlDirective.cs (1)
187return base.Type;
System\Xaml\XamlMarkupExtensionWriter.cs (2)
399(property.IsDirective && (property.Type.IsCollection || property.Type.IsDictionary)))
System\Xaml\XamlMember.cs (6)
557if (Type is not null) 559return Type.DeferringLoader; 710if (result is null && Type is not null) 712result = Type.TypeConverter; 730if (result is null && Type is not null) 732result = Type.ValueSerializer;
System\Xaml\XamlObjectReader.cs (12)
375if (attachedProperty.Type.IsDictionary) 380if (attachedProperty.Type.IsCollection) 510if (property.Type.IsXData) 517if (property.Type.IsDictionary) 522if (property.Type.IsCollection) 533var itemsInfo = ForSequenceItems(source, isAttachable ? null : property, property.Type, context, allowReadOnly: false); 561var itemsInfo = ForDictionaryItems(source, isAttachable ? null : property, property.Type, context); 668var memberType = memberInfo.XamlNode.Member.Type; 1603return XamlLanguage.String.CanAssignTo(property.Type); 1657if ((potentialProperty.Type.UnderlyingType == paraminfo.ParameterType) && 2117property.Type.UnderlyingType == parameter.ParameterType) 2324(context.IsPropertyWriteVisible(property) || property.Type.IsUsableAsReadOnly);
System\Xaml\XamlType.cs (5)
736XamlType contentType = contentWrapper.ContentProperty.Type; 1076if (!member.IsReadOnly || member.Type.IsUsableAsReadOnly) 1115if (!skipReadOnlyCheck && result.IsReadOnly && !result.Type.IsUsableAsReadOnly) 1144if (result.IsReadOnly && !result.Type.IsUsableAsReadOnly) 1667if (excludedMember.IsReadOnly && !excludedMember.Type.IsUsableAsReadOnly)
System\Xaml\XamlXmlWriter.cs (10)
152type = frame.Member.Type; 353containingXamlType = (enumerator.Current.Member is null) || enumerator.Current.Member.IsUnknown ? null : enumerator.Current.Member.Type; 910type = frame.Member.Type; 1198else if (property.IsDirective && (property.Type is not null && (property.Type.IsCollection || property.Type.IsDictionary))) 1396XamlType memberType = frame.Member.Type; 1703if (XamlLanguage.String.CanAssignTo(property.Type)) 1750if (XamlLanguage.String.CanAssignTo(property.Type) && !string.IsNullOrEmpty(value)) 1933if ((potentialProperty.Type.UnderlyingType == paraminfo.ParameterType) &&
System.Xaml.Tests (76)
System\Xaml\XamlDirectiveTests.cs (2)
33Assert.Equal(type, directive.Type); 68Assert.Equal(XamlLanguage.Object, directive.Type);
System\Xaml\XamlLanguageTests.cs (72)
273Assert.Equal("List", directive.Type.Name); 274Assert.Equal(typeof(List<object>), directive.Type.UnderlyingType); 275Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 286Assert.Equal("String", directive.Type.Name); 287Assert.Equal(typeof(string), directive.Type.UnderlyingType); 288Assert.Null(directive.Type.TypeArguments); 299Assert.Equal("String", directive.Type.Name); 300Assert.Equal(typeof(string), directive.Type.UnderlyingType); 301Assert.Null(directive.Type.TypeArguments); 312Assert.Equal("String", directive.Type.Name); 313Assert.Equal(typeof(string), directive.Type.UnderlyingType); 314Assert.Null(directive.Type.TypeArguments); 325Assert.Equal("String", directive.Type.Name); 326Assert.Equal(typeof(string), directive.Type.UnderlyingType); 327Assert.Null(directive.Type.TypeArguments); 338Assert.Equal("String", directive.Type.Name); 339Assert.Equal(typeof(string), directive.Type.UnderlyingType); 340Assert.Null(directive.Type.TypeArguments); 351Assert.Equal("String", directive.Type.Name); 352Assert.Equal(typeof(string), directive.Type.UnderlyingType); 353Assert.Null(directive.Type.TypeArguments); 364Assert.Equal("String", directive.Type.Name); 365Assert.Equal(typeof(string), directive.Type.UnderlyingType); 366Assert.Null(directive.Type.TypeArguments); 377Assert.Equal("List", directive.Type.Name); 378Assert.Equal(typeof(List<object>), directive.Type.UnderlyingType); 379Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 390Assert.Equal("Object", directive.Type.Name); 391Assert.Equal(typeof(object), directive.Type.UnderlyingType); 392Assert.Null(directive.Type.TypeArguments); 403Assert.Equal("Object", directive.Type.Name); 404Assert.Equal(typeof(object), directive.Type.UnderlyingType); 405Assert.Null(directive.Type.TypeArguments); 416Assert.Equal("List", directive.Type.Name); 417Assert.Equal(typeof(List<MemberDefinition>), directive.Type.UnderlyingType); 418Assert.Equal(new Type[] { typeof(MemberDefinition) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 429Assert.Equal("List", directive.Type.Name); 430Assert.Equal(typeof(List<Attribute>), directive.Type.UnderlyingType); 431Assert.Equal(new Type[] { typeof(Attribute) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 442Assert.Equal("String", directive.Type.Name); 443Assert.Equal(typeof(string), directive.Type.UnderlyingType); 444Assert.Null(directive.Type.TypeArguments); 455Assert.Equal("List", directive.Type.Name); 456Assert.Equal(typeof(List<object>), directive.Type.UnderlyingType); 457Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 468Assert.Equal("String", directive.Type.Name); 469Assert.Equal(typeof(string), directive.Type.UnderlyingType); 470Assert.Null(directive.Type.TypeArguments); 481Assert.Equal("String", directive.Type.Name); 482Assert.Equal(typeof(string), directive.Type.UnderlyingType); 483Assert.Null(directive.Type.TypeArguments); 494Assert.Equal("String", directive.Type.Name); 495Assert.Equal(typeof(string), directive.Type.UnderlyingType); 496Assert.Null(directive.Type.TypeArguments); 507Assert.Equal("String", directive.Type.Name); 508Assert.Equal(typeof(string), directive.Type.UnderlyingType); 509Assert.Null(directive.Type.TypeArguments); 520Assert.Equal("String", directive.Type.Name); 521Assert.Equal(typeof(string), directive.Type.UnderlyingType); 522Assert.Null(directive.Type.TypeArguments); 533Assert.Equal("Object", directive.Type.Name); 534Assert.Equal(typeof(object), directive.Type.UnderlyingType); 535Assert.Null(directive.Type.TypeArguments); 546Assert.Equal("String", directive.Type.Name); 547Assert.Equal(typeof(string), directive.Type.UnderlyingType); 548Assert.Null(directive.Type.TypeArguments); 559Assert.Equal("String", directive.Type.Name); 560Assert.Equal(typeof(string), directive.Type.UnderlyingType); 561Assert.Null(directive.Type.TypeArguments); 572Assert.Equal("String", directive.Type.Name); 573Assert.Equal(typeof(string), directive.Type.UnderlyingType); 574Assert.Null(directive.Type.TypeArguments);
System\Xaml\XamlMemberTests.cs (2)
1675Assert.Equal(expected ?? XamlLanguage.Object, member.Type); 1682Assert.Equal(XamlLanguage.Object, directive.Type);