How to create and run C# project

This post is just a reminder for me. So in order to find more details about dotnet CLI, follow the below link

https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet

Creating a C# Project

Creating a Console Project

dotnet new console -o console-demo1

Creating a WebApi Project

dotnet new webapi -o webapi-todo-demo1

1. Creating a C# Console Project

-o or –output is location to place for new generated project.

dotnet new console -o enum_demo4
Folder Structure
Generated Project
Continue reading

C# Pipeline Handler & Logger

I have created a demo project for log handler and TryCatch wrapper (https://kenanhancer.com/2018/06/26/c-trycatchwrapper-and-logging/_.

I need a logger which can write to console and file at the same time. So, I created this demo which creates logger pipeline dynamicly. When code runs, it will write message in console and FileLog.log file at the same time.

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)