async / await: calling an async method from a non-async method

C#

Sometimes it is necessary to call an async method from a method that is not marked async, for example during a synchronous version implementation of an asynchronous method. For this, it is possible to build a synchronous task by using an asynchronous lambda function. For example, either the following asynchronous method, taking a parameter of … Continue reading async / await: calling an async method from a non-async method

C #: Get information about the caller of a method

C#

Obtaining information about the caller of a method is very useful in the property binding and log function scenarios. Traditionally, the following processes would be implemented: to identify the calling method: To simply identify the calling method, one can still examine the stack trace, in which the StackFrame objects (namespace System.Diagnostics) provide the GetMethod and … Continue reading C #: Get information about the caller of a method

WPF: Developing an inflector of resource dictionary keys

.NET WPF XAML

According to the dictionary (not that of resources , but rather that of the English language: the freed dictionary, "an inflector is the way a word is changed or modified in form in order to reach a new specific meaning". In the case of a WPF resource dictionary, a key inflection mechanism makes it possible … Continue reading WPF: Developing an inflector of resource dictionary keys

First steps with ANTLR4 in C #

texte de grammaire csharp

1. What is ANTLR? ANTLR4 is a lexer / parser generator. A parser takes a text input, and according to a grammar, extracts the recognized lexicons terms (action of the lexer), and produce an AST: Abstract Syntax Tree (action of the parser). We can have parsers without grammars (the PEG: Parsing Expression Grammar, which are … Continue reading First steps with ANTLR4 in C #

Localize a .NET application with locbaml – excel – csvtransformer

illustration traduction pays et texte traduire

Your latest software creation is ready and should be disseminated beyond your borders? So it's time to translate (localization) the resources used. We will see in this ticket a simple way to do it using the appropriate tools: • Visual studio compiler msbuild • free tool Visual Locbaml 1. Preparing the application for localization The … Continue reading Localize a .NET application with locbaml – excel – csvtransformer

Installing applications using Microsoft ClickOnce technology

software install

The ClickOnce Microsoft technology will install a Windows application from a single link on a web page. In practice it is a file (setup.exe or .application), which allows the Windows system to start the installation by recovering all the necessary files from the WEB server. This technology can also work via the network neighborhood. The … Continue reading Installing applications using Microsoft ClickOnce technology

Trace the WPF easing functions

homme forme fonction

Wpf Easing fonctions, otherwise known as the acceleration functions, are functions that slow down or accelerate the motion of an animation according to a mathematical formula. In this post we will see how to make a small WPF application that lists and draws the Easing functions available in the WPF framework. Let's start with the … Continue reading Trace the WPF easing functions