We sometimes see an exception when setting the dictionary file stream:
Relevant callstack:
at Keyoti.RapidSpell.Wpf.RapidSpellChecker.f()
at Keyoti.RapidSpell.Wpf.RapidSpellChecker.e()
at Keyoti.RapidSpell.Wpf.RapidSpellChecker.SetDictFileStream(Stream dictFileStream, String dictionaryID, DateTime modifiedDate)
Code:
private static void PrepareSpellCheck(ICheckerEngine SpellCheck)
{
SpellCheck.LanguageParser = LanguageType.DUTCH;
SpellCheck.CheckCompoundWords = true;
var _dictStream = Application.GetResourceStream(new Uri("somevaliddictlocation")).Stream;
SpellCheck.SetDictFileStream(_dictStream, "Words.dict", DateTime.Now);
}
Note: the uri is a valid uri in our situation.
Note2: the Check method isn't called before this code
Are we setting the Stream in the wrong way?
I read that SetDictFileStream doesn't close stream, do we have to wrap it in an using block to solve this exception?
I'm wondering what's going wrong? What's the correct way to set the dict file stream?