Пример #1
0
        private DirectProvider()
        {
            var config = ProviderConfiguration.GetConfiguration();

            this.Name       = config.Name;
            this.Namespace  = config.Namespace;
            this.Assembly   = config.Assembly;
            this.Buffer     = config.Buffer;
            this.MaxRetries = config.MaxRetries;
            this.Timeout    = config.Timeout;
            this.DateFormat = config.DateFormat;
            this.Debug      = config.Debug;
        }
Пример #2
0
        public DirectErrorResponse(DirectRequest request, Exception exception) : base(request)
        {
            ErrorMessage = exception.Message;
            ErrorData    = exception.Data.Count > 0 ? exception.Data : null;
#if DEBUG
            Where = GetErrorLocation(exception);
#else
            if (ProviderConfiguration.GetConfiguration().Debug)
            {
                Where = GetErrorLocation(exception);
            }
#endif
            if (request.IsFormPost)
            {
                Result = new { success = false };
            }
        }