Example #1
0
 public AuditPipelineModule(AuditDataProvider dataProvider = null, EventCreationPolicy?creationPolicy = null,
                            string auditEventType          = null, bool includeHeaders = false, bool includeQueryString = false, bool auditDisabled = false, IAuditScopeFactory auditScopeFactory = null)
 {
     AuditDataProvider  = dataProvider;
     CreationPolicy     = creationPolicy;
     AuditEventType     = auditEventType;
     AuditDisabled      = auditDisabled;
     IncludeHeaders     = includeHeaders;
     IncludeQueryString = includeQueryString;
     AuditScopeFactory  = auditScopeFactory;
 }
Example #2
0
 static Configuration()
 {
     AuditDisabled  = false;
     DataProvider   = new FileDataProvider();
     CreationPolicy = EventCreationPolicy.InsertOnEnd;
     JsonSettings   = new JsonSerializerSettings
     {
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore
     };
     SystemClock = new DefaultSystemClock();
     ResetCustomActions();
     _auditScopeFactory = new AuditScopeFactory();
 }
Example #3
0
        static Configuration()
        {
            AuditDisabled  = false;
            DataProvider   = new FileDataProvider();
            CreationPolicy = EventCreationPolicy.InsertOnEnd;
#if IS_NK_JSON
            JsonSettings = new JsonSerializerSettings
            {
                NullValueHandling     = NullValueHandling.Ignore,
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            };
#else
            JsonSettings = new JsonSerializerOptions
            {
                DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
                PropertyNamingPolicy   = null
                                         // TODO: Will be added on .net 6 https://github.com/dotnet/runtime/pull/46101/commits/152db423e06f6d93a560b45b4330fac6507c7aa7
                                         //ReferenceHandler = ReferenceHandler.IgnoreCycle
            };
#endif
            SystemClock = new DefaultSystemClock();
            ResetCustomActions();
            _auditScopeFactory = new AuditScopeFactory();
        }
 public IAuditClientHandlerConfigurator AuditScopeFactory(IAuditScopeFactory auditScopeFactory)
 {
     _auditScopeFactory = auditScopeFactory;
     return(this);
 }
Example #5
0
 public Audit(IAuditScopeFactory auditScopeFactory) => _auditScopeFactory = auditScopeFactory;