/// <summary> /// Get all Units /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderby'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// ascending order by the supplied property.</p><p>Valid values /// are: <strong>UnitId</strong> (default), /// <strong>Name</strong>.</p><p>Note: /// <strong>orderby</strong> and /// <strong>orderbydesc</strong> are mutually exclusive.</p> /// </param> /// <param name='orderbydesc'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// descending order by the supplied property.</p><p>Valid values /// are: <strong>UnitId</strong> (default), /// <strong>Name</strong>.</p><p>Note: /// <strong>orderby</strong> and /// <strong>orderbydesc</strong> are mutually exclusive.</p> /// </param> /// <param name='accountAccountId'> /// <p><a href="#queryoptions">Filters</a> the result by /// Account.AccountId using the supplied operation and /// value.</p><p>Valid operations are: /// <strong>eq(int)</strong></p> /// </param> /// <param name='unitTypeUnitTypeId'> /// <p><a href="#queryoptions">Filters</a> the result by /// UnitType.UnitTypeId using the supplied operation and /// value.</p><p>Valid operations are: /// <strong>eq(int)</strong></p> /// </param> /// <param name='top'> /// <a href="#queryoptions">Query paging</a> Returns the maximum /// number of entities. Default and max value is 10000 /// </param> /// <param name='skip'> /// <a href="#queryoptions">Query paging</a> Skips this number of /// entities /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> GetCollectionAsyncByqueryOptionsAsync(this IUnits operations, string orderby = "UnitId", string orderbydesc = default(string), string accountAccountId = default(string), string unitTypeUnitTypeId = default(string), int?top = 10000, int?skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetCollectionAsyncByqueryOptionsWithHttpMessagesAsync(orderby, orderbydesc, accountAccountId, unitTypeUnitTypeId, top, skip, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }