private Aspell() { AspellConfigHandle config = AspellConfigHandle.Default; AspellCanHaveErrorHandle result = new AspellCanHaveErrorHandle(config); if (NativeMethods.aspell_error_number(result) != 0) { IntPtr ptr = NativeMethods.aspell_error_message(result); throw new AspellException(Marshal.PtrToStringAnsi(ptr)); } m_speller = new AspellSpellerHandle(result); DoAdd("exe"); DoAdd("mdb"); DoAdd("stdout"); DoAdd("xml"); if (Settings.Has("ignoreList")) { Console.Error.WriteLine("the ignoreList setting is no longer supported: use dictionary instead"); // TODO: remove this (eventually) } string path = Settings.Get("dictionary", string.Empty); string[] entries = path.Split(':'); foreach (string s in entries) { DoAddDictFile(s); } }
// public AspellCanHaveErrorHandle() : base(IntPtr.Zero, true) // { // } public AspellCanHaveErrorHandle(AspellConfigHandle config) : base(IntPtr.Zero, true) { handle = NativeMethods.new_aspell_speller(config); }
// public AspellCanHaveErrorHandle() : base(IntPtr.Zero, true) // { // } public AspellCanHaveErrorHandle(AspellConfigHandle config) : base(IntPtr.Zero, true) { handle = NativeMethods.new_aspell_speller(config); }
public static extern IntPtr new_aspell_speller(AspellConfigHandle handle);
public static extern void delete_aspell_config(AspellConfigHandle handle);
public static extern IntPtr new_aspell_speller(AspellConfigHandle handle);
public static extern void delete_aspell_config(AspellConfigHandle handle);