You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
925 B
C#
39 lines
925 B
C#
namespace HttpClientStudy.Config
|
|
{
|
|
public class WebApiConfig
|
|
{
|
|
/// <summary>
|
|
/// 主机
|
|
/// </summary>
|
|
public string Host { get; set; } = "localhost";
|
|
|
|
/// <summary>
|
|
/// 端口
|
|
/// </summary>
|
|
public int Port { get; set; } = 5189;
|
|
|
|
/// <summary>
|
|
/// 协议(http 或者 https)
|
|
/// </summary>
|
|
public string Scheme { get; set; } = "http";
|
|
|
|
/// <summary>
|
|
/// 基本路径,不以/结尾
|
|
/// </summary>
|
|
public string PathBase { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string BaseUrl
|
|
{
|
|
get { return $"{Scheme}://{Host}:{Port}"; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// WebApi 互斥量
|
|
/// </summary>
|
|
public string WebAppMutexName { get; set; } = "HttpClientStudy.WebApp";
|
|
}
|
|
}
|