public bool QueryRegex(string strQuery, out Regex re) { re = null; if(String.IsNullOrEmpty(strQuery)) return false; if(this.migemoWrapper == null) { try { this.migemoWrapper = new MigemoWrapper(MigemoLoader.pathDLL, MigemoLoader.pathDic); } catch { return false; } } if(this.migemoWrapper != null && this.migemoWrapper.IsEnable) { try { bool fStartWithNoPartial = strQuery.StartsWith("^"); if(fStartWithNoPartial && strQuery.Length > 1) strQuery = strQuery.Substring(1); string strPrefix = String.Empty; if(fStartWithNoPartial || !MigemoLoader.fPartialMatch) strPrefix = "^"; re = new Regex(strPrefix + this.migemoWrapper.QueryRegexStr(strQuery), RegexOptions.IgnoreCase); return true; } catch { } } return false; }
public void Close(EndCode endCode) { if(migemoWrapper != null) { migemoWrapper.Dispose(); migemoWrapper = null; } }
public void Close(EndCode endCode) { if (migemoWrapper != null) { migemoWrapper.Dispose(); migemoWrapper = null; } }
public void Close(EndCode endCode) { if (this.migemoWrapper != null) { this.migemoWrapper.Dispose(); this.migemoWrapper = null; } }
public bool QueryRegex(string strQuery, out Regex re) { re = null; if (String.IsNullOrEmpty(strQuery)) { return(false); } if (migemoWrapper == null) { try { migemoWrapper = new MigemoWrapper(pathDLL, pathDic); } catch { return(false); } } if (migemoWrapper != null && migemoWrapper.IsEnable) { try { bool fStartWithNoPartial = strQuery.StartsWith("^"); if (fStartWithNoPartial && strQuery.Length > 1) { strQuery = strQuery.Substring(1); } string strPrefix = String.Empty; if (fStartWithNoPartial || !fPartialMatch) { strPrefix = "^"; } re = new Regex(strPrefix + migemoWrapper.QueryRegexStr(strQuery), RegexOptions.IgnoreCase); return(true); } catch { } } return(false); }
public void Close(EndCode endCode) { if(this.migemoWrapper != null) { this.migemoWrapper.Dispose(); this.migemoWrapper = null; } }