mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-15 23:03:55 +01:00
* ProtoBuf
* .
* x
* ---
* x
* fx
* ...
* sc
* ...
* .
* groen
* x
* fix tests
* ok!?
* fix tests
* fix tests
* !
* x
* 6
* .
* x
* ivaluematcher
* transformer
* .
* sc
* .
* mapping
* x
* tra
* com
* ...
* .
* .
* .
* AddProtoDefinition
* .
* set
* grpahj
* .
* .
* IdOrText
* ...
* async
* async2
* .
* t
* nuget
* <PackageReference Include="ProtoBufJsonConverter" Version="0.2.0-preview-04" />
* http version
* tests
* .WithHttpVersion("2")
* <PackageReference Include="ProtoBufJsonConverter" Version="0.2.0" />
* HttpVersionParser
33 lines
719 B
C#
33 lines
719 B
C#
namespace WireMock.Models;
|
|
|
|
/// <summary>
|
|
/// A structure defining an (optional) Id and a Text.
|
|
/// </summary>
|
|
public readonly struct IdOrText
|
|
{
|
|
/// <summary>
|
|
/// The Id [optional].
|
|
/// </summary>
|
|
public string? Id { get; }
|
|
|
|
/// <summary>
|
|
/// The Text.
|
|
/// </summary>
|
|
public string Text { get; }
|
|
|
|
/// <summary>
|
|
/// When Id is defined, return the Id, else the Text.
|
|
/// </summary>
|
|
public string Value => Id ?? Text;
|
|
|
|
/// <summary>
|
|
/// Create a IdOrText
|
|
/// </summary>
|
|
/// <param name="id">The Id [optional]</param>
|
|
/// <param name="text">The Text.</param>
|
|
public IdOrText(string? id, string text)
|
|
{
|
|
Id = id;
|
|
Text = text;
|
|
}
|
|
} |