Welcome to Duracellko.NET

Round-lot validation (part 4)

In my previous blog post I was writing about round-lot validation on data type decimal in .NET. I presented that the implementation using simple division of the numbers does not return any false-negatives. It means that the function never returns false, when a value fits into a round lot. However, it can return false-positives. It means that the function may return true, when the value doesn't fit into the round-lot. I also presented a small update to mitigate false-positives, but we didn't eliminate them completely.

Read more...

Round-lot validation (part 3)

Recently I was implementing a validation checking that a number entered by user fits into a configured round-lot. And I decided to write few blog posts about it. In the previous post I presented implementation of the function for data type double. And in this post I will focus on decimal data type.

Read more...

Round-lot validation (part 2)

Recently I was implementing a validation checking that a number entered by user fits into a configured round-lot. And I decided to write few blog posts about it. In the previous post I described the problem and created naive implementation that didn't work in some cases. And I presented implementation that should handle those cases, but there is unanswered question about acceptedError.

Read more...

Round-lot validation (part 1)

Recently I was implementing a validation checking that a number entered by user fits into a configured round-lot. For example when the round-lot is 2 then only even numbers are allowed values. Other examples would be:

Read more...

Hosting both Blazor Server and WebAssembly in single website

Blazor framework supports 2 types of hosting and running of Blazor application. Blazor Server runs application on server inside ASP.NET Core application and only exchanges HTML fragments and events with client. And Blazor WebAssembly runs application completely inside web browser and in some cases does not need server at all. What if you want to use both models in the same application and run different type based on client device type.

Read more...

Configure Blazor app from server

Microsoft recently release Blazor WebAssembly 3.2.0 Release Candidate. This version includes configuration of an application by appsettings.json configuration file.

Read more...

Create certificate for automated build of UWP app

Visual Studio 2019 improved build of UWP applications for Windows 10. Good news is that it is possible to build the project without need for temporary certificate. This is useful for automated builds validating pull requests. When validating pull-request, I simply build the project without creating APPX package. In Visual Studio 2017 this used to fail because of missing certificate to sign the package. So I had to create a self-signed certificate. However, in Visual Studio 2019 no APPX package signing is done by default, and thus no certificate is needed.

Read more...

Blazor and .NET Core 3.1.1

Few days ago updated version of .NET Core 3.1.1 was released. It includes several security fixes, so it is strongly recommend to upgrade. However, after installation I was not able to build Blazor projects with client-side Blazor. Build failed with error:

Read more...

Azure Functions and static website (part 2)

In previous post I explained how I developed an Azure Function to send email using SendGrid service. Today I explain how to deploy the Azure Function and how to use it from Wyam generated website.

Read more...

Azure Functions and static website (part 1)

This is 4th post in the series about my experience with Wyam. This post will explain how to add some dynamic functionality to static website using Azure Functions. While writing this blog post I realized that it's too long, so I decided to split it to 2 parts. And the first part is focused on implementation of Azure Function.

Read more...