标签:
public void GetTagLogRecord(int tagId, string keyword, string area) {
var tag = _repositoryTagRecord.Get(tagId);
OnlineGet(tag, keyword, area);
}
_jobsQueueService.Enqueue("IClawerService.GetTagLogRecord", new Dictionary<string, object> {
{ "tagId", tag.Id }
, { "keyword", tag.Keyword }
, { "area", area }
}, 1);
if (cachedDelegate != null) {
var args = cachedDelegate.Item1.Select(methodParameter => arguments[methodParameter.Name]).ToArray();
//此处args为object[]数组,调用下面的一句话始终报转换无效的错误,
//调试时将args手动构造成 args = new object[] { 23, "PPAPI", "" };又没问题 !!!!!!
//不知道是不是.NET的bug !!!
var result = cachedDelegate.Item2(eventHandler, args);
returnValue = result as IEnumerable;
if (result != null && (returnValue == null || result is string))
returnValue = new[] { result };
return true;
}
否则 cachedDelegate.Item2 始终报错 : 指定的转换无效 !!!!!
标签:
原文地址:http://www.cnblogs.com/cabbage/p/4876318.html