Rico Suter's blog.
 

Articles

Aurelia JS: Implement a dialog service which renders Bootstrap UI dialogs

I’m currently working on an SPA (single-page application) which uses the Aurelia JavaScript client framework and Bootstrap UI CSS framework. In the application I need to show various custom dialogs. This is why I implemented a reusable dialog service class which simplifies the creation of Bootstrap based dialogs. In this article I’d like to share and explain the code of this dialog service and the required helper classes. The sample code is written in TypeScript but it can easily be converted to ES6 JavaScript.
Read More ›

.NET Core: Missing mscorlib after installing a Portable Class Library (PCL) or .NET Standard library

.NET Core projects can reference Portable Class Libraries if one of the .NET Standard compliant profiles is used (e.g. the profile 259).
Read More ›

NSwag Tutorial: Generate an Angular TypeScript client from an existing ASP.NET Web API web assembly

This tutorial shows how to generate an Angular TypeScript client with the NSwag Swagger toolchain. You can use this client in your Angular 2 SPA (single-page application) to consume the web services of an existing Web API project. The metadata for the client generator will be loaded from an existing .NET assembly which contains your Web API controller classes. The NSwag project provides many other TypeScript templates (for targeting other JS frameworks) and also a C# client generator.
Read More ›

NSwag Tutorial: Integrate the NSwag toolchain into your ASP.NET Web API project

This tutorial shows how to integrate NSwag (Swagger toolchain for .NET) so that you can access your Web API actions with the Swagger UI and a generated C# client library.
Read More ›

Script to clone all Git repositories from your Azure DevOps collection

In this article I show you a PowerShell script which clones and pulls all Git repositories from your Azure DevOps collection. I use this script to retrieve the complete code base so that I can run my code analysis tools on it.
Read More ›

SystemJS module loader: Enable JavaScript debugging with Visual Studio and Internet Explorer

In a project, we switched from the JavaScript module loader RequireJS to SystemJS. After the migration, debugging JavaScript directly from Visual Studio in Internet Explorer stopped working. The problem is that Visual Studio cannot detect the loading of script files because SystemJS uses JavaScript HTTP calls instead of injected tags to load modules.
Read More ›

How to programmatically retrieve the deployment time of an ASP.NET web site

In one of my web projects, I wanted to append the web site deployment time to the JavaScript URLs. This way the browser uses the cached file version until a new web site version is deployed.
Read More ›

OpenLayers 3: Add the Bing Maps Traffic layer to your map

The following code shows how to add the Bing Maps Traffic layer to your OpenLayers 3 map.
Read More ›

JavaScript decorator to add pre- and post-logic to a Promise

In this blog post, I’ll describe the simple concepts of JavaScript Promise decorators. They are a simple way to add logic which is run before and after the exection of a Promise (a.k.a. aspect-oriented programming). As soon as you see my two samples, you’ll get the idea…
Read More ›

Asynchronously loaded Unit Tests with Jasmine and RequireJS

The following check list shows how to write JavaScript Jasmine Unit Tests where the tests are asynchronously loaded from AMD modules with RequireJS.
Read More ›