/// <summary> /// Obtiene la información del fichero /// </summary> /// <param name="viewPath">ruta virtual del fichero</param> private void GetView(string viewPath) { try { var page = _apiVirtualPath.GetPage(viewPath); if (page != null) { _exists = true; _viewContent = Encoding.UTF8.GetBytes(page.Content); _lastModified = page.LastModified; } } catch (Exception ex) { // if something went wrong, Exists will be false } }
/// <summary> /// Obtiene la información del fichero /// </summary> /// <param name="viewPath">ruta virtual del fichero</param> private void GetView(string viewPath) { try { //Stopwatch sw = new Stopwatch(); //sw.Start(); // Iniciar la medición. var page = _apiVirtualPath.GetPage(viewPath); if (page != null) { _exists = true; _viewContent = Encoding.UTF8.GetBytes(page.Content); _lastModified = page.LastModified; } //sw.Stop(); //Log.Information($"Api file info: obtener la ruta: {viewPath} : {sw.Elapsed.ToString("hh\\:mm\\:ss\\.fff")}\n"); } catch (Exception ex) { // if something went wrong, Exists will be false } }