In this blog post, I’m going to describe how to create a tool for generating code during the build process and how I used it to create auto-synchronizing mapping classes.
Strona głównaUżytkownik
cezarypiatek | użytkownik
Documentation for new csproj format, as well as for Nuget related properties, is scattered across different MSDN documents, so I decided to create this blog post as a reference to what I’ve recently learned and discovered about the project’s options that affect the content of the output directory.
Two weeks ago .NET Core 3.0 was officially published. Together with the new framework version, Visual Studio 2019 got support for a long-awaited C# 8.0. The complete list of the new language features is available here on the MSDN, but the one that deserves special attention is Nullable reference types. In this blog post, I will show you how to use this new language feature and how to achieve similar benefits if you still cannot use .NET Core 3.0 in your projects.
This blog post continues the series "Avoid thread synchronization problems with Roslyn" and this part is about the traps related to the usage of synchronization primitives.
How I built a very simple macro system for C# that works right in the code editor
I've decided to create a series of blog posts where I will present what I've recently learned about the traps related to the multithreading in C#. I will also show you my proposition of Roslyn analyzers that can possibly help to avoid those issues right at the stage of writing the code. This part is about choosing a suitable object for locking.
Sztuka programowania 1921 dni, 4 godziny, 36 minut temu 65 źrodło rozwiń
How to avoid common mocking issues and save a lot of typing with the help of Roslyn.
Over a year ago I wrote a blog post about designing exceptions. I found this article very useful by myself and I used it as a reference a few times during code review. However, it’s almost impossible to expect that, after reading the recommended resource, anybody would start to apply described rules immediately and remember about them all the time.
Sztuka programowania 1970 dni, 5 godzin temu 91 źrodło rozwiń
TeamCity has really good support for running PowerShell, however, it can cause some troubles if it’s not configured correctly. After coming across the same mistakes and issues over and over again, I finally decided to write this article that shows how to use PowerShell properly, together with TeamCity.
In the early days of dotnet core, there was an attempt of changing the C# project file format. The old “csproj” based on XML format was replaced with .xproj/project.json. However, after releasing dotnet core 1.0 the authors decided to get back to XML file. The format stayed the same but the specification went through a major change. With the new schema...
In this post, I will show you how to build a self-maintenance mechanism for ELK stack using curator together with cron scheduler.
Recently I’ve learned a few new DevOps things which help me and my teammates to work more effectively with ELK. I think they’re worth sharing.
Have you ever been in a situation when you discovered an exception in the logs that forced you to spend the next couple of minutes - or even hours - figuring out what exactly went wrong? The message was very cryptic and the only useful information that guided you to the crime scene was a stack trace. And after arriving there, you still had no idea what had really happened and what was the culprit. The most frustrating part is that in many cases the reason is very trivial and could be diagnosed immediatel...
Sztuka programowania 2225 dni, 1 godzinę, 49 minut temu 139 źrodło rozwiń
The CQRS/CQS pattern works great, I immediately found a lot of benefits. It helps me to enforce separation of concerns, single responsibility and consistency in my codebase, as well as eliminate all that AOP magic with restoring full control over the code execution. Unfortunately, there is also a boring side of implementing CQRS - THE TYPING.
StaleElementReferenceException can be definitely classified as the number 1 nightmare of people who write automated tests with Selenium framework. This exception occurs when given web element with which we are trying to interact is no longer present in DOM tree. This can be caused by multiple factors...
When it comes to writing maintainable UI test there always appears the term of Page Object Pattern. For those who are not familiar with Page Object, it’s the approach to building UI test that focuses on creating high-level abstraction over low-level details related to interaction with a tested application. This testing interface encapsulates all the noise related to technology and allows to clearly express intention of test cases. This concept is very well described...
Sztuka programowania 2299 dni, 4 godziny, 38 minut temu 83 źrodło rozwiń
Let’s assume that your system consists of a few microservices. Everything must have high availability so each microservice has at least two active instances on separate machines and everything must be multiplied by the number of testing and production related environments. When there is a situation that requires log analysis you have to skip from server to server looking for the file with desired information. You browse each file using some kind of notepad-based editor and if the files weight hundreds of...
One of my ideas for increasing productivity of my team with ELK was to integrate it with Microsoft Teams. I wanted to shorten the feedback loop between error occurrence and diagnosis phase by notifying development team about the issue right after of the occurrence through the dedicated Microsoft Teams Channel. In this blog post, I've described how to easily implement this integration.
My laptop stores everything on 250 GB SSD hard drive (actually Windows sees it as 223 GB), so from time to time I’m running out of free space. When there is a need I’m starting clearing-up by emptying c:\Users\username\AppData\Local\Temp\ and c:\Users\username\Downloads\ directories (the second one against all appearances is often full of unnecessary files). When this is not enough I use ...
Recently I’ve had occasion to work much more than usually with NHibernate. This is a really great ORM and a very mature project, but when you make a mistake it informs you about that in a very generic way (in most cases). The problem that hunted me for a few days was the issue with field length constrains (which was caused by insufficient and inconsistent REST API validation). When there was a discrepancy between declared field length in NHibernate mapping and validation logic (or the vali...
Bazy danych i XML 2403 dni, 5 godzin, 29 minut temu 52 źrodło rozwiń