/// <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); }
/// <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(); }
/// <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; }
internal static string ToSerializedValue(this GreyscaleColors?value) => value == null ? null : (( GreyscaleColors )value).ToSerializedValue();
/// <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(); }