Пример #1
0
        /// <summary>
        /// 初始化 <see cref="PushTask"/> 类的新实例。
        /// </summary>
        /// <param name="client">推送客户端。</param>
        /// <param name="message">推送消息。</param>
        public PushTask(PushClient client, PushMessage message) : this(Guid.NewGuid())
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            this._client  = client;
            this._message = message;
        }
Пример #2
0
 /// <summary>
 /// 初始化 <see cref="PushEntry"/> 类的新实例。
 /// </summary>
 /// <param name="client">待推送的客户端。</param>
 /// <param name="message">待推送的消息实例。</param>
 public PushEntry(PushClient client, PushMessage message)
 {
     this.Client  = client;
     this.Message = message;
 }