Exemple #1
0
 /// <summary>
 /// Create a new Time Window
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> PostTimeWindowAsync(this IFeatureManagementAppTierAPI operations, TimeWindow body = default(TimeWindow), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PostTimeWindowWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
        public async Task <IActionResult> Post(TimeWindow timeWindow)
        {
            if (timeWindow == null)
            {
                return(BadRequest("TimeWindow is required"));
            }

            using (IFeatureManagementAppTierAPI api = CreateFeatureManagementApi())
            {
                HttpOperationResponse <object> result = await api.PostTimeWindowWithHttpMessagesAsync(timeWindow);

                return(CreateResponse <TimeWindow>(result));
            }
        }