C# 클래스 SIL.CoreImpl.SpellEngine

상속: ISpellEngine, IDisposable
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
Hunspell_add int
Hunspell_add_with_affix int
Hunspell_free_list void
Hunspell_initialize System.IntPtr
Hunspell_remove int
Hunspell_spell int
Hunspell_suggest int
Hunspell_suggest_Impl int
Hunspell_suggest_Impl int
Hunspell_uninitialize void
MarshalUnmananagedStrArray2ManagedStrArray string[]
MarshallAsUtf8Bytes byte[]
SetInternalStatus void
SpellEngine System

공개 메소드들

메소드 설명
Check ( string word ) : bool
Dispose ( ) : void
SetStatus ( string word1, bool isCorrect ) : void
Suggest ( string badWord ) : ICollection

Get a list of suggestions for alternate words to use in place of the mis-spelled one.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
Hunspell_add ( IntPtr handle, byte word ) : int
Hunspell_add_with_affix ( IntPtr handle, byte word, byte example ) : int
Hunspell_free_list ( IntPtr handle, IntPtr &list, int count ) : void
Hunspell_initialize ( byte aff_file, byte dict_file ) : IntPtr
Hunspell_remove ( IntPtr handle, byte word ) : int
Hunspell_spell ( IntPtr handle, byte word ) : int
Hunspell_suggest ( IntPtr handle, byte word, IntPtr &suggestions ) : int
Hunspell_suggest_Impl ( IntPtr handle, IntPtr &suggestions, byte word ) : int
Hunspell_suggest_Impl ( IntPtr handle, byte word, IntPtr &suggestions ) : int
Hunspell_uninitialize ( IntPtr handle ) : void
MarshalUnmananagedStrArray2ManagedStrArray ( IntPtr pUnmanagedStringArray, int StringCount ) : string[]
MarshallAsUtf8Bytes ( string word ) : byte[]

We can't declare these arguments (char * in C++) as [MarshalAs(UnmanagedType.LPStr)] string, because that unconditionally coverts the string to bytes using the current system code page, which is never what we want. So we declare them as byte[] and marshal like this. The C++ code requires null termination so add a null before converting. (This doesn't seem to be necessary, but better safe than sorry.)

SetInternalStatus ( string word, bool isCorrect ) : void
SpellEngine ( string affixPath, string dictPath, string exceptionPath ) : System

메소드 상세

Check() 공개 메소드

public Check ( string word ) : bool
word string
리턴 bool

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

SetStatus() 공개 메소드

public SetStatus ( string word1, bool isCorrect ) : void
word1 string
isCorrect bool
리턴 void

Suggest() 공개 메소드

Get a list of suggestions for alternate words to use in place of the mis-spelled one.
public Suggest ( string badWord ) : ICollection
badWord string
리턴 ICollection