| | | 1 | | using System; |
| | | 2 | | using JetBrains.Annotations; |
| | | 3 | | using Newtonsoft.Json; |
| | | 4 | | using WireMock.Handlers; |
| | | 5 | | using WireMock.Logging; |
| | | 6 | | |
| | | 7 | | namespace WireMock.Settings |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// FluentMockServerSettings |
| | | 11 | | /// </summary> |
| | | 12 | | public class FluentMockServerSettings : IFluentMockServerSettings |
| | | 13 | | { |
| | | 14 | | /// <inheritdoc cref="IFluentMockServerSettings.Port"/> |
| | | 15 | | [PublicAPI] |
| | 123 | 16 | | public int? Port { get; set; } |
| | | 17 | | |
| | | 18 | | /// <inheritdoc cref="IFluentMockServerSettings.UseSSL"/> |
| | | 19 | | [PublicAPI] |
| | | 20 | | // ReSharper disable once InconsistentNaming |
| | 123 | 21 | | public bool? UseSSL { get; set; } |
| | | 22 | | |
| | | 23 | | /// <inheritdoc cref="IFluentMockServerSettings.StartAdminInterface"/> |
| | | 24 | | [PublicAPI] |
| | 108 | 25 | | public bool? StartAdminInterface { get; set; } |
| | | 26 | | |
| | | 27 | | /// <inheritdoc cref="IFluentMockServerSettings.ReadStaticMappings"/> |
| | | 28 | | [PublicAPI] |
| | 94 | 29 | | public bool? ReadStaticMappings { get; set; } |
| | | 30 | | |
| | | 31 | | /// <inheritdoc cref="IFluentMockServerSettings.WatchStaticMappings"/> |
| | | 32 | | [PublicAPI] |
| | 94 | 33 | | public bool? WatchStaticMappings { get; set; } |
| | | 34 | | |
| | | 35 | | /// <inheritdoc cref="IFluentMockServerSettings.ProxyAndRecordSettings"/> |
| | | 36 | | [PublicAPI] |
| | 100 | 37 | | public IProxyAndRecordSettings ProxyAndRecordSettings { get; set; } |
| | | 38 | | |
| | | 39 | | /// <inheritdoc cref="IFluentMockServerSettings.Urls"/> |
| | | 40 | | [PublicAPI] |
| | 96 | 41 | | public string[] Urls { get; set; } |
| | | 42 | | |
| | | 43 | | /// <inheritdoc cref="IFluentMockServerSettings.StartTimeout"/> |
| | | 44 | | [PublicAPI] |
| | 141 | 45 | | public int StartTimeout { get; set; } = 10000; |
| | | 46 | | |
| | | 47 | | /// <inheritdoc cref="IFluentMockServerSettings.AllowPartialMapping"/> |
| | | 48 | | [PublicAPI] |
| | 95 | 49 | | public bool? AllowPartialMapping { get; set; } |
| | | 50 | | |
| | | 51 | | /// <inheritdoc cref="IFluentMockServerSettings.AdminUsername"/> |
| | | 52 | | [PublicAPI] |
| | 61 | 53 | | public string AdminUsername { get; set; } |
| | | 54 | | |
| | | 55 | | /// <inheritdoc cref="IFluentMockServerSettings.AdminPassword"/> |
| | | 56 | | [PublicAPI] |
| | 51 | 57 | | public string AdminPassword { get; set; } |
| | | 58 | | |
| | | 59 | | /// <inheritdoc cref="IFluentMockServerSettings.RequestLogExpirationDuration"/> |
| | | 60 | | [PublicAPI] |
| | 96 | 61 | | public int? RequestLogExpirationDuration { get; set; } |
| | | 62 | | |
| | | 63 | | /// <inheritdoc cref="IFluentMockServerSettings.MaxRequestLogCount"/> |
| | | 64 | | [PublicAPI] |
| | 94 | 65 | | public int? MaxRequestLogCount { get; set; } |
| | | 66 | | |
| | | 67 | | /// <inheritdoc cref="IFluentMockServerSettings.PreWireMockMiddlewareInit"/> |
| | | 68 | | [PublicAPI] |
| | | 69 | | [JsonIgnore] |
| | 47 | 70 | | public Action<object> PreWireMockMiddlewareInit { get; set; } |
| | | 71 | | |
| | | 72 | | /// <inheritdoc cref="IFluentMockServerSettings.PostWireMockMiddlewareInit"/> |
| | | 73 | | [PublicAPI] |
| | | 74 | | [JsonIgnore] |
| | 47 | 75 | | public Action<object> PostWireMockMiddlewareInit { get; set; } |
| | | 76 | | |
| | | 77 | | /// <inheritdoc cref="IFluentMockServerSettings.Logger"/> |
| | | 78 | | [PublicAPI] |
| | | 79 | | [JsonIgnore] |
| | 195 | 80 | | public IWireMockLogger Logger { get; set; } = new WireMockNullLogger(); |
| | | 81 | | |
| | | 82 | | /// <inheritdoc cref="IFluentMockServerSettings.FileSystemHandler"/> |
| | | 83 | | [PublicAPI] |
| | | 84 | | [JsonIgnore] |
| | 98 | 85 | | public IFileSystemHandler FileSystemHandler { get; set; } = new LocalFileSystemHandler(); |
| | | 86 | | } |
| | | 87 | | } |