internal static List <string> ToList(this RCW.IEnumString enumString, bool shouldSuppressCOMExceptions = true, bool shouldReleaseCOMObject = true) { List <string> list = new List <string>(); if (enumString == null) { throw new ArgumentNullException("enumString"); } try { uint num = 0U; string empty = string.Empty; do { enumString.RemoteNext(1U, out empty, out num); if (num > 0U) { list.Add(empty); } }while (num > 0U); } catch (COMException obj) when(shouldSuppressCOMExceptions) { } finally { if (shouldReleaseCOMObject) { Marshal.ReleaseComObject(enumString); } } return(list); }
public List <string> SuggestImpl(string word) { RCW.IEnumString enumString = this._speller.Value.Suggest(word); if (enumString == null) { return(null); } return(enumString.ToList(false, true)); }
private List <string> GetOptionIdsImpl() { RCW.IEnumString optionIds = this._speller.Value.OptionIds; if (optionIds == null) { return(null); } return(optionIds.ToList(false, true)); }
private List <string> SupportedLanguagesImpl() { RCW.ISpellCheckerFactory comFactory = this.ComFactory; RCW.IEnumString enumString = (comFactory != null) ? comFactory.SupportedLanguages : null; List <string> result = null; if (enumString != null) { result = enumString.ToList(true, true); } return(result); }