You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.6 KiB

using System;
using System.Collections.Generic;
using System.Web;
namespace Apewer.Web
{
/// <summary>选项。</summary>
public static class ApiOptions
{
/// <summary>允许 Invoker 解析 favicon.ico 请求。</summary>
/// <remarks>默认值:不允许,响应空。</remarks>
public static bool AllowFavIcon { get; set; } = false;
/// <summary>允许 Invoker 解析 robot.txt 请求。</summary>
/// <remarks>默认值:不允许,拒绝搜索引擎收录根目录。</remarks>
public static bool AllowRobot { get; set; } = false;
/// <summary>允许 Invoker 枚举输出 Applications 或 Functions。</summary>
/// <remarks>默认值:允许,输出列表。</remarks>
public static bool AllowEnumerate { get; set; } = true;
/// <summary>允许 Invoker 输出 Exception 对象的属性。</summary>
/// <remarks>默认值:不允许输出。</remarks>
public static bool AllowException { get; set; } = false;
/// <summary>允许 Invoker 输出的 Json 对象缩进。</summary>
/// <remarks>默认值:不缩进。</remarks>
public static bool JsonIndent { get; set; } = false;
/// <summary>允许 Invoker 输出 Application 列表时包含模块名称。</summary>
/// <remarks>默认值:不包含。</remarks>
public static bool WithModuleName { get; set; } = false;
/// <summary>允许 Invoker 输出 Application 列表时包含类型名称。</summary>
/// <remarks>默认值:不包含。</remarks>
public static bool WithTypeName { get; set; } = false;
/// <summary>在响应中包含时间属性。</summary>
/// <remarks>默认值:不包含。</remarks>
public static bool WithClock { get; set; } = false;
/// <summary>在响应中包含执行 API 的持续时间。</summary>
/// <remarks>默认值:包含。</remarks>
public static bool WithDuration { get; set; } = true;
/// <summary>在响应中包含 Application 和 Function 属性。</summary>
/// <remarks>默认值:不包含。</remarks>
public static bool WithTarget { get; set; } = false;
/// <summary>在响应中包含 Access-Control 属性。</summary>
/// <remarks>默认值:包含。</remarks>
public static bool WithAccessControl { get; set; } = true;
/// <summary>设置 Access-Control-Max-Age 的值。</summary>
/// <remarks>默认值:60。</remarks>
public static int AccessControlMaxAge { get; set; } = 60;
}
}