Browse Source

Make TopLevel.CreateLayoutManager internal.

Should only be needed for unit tests.
Steven Kirk 2 years ago
parent
commit
e4634a917e

+ 1 - 1
src/Avalonia.Controls/TopLevel.cs

@@ -523,7 +523,7 @@ namespace Avalonia.Controls
         /// <summary>
         /// Creates the layout manager for this <see cref="TopLevel" />.
         /// </summary>
-        protected virtual ILayoutManager CreateLayoutManager() => new LayoutManager(this);
+        private protected virtual ILayoutManager CreateLayoutManager() => new LayoutManager(this);
 
         /// <summary>
         /// Handles a paint notification from <see cref="ITopLevelImpl.Resized"/>.

+ 1 - 1
tests/Avalonia.Controls.UnitTests/MaskedTextBoxTests.cs

@@ -1004,7 +1004,7 @@ namespace Avalonia.Controls.UnitTests
                 _layoutManager = layoutManager ?? new LayoutManager(this);
             }
 
-            protected override ILayoutManager CreateLayoutManager() => _layoutManager;
+            private protected override ILayoutManager CreateLayoutManager() => _layoutManager;
         }
 
         private static Mock<ITopLevelImpl> CreateMockTopLevelImpl()

+ 1 - 1
tests/Avalonia.Controls.UnitTests/TextBoxTests.cs

@@ -1208,7 +1208,7 @@ namespace Avalonia.Controls.UnitTests
                 _layoutManager = layoutManager ?? new LayoutManager(this);
             }
 
-            protected override ILayoutManager CreateLayoutManager() => _layoutManager;
+            private protected override ILayoutManager CreateLayoutManager() => _layoutManager;
         }
 
         private static Mock<ITopLevelImpl> CreateMockTopLevelImpl()

+ 1 - 1
tests/Avalonia.Controls.UnitTests/TopLevelTests.cs

@@ -339,7 +339,7 @@ namespace Avalonia.Controls.UnitTests
                 _layoutManager = layoutManager ?? new LayoutManager(this);
             }
 
-            protected override ILayoutManager CreateLayoutManager() => _layoutManager;
+            private protected override ILayoutManager CreateLayoutManager() => _layoutManager;
         }
     }
 }