97 references to InheritanceLevel
netstandard (1)
netstandard.cs (1)
340
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.
InheritanceLevel
))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
326
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.
InheritanceLevel
))]
System.ComponentModel.TypeConverter (8)
System\ComponentModel\Container.cs (1)
233
if (inheritanceAttribute.InheritanceLevel !=
InheritanceLevel
.InheritedReadOnly)
System\ComponentModel\InheritanceAttribute.cs (7)
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);
62
public InheritanceAttribute(
InheritanceLevel
inheritanceLevel)
73
public
InheritanceLevel
InheritanceLevel { get; }
92
InheritanceLevel
valueLevel = ((InheritanceAttribute)value).InheritanceLevel;
109
public override string ToString() => TypeDescriptor.GetConverterTrimUnsafe(typeof(
InheritanceLevel
)).ConvertToString(InheritanceLevel)!;
System.Windows.Forms (1)
System\Windows\Forms\DataBinding\Binding.cs (1)
496
if (attr is not null && attr.InheritanceLevel !=
InheritanceLevel
.NotInherited)
System.Windows.Forms.Design (37)
System\ComponentModel\Design\CollectionEditor.cs (1)
62
&& attribute.InheritanceLevel !=
InheritanceLevel
.NotInherited)
System\ComponentModel\Design\ComponentDesigner.cs (1)
69
=> InheritanceAttribute!.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly;
System\ComponentModel\Design\DesignerHost.cs (1)
1004
if (TypeDescriptorHelper.TryGetAttribute(component, out InheritanceAttribute? ia) && ia.InheritanceLevel !=
InheritanceLevel
.NotInherited)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (2)
493
genCode = ia.InheritanceLevel !=
InheritanceLevel
.InheritedReadOnly;
575
genCode = ia.InheritanceLevel !=
InheritanceLevel
.InheritedReadOnly;
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (6)
118
InheritanceLevel
inheritanceLevel =
InheritanceLevel
.NotInherited;
127
if (inheritanceLevel !=
InheritanceLevel
.InheritedReadOnly)
175
if (inheritanceLevel ==
InheritanceLevel
.NotInherited)
215
if (inheritanceLevel ==
InheritanceLevel
.NotInherited)
239
if (inheritanceLevel ==
InheritanceLevel
.NotInherited)
System\ComponentModel\Design\Serialization\ResourcePropertyMemberCodeDomSerializer.cs (1)
115
if (inheritance.InheritanceLevel !=
InheritanceLevel
.InheritedReadOnly)
System\ComponentModel\Design\ToolStripContainerActionList.cs (1)
164
|| inheritanceAttribute.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly)
System\Windows\Forms\Design\CommandSet.cs (1)
3087
if (attr.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly)
System\Windows\Forms\Design\ComponentTray.cs (2)
731
if (attr.InheritanceLevel !=
InheritanceLevel
.NotInherited)
1511
if (attr.InheritanceLevel !=
InheritanceLevel
.NotInherited && _inheritanceUI is not null)
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (6)
102
&& inheritanceAttribute.InheritanceLevel !=
InheritanceLevel
.NotInherited)
133
&& inheritanceAttribute.InheritanceLevel !=
InheritanceLevel
.InheritedReadOnly)
161
InheritanceLevel
inheritanceLevel =
InheritanceLevel
.NotInherited;
168
if (inheritanceLevel !=
InheritanceLevel
.InheritedReadOnly)
430
if (inheritanceAttribute.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly)
System\Windows\Forms\Design\InheritanceUI.cs (3)
47
public void AddInheritedControl(Control c,
InheritanceLevel
level)
54
Debug.Assert(level !=
InheritanceLevel
.NotInherited, "This should only be called for inherited components.");
56
if (level ==
InheritanceLevel
.InheritedReadOnly)
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (3)
34
isTargetInherited = TypeDescriptorHelper.TryGetAttribute(comp, out InheritanceAttribute? ia) && ia.InheritanceLevel ==
InheritanceLevel
.Inherited;
45
if (ia.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly)
47
else if (ia.InheritanceLevel ==
InheritanceLevel
.Inherited && isTargetInherited)
System\Windows\Forms\Design\TableLayoutPanelCodeDomSerializer.cs (1)
46
if (!TypeDescriptorHelper.TryGetAttribute(panel, out InheritanceAttribute? ia) || ia.InheritanceLevel !=
InheritanceLevel
.InheritedReadOnly)
System\Windows\Forms\Design\ToolStripActionList.cs (2)
37
if (!TypeDescriptorHelper.TryGetAttribute(_toolStrip, out InheritanceAttribute? ia) || ia.InheritanceLevel ==
InheritanceLevel
.NotInherited)
49
|| ia.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly;
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 (1)
179
if (ia is null || ia.InheritanceLevel ==
InheritanceLevel
.NotInherited)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (4)
1101
if (ia is not null && (ia.InheritanceLevel ==
InheritanceLevel
.Inherited || ia.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly))
1129
if (ia is not null && (ia.InheritanceLevel ==
InheritanceLevel
.Inherited || ia.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly))
System.Windows.Forms.Design.Tests (49)
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\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));
System\Windows\Forms\Design\InheritanceUITests.cs (10)
40
[InlineData(
InheritanceLevel
.Inherited, "Inherited control")]
41
[InlineData(
InheritanceLevel
.InheritedReadOnly, "Inherited control (Private)")]
42
[InlineData(
InheritanceLevel
.NotInherited, "Inherited control")]
43
public void AddInheritedControl_ShouldSetToolTipText(
InheritanceLevel
inheritanceLevel, string expectedText)
80
_inheritanceUI.AddInheritedControl(trayControl,
InheritanceLevel
.Inherited);
104
[InlineData(
InheritanceLevel
.Inherited, "Inherited control")]
105
[InlineData(
InheritanceLevel
.InheritedReadOnly, "Inherited control (Private)")]
106
public void AddInheritedControl_ShouldSetToolTipText_And_InitializeToolTip(
InheritanceLevel
inheritanceLevel, string expectedText)
120
_inheritanceUI.AddInheritedControl(_control,
InheritanceLevel
.Inherited);
152
_inheritanceUI.AddInheritedControl(_control,
InheritanceLevel
.Inherited);