コード例 #1
0
ファイル: Configuration.cs プロジェクト: xiawei666/Audit.NET
 static Configuration()
 {
     AuditDisabled  = false;
     DataProvider   = new FileDataProvider();
     CreationPolicy = EventCreationPolicy.InsertOnEnd;
     JsonSettings   = new JsonSerializerSettings
     {
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore
     };
     SystemClock = new DefaultSystemClock();
     ResetCustomActions();
 }
コード例 #2
0
ファイル: Configuration.cs プロジェクト: eduprog/Audit.NET
        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();
        }