static SpellCheckerFactory() { Singleton = new SpellCheckerFactory(); bool creationResult = false; _factoryLock.WithWriteLock(CreateLockFree, true, true, out creationResult); }
internal static RCW.ISpellChecker CreateSpellChecker(string languageTag, bool suppressCOMExceptions = true) { SpellCheckerFactory singleton = SpellCheckerFactory.Singleton; if (singleton == null) { return(null); } return(singleton.CreateSpellCheckerPrivate(languageTag, suppressCOMExceptions)); }
// Token: 0x0600409B RID: 16539 RVA: 0x0012724A File Offset: 0x0012544A internal static void UnregisterUserDictionary(string dictionaryPath, string languageTag, bool suppressCOMExceptions = true) { SpellCheckerFactory singleton = SpellCheckerFactory.Singleton; if (singleton == null) { return; } singleton.UnregisterUserDictionaryPrivate(dictionaryPath, languageTag, suppressCOMExceptions); }
// Token: 0x0600408B RID: 16523 RVA: 0x00126EC7 File Offset: 0x001250C7 internal static List <string> GetSupportedLanguages(bool shouldSuppressCOMExceptions = true) { SpellCheckerFactory singleton = SpellCheckerFactory.Singleton; if (singleton == null) { return(null); } return(singleton.GetSupportedLanguagesPrivate(shouldSuppressCOMExceptions)); }
public bool CreateSpellCheckerRetryPreamble(out Func <RCW.ISpellChecker> func) { func = null; bool result; if (result = SpellCheckerFactory.Reinitalize()) { func = new Func <RCW.ISpellChecker>(SpellCheckerFactory.SpellCheckerCreationHelper.Helper(this._language).CreateSpellChecker); } return(result); }
// Token: 0x06004083 RID: 16515 RVA: 0x00126C20 File Offset: 0x00124E20 public static SpellCheckerFactory Create(bool shouldSuppressCOMExceptions = false) { SpellCheckerFactory result = null; bool flag = false; if (SpellCheckerFactory._factoryLock.WithWriteLock <bool, bool, bool>(new Func <bool, bool, bool>(SpellCheckerFactory.CreateLockFree), shouldSuppressCOMExceptions, false, out flag) && flag) { result = SpellCheckerFactory.Singleton; } return(result); }
public bool CreateSpellCheckerRetryPreamble(out Func <RCW.ISpellChecker> func) { bool success = false; func = null; if (success = SpellCheckerFactory.Reinitalize()) { func = SpellCheckerCreationHelper.Helper(_language).CreateSpellChecker; } return(success); }
public static SpellCheckerFactory Create(bool shouldSuppressCOMExceptions = false) { SpellCheckerFactory result = null; bool creationSucceeded = false; if ( _factoryLock.WithWriteLock(CreateLockFree, shouldSuppressCOMExceptions, false, out creationSucceeded) && creationSucceeded) { result = Singleton; } return(result); }
// Token: 0x06004099 RID: 16537 RVA: 0x00127178 File Offset: 0x00125378 private void UnregisterUserDictionaryImplWithRetries(string dictionaryPath, string languageTag, bool suppressCOMExceptions = true) { if (dictionaryPath == null) { throw new ArgumentNullException("dictionaryPath"); } if (languageTag == null) { throw new ArgumentNullException("languageTag"); } RetryHelper.TryCallAction(delegate() { this.UnregisterUserDictionaryImpl(dictionaryPath, languageTag); }, () => SpellCheckerFactory.Reinitalize(), SpellCheckerFactory.SuppressedExceptions[suppressCOMExceptions], 3, false); }
private bool Init(bool shouldSuppressCOMExceptions = true) { this._speller.Value = SpellCheckerFactory.CreateSpellChecker(this._languageTag, shouldSuppressCOMExceptions); return(this._speller.Value != null); }
// Token: 0x0600408D RID: 16525 RVA: 0x00126EF8 File Offset: 0x001250F8 private bool IsSupportedImplWithRetries(string languageTag, bool suppressCOMExceptions = true) { bool flag = false; return(RetryHelper.TryExecuteFunction <bool>(() => this.IsSupportedImpl(languageTag), out flag, () => SpellCheckerFactory.Reinitalize(), SpellCheckerFactory.SuppressedExceptions[suppressCOMExceptions], 3, false) && flag); }
// Token: 0x06004089 RID: 16521 RVA: 0x00126E40 File Offset: 0x00125040 private List <string> SupportedLanguagesImplWithRetries(bool shouldSuppressCOMExceptions) { List <string> result = null; if (!RetryHelper.TryExecuteFunction <List <string> >(new Func <List <string> >(this.SupportedLanguagesImpl), out result, () => SpellCheckerFactory.Reinitalize(), SpellCheckerFactory.SuppressedExceptions[shouldSuppressCOMExceptions], 3, false)) { return(null); } return(result); }