Skip to content

Commit c206793

Browse files
committed
remove check that is not needed
1 parent 4516532 commit c206793

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AdornerPresentationContext.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,14 @@ internal static void HostComponent(AdornerLayer adornerLayer, IAnnotationCompone
100100
/// BringToTop method. This will move the component to the top of its priority group. If there are other
101101
/// components with higher priority they will still be on top of that component. If more than
102102
/// one component type have the same ZLevel that means they all can stay on top of each other.
103-
/// Setting IAnnotationComponent.ZOrder must be invoked only by the PrezentationContext
103+
/// Setting IAnnotationComponent.ZOrder must be invoked only by the PresentationContext
104104
/// when the Z-order changes. It can not be set by application in v1.</remarks>
105105
internal static void SetTypeZLevel(Type type, int level)
106106
{
107107
Invariant.Assert(level >= 0, "level is < 0");
108-
109108
Invariant.Assert(type != null, "type is null");
110109

111-
if (s_ZLevel.ContainsKey(type))
112-
{
113-
s_ZLevel[type] = level;
114-
}
115-
else
116-
{
117-
s_ZLevel.Add(type, level);
118-
}
110+
s_ZLevel[type] = level;
119111
}
120112

121113
/// <summary>

0 commit comments

Comments
 (0)