Exemplo n.º 1
0
        internal static string ToSerializedValue(this GreyscaleColors value)
        {
            switch (value)
            {
            case GreyscaleColors.White:
                return("White");

            case GreyscaleColors.Black:
                return("black");

            case GreyscaleColors.GREY:
                return("GREY");
            }
            return(null);
        }
Exemplo n.º 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>
 /// <param name='cancellationToken'>
 /// 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);
 }
Exemplo n.º 3
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();
 }
 /// <summary>
 /// Initializes a new instance of the HeaderResponseEnumHeaders class.
 /// </summary>
 public HeaderResponseEnumHeaders(GreyscaleColors? value = default(GreyscaleColors?))
 {
     Value = value;
 }
 public static string ToSerialString(this GreyscaleColors value) => value switch
 {