Example #1
0
        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;
            }
        }
Example #2
0
        private MatchResult IdentifyAsmx(MatchRequest request)
        {
            var svcRequest = ToAsmxRequest(request);
            var client     = new BioMatcherAsmxReference.BioMatcherServiceSoapClient();
            var svcResult  = client.Identify(svcRequest);

            return(FromAsmxResult(svcResult));
        }
Example #3
0
        private void UpdateCacheAsmx(int localeId = -1, bool fullUpdate = false, bool async = false)
        {
            var client = new BioMatcherAsmxReference.BioMatcherServiceSoapClient();

            if (async)
            {
                client.UpdateCacheAsync(localeId, fullUpdate);
            }
            else
            {
                client.UpdateCache(localeId, fullUpdate);
            }
            client.Close();
        }
Example #4
0
        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);
        }