From 298a5eba2a03c4b0dc7644da78104eb51fd093df Mon Sep 17 00:00:00 2001 From: Davide Giacometti Date: Tue, 5 Sep 2023 13:13:41 +0200 Subject: [PATCH] [Hosts]Ignore default ACME sample entries (#28163) --- src/modules/Hosts/Hosts.Tests/EntryTest.cs | 2 ++ .../Hosts/Hosts/HostsXAML/Views/MainPage.xaml | 2 +- src/modules/Hosts/Hosts/Models/Entry.cs | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/modules/Hosts/Hosts.Tests/EntryTest.cs b/src/modules/Hosts/Hosts.Tests/EntryTest.cs index 505f4d8474..04b02b4879 100644 --- a/src/modules/Hosts/Hosts.Tests/EntryTest.cs +++ b/src/modules/Hosts/Hosts.Tests/EntryTest.cs @@ -76,6 +76,8 @@ namespace Hosts.Tests [DataRow("host 10.1.1.1")] [DataRow("# comment 10.1.1.1 host # comment")] [DataRow("10.1.1.1 host01 host02 host03 host04 host05 host06 host07 host08 host09 host10")] + [DataRow("102.54.94.97 rhino.acme.com # source server")] + [DataRow("38.25.63.10 x.acme.com # x client host")] public void Not_Valid_Entry(string line) { var entry = new Entry(0, line); diff --git a/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml b/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml index d70e732665..28f4e836bf 100644 --- a/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml +++ b/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml @@ -448,7 +448,7 @@ ScrollViewer.IsVerticalRailEnabled="True" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollMode="Enabled" - Text="{Binding Comment, Mode=TwoWay}" /> + Text="{Binding Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />