Ejemplo n.º 1
0
        public virtual string Create(string entityType, PropertyBag properties)
        {
            var stopwatch = new Stopwatch();

            try
            {
                if (_infoService == null)
                {
                    Open();
                }
                stopwatch.Start();
                return(_infoService.Create(entityType, properties));
            }
            catch (FaultException <InfoServiceFaultContract> ex)
            {
                _log.Error("Error executing create operation: " + ex.Detail.Message + Environment.NewLine + entityType + Environment.NewLine + properties);
                throw;
            }
            finally
            {
                stopwatch.Stop();
                if (stopwatch.Elapsed > longRunningQueryTime)
                {
                    _log.WarnFormat("Support! -- LONG RUNNING CREATE: {0} ms: {1}", stopwatch.Elapsed.TotalMilliseconds, entityType);
                }
            }
        }