예제 #1
0
 /// <summary>
 /// Validates this instance.
 /// </summary>
 internal override void InternalValidate()
 {
     base.InternalValidate();
     EwsUtilities.ValidateParam(this.displayName, "DisplayName");
     EwsUtilities.ValidateParamAllowNull(this.annotation, "Annotation");
     EwsUtilities.ValidateParamAllowNull(this.personaPostalAddress, "PersonaPostalAddress");
 }
예제 #2
0
        /// <summary>
        /// Obtains a list of items by searching the contents of this folder. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="queryString">query string to be used for indexed search</param>
        /// <param name="view">The view controlling the number of items returned.</param>
        /// <returns>An object representing the results of the search operation.</returns>
        public FindItemsResults <Item> FindItems(string queryString, ItemView view)
        {
            EwsUtilities.ValidateParamAllowNull(queryString, "queryString");

            ServiceResponseCollection <FindItemResponse <Item> > responses = this.InternalFindItems <Item>(queryString, view, null /* groupBy */);

            return(responses[0].Results);
        }
예제 #3
0
        /// <summary>
        /// Obtains a list of items by searching the contents of this folder. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="queryString">query string to be used for indexed search</param>
        /// <param name="view">The view controlling the number of items returned.</param>
        /// <returns>An object representing the results of the search operation.</returns>
        public async Task <FindItemsResults <Item> > FindItems(string queryString, ItemView view)
        {
            EwsUtilities.ValidateParamAllowNull(queryString, "queryString");

            ServiceResponseCollection <FindItemResponse <Item> > responses = await this.InternalFindItems <Item>(queryString, view, null /* groupBy */).ConfigureAwait(false);

            return(responses[0].Results);
        }
예제 #4
0
        /// <summary>
        /// Validates this instance against the specified time window.
        /// </summary>
        /// <param name="timeWindow">The time window.</param>
        internal void Validate(TimeSpan timeWindow)
        {
            if (TimeSpan.FromMinutes(this.MergedFreeBusyInterval) > timeWindow)
            {
                throw new ArgumentException(Strings.MergedFreeBusyIntervalMustBeSmallerThanTimeWindow, "MergedFreeBusyInterval");
            }

            EwsUtilities.ValidateParamAllowNull(this.DetailedSuggestionsWindow, "DetailedSuggestionsWindow");
        }
예제 #5
0
        /// <summary>
        /// Obtains a list of items by searching the contents of this folder. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="searchFilter">The search filter. Available search filter classes
        /// include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
        /// SearchFilter.SearchFilterCollection</param>
        /// <param name="view">The view controlling the number of items returned.</param>
        /// <returns>An object representing the results of the search operation.</returns>
        public FindItemsResults <Item> FindItems(SearchFilter searchFilter, ItemView view)
        {
            EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");

            ServiceResponseCollection <FindItemResponse <Item> > responses = this.InternalFindItems <Item>(
                searchFilter,
                view,
                null /* groupBy */);

            return(responses[0].Results);
        }
예제 #6
0
        /// <summary>
        /// Obtains a list of items by searching the contents of this folder. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="searchFilter">The search filter. Available search filter classes
        /// include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
        /// SearchFilter.SearchFilterCollection</param>
        /// <param name="view">The view controlling the number of items returned.</param>
        /// <returns>An object representing the results of the search operation.</returns>
        public async Task <FindItemsResults <Item> > FindItems(SearchFilter searchFilter, ItemView view)
        {
            EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");

            ServiceResponseCollection <FindItemResponse <Item> > responses = await this.InternalFindItems <Item>(
                searchFilter,
                view,
                null /* groupBy */).ConfigureAwait(false);

            return(responses[0].Results);
        }
예제 #7
0
        /// <summary>
        /// Obtains a grouped list of items by searching the contents of this folder. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="searchFilter">The search filter. Available search filter classes
        /// include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
        /// SearchFilter.SearchFilterCollection</param>
        /// <param name="view">The view controlling the number of items returned.</param>
        /// <param name="groupBy">The grouping criteria.</param>
        /// <returns>A collection of grouped items representing the contents of this folder.</returns>
        public GroupedFindItemsResults <Item> FindItems(SearchFilter searchFilter, ItemView view, Grouping groupBy)
        {
            EwsUtilities.ValidateParam(groupBy, "groupBy");
            EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");

            ServiceResponseCollection <FindItemResponse <Item> > responses = this.InternalFindItems <Item>(
                searchFilter,
                view,
                groupBy);

            return(responses[0].GroupedFindResults);
        }
예제 #8
0
        /// <summary>
        /// Obtains a grouped list of items by searching the contents of this folder. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="searchFilter">The search filter. Available search filter classes
        /// include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
        /// SearchFilter.SearchFilterCollection</param>
        /// <param name="view">The view controlling the number of items returned.</param>
        /// <param name="groupBy">The grouping criteria.</param>
        /// <returns>A collection of grouped items representing the contents of this folder.</returns>
        public async Task <GroupedFindItemsResults <Item> > FindItems(SearchFilter searchFilter, ItemView view, Grouping groupBy, CancellationToken token = default(CancellationToken))
        {
            EwsUtilities.ValidateParam(groupBy, "groupBy");
            EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");

            ServiceResponseCollection <FindItemResponse <Item> > responses = await this.InternalFindItems <Item>(
                searchFilter,
                view,
                groupBy,
                token).ConfigureAwait(false);

            return(responses[0].GroupedFindResults);
        }