Asynchronous Programming Models in C#

Pattern Description Based On Notes
Thread based By creating System .Threading .Thread instance Managed Thread Expensive, not recommended
Standard BeginXxx and EndXxx methods By calling BeginXxx method with a user callback; calling EndXxx inside that user callback Thread pool Widely used, standard, recommended, support cancellation and continuation
ThreadPool By calling ThreadPool’s static QueueUserWorkItem method Thread pool Widely used, recommended use as much as possible
Delegate By calling Delegate’s BeginInvoke and EndInvoke instance methods Thread pool Less used
Event based By subscribing to the appropriate event and calling the appropriate method Thread pool Avoid use as much as possible, not recommended
Task based By creating System .Threading .Tasks .Task instance A specified task scheduler Recommended, supports all features of a thread pool pattern, and has many other features
async method and await expression By using async and await keywords Task based pattern The new C# 5.0 asynchronous pattern

Read more in The Asynchronous Programming Models (C# 5.0 Series) at CodeProject

Microsoft’s new Cascadia Code font is designed with developers in mind

Update: Unfortunately, the Cascadia Code font is not complete.  A very large number of Unicode characters are missing, making it unusable in f.x RAD Studio or with any application or language that uses characters outside the very limited ASCII range.

Going to try it out instead of my current favorite: Source Code Pro by Adobe.

“Microsoft has announced a new version of their Cascadia Code which is designed with developers in mind. Cascadia Code was first announced by Microsoft at Build back in May and is finally shipping to the Windows users. Microsoft noted that the new font is designed for command-line applications including Windows Terminal. ”

Source: Microsoft’s new Cascadia Code font is designed with developers in mind – MSPoweruser

Generic Command Line Parser for Delphi 10.3.x

You know the feeling. You need a specific input from your command line, but you can’t find something lightweight that does the job. Hence, the FDC.CommandLine was born.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

You can use – / or + as a switch, and use : or = as a flag for parameters.
/option:parameter

You can use single and double quotes to be able to parse parameters that contain spaces and quotes.
/quoteoftheday:”This is a ‘quoted’ parameter”

It also supports lists of parameters.
/inputfiles:(file1.txt , “file with space.txt”)

Take a look at the TestFDCCommandLine.dpr for more examples of how it works.

Continue reading “Generic Command Line Parser for Delphi 10.3.x”