Ejemplo n.º 1
0
        public static DbLogger CreateDocumentLogger(this DbLoggerProvider logger, string documentId)
        {
            var category = typeof(FileDocument).Name;
            var resource = documentId;

            return(logger.CreateLogger(category, resource));
        }
Ejemplo n.º 2
0
        public static DbLogger CreateDocumentLogger(this DbLoggerProvider logger, IDocument document)
        {
            var category = document.GetType().Name;
            var resource = document.DocumentId;

            return(logger.CreateLogger(category, resource));
        }
Ejemplo n.º 3
0
        public async Task <IViewComponentResult> InvokeAsync(string documentId, string userId)
        {
            //var url = $"http://localhost:24000/api/doc/log?id={documentId}";

            //var model = JsonConvert.DeserializeObject<LogDescriptor>(await new HttpClient().GetStringAsync(url));
            //var model = new List<object>();
            var model = _logger.CreateLogger(typeof(FileDocument).Name, documentId);

            return(await Task.Run(() => View(model)));
        }
Ejemplo n.º 4
0
 public OpenIdInterceptors(DbLoggerProvider logProvider, IOptions <ServerOptions> serverOptions)
 {
     _logger        = logProvider.CreateLogger("OIDC Events");
     _serverOptions = serverOptions.Value;
 }