Наследование: System.Configuration.ConfigurationSection
Пример #1
0
        public RaygunClient(RaygunSettings settings)
        {
            _settings = settings;
            _apiKey   = settings.ApiKey;

            _wrapperExceptions.Add(typeof(TargetInvocationException));

            if (settings.IgnoreFormFieldNames != null)
            {
                var ignoredNames = settings.IgnoreFormFieldNames;
                IgnoreFormFieldNames(ignoredNames);
            }
            if (settings.IgnoreHeaderNames != null)
            {
                var ignoredNames = settings.IgnoreHeaderNames;
                IgnoreHeaderNames(ignoredNames);
            }
            if (settings.IgnoreCookieNames != null)
            {
                var ignoredNames = settings.IgnoreCookieNames;
                IgnoreCookieNames(ignoredNames);
            }
            if (settings.IgnoreServerVariableNames != null)
            {
                var ignoredNames = settings.IgnoreServerVariableNames;
                IgnoreServerVariableNames(ignoredNames);
            }
            if (!string.IsNullOrEmpty(settings.ApplicationVersion))
            {
                ApplicationVersion = settings.ApplicationVersion;
            }
            IsRawDataIgnored = settings.IsRawDataIgnored;
        }
    public RaygunAspNetMiddleware(RequestDelegate next, IOptions<RaygunSettings> settings, RaygunMiddlewareSettings middlewareSettings)
    {
      _next = next;
      _middlewareSettings = middlewareSettings;

      _settings = _middlewareSettings.ClientProvider.GetRaygunSettings(settings.Value ?? new RaygunSettings());  
    }
Пример #3
0
        public RaygunAspNetMiddleware(RequestDelegate next, IOptions <RaygunSettings> settings, RaygunMiddlewareSettings middlewareSettings)
        {
            _next = next;
            _middlewareSettings = middlewareSettings;

            _settings = _middlewareSettings.ClientProvider.GetRaygunSettings(settings.Value ?? new RaygunSettings());
        }
Пример #4
0
        public RaygunClient(string apiKey, RaygunSettings settings)
        {
            _settings = settings;
            _apiKey = apiKey;
            _wrapperExceptions = new List<Type>();
            _wrapperExceptions.Add(typeof(TargetInvocationException));
            _wrapperExceptions.Add(typeof(AggregateException));

            ThreadPool.QueueUserWorkItem(state => { SendStoredMessages(); });
        }
Пример #5
0
        public RaygunClient(RaygunSettings settings)
        {
            _settings = settings;
            _apiKey   = settings.ApiKey;

            _wrapperExceptions.Add(typeof(TargetInvocationException));

            if (!string.IsNullOrEmpty(settings.ApplicationVersion))
            {
                ApplicationVersion = settings.ApplicationVersion;
            }
        }
Пример #6
0
        public static RaygunEnvironmentMessage Build(RaygunSettings settings)
        {
            RaygunEnvironmentMessage message = new RaygunEnvironmentMessage();

            // The cross platform APIs for getting this information don't exist right now.

            try
            {
                DateTime now = DateTime.Now;
                message.UtcOffset = TimeZoneInfo.Local.GetUtcOffset(now).TotalHours;
                message.Locale    = CultureInfo.CurrentCulture.DisplayName;
            }
            catch (Exception ex)
            {
                Debug.WriteLine($"Failed to capture time locale {ex.Message}");
            }

            return(message);
        }
Пример #7
0
    public RaygunClient(RaygunSettings settings, HttpContext context = null)
    {
      _settings = settings;
      _apiKey = settings.ApiKey;

      _wrapperExceptions.Add(typeof(TargetInvocationException));

      if (settings.IgnoreFormFieldNames != null)
      {
        var ignoredNames = settings.IgnoreFormFieldNames;
        IgnoreFormFieldNames(ignoredNames);
      }
      if (settings.IgnoreHeaderNames != null)
      {
        var ignoredNames = settings.IgnoreHeaderNames;
        IgnoreHeaderNames(ignoredNames);
      }
      if (settings.IgnoreCookieNames != null)
      {
        var ignoredNames = settings.IgnoreCookieNames;
        IgnoreCookieNames(ignoredNames);
      }
      if (settings.IgnoreServerVariableNames != null)
      {
        var ignoredNames = settings.IgnoreServerVariableNames;
        IgnoreServerVariableNames(ignoredNames);
      }
      if (!string.IsNullOrEmpty(settings.ApplicationVersion))
      {
        ApplicationVersion = settings.ApplicationVersion;
      }
      IsRawDataIgnored = settings.IsRawDataIgnored;

      if (context != null)
      {
        SetCurrentContext(context);
      }
    }
Пример #8
0
 public virtual RaygunSettings GetRaygunSettings(RaygunSettings baseSettings)
 {
     return(baseSettings);
 }
Пример #9
0
 public virtual RaygunClient GetClient(RaygunSettings settings, HttpContext context)
 {
     return(new RaygunClient(settings, context));
 }
Пример #10
0
 public virtual RaygunClient GetClient(RaygunSettings settings)
 {
     return(GetClient(settings, null));
 }
Пример #11
0
 public virtual RaygunSettings GetRaygunSettings(RaygunSettings baseSettings)
 {
     return baseSettings;
 }
Пример #12
0
 public virtual RaygunClient GetClient(RaygunSettings settings, HttpContext context)
 {
     return new RaygunClient(settings, context);
 }
Пример #13
0
 public virtual RaygunClient GetClient(RaygunSettings settings)
 {
     return GetClient(settings, null);
 }
Пример #14
0
 private RaygunMessageBuilder(RaygunSettings settings)
 {
     _raygunMessage = new RaygunMessage();
     _settings      = settings;
 }
Пример #15
0
 public static RaygunMessageBuilder New(RaygunSettings settings)
 {
     return(new RaygunMessageBuilder(settings));
 }