Esempio n. 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();
        }
Esempio n. 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();
        }
Esempio n. 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <returns></returns>
 public static bool IsAuditingPage(this AuditingOptions options) => options.GetOption <bool>(nameof(IsAuditingPage));
Esempio n. 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <returns></returns>
 public static bool IsAuditingController(this AuditingOptions options) => options.GetOption <bool>(nameof(IsAuditingController));