コード例 #1
0
ファイル: NotificationManager.cs プロジェクト: skyfyl/Lean
        /// <summary>
        /// Send an email to the address specified for live trading notifications.
        /// </summary>
        /// <param name="subject">Subject of the email</param>
        /// <param name="message">Message body, up to 10kb</param>
        /// <param name="data">Data attachment (optional)</param>
        /// <param name="address">Email address to send to</param>
        public bool Email(string address, string subject, string message, string data = "")
        {
            if (!_liveMode) return false;
            var allow = Allow();

            if (allow)
            {
                var email = new NotificationEmail(address, subject, message, data);
                Messages.Enqueue(email);
            }

            return allow;
        }
コード例 #2
0
        /// <summary>
        /// Send an email to the address specified for live trading notifications.
        /// </summary>
        /// <param name="subject">Subject of the email</param>
        /// <param name="message">Message body, up to 10kb</param>
        /// <param name="data">Data attachment (optional)</param>
        /// <param name="address">Email address to send to</param>
        /// <param name="headers">Optional email headers to use</param>
        public bool Email(string address, string subject, string message, string data = "", Dictionary <string, string> headers = null)
        {
            if (!Allow())
            {
                return(false);
            }

            var email = new NotificationEmail(address, subject, message, data, headers);

            Messages.Enqueue(email);

            return(true);
        }
コード例 #3
0
        /// <summary>
        /// Send an email to the address specified for live trading notifications.
        /// </summary>
        /// <param name="subject">Subject of the email</param>
        /// <param name="message">Message body, up to 10kb</param>
        /// <param name="data">Data attachment (optional)</param>
        /// <param name="address">Email address to send to</param>
        public bool Email(string address, string subject, string message, string data = "")
        {
            if (!Allow())
            {
                return(false);
            }

            var email = new NotificationEmail(address, subject, message, data);

            Messages.Enqueue(email);

            return(true);
        }
コード例 #4
0
        /// <summary>
        /// Send an email to the address specified for live trading notifications.
        /// </summary>
        /// <param name="subject">Subject of the email</param>
        /// <param name="message">Message body, up to 10kb</param>
        /// <param name="data">Data attachment (optional)</param>
        /// <param name="address">Email address to send to</param>
        public bool Email(string address, string subject, string message, string data = "")
        {
            if (!_liveMode)
            {
                return(false);
            }
            var allow = Allow();

            if (allow)
            {
                var email = new NotificationEmail(address, subject, message, data);
                Messages.Enqueue(email);
            }

            return(allow);
        }
コード例 #5
0
ファイル: Messaging.cs プロジェクト: intelliBrain/Lean
 /// <summary>
 /// Send a rate limited email notification triggered during live trading from a user algorithm
 /// </summary>
 /// <param name="notification"></param>
 public void Email(NotificationEmail notification)
 {
     //
 }