Author: admin
C# Asynchronous Programming Patterns
There are 3 Asynchronous Programming Patterns in C#.
1- Asynchronous Programming Model (APM)
2- Event-based Asynchronous Pattern (EAP)
3- Task-based Asynchronous Pattern (TAP)
1- Asynchronous Programming Model (APM)
Asynchronous Programming Model using Delegates
you can reach that article from Calling synchronous methods asynchronously
2- Event-based Asynchronous Pattern (EAP)
3- Task-based Asynchronous Pattern (TAP)
Kubernetes multi node cluster with Vagrant (included Kubernetes Dashboards, Grafana, Prometheus)
The following Vagrantfile code(syntax is Ruby) is creating one master node and two worker nodes for Kubernetes.
Go to Vagrantfile directory in Terminal and run the following code to create virtual machines.

The following Vagrantfile code(syntax is Ruby) is creating one master node and two worker nodes for Kubernetes.
Go to Vagrantfile directory in Terminal and run the following code to create virtual machines.
As you can see in the below picture, three virtual machines are obtained and running.
But, Kubernetes cluester is still not ready. We created just an environment to install the cluster.
Continue reading
C# .Equals() .ReferenceEquals() and == operator
Chain of Responsibility Pattern and Aspect Oriented Programming with C#.NET
C# Async Concurrent ForEach
Uninstall Vagrant on Ubuntu
Uninstall just vagrant
This will remove just the vagrant package itself.
sudo apt-get remove vagrant
Uninstall vagrant and its dependencies
To remove the vagrant package and any other dependant package which are no longer needed from Ubuntu.
sudo apt-get remove --auto-remove vagrant
Purging vagrant (your config/data too)
If you also want to delete your local/config files for vagrant then this will work.
sudo apt-get purge vagrant
To delete configuration and/or data files of vagrant and it's dependencies from Ubuntu then execute.
sudo apt-get purge --auto-remove vagrant
Bash Shortcuts
Command | Description |
---|---|
CTRL + A | Move to the start of the line. |
CTRL + E | Move to the end of the line. |
CTRL + B | Move back one character. |
CTRL + F | Move forward one character. |
CTRL + D | Delete one character after cursor. |
CTRL + H | Delete one character after cursor. |
CTRL + U | Delete from the cursor to the beginning of the line. |
CTRL + K | Delete from the cursor to the end of the line. |
CTRL + W | Delete from the cursor to the start of the word. |
!! | Execute last command in history. |
!n | Execute nth command in history. |
!$ | Last argument of last command. |
!^ | First argument of last command. |
C# and RabbitMQ PubSub Example
Before you run the following C# code, run the below docker code to have a RabbitMQ applicaton locally.
docker run -d –hostname my-rabbit –name some-rabbit -p 8080:15672 -p 5672:5672 rabbitmq:3-management
After run Docker RabbitMQ container, you can reach from http://localhost:8080/ as shown in following picture.