A C# Source Generators, as Microsoft defines it, is “a new C# compiler feature that lets C# developers inspect user code and generate new C# source files that can be added to a compilation. This is done via a new kind of component that we’re calling a Source Generator.” Think of C# Source generator as […]
.NET Compiler Platform, also known by its nickname Roslyn, is a set of open-source compilers and code analysis APIs for C# and Visual Basic .NET languages. The primary features of Roslyn are to provide compilers and APIs for code analysis and refactoring. There is a splendid must-read article about Roslyn entitled How Microsoft rewrote its […]
C# is awesome programming language. The C# team at Microsoft is adding new features with every new version of the language. And forthcoming version C# 9 is no exception. Among other nice features, there will also be a feature called Top-level statements. You can read more about proposal on this link https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/top-level-statements. Furthermore, you can […]
What’s the point of this blog post? In modern C#/.NET ecosystem there is encouragement to use async/await Task based asynchronous model over other asynchronous patterns and approaches. On the other side, there are still a lot of libraries (legacy, wrappers from other technologies/languages which uses events for callback calls, etc…) which use older EAP approach […]
A little bit of background. Bluetooth is a wireless technology standard used for exchanging data between fixed and mobile devices over short distances using short-wavelength UHF radio waves in the industrial, scientific and medical radio bands, from 2.402 GHz to 2.480 GHz, and building personal area networks. It was originally conceived as a wireless alternative to […]
Every application need some kind of logging or monitoring system. Monitoring can be used for tracing errors and exceptions, for analyzing of app usage, for finding hard-to-trace bugs in “production environment”, for storing some other runtime data interested for later analysis, and similar. In general and very commonly, .NET desktop apps use some kind of […]
In this blog post I will show how to remotely debug simple .NET Core console application running on Raspberry Pi and Ubuntu Linux. The purpose of this blog post is not to debug complex application, but to show step by step procedure how to perform remote debugging of .NET Core application. In other words, I […]
To be honest, I have never believed that I will write about developing Mac applications with C#. Well, I am more or less hardcore C# & .NET developer so this post is (I guess) a bit out-of-my-course. Not so long ago, .NET developers were limited to develop applications strictly for Windows environment. But with .NET […]
Task-based Asynchronous Pattern (TAP) was introduced in .NET Framework 4 and since then, it is the recommended approach to asynchronous programming in .NET.
Event-based Asynchronous Pattern (EAP) is still in use, especially at legacy systems, but for new development is not recommended anymore.
In this post I will show how to wrap EAP into TAP and use more modern approach.
On Android, when pairing with Bluetooth device is in progress, popup form requesting pin is displayed. Everything is ok, except awkward message “Try 000 or 1234”. For some users this is confusing, because they simply type in what pairing popup is suggesting. Of course, pairing fails due to wrong pin entered. Let’s take a look how I fixed this issue.