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