示例#1
0
        public void EnableAuditingPage()
        {
            var options = new AuditingOptions();

            options.GetOption <bool>(nameof(AuditingOptionsExtensions.IsAuditingPage)).ShouldBeFalse();
            options.EnableAuditingPage();
            options.GetOption <bool>(nameof(AuditingOptionsExtensions.IsAuditingPage)).ShouldBeTrue();
        }
示例#2
0
        public void DisableAuditingController()
        {
            var options = new AuditingOptions();

            options.GetOption <bool>(nameof(AuditingOptionsExtensions.IsAuditingController)).ShouldBeFalse();
            options.EnableAuditingController();
            options.GetOption <bool>(nameof(AuditingOptionsExtensions.IsAuditingController)).ShouldBeTrue();
            options.DisableAuditingController();
            options.GetOption <bool>(nameof(AuditingOptionsExtensions.IsAuditingController)).ShouldBeFalse();
        }
示例#3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <returns></returns>
 public static bool IsAuditingPage(this AuditingOptions options) => options.GetOption <bool>(nameof(IsAuditingPage));
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <returns></returns>
 public static bool IsAuditingController(this AuditingOptions options) => options.GetOption <bool>(nameof(IsAuditingController));