99 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)
235
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)
1001
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)
161
|| 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)
181
return inheritanceAttribute is null || inheritanceAttribute.InheritanceLevel ==
InheritanceLevel
.NotInherited;
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (4)
1092
if (ia is not null && (ia.InheritanceLevel ==
InheritanceLevel
.Inherited || ia.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly))
1120
if (ia is not null && (ia.InheritanceLevel ==
InheritanceLevel
.Inherited || ia.InheritanceLevel ==
InheritanceLevel
.InheritedReadOnly))
System.Windows.Forms.Design.Tests (51)
System\ComponentModel\Design\ArrayEditorTests.cs (5)
71
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.Inherited - 1), false };
72
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.Inherited), false };
73
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly), false };
74
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.NotInherited), true };
75
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.NotInherited + 1), false };
System\ComponentModel\Design\CollectionEditorTests.cs (5)
73
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.Inherited - 1), false };
74
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.Inherited), false };
75
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly), false };
76
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.NotInherited), true };
77
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.NotInherited + 1), false };
System\ComponentModel\Design\CollectionFormTests.cs (5)
467
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.Inherited - 1), false };
468
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.Inherited), false };
469
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly), false };
470
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.NotInherited), true };
471
yield return new object[] { new InheritanceAttribute(
InheritanceLevel
.NotInherited + 1), false };
System\ComponentModel\Design\DesignerHostTests.cs (12)
386
TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
390
TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(
InheritanceLevel
.Inherited));
394
TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(
InheritanceLevel
.NotInherited));
457
TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
461
TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(
InheritanceLevel
.Inherited));
465
TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(
InheritanceLevel
.NotInherited));
2577
TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
2581
TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(
InheritanceLevel
.Inherited));
2585
TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(
InheritanceLevel
.NotInherited));
2647
TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
2651
TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(
InheritanceLevel
.Inherited));
2655
TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(
InheritanceLevel
.NotInherited));
System\ComponentModel\Design\SiteNestedContainerTests.cs (12)
290
TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
294
TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(
InheritanceLevel
.Inherited));
298
TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(
InheritanceLevel
.NotInherited));
366
TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
370
TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(
InheritanceLevel
.Inherited));
374
TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(
InheritanceLevel
.NotInherited));
713
TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
717
TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(
InheritanceLevel
.Inherited));
721
TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(
InheritanceLevel
.NotInherited));
778
TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
782
TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(
InheritanceLevel
.Inherited));
786
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);
102
[InlineData(
InheritanceLevel
.Inherited, "Inherited control")]
103
[InlineData(
InheritanceLevel
.InheritedReadOnly, "Inherited control (Private)")]
104
public void AddInheritedControl_ShouldSetToolTipText_And_InitializeToolTip(
InheritanceLevel
inheritanceLevel, string expectedText)
118
_inheritanceUI.AddInheritedControl(_control,
InheritanceLevel
.Inherited);
150
_inheritanceUI.AddInheritedControl(_control,
InheritanceLevel
.Inherited);
System\Windows\Forms\Design\ToolStripActionListTests.cs (1)
119
TypeDescriptor.AddAttributes(_toolStrip, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));
System\Windows\Forms\Design\ToolStripContainerActionListTests.cs (1)
77
TypeDescriptor.AddAttributes(inheritedControl, new InheritanceAttribute(
InheritanceLevel
.InheritedReadOnly));