Exemplo n.º 1
0
        public VerbInvokeResponse StreamedInvoke(VerbInvokeArguments parameter)
        {
            var stopwatch = new Stopwatch();

            try
            {
                if (_infoService == null)
                {
                    Open();
                }
                stopwatch.Start();
                return(_infoService.StreamedInvoke(parameter));
            }
            catch (FaultException <InfoServiceFaultContract> ex)
            {
                _log.Error("Error executing invoke: " + ex.Detail.Message + Environment.NewLine + parameter.Entity + "." + parameter.Verb);
                throw;
            }
            finally
            {
                stopwatch.Stop();
                if (stopwatch.Elapsed > longRunningQueryTime)
                {
                    _log.WarnFormat("Support! -- LONG RUNNING INVOKE: {0} ms: {1}:{2}", stopwatch.Elapsed.TotalMilliseconds, parameter.Verb, parameter.Entity);
                }
            }
        }
Exemplo n.º 2
0
 public VerbInvokeResponse StreamedInvoke(VerbInvokeArguments parameter)
 {
     var stopwatch = new Stopwatch();
     try
     {
         if (_infoService == null)
         {
             Open();
         }
         stopwatch.Start();
         return _infoService.StreamedInvoke(parameter);
     }
     catch (FaultException<InfoServiceFaultContract> ex)
     {
         _log.Error("Error executing invoke: " + ex.Detail.Message + Environment.NewLine + parameter.Entity + "." + parameter.Verb);
         throw;
     }
     finally
     {
         stopwatch.Stop();
         if (stopwatch.Elapsed > longRunningQueryTime)
         {
             _log.WarnFormat("Support! -- LONG RUNNING INVOKE: {0} ms: {1}:{2}", stopwatch.Elapsed.TotalMilliseconds, parameter.Verb, parameter.Entity);
         }
     }
 }