Blog

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

GMini Translator 2.0: a free text translator for the Windows desktop

gmini translator 2

GMini Translator 2.0 is a free tool for the Windows desktop that allows you to quickly translate text from the Google Translate service. I wrote this little software in WPF / C# 6.0 / .NET 4.6.2 to have a tool more ergonomic than its counterpart Google translate in the WEB browser: support of the clipboard, … Continue reading GMini Translator 2.0: a free text translator for the Windows desktop

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

Killing a process with a PowerShell script

Microsoft PowerShell

To kill a process in a Windows script environment, PowerShell is the perfect tool. Just make a PowerShell script file: script file: kill_process.ps1 This script kills the process named MyProcess if it exists. The error action prevents the script from outputting information if an error occurs, for example if the process does not exist. [shell … Continue reading Killing a process with a PowerShell script

GMini Translator: an ergonomic text translator for the Windows desktop

earth hands

GMini Translator is a windowed tool for the Windows desktop that allows fast translations of short texts from the Google Translate translation service as provided by the Google Chrome. Thus no API key is needed to run the service. However, it has limitations (text size, automatic hyphenation on punctuation, ...). The GMini Translator tool circumvents … Continue reading GMini Translator: an ergonomic text translator for the Windows desktop

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

Use Google Translate for free on the command line

image

The official Google Translate API is available to businesses by paying a license fee ... But it is possible to call the secret API translate.googleapis.com which is used internally by the extension for Google Translate Chrome! On his website Digital Inspiration, the famous Amit Agarwal (historically the 1st Indian blogger) informs us of this possibility … Continue reading Use Google Translate for free on the command line