예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SubscribeResponseMessage"/> class with the supplied content.
        /// </summary>
        /// <remarks>
        /// Generally used as a convienence method to quickly create a response message with a body containing the provided
        /// <paramref name="subscriptionManager"/> and <paramref name="expires"/> information.
        /// </remarks>
        /// <param name="subscriptionManager">The <see cref="SubscriptionManager"/> this response message will return to the subscriber.</param>
        /// <param name="expires">The <see cref="Expires"/> information for the new subscription.</param>
        public SubscribeResponseMessage(SubscriptionManager subscriptionManager, Expires expires)
        {
            Contract.Requires <ArgumentNullException>(subscriptionManager != null, "subscriptionManager");
            Contract.Requires <ArgumentNullException>(expires != null, "expires");

            this.body = new SubscribeResponseMessageBody(subscriptionManager, expires);
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SubscribeResponseMessage"/> class with the supplied content.
        /// </summary>
        /// <param name="body">The <see cref="SubscribeResponseMessageBody"/> this response message will return to the subscriber.</param>
        public SubscribeResponseMessage(SubscribeResponseMessageBody body)
        {
            Contract.Requires <ArgumentNullException>(body != null, "body");

            this.body = body;
        }