public void Initialize() { if (!_initialized) { MatchManager.Mode = EnableLocaleCache ? MatcherModes.ClientLocaleCache : MatcherModes.ClientNoCache; MatchManager.Initialize(); switch (ClientMode) { case ClientModes.SignalR: ConnectAsync(); break; case ClientModes.Asmx: var asmxClient = new BioMatcherAsmxReference.BioMatcherServiceSoapClient(); asmxClient.Initialize(); break; case ClientModes.Wcf: var wcfClient = new BioMatcherWcfReference.BioMatcherWcfServiceClient(); wcfClient.Initialize(); break; } //lib = FingerprintUtil.CreateMatcher<IFingerprintMatcher>(); //lib.Initialize(); //lib.BenchmarkMode = benchmarkMode; //lib.FingerPrints = FingerprintUtil.CacheFingerPrints(benchmarkMode, Application.StartupPath); _initialized = true; } }
private MatchResult IdentifyWcf(MatchRequest request) { var svcRequest = ToWcfRequest(request); var client = new BioMatcherWcfReference.BioMatcherWcfServiceClient(); var svcResult = client.Identify(svcRequest); client.Close(); return(FromWcfResult(svcResult)); }
private void UpdateCacheWcf(int localeId = -1, bool fullUpdate = false, bool async = false) { var client = new BioMatcherWcfReference.BioMatcherWcfServiceClient(); if (async) { client.UpdateCacheAsync(localeId, fullUpdate); } else { client.UpdateCache(localeId, fullUpdate); } client.Close(); }
public string GetCacheStatus() { switch (ClientMode) { case ClientModes.Asmx: var asmxClient = new BioMatcherAsmxReference.BioMatcherServiceSoapClient(); return(asmxClient.GetCacheStatus()); case ClientModes.Wcf: var wcfClient = new BioMatcherWcfReference.BioMatcherWcfServiceClient(); return(wcfClient.GetCacheStatus()); } return(string.Empty); }