public virtual Response EnumNull(UriColor enumPath, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PathsClient.EnumNull"); scope.Start(); try { return(RestClient.EnumNull(enumPath, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response> EnumNullAsync(UriColor enumPath, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PathsClient.EnumNull"); scope.Start(); try { return(await RestClient.EnumNullAsync(enumPath, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }
internal static string ToSerializedValue(this UriColor value) { switch (value) { case UriColor.Redcolor: return("red color"); case UriColor.Greencolor: return("green color"); case UriColor.Bluecolor: return("blue color"); } return(null); }
/// <summary> /// Get null (no query parameter in url) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumQuery'> /// null string value. Possible values include: 'red color', 'green color', /// 'blue color' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task EnumNullAsync(this IQueries operations, UriColor? enumQuery = default(UriColor?), CancellationToken cancellationToken = default(CancellationToken)) { await operations.EnumNullWithHttpMessagesAsync(enumQuery, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Get null (no query parameter in url) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumQuery'> /// null string value. Possible values include: 'red color', 'green color', /// 'blue color' /// </param> public static void EnumNull(this IQueries operations, UriColor? enumQuery = default(UriColor?)) { Task.Factory.StartNew(s => ((IQueries)s).EnumNullAsync(enumQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get using uri with query parameter 'green color' /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumQuery'> /// 'green color' enum value. Possible values include: 'red color', 'green /// color', 'blue color' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task EnumValidAsync(this IQueries operations, UriColor? enumQuery = default(UriColor?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.EnumValidWithHttpMessagesAsync(enumQuery, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Get using uri with query parameter 'green color' /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumQuery'> /// 'green color' enum value. Possible values include: 'red color', 'green /// color', 'blue color' /// </param> public static void EnumValid(this IQueries operations, UriColor? enumQuery = default(UriColor?)) { System.Threading.Tasks.Task.Factory.StartNew(s => ((IQueries)s).EnumValidAsync(enumQuery), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get null (should throw on the client before the request is sent on wire) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumPath'> /// send null should throw. Possible values include: 'red color', 'green /// color', 'blue color' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task EnumNullAsync(this IPaths operations, UriColor enumPath, CancellationToken cancellationToken = default(CancellationToken)) { await operations.EnumNullWithHttpMessagesAsync(enumPath, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Get using uri with 'green color' in path parameter /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumPath'> /// send the value green. Possible values include: 'red color', 'green color', /// 'blue color' /// </param> public static void EnumValid(this IPaths operations, UriColor enumPath) { Task.Factory.StartNew(s => ((IPaths)s).EnumValidAsync(enumPath), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get null (should throw on the client before the request is sent on wire) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumPath'> /// send null should throw. Possible values include: 'red color', 'green /// color', 'blue color' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task EnumNullAsync(this IPaths operations, UriColor enumPath, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.EnumNullWithHttpMessagesAsync(enumPath, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Get null (should throw on the client before the request is sent on wire) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumPath'> /// send null should throw. Possible values include: 'red color', 'green /// color', 'blue color' /// </param> public static void EnumNull(this IPaths operations, UriColor enumPath) { operations.EnumNullAsync(enumPath).GetAwaiter().GetResult(); }
/// <summary> /// Get null (should throw on the client before the request is sent on wire) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumPath'> /// send null should throw. Possible values include: 'red color', 'green /// color', 'blue color' /// </param> public static void EnumNull(this IPaths operations, UriColor enumPath) { Task.Factory.StartNew(s => ((IPaths)s).EnumNullAsync(enumPath), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get null (should throw on the client before the request is sent on wire) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumPath'> /// send null should throw. Possible values include: 'red color', 'green /// color', 'blue color' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task EnumNullAsync(this IPaths operations, UriColor enumPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.EnumNullWithHttpMessagesAsync(enumPath, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Get using uri with 'green color' in path parameter /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumPath'> /// send the value green. Possible values include: 'red color', 'green color', /// 'blue color' /// </param> public static void EnumValid(this IPaths operations, UriColor enumPath) { System.Threading.Tasks.Task.Factory.StartNew(s => ((IPaths)s).EnumValidAsync(enumPath), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get null (should throw on the client before the request is sent on wire) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='enumPath'> /// send null should throw. Possible values include: 'red color', 'green /// color', 'blue color' /// </param> public static void EnumNull(this IPaths operations, UriColor enumPath) { System.Threading.Tasks.Task.Factory.StartNew(s => ((IPaths)s).EnumNullAsync(enumPath), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
public static string ToSerialString(this UriColor value) => value switch {