示例#1
0
        public Hub(SentryOptions options)
        {
            // Create client from options and bind
            _ownedClient = new SentryClient(options);
            ScopeManager = new SentryScopeManager(options, _ownedClient);

            // TODO: Subscribing or not should be based on the Options or some IIntegration
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
        }
示例#2
0
        public Hub(SentryOptions options)
        {
            Debug.Assert(options != null);

            _ownedClient = new SentryClient(options);
            ScopeManager = new SentryScopeManager(options, _ownedClient);

            _integrations = options.Integrations;

            if (_integrations?.Count > 0)
            {
                foreach (var integration in _integrations)
                {
                    integration.Register(this);
                }
            }
        }
示例#3
0
        public Hub(SentryOptions options)
        {
            Debug.Assert(options != null);
            _options = options;

            options.DiagnosticLogger?.LogDebug("Initializing Hub for Dsn: '{0}'.", options.Dsn);

            _ownedClient = new SentryClient(options);
            ScopeManager = new SentryScopeManager(options, _ownedClient);

            _integrations = options.Integrations;

            if (_integrations?.Count > 0)
            {
                foreach (var integration in _integrations)
                {
                    options.DiagnosticLogger?.LogDebug("Registering integration: '{0}'.", integration.GetType().Name);
                    integration.Register(this);
                }
            }
        }