private void OnTimerElapsed(object sender)
{
System.Threading.ThreadPool.QueueUserWorkItem(delegate(object n)
{
foreach (System.Collections.Generic.KeyValuePair<SessionManager, string> current in RpcHubManager.Dashboard_Connections)
{
System.Collections.Generic.List<SymbolMinimizedDTO> updatedSymbolsPrices = this.trader_manager.GetUpdatedSymbolsPrices(current.Key, false);
if (RpcHubManager.<OnTimerElapsed>o__SiteContainer6.<>p__Site7 == null)
{
RpcHubManager.<OnTimerElapsed>o__SiteContainer6.<>p__Site7 = CallSite<Action<CallSite, object, string>>.Create(Binder.InvokeMember(CSharpBinderFlags.ResultDiscarded, "updateSymbols", null, typeof(RpcHubManager), new CSharpArgumentInfo[]
{
CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null),
CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null)
}));
}
RpcHubManager.<OnTimerElapsed>o__SiteContainer6.<>p__Site7.Target(RpcHubManager.<OnTimerElapsed>o__SiteContainer6.<>p__Site7, this.hubContext.Clients.Client(current.Value), Json.Encode(updatedSymbolsPrices));
}
});
}
答案 0 :(得分:1)
您的问题是因为IL
(通用中间语言)允许变量名中的<
和>
符号,但C#不会。
例如:
RpcHubManager.<OnTimerElapsed>o__SiteContainer6.<>p__Site7
由于<OnTimerElapsed>o__SiteContainer6
和<>p__Site7
名称无法编译。
将其替换为
RpcHubManager.OnTimerElapsedo__SiteContainer6.p__Site7
一切都会有效