Ejemplo n.º 1
0
 static Configuration()
 {
     AuditDisabled  = false;
     DataProvider   = new FileDataProvider();
     CreationPolicy = EventCreationPolicy.InsertOnEnd;
     JsonSettings   = new JsonSerializerSettings
     {
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore
     };
     SystemClock = new DefaultSystemClock();
     ResetCustomActions();
 }
Ejemplo n.º 2
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();
        }