22 references to TryGetAttribute
System.Windows.Forms (6)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
2151if (!TypeDescriptorHelper.TryGetAttribute(components[0], out PropertyTabAttribute? tabAttribute)) 2169if (!TypeDescriptorHelper.TryGetAttribute(components[i], out tabAttribute))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1282forceReadOnly = TypeDescriptorHelper.TryGetAttribute(value, out ReadOnlyAttribute? readOnlyAttribute)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.cs (1)
43if ((TypeDescriptorHelper.TryGetAttribute(target, out ReadOnlyAttribute? readOnlyAttribute)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (2)
126if ((TypeDescriptorHelper.TryGetAttribute(Target, out ReadOnlyAttribute? readOnlyAttribute) 152if (TypeDescriptorHelper.TryGetAttribute(Target, out HelpKeywordAttribute? helpAttribute)
System.Windows.Forms.Design (16)
System\ComponentModel\Design\CollectionEditor.cs (1)
61if (TypeDescriptorHelper.TryGetAttribute(component, out InheritanceAttribute? attribute)
System\ComponentModel\Design\DesignerHost.cs (1)
1001if (TypeDescriptorHelper.TryGetAttribute(component, out InheritanceAttribute? ia) && ia.InheritanceLevel != InheritanceLevel.NotInherited)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (2)
491if (TypeDescriptorHelper.TryGetAttribute(o, out InheritanceAttribute? ia)) 573if (TypeDescriptorHelper.TryGetAttribute(o, out InheritanceAttribute? ia))
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (1)
120if (TypeDescriptorHelper.TryGetAttribute(value, out InheritanceAttribute? inheritanceAttribute))
System\ComponentModel\Design\Serialization\ResourcePropertyMemberCodeDomSerializer.cs (1)
110if (!manager.TryGetContext(out InheritanceAttribute? inheritance) && !TypeDescriptorHelper.TryGetAttribute(value, out inheritance))
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (3)
101if (TypeDescriptorHelper.TryGetAttribute(control, out InheritanceAttribute? inheritanceAttribute) 132if (TypeDescriptorHelper.TryGetAttribute(control, out InheritanceAttribute? inheritanceAttribute) 163if (TypeDescriptorHelper.TryGetAttribute(value, out InheritanceAttribute? inheritanceAttribute))
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1220if (TypeDescriptorHelper.TryGetAttribute(column, out ToolboxBitmapAttribute? attr))
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (2)
34isTargetInherited = TypeDescriptorHelper.TryGetAttribute(comp, out InheritanceAttribute? ia) && ia.InheritanceLevel == InheritanceLevel.Inherited; 43if (TypeDescriptorHelper.TryGetAttribute(o, out InheritanceAttribute? ia))
System\Windows\Forms\Design\TableLayoutPanelCodeDomSerializer.cs (1)
46if (!TypeDescriptorHelper.TryGetAttribute(panel, out InheritanceAttribute? ia) || ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\ToolStripActionList.cs (2)
37if (!TypeDescriptorHelper.TryGetAttribute(_toolStrip, out InheritanceAttribute? ia) || ia.InheritanceLevel == InheritanceLevel.NotInherited) 48!TypeDescriptorHelper.TryGetAttribute(_toolStrip, out InheritanceAttribute? ia)
System\Windows\Forms\Design\ToolStripCodeDomSerializer.cs (1)
28if (TypeDescriptorHelper.TryGetAttribute(item, out InheritanceAttribute? ia) && ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly)