草庐IT

event_name

全部标签

c# - react 性扩展 : Process events in batches + add delay between every batch

我有一个应用程序,它有时几乎同时引发1000个事件。我想做的是将事件批处理为50个项目的block,并开始每10秒处理一次。在开始新的批处理之前无需等待批处理完成。例如:10:00:00:10000neweventsreceived10:00:00:StartProcessing(events.Take(50))10:00:10:StartProcessing(events.Skip(50).Take(50))10:00:15:StartProcessing(events.Skip(100).Take(50))有什么想法可以实现吗?我想ReactiveExtensions是可行的方法,

c# - "The type or namespace name ' 引用System.Xml.dll时XmlSerializer ' could not be found"错误

我已经在这上面浪费了几个小时:XmlSerializerserializer;是的,using在那里,引用在那里,我在VS2010中使用.NET4.0制作了整个解决方案,所以它不是那些东西。如果我进入对象资源管理器,我可以在正确的命名空间中找到我想要的XmlSerializer类,但是如果我尝试在我的代码文件中键入上面的行并进行编译,我会得到可怕的Thetypeornamespacename'XmlSerializer'couldnotbefound(areyoumissingausingdirectiveoranassemblyreference?)死亡警告。我也没有在Intelli

c# - 跨线程操作无效(How to access WinForm elements from another module events?)

我有一个带有串行端口信号事件的模块serialPort.DataReceived.AddHandler(SerialDataReceivedEventHandler(DataReceived));DataReceived在哪里letDataReceivedab=rxstringProcessData正在调用WinForms方法letProcessData(a,b)=dataProcessor.Invoke(a,b)|>ignore这是privatevoidProcessData(objectsender,EventArgse){byte[]m=Core.ncon.ArrayRead;s

c# - 从 Nullable 类型反射获取 PropertyType.Name

我想使用反射获取属性类型。这是我的代码varproperties=type.GetProperties();foreach(varpropertyInfoinproperties){model.ModelProperties.Add(newKeyValuePair(propertyInfo.PropertyType.Name,propertyInfo.Name));}这段代码propertyInfo.PropertyType.Name没问题,但是如果我的属性类型是Nullable我得到这个Nullable'1字符串,如果写FullName如果得到这个stirngSystem.Nulla

c# - 'Event' 的无效值 - 属性 (XAML Eventsetter)

我正在使用VisualStudio2015社区,但收到以下错误消息:Invalidvaluefor'Event'-Property:Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.Semantics.XmlValue.下面是代码:我试过UIElement.MouseEnter、Mouse.MouseEnter、TextBox.MouseEnter。如果我编译处理程序工作正常,但错误消息仍然存在。有什么建议吗? 最佳答案 这似乎是WPF设计器中的一个错误,正如已经报告的那

c# - 有没有办法在 Web.config 文件的 smtp 元素中包含电子邮件地址 "display name"?

这个问题在这里已经有了答案:关闭9年前。PossibleDuplicate:StoringSmtpfromemailfriendlydisplaynameinWeb.Config我正在处理EmailSender,我正在从我的Web.config文件中获取电子邮件地址。如果可能的话,我还想从同一部分获取该电子邮件的“显示名称”,但我没有看到一个明显的方法来做到这一点。在我的Web.config文件中,我包含了一个默认的“发件人电子邮件地址”,如下所示:在我的EmailSender中,我有这样的东西:varsmtpSection=...;varmessage=newMailMessage(

c# - 如何使用 AutomationProperties.Name?

问题任何人都可以解释(最好使用代码示例)AutomationProperties.Name属性如何以编程方式和声明方式与XAML一起使用吗?解释我了解到,例如,VisualStudio2010中的编码UI生成器将窗口的名称作为SearchProperty。由于我的窗口名称发生变化,我希望有一个常量SearchProperty,我的编码UI测试可以依赖它。在下面的代码示例中,我不希望窗口标题被硬编码为“管道1的属性”,因为它发生了变化。代码示例[GeneratedCode("CodedUITestBuilder","10.0.30319.1")]publicclassUIListView

c# - Visual Studio 变得疯狂 : 'The directory name is invalid' error when trying to compile

出于一些非常奇怪的原因,我的VisualStudio2008在尝试编译C#项目时尝试将可执行文件的输出写入与可执行文件同名的目录,至少看起来这就是错误所在消息暗示。在我的任何项目上运行编译后,CSC.EXE报告以下编译器错误:Couldnotwritetooutputfile'D:\Projects\Examples\StringBuilderVsString\obj\Release\StringBuilderVsString.exe'--'Thedirectorynameisinvalid.'当我查看obj\Release或obj\Debug时,所有中间资源(如StringBuild

c# - "Both use the XML type name X, use XML attributes to specify a unique XML name and/or namespace for the type"怎么解决?

我有以下枚举定义...namespaceItemTable{publicenumDisplayMode{Tiles,Default}}namespaceEffectiveItemPermissionTable{publicenumDisplayMode{Tree,FullPaths}}...然后我有以下类(class)...publicclassTablewhereTDisplayMode:struct{//publicpublicTDisplayModeDisplayMode{get{returnmDisplayMode;}set{mDisplayMode=value;}}//pri

c# - 路由 : How to hide action name in url?

在MVC默认路由中routes.MapRoute("Default",//Routename"{controller}/{action}/{id}",//URLwithparametersnew{controller="Home",action="Index",id=UrlParameter.Optional}//Parameterdefaults);每当访问索引操作时,当访问“索引”操作时,url不会显示操作名称。我想在另一个Controller上获得该行为,该Controller正在检索单个项目的数据。我希望将默认操作命名为“get”,对于此操作,我希望url不显示操作名称,只显示