C#

Caching in Azure Function – how you can use Redis

I believe that you should know that Microsoft has prepared some set of components that can be used for integration purposes. You are able to consume the following services in our function: Azure Storage, Azure Event Hubs, Azure Service Bus, Azure Mobile Apps, Azure Cosmos DB, Azure Notification Hubs, Twilio, SendGrid. On the one hand this list is not so big. On the other one you can address with those services a lot of typical scenarios. But sometimes you need to do something more. Today I would like to share with how easily you can use Redis cache in Azure [...]

By |2019-05-12T16:04:26+02:002 October 2017 |.net, Azure Functions, C#|0 Comments

Azure Functions – Lessons learned

Nowadays all topics related to Cloud and Serverless terms have become very popular. One of such elements are Azure Functions. Microsoft defines it as: Azure Functions is a solution for easily running small pieces of code, or “functions,” in the cloud. You can write just the code you need for the problem at hand, without worrying about a whole application or the infrastructure to run it. Functions can make development even more productive, and you can use your development language of choice, such as C#, F#, Node.js, Python or PHP. Pay only for the time your code runs and trust [...]

By |2019-05-12T16:07:34+02:006 June 2017 |.net, Azure Functions, C#|0 Comments

Moq.EntityFramework.Helpers NuGet package

As you probably know I wrote two articles about mocking DbSet<TEntity> with Moq: synchronous calls – Mocking DbContext and DbSet with Moq asynchronous calls – EntityFramework – asynchronous queries unit tests I combined those solution to one library and published in on NuGet – Moq.EntityFramework.Helpers. […]

By |2017-03-07T22:07:45+01:007 March 2017 |C#, Extras / Tools, Projects, Testing|2 Comments

Lightning talk – Autofixture

I would like to encourage you to download and go through presentation from lighting talk about AutoFixture library. Main purpose of this library is to minimize the ‘Arrange’ phase of unit tests in order to maximize maintainability. Presentation is available on GitHub – AutoFixture - Lightning talk. You will find there description of main features of this library. Moreover, presentation contains short comparison AutoFixture with other available solutions. Of course on GitHub you will find code used in presentation.

dynamic – Code review

With each new version of .net framework Microsoft tries to add some new elements to the language, which in theory should improve the possibilities of language and comfort of the software developer. In .net 4.0 new keyword – [mark]dynamic[/mark] – has been introduced. This type enables the operations that will be resolved at run time. It means that we can use any name with dynamic object and compiler will not show any error during compilation – even if there is no method with used signature. The error will occur when the running application will not find used method. [...]

By |2013-05-14T12:48:47+02:0014 May 2013 |C#|5 Comments

Useful value converters

Value converters – small pieces of code that are very useful in case of binding some values in XAML. Without them some types of bindings in XALM would not be so easy. We use them in Windows Phone, Silverlight or WPF projects. In most cases for each new project I copy the most important converters to solution. For me the most important are: [list] string / Uri to BitmapImage bool to Visibility Color to SolidColorBrush String + StringFormat [/list] Please click more to see implementation of the following converters. […]

By |2013-06-10T13:49:37+02:007 May 2013 |C#, Windows Phone, WPF|0 Comments

Oh that recursion…

Some time ago I lost two days for finding trivial bug. It was done completely unconsciously. Anyway, as most of other bugs. Application started to behave quite strange – after launching, it crashed immediately. Probably you will ask yourself what it is unusual. I have started standard procedure – run application with connected a debugger. But debugger was useless. Application crashed without any notification disconnecting the debugger. I have not got any single clue that will help me to solve this riddle. […]

By |2013-06-10T13:50:46+02:003 December 2012 |C#, Windows Phone|2 Comments

lock (this) – For and against

Recently reviewing the code I have found the following construction: lock (this) { // Do something } To synchronize access to shared resource object is used, in which this construction occur. Theoretically, this code is correct. What more, there was no problem with deadlock in the program. […]

By |2013-06-10T13:56:42+02:0013 January 2012 |C#|11 Comments

Windows Phone Fast Application Switching

With the new version of Windows Phone – Mango the program management model has been changed. Until now there were only four states in which the application could be. At the time of restarting the application developers had to take care every time, that all data have been re-loaded. This idea was to ensure that mobile phone will be high-performance device and it will work long on batteries. The idea was and still is very correct, but has been slightly modified. […]

By |2012-05-24T20:08:18+02:0013 December 2011 |C#, Windows Phone|0 Comments

WPF hybrid application with parameters

Hmmmmm…… What is a hybrid application WPF? I tried to find some other term for this problem, but unfortunately it seems to be most relevant. Concept of a hybrid application WPF I will call the application, that works and presents the results in the console, as well as in its own window. Additionally, the application should support passing parameters during the boot. […]

By |2013-06-10T13:57:59+02:008 December 2011 |C#, WPF|12 Comments