Example #1
0
 /// <summary>
 /// Send a post request with header values "scenario": "valid", "value":
 /// "GREY" or "scenario": "null", "value": null
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scenario'>
 /// Send a post request with header values "scenario": "valid" or "null" or
 /// "empty"
 /// </param>
 /// <param name='value'>
 /// Send a post request with header values 'GREY' . Possible values for this
 /// parameter include: 'White', 'black', 'GREY'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ParamEnumAsync(this IHeader operations, string scenario, GreyscaleColors?value = default(GreyscaleColors?), CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.ParamEnumWithHttpMessagesAsync(scenario, value, null, cancellationToken).ConfigureAwait(false);
 }
Example #2
0
 /// <summary>
 /// Send a post request with header values "scenario": "valid", "value":
 /// "GREY" or "scenario": "null", "value": null
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scenario'>
 /// Send a post request with header values "scenario": "valid" or "null" or
 /// "empty"
 /// </param>
 /// <param name='value'>
 /// Send a post request with header values 'GREY' . Possible values for this
 /// parameter include: 'White', 'black', 'GREY'
 /// </param>
 public static void ParamEnum(this IHeader operations, string scenario, GreyscaleColors?value = default(GreyscaleColors?))
 {
     Task.Factory.StartNew(s => ((IHeader)s).ParamEnumAsync(scenario, value), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the HeaderResponseEnumHeaders class.
 /// </summary>
 /// <param name="value">response with header values "GREY" or null.
 /// Possible values include: 'White', 'black', 'GREY'</param>
 public HeaderResponseEnumHeaders(GreyscaleColors?value = default(GreyscaleColors?))
 {
     Value = value;
 }
Example #4
0
 internal static string ToSerializedValue(this GreyscaleColors?value) =>
 value == null ? null : (( GreyscaleColors )value).ToSerializedValue();
Example #5
0
 /// <summary>
 /// Send a post request with header values "scenario": "valid", "value": "GREY"
 /// or "scenario": "null", "value": null
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scenario'>
 /// Send a post request with header values "scenario": "valid" or "null" or
 /// "empty"
 /// </param>
 /// <param name='value'>
 /// Send a post request with header values 'GREY'. Possible values include:
 /// 'White', 'black', 'GREY'
 /// </param>
 public static void ParamEnum(this IHeader operations, string scenario, GreyscaleColors?value = default(GreyscaleColors?))
 {
     operations.ParamEnumAsync(scenario, value).GetAwaiter().GetResult();
 }