调用一个方法:
ServiceFactory.GetService<MatchService>(ctx)
System.Collections.Generic.KeyNotFoundException:“给定关键字不在字典中。”
此异常最初是在此调用堆栈中引发的:
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.this[TKey].get(TKey)
Kingdee.BOS.ServicesContainer.GetService.AnonymousMethod__2(string)
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey, System.Func<TKey, TValue>)
Kingdee.BOS.ServicesContainer.GetService<T>(string, string)
Kingdee.BOS.Contracts.ServiceFactory.GetService<T>(string)
Kingdee.BOS.Contracts.ServiceFactory.GetService<T>(Kingdee.BOS.Context, string)
Kingdee.BOS.Contracts.ServiceFactory.GetService<T>(Kingdee.BOS.Context)
MasterDataTransfer.Form1.btnContext_Click(object, System.EventArgs) - 位于 Form1.cs
System.Windows.Forms.Control.OnClick(System.EventArgs)
System.Windows.Forms.Button.OnClick(System.EventArgs)
...
[调用堆栈已截断]
推荐阅读