mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-21 16:27:48 +01:00
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.Net;
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
namespace WireMock.Admin.Mappings;
|
|
|
|
/// <summary>
|
|
/// ResponseModelBuilder
|
|
/// </summary>
|
|
public partial class ResponseModelBuilder
|
|
{
|
|
/// <summary>
|
|
/// Set the StatusCode.
|
|
/// </summary>
|
|
public ResponseModelBuilder WithStatusCode(int value) => WithStatusCode(() => value);
|
|
|
|
/// <summary>
|
|
/// Set the StatusCode.
|
|
/// </summary>
|
|
public ResponseModelBuilder WithStatusCode(HttpStatusCode value) => WithStatusCode(() => value);
|
|
|
|
/// <summary>
|
|
/// Set the Delay.
|
|
/// </summary>
|
|
public ResponseModelBuilder WithDelay(TimeSpan value) => WithDelay((int) value.TotalMilliseconds);
|
|
|
|
/// <summary>
|
|
/// Set the MinimumRandomDelay.
|
|
/// </summary>
|
|
public ResponseModelBuilder WithMinimumRandomDelay(TimeSpan value) => WithMinimumRandomDelay((int)value.TotalMilliseconds);
|
|
|
|
/// <summary>
|
|
/// Set the MaximumRandomDelay.
|
|
/// </summary>
|
|
public ResponseModelBuilder WithMaximumRandomDelay(TimeSpan value) => WithMaximumRandomDelay((int)value.TotalMilliseconds);
|
|
} |