Esempio n. 1
0
        /// <summary>
        /// Adds an available period to the request.
        /// </summary>
        /// <param name="start">
        /// The start of the available period.
        /// </param>
        /// <param name="end">
        /// The end of the available period.
        /// </param>
        /// <returns>
        /// A reference to the <see cref="SequencedAvailabilityRequestBuilder"/>.
        /// </returns>
        public SequencedAvailabilityRequestBuilder AddAvailablePeriod(DateTimeOffset start, DateTimeOffset end)
        {
            var period = new AvailabilityRequest.AvailablePeriod
            {
                Start = start,
                End   = end,
            };

            this.availablePeriods.Add(period);

            return(this);
        }
        /// <summary>
        /// Adds an available period to the member.
        /// </summary>
        /// <param name="start">
        /// The start of the available period.
        /// </param>
        /// <param name="end">
        /// The end of the available period.
        /// </param>
        /// <returns>
        /// A reference to the <see cref="AvailabilityMemberBuilder"/>.
        /// </returns>
        public AvailabilityMemberBuilder AddAvailablePeriod(DateTimeOffset start, DateTimeOffset end)
        {
            var period = new AvailabilityRequest.AvailablePeriod
            {
                Start = start,
                End   = end,
            };

            if (this.availablePeriods == null)
            {
                this.availablePeriods = new List <AvailabilityRequest.AvailablePeriod>();
            }

            this.availablePeriods.Add(period);

            return(this);
        }