Exemple #1
0
        /// <summary>
        /// Gets all Active Entities (with the given subset of columns only)
        /// where the values are in the columnName
        /// </summary>
        /// <typeparam name="T">Type of Entity List to return.</typeparam>
        /// <param name="service"></param>
        /// <param name="anonymousTypeInitializer">An Anonymous Type Initializer where the properties of the anonymous
        /// type are the column names to add.</param>
        /// <param name="columnName">The name of the column to perform the in against.</param>
        /// <param name="values">The list of values to search for being in the column name.</param>
        /// <param name="token"></param>
        /// <returns></returns>
        public static IAsyncEnumerable <T> GetAllEntitiesInAsync <T>(this IOrganizationServiceAsync2 service,
                                                                     Expression <Func <T, object> > anonymousTypeInitializer, string columnName, IEnumerable values, CancellationToken token)
            where T : Entity
        {
            var columnSet = new ColumnSet(anonymousTypeInitializer.GetAttributeNamesArray());

            return(service.GetAllEntitiesInAsync <T>(columnSet, columnName, values, token));
        }
Exemple #2
0
 /// <summary>
 /// Gets all Active Entities where the values are in the columnName
 /// </summary>
 /// <typeparam name="T">Type of Entity List to return.</typeparam>
 /// <param name="service"></param>
 /// <param name="columnName">The name of the column to perform the in against.</param>
 /// <param name="values">The list of values to search for being in the column name.</param>
 /// <returns></returns>
 public static IAsyncEnumerable <T> GetAllEntitiesInAsync <T>(this IOrganizationServiceAsync2 service,
                                                              string columnName, params object[] values) where T : Entity
 {
     return(service.GetAllEntitiesInAsync <T>(default(CancellationToken), columnName, values));
 }
Exemple #3
0
 /// <summary>
 /// Gets all Active Entities (with the given subset of columns only)
 /// where the values are in the columnName
 /// </summary>
 /// <typeparam name="T">Type of Entity List to return.</typeparam>
 /// <param name="service"></param>
 /// <param name="anonymousTypeInitializer">An Anonymous Type Initializer where the properties of the anonymous
 /// type are the column names to add.</param>
 /// <param name="columnName">The name of the column to perform the in against.</param>
 /// <param name="values">The list of values to search for being in the column name.</param>
 /// <returns></returns>
 public static IAsyncEnumerable <T> GetAllEntitiesInAsync <T>(this IOrganizationServiceAsync2 service,
                                                              Expression <Func <T, object> > anonymousTypeInitializer, string columnName, params object[] values)
     where T : Entity
 {
     return(service.GetAllEntitiesInAsync <T>(anonymousTypeInitializer, default, columnName, values));