示例#1
0
        /// <summary>
        /// Initializes the <see cref="RavenClient"/> class which you can then access through <see cref="Instance"/>. 
        /// Call this in your App() constructor before InitializeComponent()
        /// </summary>
        /// <param name="dsn"></param>
        /// <param name="captureUnhandled"></param>
        public static void InitializeAsync(Dsn dsn, bool captureUnhandled = true)
        {
            if (_instance != null)
                return;

            _instance = new RavenClient(dsn, captureUnhandled);

            _instance.FlushStoredPayloadsAsync().ContinueWith(t => _instance.HandleInternalException(t.Exception), TaskContinuationOptions.OnlyOnFaulted);
        }