Dependency injection in Apache Ignite.NET service

Consider there is an Apache Ignite.NET cluster that provides service grid and you want to be able to execute distributed service that could access local dependency injector.

First, let’s create service itself.

As you know, Apache Ignite.NET automagically serializes services, sends them over the wire and deserializes on the node, where it will be executed. Thus, if we are using dependency injection container, Apache Ignite.NET simply does not know about it and won’t inject anything that it is not aware of. Luckily, we still can inject Apache Ignite.NET instance itself, by marking it with [InstanceResource] attribute.

Let’s introduce dependency injection container abstraction

In order to introduce Apache Ignite.NET to dependency injection container abstraction, let’s create a simple plugin.

So far, so good, we are able to wire up our DI abstraction

Finally, in application’s main method let’s complete the puzzle

That’s it, now we are ready to access our DI abstraction in Apache Ignite.NET service:


How-to: Use different environment variables for production and development with ionic 3

Create 2 configuration files with environment variables in folder src/config: and

Update: For Ionic < 3.7

Override 2 configuration files provided by @ionic/app-scripts package: optimization.config.js and webpack.config.js

Notify ionic to use these overridden files by adding links to them to package.json

Update: For Ionic >= 3.7

Override webpack.config.js, provided by @ionic/app-scripts package.

Notify ionic to use overridden file by adding link to package.json

Instruct TypeScript to use custom alias for a module by editing tsconfig.json

Finally, use your environment variables

Automatically build Android APK for Ionic 3 project stored in GitLab

Setup GitLab CI. Your configuration file will look something like this

Optionally put a link to file in your that will look like

Animations stop working after building project scaffolded by Fountain Webapp Generator

Fix is very quick and clean. In gulp_tasks/build.js pass additional parameters to cssnano:


How-to: Display images obtained from cordova-plugin-camera in ionic with live reload

  1. Install cordova-plugin-file.
  2. Obtain file URI from cordova-plugin-camera and convert it to cdvfile://

How-to: Use angular-templatecache with ionic

From project’s directory execute next command in order to install angular-templatecache

Modify your gulpfile.js

Don’t forget to reference ‘templates’ dependency in your www/js/app.js

Don’t forget to reference www/js/dist/templates.js in your index.html file.

Start debugging with

Run next command to rebuild template cache