mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-23 01:29:05 +01:00
55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
using System.Collections.Concurrent;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
[module:
|
|
SuppressMessage("StyleCop.CSharp.ReadabilityRules",
|
|
"SA1101:PrefixLocalCallsWithThis",
|
|
Justification = "Reviewed. Suppression is OK here, as it conflicts with internal naming rules.")]
|
|
[module:
|
|
SuppressMessage("StyleCop.CSharp.NamingRules",
|
|
"SA1309:FieldNamesMustNotBeginWithUnderscore",
|
|
Justification = "Reviewed. Suppression is OK here, as it conflicts with internal naming rules.")]
|
|
[module:
|
|
SuppressMessage("StyleCop.CSharp.DocumentationRules",
|
|
"SA1633:FileMustHaveHeader",
|
|
Justification = "Reviewed. Suppression is OK here, as unknown copyright and company.")]
|
|
// ReSharper disable ArrangeThisQualifier
|
|
// ReSharper disable InconsistentNaming
|
|
namespace WireMock
|
|
{
|
|
/// <summary>
|
|
/// The response.
|
|
/// </summary>
|
|
public class ResponseMessage
|
|
{
|
|
/// <summary>
|
|
/// Gets the headers.
|
|
/// </summary>
|
|
public IDictionary<string, string> Headers { get; set; } = new ConcurrentDictionary<string, string>();
|
|
|
|
/// <summary>
|
|
/// Gets or sets the status code.
|
|
/// </summary>
|
|
public int StatusCode { get; set; } = 200;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the body.
|
|
/// </summary>
|
|
public string Body { get; set; }
|
|
|
|
/// <summary>
|
|
/// The add header.
|
|
/// </summary>
|
|
/// <param name="name">
|
|
/// The name.
|
|
/// </param>
|
|
/// <param name="value">
|
|
/// The value.
|
|
/// </param>
|
|
public void AddHeader(string name, string value)
|
|
{
|
|
Headers.Add(name, value);
|
|
}
|
|
}
|
|
} |