/*----------------------------------------------------- called by hub proxy */ private static void NewTask(SnTask t) { if (_working) { return; } if (t != null && !TaskExecutors.ContainsKey(t.Type)) { return; } SnTrace.TaskManagement.Write( t == null ? "Agent {0} handles a 'handle-dead-tasks' message." : "Agent {0} handles a 'new-tasks' message.", AgentName); #pragma warning disable 4014 WorkAsync(); #pragma warning restore 4014 }
/*----------------------------------------------------- called by hub proxy */ private static void NewTask(SnTask t) { if (_working) { return; } if (t != null && !TaskExecutors.ContainsKey(t.Type)) { return; } if (t == null) { SnTrace.TaskManagement.Write("Agent {0} handles a 'handle-dead-tasks' message.", AgentName); } else { SnTrace.TaskManagement.Write("Agent {0} handles a 'new-tasks' message.", AgentName); } Work(); }