44 instantiations of InheritanceAttribute
System.ComponentModel.TypeConverter (3)
System\ComponentModel\InheritanceAttribute.cs (3)
21public static readonly InheritanceAttribute Inherited = new InheritanceAttribute(InheritanceLevel.Inherited); 30public static readonly InheritanceAttribute InheritedReadOnly = new InheritanceAttribute(InheritanceLevel.InheritedReadOnly); 38public static readonly InheritanceAttribute NotInherited = new InheritanceAttribute(InheritanceLevel.NotInherited);
System.Windows.Forms.Design.Tests (41)
System\ComponentModel\Design\ArrayEditorTests.cs (5)
67yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 68yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 69yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 70yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 71yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\CollectionEditorTests.cs (5)
77yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 78yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 79yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 80yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 81yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\CollectionFormTests.cs (5)
465yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 466yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 467yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 468yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 469yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\ComponentDesignerTests.cs (2)
200yield return new object[] { new InheritanceAttribute(), 1, 1 }; 2407InheritanceAttribute attribute = new();
System\ComponentModel\Design\DesignerHostTests.cs (12)
384TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 388TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 392TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 455TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 459TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 463TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 2575TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 2579TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 2583TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 2645TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 2649TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 2653TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited));
System\ComponentModel\Design\SiteNestedContainerTests.cs (12)
288TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 292TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 296TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 364TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 368TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 372TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 711TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 715TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 719TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 776TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 780TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 784TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited));
244 references to InheritanceAttribute
netstandard (1)
netstandard.cs (1)
339[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InheritanceAttribute))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
325[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InheritanceAttribute))]
System.ComponentModel.TypeConverter (11)
System\ComponentModel\Container.cs (3)
232InheritanceAttribute inheritanceAttribute = (InheritanceAttribute)TypeDescriptor.GetAttributes(s.Component)[typeof(InheritanceAttribute)]!;
System\ComponentModel\Design\IInheritanceService.cs (2)
19/// value <see cref='System.ComponentModel.InheritanceAttribute.NotInherited'/>. 22InheritanceAttribute GetInheritanceAttribute(IComponent component);
System\ComponentModel\InheritanceAttribute.cs (6)
21public static readonly InheritanceAttribute Inherited = new InheritanceAttribute(InheritanceLevel.Inherited); 30public static readonly InheritanceAttribute InheritedReadOnly = new InheritanceAttribute(InheritanceLevel.InheritedReadOnly); 38public static readonly InheritanceAttribute NotInherited = new InheritanceAttribute(InheritanceLevel.NotInherited); 46public static readonly InheritanceAttribute Default = NotInherited; 87if (!(value is InheritanceAttribute)) 92InheritanceLevel valueLevel = ((InheritanceAttribute)value).InheritanceLevel;
System.Windows.Forms (6)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
371forceReadOnly |= TypeDescriptor.GetAttributes(value).Contains(InheritanceAttribute.InheritedReadOnly);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.cs (1)
45|| TypeDescriptor.GetAttributes(target).Contains(InheritanceAttribute.InheritedReadOnly))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
128|| TypeDescriptor.GetAttributes(Target).Contains(InheritanceAttribute.InheritedReadOnly))
System\Windows\Forms\DataBinding\Binding.cs (3)
495InheritanceAttribute? attr = (InheritanceAttribute?)TypeDescriptor.GetAttributes(BindableComponent)[typeof(InheritanceAttribute)];
System.Windows.Forms.Design (161)
System\ComponentModel\Design\CollectionEditor.cs (2)
61if (TypeDescriptorHelper.TryGetAttribute(component, out InheritanceAttribute? attribute) 319&& inheritanceService.GetInheritanceAttribute(component).Equals(InheritanceAttribute.InheritedReadOnly))
System\ComponentModel\Design\ComponentDesigner.cs (19)
15private InheritanceAttribute? _inheritanceAttribute; 63InheritanceAttribute? inheritanceAttribute = InheritanceAttribute; 64return inheritanceAttribute is not null && !inheritanceAttribute.Equals(InheritanceAttribute.NotInherited); 90protected virtual InheritanceAttribute? InheritanceAttribute 103_inheritanceAttribute = InheritanceAttribute.Default; 395InheritanceAttribute? inheritanceAttribute = InheritanceAttribute; 396if (isRoot || inheritanceAttribute is null || !inheritanceAttribute.Equals(InheritanceAttribute.NotInherited)) 405InheritanceAttribute? inheritanceAttribute = InheritanceAttribute; 406bool readOnlyInherit = inheritanceAttribute is not null && inheritanceAttribute.Equals(InheritanceAttribute.InheritedReadOnly); 446protected InheritanceAttribute? InvokeGetInheritanceAttribute(ComponentDesigner? toInvoke) 603if (attributes.Contains(typeof(InheritanceAttribute))) 605_inheritanceAttribute = attributes[typeof(InheritanceAttribute)] as InheritanceAttribute; 609InheritanceAttribute? inheritanceAttribute = InheritanceAttribute; 610if (inheritanceAttribute is not null && !inheritanceAttribute.Equals(InheritanceAttribute.NotInherited)) 612attributes[typeof(InheritanceAttribute)] = InheritanceAttribute; 627InheritanceAttribute? inheritanceAttribute = InheritanceAttribute; 628if (inheritanceAttribute is null || !inheritanceAttribute.Equals(InheritanceAttribute.InheritedReadOnly)) 656bool readOnlyInherit = InheritanceAttribute.InheritedReadOnly.Equals(InheritanceAttribute);
System\ComponentModel\Design\DesignerActionUI.cs (4)
171InheritanceAttribute? attribute = (InheritanceAttribute?)TypeDescriptor.GetAttributes(comp)[typeof(InheritanceAttribute)]; 172if (attribute == InheritanceAttribute.InheritedReadOnly)
System\ComponentModel\Design\DesignerHost.cs (2)
234&& !TypeDescriptor.GetAttributes(extenderComponent).Contains(InheritanceAttribute.InheritedReadOnly) 1004if (TypeDescriptorHelper.TryGetAttribute(component, out InheritanceAttribute? ia) && ia.InheritanceLevel != InheritanceLevel.NotInherited)
System\ComponentModel\Design\InheritanceService.cs (9)
16private Dictionary<IComponent, InheritanceAttribute> _inheritedComponents; 23private InheritanceAttribute? _addingAttribute; 151InheritanceAttribute attr; 177attr = InheritanceAttribute.InheritedReadOnly; 181attr = InheritanceAttribute.Inherited; 255public InheritanceAttribute GetInheritanceAttribute(IComponent component) 256=> _inheritedComponents.TryGetValue(component, out InheritanceAttribute? attr) 258: InheritanceAttribute.Default; 264_inheritedComponents[ce.Component!] = InheritanceAttribute.InheritedReadOnly;
System\ComponentModel\Design\MenuCommandService.cs (1)
200!TypeDescriptor.GetAttributes(selectedComponent).Contains(InheritanceAttribute.InheritedReadOnly))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersExtenderProvider.cs (2)
41if (!TypeDescriptor.GetAttributes(o)[typeof(InheritanceAttribute)]!.Equals(InheritanceAttribute.NotInherited))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (2)
43if (!attributes[typeof(InheritanceAttribute)]!.Equals(InheritanceAttribute.NotInherited))
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (4)
2145InheritanceAttribute? inheritance = (InheritanceAttribute?)GetAttributesHelper(manager, value)[typeof(InheritanceAttribute)]; 2147inheritance ??= InheritanceAttribute.NotInherited;
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (3)
411if (o is IComponent && TypeDescriptor.GetAttributes(o).Contains(InheritanceAttribute.InheritedReadOnly)) 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 (2)
110if (!manager.TryGetContext(out InheritanceAttribute? inheritance) && !TypeDescriptorHelper.TryGetAttribute(value, out inheritance)) 112inheritance = InheritanceAttribute.NotInherited;
System\ComponentModel\Design\ToolStripContainerActionList.cs (2)
163if (TypeDescriptor.GetAttributes(control)?[typeof(InheritanceAttribute)] is not InheritanceAttribute inheritanceAttribute
System\Windows\Forms\Design\CommandSet.cs (5)
2927if (!Equals(TypeDescriptor.GetAttributes(obj)[typeof(InheritanceAttribute)], InheritanceAttribute.NotInherited)) 3085InheritanceAttribute? attr = (InheritanceAttribute?)TypeDescriptor.GetAttributes(primarySelection)[typeof(InheritanceAttribute)];
System\Windows\Forms\Design\ComponentTray.cs (7)
730InheritanceAttribute attr = trayctl.InheritanceAttribute; 1510InheritanceAttribute attr = c.InheritanceAttribute; 1902private readonly InheritanceAttribute _inheritanceAttribute; 1949_inheritanceAttribute = (InheritanceAttribute)TypeDescriptor.GetAttributes(component)[typeof(InheritanceAttribute)]; 1966public InheritanceAttribute InheritanceAttribute 2320if (!InheritanceAttribute.NotInherited.Equals(_inheritanceAttribute))
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (7)
101if (TypeDescriptorHelper.TryGetAttribute(control, out InheritanceAttribute? inheritanceAttribute) 132if (TypeDescriptorHelper.TryGetAttribute(control, out InheritanceAttribute? inheritanceAttribute) 163if (TypeDescriptorHelper.TryGetAttribute(value, out InheritanceAttribute? inheritanceAttribute)) 243if (TypeDescriptor.GetAttributes(component).Contains(InheritanceAttribute.InheritedReadOnly)) 428InheritanceAttribute inheritanceAttribute = (InheritanceAttribute)TypeDescriptor.GetAttributes(child)[typeof(InheritanceAttribute)]!;
System\Windows\Forms\Design\ControlCommandSet.cs (2)
1320!TypeDescriptor.GetAttributes(obj)[typeof(InheritanceAttribute)].Equals(InheritanceAttribute.InheritedReadOnly))
System\Windows\Forms\Design\ControlDesigner.cs (3)
367protected override InheritanceAttribute? InheritanceAttribute 368=> IsRootDesigner ? InheritanceAttribute.Inherited : base.InheritanceAttribute; 745if (Locked || (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly))
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (1)
74TypeDescriptor.GetAttributes(_realCollection[i]).Contains(InheritanceAttribute.NotInherited))
System\Windows\Forms\Design\DataGridViewDesigner.cs (4)
154protected override InheritanceAttribute? InheritanceAttribute 158if ((base.InheritanceAttribute == InheritanceAttribute.Inherited) 159|| (base.InheritanceAttribute == InheritanceAttribute.InheritedReadOnly)) 161return InheritanceAttribute.InheritedReadOnly;
System\Windows\Forms\Design\DesignerExtenders.NameExtenderProvider.cs (2)
59if (!TypeDescriptor.GetAttributes(o)[typeof(InheritanceAttribute)]?.Equals(InheritanceAttribute.NotInherited) ?? false)
System\Windows\Forms\Design\DesignerExtenders.NameInheritedExtenderProvider.cs (2)
39if (!TypeDescriptor.GetAttributes(o)[typeof(InheritanceAttribute)]?.Equals(InheritanceAttribute.NotInherited) ?? false)
System\Windows\Forms\Design\DocumentDesigner.cs (1)
1384if (!InvokeGetInheritanceAttribute(designer).Equals(InheritanceAttribute.InheritedReadOnly))
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (5)
80TypeDescriptor.AddAttributes(child, InheritanceAttribute.InheritedReadOnly); 358protected override InheritanceAttribute InheritanceAttribute 362if ((base.InheritanceAttribute == InheritanceAttribute.Inherited) 363|| (base.InheritanceAttribute == InheritanceAttribute.InheritedReadOnly)) 365return InheritanceAttribute.InheritedReadOnly;
System\Windows\Forms\Design\OleDragDropHandler.cs (5)
476InheritanceAttribute attr = (InheritanceAttribute)TypeDescriptor.GetAttributes(components[i])[typeof(InheritanceAttribute)]!; 478if (!attr.Equals(InheritanceAttribute.NotInherited) && !attr.Equals(InheritanceAttribute.InheritedReadOnly))
System\Windows\Forms\Design\ParentControlDesigner.cs (15)
1038InheritanceAttribute != InheritanceAttribute.InheritedReadOnly && selectionType != GlyphSelectionType.NotSelected) 1525InheritanceAttribute attr = (InheritanceAttribute)TypeDescriptor.GetAttributes(comp)[typeof(InheritanceAttribute)]; 1526if (attr is not null && !attr.Equals(InheritanceAttribute.NotInherited) && !attr.Equals(InheritanceAttribute.InheritedReadOnly)) 1555if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly && draggedControl.Parent != Control) 1626if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly) 1713if (!InheritanceAttribute.Equals(InheritanceAttribute.InheritedReadOnly)) 2071if (_toolboxService is null || !_toolboxService.SetCursor() || InheritanceAttribute.Equals(InheritanceAttribute.InheritedReadOnly)) 2157InheritanceAttribute inheritanceAttribute = (InheritanceAttribute)TypeDescriptor.GetAttributes(control)[typeof(InheritanceAttribute)]; 2158if (inheritanceAttribute is not null && inheritanceAttribute == InheritanceAttribute.InheritedReadOnly) 2463return (!InheritanceAttribute.Equals(InheritanceAttribute.InheritedReadOnly));
System\Windows\Forms\Design\SplitContainerDesigner.cs (3)
189protected override bool GetHitTest(Point point) => !(InheritanceAttribute == InheritanceAttribute.InheritedReadOnly) && _splitContainerSelected; 304if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly || _splitterDistanceException) 347if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly)
System\Windows\Forms\Design\SplitterPanelDesigner.cs (7)
29protected override InheritanceAttribute? InheritanceAttribute => _splitterPanel is not null && _splitterPanel.Parent is not null 30? (InheritanceAttribute?)TypeDescriptor.GetAttributes(_splitterPanel.Parent)[typeof(InheritanceAttribute)] 52if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly) 63if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly) 74if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly) 84if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly)
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\TableLayoutPanelDesigner.cs (9)
1071if (selectionType != GlyphSelectionType.NotSelected && !locked && InheritanceAttribute != InheritanceAttribute.InheritedReadOnly) 1179if (InheritanceAttribute == InheritanceAttribute.InheritedReadOnly) 1183TypeDescriptor.AddAttributes(Control.Controls[i], InheritanceAttribute.InheritedReadOnly); 1188protected override InheritanceAttribute InheritanceAttribute => 1189(base.InheritanceAttribute == InheritanceAttribute.Inherited) 1190|| (base.InheritanceAttribute == InheritanceAttribute.InheritedReadOnly) 1191? InheritanceAttribute.InheritedReadOnly 1591bool enabled = (selCount == 1) && (InheritanceAttribute != InheritanceAttribute.InheritedReadOnly); 2212TypeDescriptor.GetAttributes(_realCollection[i]).Contains(InheritanceAttribute.NotInherited))
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)
System\Windows\Forms\Design\ToolStripDesigner.cs (9)
178InheritanceAttribute ia = (InheritanceAttribute)TypeDescriptor.GetAttributes(ToolStrip)[typeof(InheritanceAttribute)]; 313protected override InheritanceAttribute InheritanceAttribute 317if ((base.InheritanceAttribute == InheritanceAttribute.Inherited)) 319return InheritanceAttribute.InheritedReadOnly; 1227if (InheritanceAttribute != InheritanceAttribute.InheritedReadOnly) 1365if ((SelectionRules & SelectionRules.Moveable) != 0 && InheritanceAttribute != InheritanceAttribute.InheritedReadOnly && (selType != GlyphSelectionType.NotSelected)) 2113|| InheritanceAttribute.Equals(InheritanceAttribute.InheritedReadOnly))
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (3)
110protected override InheritanceAttribute InheritanceAttribute 114if ((base.InheritanceAttribute == InheritanceAttribute.Inherited)) 116return InheritanceAttribute.InheritedReadOnly;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (3)
119protected override InheritanceAttribute InheritanceAttribute 123if ((base.InheritanceAttribute == InheritanceAttribute.Inherited)) 125return InheritanceAttribute.InheritedReadOnly;
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (6)
1100InheritanceAttribute ia = (InheritanceAttribute)TypeDescriptor.GetAttributes(tool)[typeof(InheritanceAttribute)]; 1128InheritanceAttribute ia = (InheritanceAttribute)TypeDescriptor.GetAttributes(tool)[typeof(InheritanceAttribute)];
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (3)
91protected override InheritanceAttribute? InheritanceAttribute 93get => Control.Parent is ToolStripContainer && (base.InheritanceAttribute == InheritanceAttribute.Inherited) 94? InheritanceAttribute.InheritedReadOnly
System.Windows.Forms.Design.Tests (64)
System\ComponentModel\Design\ArrayEditorTests.cs (1)
76public void ArrayEditor_CanRemoveInstance_InheritanceAttribute_ReturnsExpected(InheritanceAttribute attribute, bool expected)
System\ComponentModel\Design\CollectionEditorTests.cs (1)
86public void CollectionEditor_CanRemoveInstance_InheritanceAttribute_ReturnsExpected(InheritanceAttribute attribute, bool expected)
System\ComponentModel\Design\CollectionFormTests.cs (1)
474public void CollectionForm_CanRemoveInstance_InheritanceAttribute_ReturnsExpected(InheritanceAttribute attribute, bool expected)
System\ComponentModel\Design\ComponentDesignerTests.cs (60)
23Assert.Same(InheritanceAttribute.Default, designer.InheritanceAttribute); 233public void ComponentDesigner_InheritanceAttribute_GetWithValidService_ReturnsDefault(InheritanceAttribute attributeResult, int expectedCallCount1, int expectedCallCount2) 247InheritanceAttribute attribute = designer.InheritanceAttribute; 274InheritanceAttribute attribute = designer.InheritanceAttribute; 275Assert.Same(InheritanceAttribute.Default, attribute); 283yield return new object[] { InheritanceAttribute.Default, false }; 284yield return new object[] { InheritanceAttribute.Inherited, true }; 285yield return new object[] { InheritanceAttribute.InheritedReadOnly, true }; 286yield return new object[] { InheritanceAttribute.NotInherited, false }; 291public void ComponentDesigner_Inherited_Get_ReturnsExpected(InheritanceAttribute inheritanceAttribute, bool expected) 2382yield return new object[] { InheritanceAttribute.Default, null, null }; 2383yield return new object[] { InheritanceAttribute.Default, new Dictionary<Type, object>(), null }; 2384yield return new object[] { InheritanceAttribute.Inherited, null, null }; 2385yield return new object[] { InheritanceAttribute.Inherited, new Dictionary<Type, object>(), InheritanceAttribute.Inherited }; 2386yield return new object[] { InheritanceAttribute.InheritedReadOnly, null, null }; 2387yield return new object[] { InheritanceAttribute.InheritedReadOnly, new Dictionary<Type, object>(), InheritanceAttribute.InheritedReadOnly }; 2388yield return new object[] { InheritanceAttribute.NotInherited, null, null }; 2389yield return new object[] { InheritanceAttribute.NotInherited, new Dictionary<Type, object>(), null }; 2394public void ComponentDesigner_PostFilterAttributes_NoInheritanceAttribute_AddsToAttributes(InheritanceAttribute attribute, IDictionary attributes, object expected) 2398Assert.Same(expected, attributes?[typeof(InheritanceAttribute)]); 2403yield return new object[] { null, InheritanceAttribute.Default }; 2404yield return new object[] { new Dictionary<Type, object>(), InheritanceAttribute.Default }; 2405yield return new object[] { new Dictionary<Type, object> { { typeof(InheritanceAttribute), null } }, InheritanceAttribute.Default }; 2406yield return new object[] { new Dictionary<Type, object> { { typeof(InheritanceAttribute), new object() } }, InheritanceAttribute.Default }; 2407InheritanceAttribute attribute = new(); 2408yield return new object[] { new Dictionary<Type, object> { { typeof(InheritanceAttribute), attribute } }, attribute }; 2423yield return new object[] { InheritanceAttribute.Default, false }; 2424yield return new object[] { InheritanceAttribute.Inherited, false }; 2425yield return new object[] { InheritanceAttribute.InheritedReadOnly, true }; 2426yield return new object[] { InheritanceAttribute.NotInherited, false }; 2431public void ComponentDesigner_PostFilterEvents_InvokeWithEvents_Success(InheritanceAttribute inheritanceAttribute, bool valid) 2455yield return new object[] { InheritanceAttribute.Default, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2456yield return new object[] { InheritanceAttribute.Default, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2457yield return new object[] { InheritanceAttribute.Inherited, null, null }; 2458yield return new object[] { InheritanceAttribute.Inherited, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2459yield return new object[] { InheritanceAttribute.InheritedReadOnly, null, null }; 2460yield return new object[] { InheritanceAttribute.InheritedReadOnly, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2461yield return new object[] { InheritanceAttribute.NotInherited, null, null }; 2462yield return new object[] { InheritanceAttribute.NotInherited, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2467public void ComponentDesigner_PostFilterEvents_InvokeWithoutEvents_Success(InheritanceAttribute inheritanceAttribute, IDictionary events, IDictionary expected) 2477using CustomInheritanceAttributeComponentDesigner designer = new(InheritanceAttribute.InheritedReadOnly); 2831public void ComponentDesigner_IDesignerFilterPostFilterAttributes_NoInheritanceAttribute_AddsToAttributes(InheritanceAttribute attribute, IDictionary attributes, object expected) 2836Assert.Same(expected, attributes?[typeof(InheritanceAttribute)]); 2855.SetupGet<InheritanceAttribute>("InheritanceAttribute") 2856.Returns(InheritanceAttribute.Default); 2870public void ComponentDesigner_IDesignerFilterPostFilterEvents_InvokeWithEvents_Success(InheritanceAttribute inheritanceAttribute, bool valid) 2893public void ComponentDesigner_IDesignerFilterPostFilterEvents_InvokeWithoutEvents_Success(InheritanceAttribute inheritanceAttribute, IDictionary events, IDictionary expected) 2904CustomInheritanceAttributeComponentDesigner designer = new(InheritanceAttribute.InheritedReadOnly); 2915.SetupGet<InheritanceAttribute>("InheritanceAttribute") 2916.Returns(InheritanceAttribute.Default); 2930public new InheritanceAttribute InheritanceAttribute => base.InheritanceAttribute; 2942public new InheritanceAttribute InvokeGetInheritanceAttribute(ComponentDesigner toInvoke) => base.InvokeGetInheritanceAttribute(toInvoke); 2978private readonly InheritanceAttribute _inheritanceAttribute; 2980public CustomInheritanceAttributeComponentDesigner(InheritanceAttribute inheritanceAttribute) : base() 2985protected override InheritanceAttribute InheritanceAttribute => InheritanceAttribute1; 2989public InheritanceAttribute InheritanceAttribute1 => _inheritanceAttribute;
TestControlDesigner.cs (1)
34internal InheritanceAttribute GetInheritanceAttributeProperty()