/// <summary> /// Get Time Window by feature Id /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='featureId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> GetTimeWindowByFeatureIdAsync(this IFeatureManagementAppTierAPI operations, System.Guid featureId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetTimeWindowByFeatureIdWithHttpMessagesAsync(featureId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public async Task <IActionResult> GetByFeatureId(Guid featureId) { if (featureId == Guid.Empty) { return(BadRequest("Invalid Id")); } using (IFeatureManagementAppTierAPI api = CreateFeatureManagementApi()) { HttpOperationResponse <object> result = await api.GetTimeWindowByFeatureIdWithHttpMessagesAsync(featureId); return(CreateResponse <TimeWindow>(result)); } }