Esempio n. 1
0
        public override void ExecuteQuery(CommerceQueryOperation queryOperation, OperationCacheDictionary operationCache, CommerceQueryOperationResponse response)
        {
            if (LoggingShared.SkipLogging(queryOperation))
            {
                return;
            }

            operationCache[LoggingShared.WatchCacheKey] = Stopwatch.StartNew();
        }
Esempio n. 2
0
        public override void ExecuteQuery(CommerceQueryOperation queryOperation, OperationCacheDictionary operationCache, CommerceQueryOperationResponse response)
        {
            if (queryOperation == null)
            {
                throw new ArgumentNullException("queryOperation");
            }
            if (operationCache == null)
            {
                throw new ArgumentNullException("operationCache");
            }
            if (response == null)
            {
                throw new ArgumentNullException("response");
            }

            if (LoggingShared.SkipLogging(queryOperation))
            {
                return;
            }

            if (!EnsureStorageProvider())
            {
                return;
            }

            TimeSpan?elapsedTime = GetExecutionTime(operationCache);
            CommerceCatalogFullTextSearch searchCriteria = GetSearchCriteria(queryOperation);

            if (searchCriteria == null)
            {
                return;
            }

            var provider = _container.GetService <ILoggingStorageProvider>();

            provider.Log(new LoggingResult());
        }