" 关键字 "字段类型与在Elasticsearch 中使用" not_analyzed "作为分析器的字段之间是否有任何区别?如果有一个,何时使用哪个?
我发现所有使用 Netty 4.0 的 TCP 服务器实现都使用 ServerBootstrap 实例。
Netty 中服务器和客户端之间最大也是唯一的区别是使用了不同的 Bootstrap 和 Channel 实现。请看下面的代码:
谈论 TCP 客户端的netty 文档。
但是对于 UDP 来说,这句话似乎无关紧要?!我找到了仅使用 Bootstrap 的 UDP 服务器示例,例如:1 , 2 , 3
我对此很困惑,所以我的两个问题是:
对于 Netty 3.x,此处显示了 ConnectionlessBootstrap ,但对于 4.0,我找不到类似的东西。
XAML Properties AutomationProperties.AutomationId和 AutomationProperties.Name之间 是否有任何真正的区别?
最重要的是,有没有理由选择一个而不是另一个?
虽然msdn说的是.AutomationId:"唯一标识指定元素的字符串,但它们似乎都不是我独有的."
我测试了一个WPF应用程序,其中有2个按钮,每个按钮在同一个树路径中具有相同的.AutomationId,而.AutomationId根本不是唯一的.
XAML允许我给它们相同的.AutomationId,如果我通过以下代码搜索它们,它将返回两个按钮.
PropertyCondition cond = new PropertyCondition(AutomationElement.AutomationIdProperty, "myButton");
returnedAEs = myMainWindow.FindAll(TreeScope.Children, cond);
foreach (AutomationElement element in returnedAEs)
{
//...enters here 2 times
}
Run Code Online (Sandbox Code Playgroud)
XAML:
<Window ... >
<Grid ...>
<Button ... AutomationProperties.AutomationId="myButton"/>
<Button ... AutomationProperties.AutomationId="myButton"/>
<Window ... >
</Grid>
</Window>
Run Code Online (Sandbox Code Playgroud)
非常感谢您的意见!