I get this exception while running my program in this line:
DirectiveProcessingProvider _directiveProcessingProvider = new DirectiveProcessingProvider(rdeData.CollectorDB, rdeData.GridCollectorDB);
values[0] = _directiveProcessingProvider.ParseParamValue(values[0].ToString(), true);
While what it basically does is parsing a value from a dictionary. This dictuinary is being also loaded, maybe that's what cause the problem, but noting I've done helped that...
This is the dictionary load:
_collectorDB.SetItem((t.value as BaseControlProperties).Name, GetTextFromScreenInControlPosition(vco), true);
This common answer for solveing DIDN'T help:
this.Dispatcher.Invoke((Action)(() =>
{
...// your code here.
}));
Any idea why?
PS - Ive tried to add constant, just to check if getting the text from screen is the problem, and it isn't..
Any help will be appreciated.