コード例 #1
0
        /// <summary>Send sessions to a Loupe Server using the current agent configuration</summary>
        /// <remarks>The EndSend event will be raised when the send operation completes.  Because sessions are
        /// sent one by one, they will be individually marked as read once sent.</remarks>
        /// <overloads>Send sessions to the Loupe Server</overloads>
        /// <param name="sessionMatchPredicate">A delegate to evaluate sessions and determine which ones to send.</param>
        /// <param name="markAsRead">True to have every included session marked as read upon successful completion.</param>
        /// <param name="serverConfiguration">Optional.  The connection options to use instead of the current configured server connection</param>
        /// <exception cref="GibraltarException">The server couldn't be contacted or there was a communication error.</exception>
        /// <exception cref="ArgumentException">The server configuration specified is invalid.</exception>
        public void SendToServer(Predicate <SessionSummary> sessionMatchPredicate, bool markAsRead, ServerConfiguration serverConfiguration = null)
        {
            var predicateAdapter = new SessionSummaryPredicate(sessionMatchPredicate);

            m_Packager.SendToServer(predicateAdapter.Predicate, markAsRead, false, false, serverConfiguration);
        }
コード例 #2
0
        /// <summary>
        /// Asynchronously send sessions to a Loupe Server using the current agent configuration
        /// </summary>
        /// <param name="sessionMatchPredicate">A delegate to evaluate sessions and determine which ones to send.</param>
        /// <param name="markAsRead">True to have every included session marked as read upon successful completion.</param>
        /// <param name="purgeSentSessions">True to have every included session removed from the local repository upon successful completion.</param>
        /// <param name="serverConfiguration">Optional.  The connection options to use instead of the current configured server connection</param>
        /// <remarks>The EndSend event will be raised when the send operation completes.  Because sessions are
        /// sent one by one, they will be individually marked as read once sent.</remarks>
        public void SendToServerAsync(Predicate <SessionSummary> sessionMatchPredicate, bool markAsRead, bool purgeSentSessions, ServerConfiguration serverConfiguration = null)
        {
            var predicateAdapter = new SessionSummaryPredicate(sessionMatchPredicate);

            m_Packager.SendToServer(predicateAdapter.Predicate, markAsRead, purgeSentSessions, true, serverConfiguration);
        }
コード例 #3
0
        /// <summary>
        /// Asynchronously write the completed package to the provided full file name
        /// (without extension) and path. The extension will be set to glp automatically.
        /// </summary>
        /// <remarks>The EndSend event will be raised when the send operation completes.
        /// Any provided extension will be removed and replaced with the standard Loupe package extension.</remarks>
        /// <param name="sessionMatchPredicate">A delegate to evaluate sessions and determine which ones to send.</param>
        /// <param name="markAsRead">True to have every included session marked as read upon successful completion.</param>
        /// <param name="fullFileNamePath">The file name and path to write the final package to.</param>
        /// <exception cref="ArgumentNullException">A required parameter was null.</exception>
        /// <exception cref="ArgumentOutOfRangeException">The provided file information is not a fully qualified file name and path.</exception>
        public void SendToFileAsync(Predicate <SessionSummary> sessionMatchPredicate, bool markAsRead, string fullFileNamePath)
        {
            var predicateAdapter = new SessionSummaryPredicate(sessionMatchPredicate);

            m_Packager.SendToFile(predicateAdapter.Predicate, markAsRead, fullFileNamePath, true);
        }