Beispiel #1
0
        public FilePacker(IFileProviderOptions options)
        {
            this.options = options;

            this.serializerSettings = new JsonSerializerSettings
            {
                Formatting            = Formatting.None,
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            };
        }
Beispiel #2
0
        public FileClient(
            IFilePacker packer,
            IFileProviderOptions options,
            IFileClientTimer timer)
        {
            this.packer  = packer;
            this.options = options;
            this.timer   = timer;

            this.timer.SetupTimer(new TimerCallback(async(target) =>
            {
                if (!flushing)
                {
                    if (logEvents != null && logEvents.Any())
                    {
                        await FlushEvents();
                    }
                }
            }), options.FlushTime);
        }
Beispiel #3
0
 public FileLogger(IFileProviderOptions options, IEnumerable <ILogSerializer> serializers, IFileClient client)
 {
     this.options     = options;
     this.serializers = serializers;
     this.client      = client;
 }