Exemplo n.º 1
0
        /// <summary>
        /// Asynchronously Retrieve Geofence Configurations, with support for cancellation.
        /// </summary>
        /// <remarks>
        /// Retrieves a list of all geofence configurations, with
        /// optional filters to narrow down the results.
        /// </remarks>
        /// <param name="filter">
        /// An instance of the <see cref="GeofenceConfigFilter"/> class, for narrowing down the results.
        /// </param>
        /// <param name="options">
        /// An instance of the <see cref="RequestOptions"/> class, for customizing method processing.
        /// </param>
        /// <param name="cancellationToken">
        /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>
        /// An enumerable set of <see cref="GeofenceConfig"/> objects, along with an output
        /// instance of the <see cref="ResultsMeta"/> class containing additional data.
        /// </returns>
        public async Task <(IList <GeofenceConfig>, ResultsMeta)> GetGeofenceConfigsAsync(
            GeofenceConfigFilter filter,
            RequestOptions options,
            CancellationToken cancellationToken)
        {
            var context = new GetContext <GeofenceConfig>(EndpointName.GeofenceConfigs, filter, options);

            await ExecuteOperationAsync(context, cancellationToken).ConfigureAwait(false);

            return(context.Results.Items, context.ResultsMeta);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Retrieve Geofence Configurations.
 /// </summary>
 /// <remarks>
 /// Retrieves a list of all geofence configurations, with
 /// optional filters to narrow down the results.
 /// </remarks>
 /// <param name="filter">
 /// An instance of the <see cref="GeofenceConfigFilter"/> class, for narrowing down the results.
 /// </param>
 /// <returns>
 /// An enumerable set of <see cref="GeofenceConfig"/> objects, along with an output
 /// instance of the <see cref="ResultsMeta"/> class containing additional data.
 /// </returns>
 public (IList <GeofenceConfig>, ResultsMeta) GetGeofenceConfigs(
     GeofenceConfigFilter filter)
 {
     return(AsyncUtil.RunSync(() => GetGeofenceConfigsAsync(filter)));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Asynchronously Retrieve Geofence Configurations.
 /// </summary>
 /// <remarks>
 /// Retrieves a list of all geofence configurations, with
 /// optional filters to narrow down the results.
 /// </remarks>
 /// <param name="filter">
 /// An instance of the <see cref="GeofenceConfigFilter"/> class, for narrowing down the results.
 /// </param>
 /// <param name="options">
 /// An instance of the <see cref="RequestOptions"/> class, for customizing method processing.
 /// </param>
 /// <returns>
 /// An enumerable set of <see cref="GeofenceConfig"/> objects, along with an output
 /// instance of the <see cref="ResultsMeta"/> class containing additional data.
 /// </returns>
 public async Task <(IList <GeofenceConfig>, ResultsMeta)> GetGeofenceConfigsAsync(
     GeofenceConfigFilter filter,
     RequestOptions options)
 {
     return(await GetGeofenceConfigsAsync(filter, options, default).ConfigureAwait(false));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Asynchronously Retrieve Geofence Configurations, with support for cancellation.
 /// </summary>
 /// <remarks>
 /// Retrieves a list of all geofence configurations, with
 /// optional filters to narrow down the results.
 /// </remarks>
 /// <param name="filter">
 /// An instance of the <see cref="GeofenceConfigFilter"/> class, for narrowing down the results.
 /// </param>
 /// <param name="cancellationToken">
 /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// <returns>
 /// An enumerable set of <see cref="GeofenceConfig"/> objects, along with an output
 /// instance of the <see cref="ResultsMeta"/> class containing additional data.
 /// </returns>
 public async Task <(IList <GeofenceConfig>, ResultsMeta)> GetGeofenceConfigsAsync(
     GeofenceConfigFilter filter,
     CancellationToken cancellationToken)
 {
     return(await GetGeofenceConfigsAsync(filter, null, cancellationToken).ConfigureAwait(false));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Asynchronously Retrieve Geofence Configurations.
 /// </summary>
 /// <remarks>
 /// Retrieves a list of all geofence configurations, with
 /// optional filters to narrow down the results.
 /// </remarks>
 /// <param name="filter">
 /// An instance of the <see cref="GeofenceConfigFilter"/> class, for narrowing down the results.
 /// </param>
 /// <returns>
 /// An enumerable set of <see cref="GeofenceConfig"/> objects, along with an output
 /// instance of the <see cref="ResultsMeta"/> class containing additional data.
 /// </returns>
 public async Task <(IList <GeofenceConfig>, ResultsMeta)> GetGeofenceConfigsAsync(
     GeofenceConfigFilter filter)
 {
     return(await GetGeofenceConfigsAsync(filter, null, default).ConfigureAwait(false));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Retrieve Geofence Configurations.
 /// </summary>
 /// <remarks>
 /// Retrieves a list of all geofence configurations, with
 /// optional filters to narrow down the results.
 /// </remarks>
 /// <param name="filter">
 /// An instance of the <see cref="GeofenceConfigFilter"/> class, for narrowing down the results.
 /// </param>
 /// <param name="options">
 /// An instance of the <see cref="RequestOptions"/> class, for customizing method processing.
 /// </param>
 /// <returns>
 /// An enumerable set of <see cref="GeofenceConfig"/> objects, along with an output
 /// instance of the <see cref="ResultsMeta"/> class containing additional data.
 /// </returns>
 public (IList <GeofenceConfig>, ResultsMeta) GetGeofenceConfigs(
     GeofenceConfigFilter filter,
     RequestOptions options)
 {
     return(AsyncUtil.RunSync(() => GetGeofenceConfigsAsync(filter, options)));
 }