lunes, 9 de octubre de 2017
.NET / .NET Core
- Swashbuckle con ASP.NET Core y AAD B2C
Eduard Tomás - Roslyn Primer – Part I: Anatomy of a Compiler
Anthony D. Green - Dissecting the local functions in C# 7
Sergey Teplyakov - User Interface Unit Tests with .NET Core
Ricardo Peres - C# 7 Series, Part 5: Private Protected
Mark Zhou
Publicado por José M. Aguilar a las 8:55 a. m.
Nadie ha comentado la entrada, ¿quieres ser el primero?
Etiquetas: enlaces
martes, 3 de octubre de 2017
Otro ejemplo muy habitual lo encontramos con
MapPath()
, un método perteneciente a la clase HttpServerUtility
de ASP.NET "clásico" que utilizábamos para obtener una ruta física a partir de la ruta virtual o relativa de un recurso. Por ejemplo, en el siguiente código mostramos cómo averiguar la ruta en disco de una imagen utilizando este método:var path = HttpContext.Current.Server.MapPath("~/images/image.jpg"); // path = C:\inetpub\wwwroot\mysite\images\image.jpgPues bien, ni en ASP.NET Core ni en MVC tenemos disponible la clase
System.Web.HttpContext
, ni por tanto una propiedad Server
de tipo HttpServerUtility
que usábamos para invocar al método MapPath()
. Sin embargo, disponemos de herramientas alternativas que nos permiten conseguir lo mismo, aunque, eso sí, de forma algo menos directa.
lunes, 2 de octubre de 2017
.NET / .NET Core
- Plataforma .NET, Plataforma .NET Core y Xamarin: el panorama de las tecnologías de desarrollo Microsoft en 2018
José Manuel Alarcón - .NET Framework 4.7.1 Runtime and Compiler Features
Preeti Krishna - Possessive apostrophes in C# identifiers
Simon Harriyott - The Book of the Runtime - The internals of the .NET Runtime that you won’t find in the documentation
Scott Hanselman - Interesting C# 7.x features - Part 02
Malisa Ncube - Better Performance from Async Operations
Steve Smith - Upcoming features and enhancements in C# 7.2
Kapil Khandelwal - C# Tools to Help with Your Code Quality
Erik Dietrich - Interface Method Implementation C# 8.0
DotNetCrunch - .NET Core CLI and MSBUILD Cheat Sheet
Carlos Mendible
martes, 26 de septiembre de 2017
Por ejemplo, en el siguiente código vemos cómo podíamos aprovechar los eventos
Application_Start()
y Application_End()
para guardar un registro básico de estos sucesos:public class MvcApplication : System.Web.HttpApplication
{
private static string _logFile;
protected void Application_Start()
{
...
_logFile = Server.MapPath("log.txt");
File.AppendAllText(_logFile, DateTime.Now + ": Starting\n");
}
protected void Application_End()
{
File.AppendAllText(_logFile, DateTime.Now + ": Stopping\n");
}
}
Sabemos que en ASP.NET Core no existe Global.asax, por lo esta fórmula ya no está disponible. Sin embargo, el nuevo framework ofrece una alternativa bastante razonable mediante el interfaz IApplicationLifetime
, proporcionando, entre otras cosas, vías para suscribirnos a eventos relacionados con el ciclo de vida de una aplicación.
lunes, 25 de septiembre de 2017
.NET/.NET Core
- .NET Core vs .NET Framework: How to Pick a .NET Runtime for an Application
Angela Stringfellow - 3 New C# 8 Features We Are Excited About
Simon Timms - New Free C# 7.1: What's New Quick Start eBook
Jason Roberts - What would a cross-platform .NET UI Framework look like? Exploring Avalonia
Scott Hanselman - .NET Framework 4.7.1 Accessibility and WPF Improvements
Preeti Krishna - Interesting C# 7.x features - 01
Malisa Nnube - C# 7.1’s default value expressions enhancement: default literal expressions
Kapil Khandelwal - Conditional TargetFrameworks for Multi-Targeted .NET SDK Projects on Cross-Platform Builds
Rick Strahl - How to Create a .NET Core CLI Console App as an EXE Instead of a DLL
Jon Gallant - Adding circuit breakers to your .NET applications
Richard Seroter - Deep Dive into OWIN Katana
Kusnaditjung