
Ahí van los enlaces recopilados durante la semana pasada. Espero que os resulten interesantes. :-)
Por si te lo perdiste...
- El hombre que inventó el Control-Alt-Suprimir
José María Aguilar - C# source generators: un ejemplo sencillo, paso a paso
José María Aguilar
.NET Core / .NET
- Looking at C# 12 Proposals and Beyond
Michael Shpilt - LINQ on steroids with SIMD
Steven Giesel - Does OpenTelemetry in .NET Cause Performance Degradation?
Martin J. T. - Refactoring Object-Orientation Abusers in C#
Code Maze - WireMock.NET - Introduction
Cezary Piątek - An abstract example of refactoring from interaction-based to property-based testing
Mark Seemann - How to Remove All Whitespace Characters From a String in C#?
Code Maze - Source Generators and Regular Expressions
Steven Giesel - Listing all available ETW events in a .NET application
Gérald Barré - Working with Tuple in C#
A. Yohan Malshika - C# 11.0 new features: Span<char> pattern matching
Ian Griffiths - Pythonnet – A Simple Union of .NET Core and Python You’ll Love
Nick Cosentino
Publicado por José M. Aguilar a las 8:05 a. m.
Etiquetas: enlaces

Ahí van los enlaces recopilados durante la semana pasada. Espero que os resulten interesantes. :-)
Por si te lo perdiste...
- C# Source generators: metaprogramación en tiempo de compilación
José María Aguilar - Desmitificando las expresiones lambda (I)
José María Aguilar
.NET Core / .NET
- How to create a NuGet metapackage
Daniel Wertheim - C# Source Generators: How to get build information?
Steven Giesel - Handling CancelKeyPress using a CancellationToken
Gérald Barré - Deep Copy of an Object in C#
Code Maze - Understanding the .NET ecosystem: The introduction of .NET Standard
Andrew Lock - Primary Constructors with C#
Christian Nagel - Improving multi-platform container support
Richard Lander - How to Delete Elements from an Array in C#
Code Maze - Using the contents of a file to define an MSBuild property
Raymond Chen - C# - Clean up your exception handling logic with Exception Filters
Bart Wullems - Using System.Text.Json to do polymorphic Json conversion in .NET 6
Allan Thraen - Observability in Wolverine
Jeremy D. Miller - Vendor-Agnostic Telemetry Using OpenTelemetry Collector in .NET
Phil Broderick - Change the ServiceLifetime after the service has been added to the .NET ServiceCollection
Niels Swimberghe

A raíz del artículo publicado hace algunas semanas sobre las ventajas de usar diccionarios en lugar de listas, me llegaba vía comentarios un escenario en el que se utilizaba una clase List<T>
para almacenar objetos a los que luego se accedía mediante clave. Lo diferencial del caso es que dichos objetos tenían varias claves únicas a través de las cuales podían ser localizados.
Por verlo por un ejemplo, el caso era más o menos como el que sigue:
public class FriendsCollection
{
private List<Friend> _friends = new();
...
public void Add(Friend friend)
{
_friends.Add(friend);
}
public Friend? GetById(int id)
=> _friends.FirstOrDefault(f => f.Id == id);
public Friend? GetByToken(string token)
=> _friends.FirstOrDefault(f => f.Token == token);
}
Obviamente en este escenario no podemos sustituir alegremente la lista por un diccionario, porque necesitamos acceder a los elementos usando dos claves distintas. Pero, por supuesto, podemos conseguir también la ansiada búsqueda O(1) si le echamos muy poquito más de tiempo.

Ahí van los enlaces recopilados durante la semana pasada. Espero que os resulten interesantes. :-)
Por si te lo perdiste...
- Formas de relanzar excepciones en C#
José María Aguilar - Cómo crear bibliotecas de clases o proyectos de consola .NET 5 en lugar de .NET Core 3.1
José María Aguilar
.NET Core / .NET
- Adding Dependency Injection to a Console App in .Net 7
Paul Michaels - Loading RSA Keys in .NET & Loading RSA Keys in .NET
Scott Brady - How to Use MemoryStream in C#
Ivan Matec - Too many timers in .NET?
Gérald Barré - Implementing React's UseState in C#
Ricardo Peres - Understanding the .NET ecosystem: The evolution of .NET into .NET 7
Andrew Lock - Caching in .NET with MemoryCache
Steven Giesel - The Top .NET C# UI Controls You Should be Using
GrapeCity Developer Solutions - Iterator Benchmarks That Shocked With Unexpected Results
Nick Cosentino - .NET 8 Preview 2 Unveiled: 5 New Features You Need to Know
ByteHide - .NET Performance Delivers Again for Bing, From .NET 5 to .NET 7
Ben Watson - Secure your .NET cloud apps with rootless Linux Containers
Richard Lander - How to build a URL Shortener with C# .NET and Redis
Niels Swimberghe - .NET Core - Remove older SDKs and runtimes
Bart Wullems - How to Create a Custom JsonConverter in Json.NET
Ahsan Ullah - Leverage 'is not' Operator for Exception Filtering!
Steven Giesel

El pattern matching de C# proporciona la capacidad de analizar expresiones para ver si cumplen determinados "patrones" o presentan características determinadas. Podéis ver algunos ejemplos interesantes en el post Un vistazo a los patrones relacionales y combinadores.
Aunque ya los tengo bastante interiorizados y hago uso de ellos cuando toca, todavía no se me ha dado el caso de necesitar los patrones de listas, introducidos hace unos meses en C# 11. Así que no está de más echarles un vistazo para cuando se dé la ocasión 😉

Ahí van los enlaces recopilados durante la semana pasada. Espero que os resulten interesantes. :-)
Por si te lo perdiste...
- Radzen Blazor Components: ¡ahora open source!
José María Aguilar - Usando using, valga la redundancia (C#)
José María Aguilar
.NET Core / .NET
- Announcing .NET 8 Preview 2
Alexandra Barry - .NET 7 SDK built-in container improvements
Laurent Kempé - System.Text.Json Serializing Hierarchical Data
Christian Nagel - Partial Classes In C# And How to Use Them
Code Maze - Solving .NET JSON Deserialization Issues
Khalid Abuhakmeh - Using Trie Class for Efficient Text Pattern Searching in C#
Code Maze - How Async/Await Really Works in C#
Stephen Toub - Immutable Collections in C#
Code Maze - WkHtmlToPdf: Dealing with broken Url Encoded and Extended Character Links
Rick Strahl - Enhancing JPEG, PNG, Text Using C# .NET Part 1
GrapeCity Developer Solutions - Polly with .NET 6, Part 8 - Policy Registry with Minimal APIs, and HttpClientFactory
Bryan Hogan - Discover the New Features of .NET 8: What You Need to Know
ByteHide - Many Ways to make and Deserialize an HTTP GET with HttpClient
Bryan Hogan - Write your own AutoMapper in C#
Steven Giesel