Saeed Esmaeelinejad
Saeed Esmaeelinejad
  • Видео 41
  • Просмотров 119 499
🔥 xUnit version 3 is out: they finally healed the pain!
xUnit.v3 has been released recently with lots of cool features, In this video I've covered three of the most interesting of them.
⭐ Check the code [xUnitV3Features]: github.com/sa-es-ir/youtube-samples?tab=readme-ov-file#content-list-order-by-date-desc
xUnit migrations: xunit.net/docs/getting-started/v3/migration
Moments
00:00 - Intro
00:32 - xUnit structure
02:06 - Running tests in sequence or parallel
05:43 - IClassFixture in xUnit
11:23 - ICollectionFixture in xUnit
#dotnet #csharp #unittesting #xunit #xunitv3
-------------------------------------------
👉 Follow me on LinkedIn:
www.linkedin.com/in/sa-es-ir
Просмотров: 325

Видео

xUnit Essentials: Test parallelism, Collections and Fixtures!
Просмотров 24114 дней назад
xUnit Essentials: Test parallelism, Collections and Fixtures In this video, I walk through the xUnit fundamentals that every developer should know about, you can find the answers to these questions in the video: - How will xUnit pick and run a test? - When will tests be run in sequence or in parallel? - What is a collection? - How/When should I use IClassFixture and ICollectionFixture? ⭐ Repo [...
👉 Implement a Kafka-like message broker with .NET BlockingCollection!
Просмотров 10 тыс.2 месяца назад
In this video, we'll see how easy implementing a Kafka-like message broker is. The purpose is to detach consuming from producing messages. I've implemented three methods: Produce, Consume, and Close. Please let me know your feedback in the comments. ⭐ Check the code [KafkaWithBlockingCollection]: github.com/sa-es-ir/youtube-samples/tree/main?tab=readme-ov-file#content-list-order-by-date-desc Mo...
🐞 EF Core bug: Avoid using Async method with Large data result!
Просмотров 13 тыс.4 месяца назад
There is a bug in the EF Core Async methods! Optimized queries are not enough when we deal with large data and other factors come into the picture like network or EF Core internals. In this video, I've explained a bug in Async methods which is surprising since always using asynchronous is recommended but it seems here is not true yet! ⭐ Check the code [EFCoreLargeData]: github.com/sa-es-ir/yout...
🥶 Managing Concurrency with SemaphoreSlim: Avoid DeadLock!
Просмотров 7254 месяца назад
In this video, I show you my real experience with fixing a deadlock in a high-load application which was using SemaphoreSlim. I've covered some caveats in using SemaphoreSlim and CancellationToken which can put your application in a deadlock situation. 👉 Checkout the repo [SemaphoreSlimWithCancellationToken]: github.com/sa-es-ir/youtube-samples/tree/main?tab=readme-ov-file#all-youtube-sample-co...
🔥 Don't use Task.WhenAll, it may not be efficient enough!
Просмотров 7 тыс.5 месяцев назад
In C#, Task.WhenAll is commonly used to run multiple tasks in parallel, but is it always the best option? In this video, I'll explore scenarios where Task.WhenAll may not be the most efficient choice. I'll also demonstrate how to create a custom method for executing tasks in parallel, avoiding the pitfalls of Task.WhenAll. Check the code[RunMultipleTasks]: github.com/sa-es-ir/youtube-samples/tr...
Integration Test: Mock PartOf a class
Просмотров 2445 месяцев назад
When we're trying to write integration tests, usually it's better not to mock any class or method and execute actual code. By doing so we can make sure all code paths and different scenarios will be covered. But what if you want to mock only one method of a class? Well, there are a few ways to do that, in this video, while I talk about all possible ways the main focus is on NSubstitute and how ...
🍕 Template Method pattern: Refactor and make your application plug-in-able
Просмотров 7035 месяцев назад
Template Method is one of the behavioral patterns which means you can manage the code to behave differently based on our logic. It is used to define a skeleton of an algorithm in a base class and other subset classes can follow the steps or even customize them. In this video, I'm going to refactor a code and use the Template Method pattern. Check the code [TemplateMethod]: github.com/sa-es-ir/y...
🌵 Can Async/Await block the main thread?
Просмотров 1,6 тыс.6 месяцев назад
In this video, I show how to use async/await pattern in the correct and prevent the main thread from being blocked. Check the repo: github.com/sa-es-ir/youtube-samples/tree/main?tab=readme-ov-file#all-youtube-sample-codes-i-use-in-my-channel #asyncawait #csharp #dotnet #asynchronousprogramming #async Moments 00:00 - Intro 00:15 - async/await diagram 02:16 - The code part of async/await 04:58 - ...
🔐 ASP.NET Core Authorization: Policy Based Access Control
Просмотров 9827 месяцев назад
In this video, I show you how to implement Policy-Based Authorization in ASP.NET Core, I covered both minimal API and Controller-Action. Check the code here: Repo: [PolicyBasedAuthorization] github.com/sa-es-ir/youtube-samples?tab=readme-ov-file#all-youtube-sample-codes-i-use-in-my-channel #aspnetcore #dotnet #authorization #policybasedauthorization Moments 00:00 - Intro 00:27 - The code base 0...
🔐 ASP.NET Core Authorization: Role-Based Access Control (RBAC)
Просмотров 1,7 тыс.7 месяцев назад
In this video, I show you how to implement Authorization using Role-Based Access Control (RBAC), I covered both minimal API and Controller-Action. Check the code here: Repo: [RoleBasedAuthorization] github.com/sa-es-ir/youtube-samples?tab=readme-ov-file#all-youtube-sample-codes-i-use-in-my-channel Moments 00:00 - Intro 00:47 - The code base 02:35 - Call the API 03:05 - Generate JWT token using ...
🌶️ How to use Kafka in .NET 8?
Просмотров 8 тыс.7 месяцев назад
Do you want to know how we can use Kafka in .NET? Then here you go! In this video, I've tried to simplify concepts about Kafka and also write a semi-real-world application that you may face in your daily projects. repo[KafkaDotNet]: github.com/sa-es-ir/youtube-samples?tab=readme-ov-file#all-youtube-sample-codes-i-use-in-my-channel I think event-steaming is a really nice area to investigate and ...
🚀 EF Core 8: How to optimize a query?
Просмотров 3,6 тыс.8 месяцев назад
Do you want to make your queries more performant and efficient? Then this is the way you go! I've tried to address most cases in a Real-world query that you may face in your projects and fix them. If you saw my previous videos, I always like to explain the current situation and how to make it better, and finally code, I believe you grasp the concept better. Hope you enjoy it! Repo[EFQueryOptimi...
Writing your own MediatR from scratch in C#
Просмотров 1,1 тыс.9 месяцев назад
I think most .NET developers already use or at least know about the MediatR Nuget package. It's an in-process messaging with no dependencies and supports request/response, commands, and notifications. Really cool Nuget library. But have you thought about how MediatR works? As I'm curious to know how things work, here I try to show the gist of MediatR and how to write your own one from scratch i...
Multi-Tenant applications: How to do it in the correct way!
Просмотров 2,9 тыс.10 месяцев назад
Multi-tenancy allows multiple users to share resources while keeping their data separate. In a multi-tenant application, customization is provided for each user group (tenants), while the core functionality remains the same. How we should handle this situation? well, it's easy! Just need to know, the current request is for which tenant, done! In this video, I've tried to address two issues that...
.NET: Console Application + Gaming!
Просмотров 32310 месяцев назад
.NET: Console Application Gaming!
💥 gRPC on .NET: How to use gRPC in ASP.NET Core Api
Просмотров 6 тыс.10 месяцев назад
💥 gRPC on .NET: How to use gRPC in ASP.NET Core Api
🚀 ASP.NET Core: Faster Api with Multi-Layer cache!
Просмотров 1,4 тыс.11 месяцев назад
🚀 ASP.NET Core: Faster Api with Multi-Layer cache!
.NET Aspire: How to use Redis step by step
Просмотров 94411 месяцев назад
.NET Aspire: How to use Redis step by step
🌶️ .NET: What is wrong with the HttpClient object?
Просмотров 2,4 тыс.Год назад
🌶️ .NET: What is wrong with the HttpClient object?
SQL Server Indexing: How database engine chooses an index for a query?
Просмотров 577Год назад
SQL Server Indexing: How database engine chooses an index for a query?
.NET Aspire: How to use RabbitMQ component step by step?
Просмотров 2,8 тыс.Год назад
.NET Aspire: How to use RabbitMQ component step by step?
🔐 ASP.NET Core Authentication: JWT token validation using OpenID Connect (OIDC)
Просмотров 9 тыс.Год назад
🔐 ASP.NET Core Authentication: JWT token validation using OpenID Connect (OIDC)
🆒️ .NET Aspire: How it works behind the scenes?
Просмотров 4,4 тыс.Год назад
🆒️ .NET Aspire: How it works behind the scenes?
What is the difference between BackgroundService and HostedService?
Просмотров 4,6 тыс.Год назад
What is the difference between BackgroundService and HostedService?
🔆 C# Serializers: NewtonSoft vs Protobuf vs Apache.Avro vs MessagePack vs Bson
Просмотров 2,3 тыс.Год назад
🔆 C# Serializers: NewtonSoft vs Protobuf vs Apache.Avro vs MessagePack vs Bson
EF Core: Be careful about Find method cache!
Просмотров 421Год назад
EF Core: Be careful about Find method cache!
❌️ ASP.NET Dependency Injection: You may be wrong about Scoped services!
Просмотров 3,2 тыс.Год назад
❌️ ASP.NET Dependency Injection: You may be wrong about Scoped services!
♾️ ASP.NET Dependency Injection: Handle multiple implementations for one interface with delegate
Просмотров 4,3 тыс.Год назад
♾️ ASP.NET Dependency Injection: Handle multiple implementations for one interface with delegate
👨‍💻 C# xUnit: How to run code before and after a test!
Просмотров 980Год назад
👨‍💻 C# xUnit: How to run code before and after a test!

Комментарии

  • @حسینمحسنی-ب7ق
    @حسینمحسنی-ب7ق 19 дней назад

    موفق باشی بسیار عالی

    • @sa-es-ir
      @sa-es-ir 19 дней назад

      ممنون باباجان❤️

  • @kowalskijr.
    @kowalskijr. 25 дней назад

    Thanks man, helped a LOT. Happy Holidays

    • @sa-es-ir
      @sa-es-ir 18 дней назад

      Glad it was helpful, enjoy holidays:)

  • @ArjunRR-cz8hb
    @ArjunRR-cz8hb 28 дней назад

    Hi , I have requirement using Cosmos Db.All tenants share same dbnsme and connection string Which is better to have 1.Single Dbcontext Change the container name on dynamic based on tenant provider 2. Spreate Dbcontex for each tenant..

    • @sa-es-ir
      @sa-es-ir 24 дня назад

      I'll go for the first approach, the important thing here having a single connection to cosmosdb, it is exactly like calling a third-party API, you'll create a HttpClient with a base address (here is the connecitonString) and call different endpoints (here is the containername).

    • @ArjunRR-cz8hb
      @ArjunRR-cz8hb 24 дня назад

      @sa-es-ir Thank you for the details.. But I have one query, I have created a project with 1st approach 1., In a single AppDbcontext Onmodelcreating calling only once 2. When I send a request for another tenant Onmodelcreating is not getting called.. 3.Using AddDbContextFactory in Di container Please let me know to resolve this

    • @sa-es-ir
      @sa-es-ir 23 дня назад

      @@ArjunRR-cz8hb Do you have a code like mine in this video? if yes then please provide a github repo then I can see the code and talking about the actual problem.

  • @AbdulHannan-w5k
    @AbdulHannan-w5k Месяц назад

    Nice topic

    • @sa-es-ir
      @sa-es-ir Месяц назад

      Glad you like.

  • @this.developer
    @this.developer 2 месяца назад

    Well explained. Thanks.

    • @sa-es-ir
      @sa-es-ir 2 месяца назад

      Glad it was helpful!

  • @pincode7983
    @pincode7983 2 месяца назад

    Awesome explanation, great job!

    • @sa-es-ir
      @sa-es-ir 2 месяца назад

      Glad it was helpful!

  • @rishikeshnerkar1367
    @rishikeshnerkar1367 2 месяца назад

    great way to explain! Thanks, one question in my mind - After updating database to the last sate and removing migration, you still have that Description property, so we have to remove our code level changes manually, right?

    • @sa-es-ir
      @sa-es-ir 2 месяца назад

      Yes, correct. Basically we need to do two steps: 1- cleanup migrations and database (this video) 2- remove the properties that already cleaned up in previois step from the code

  • @DevNety
    @DevNety 2 месяца назад

    Hi dear fellow, how yo doing?! I hope pretty good ❤ well first of all thanks a bunch for your teaching here.

    • @sa-es-ir
      @sa-es-ir 2 месяца назад

      I'm pretty good, thanks:) Glad you like the video

  • @amirkian1181
    @amirkian1181 2 месяца назад

    بعضی از تلفظات خیلی فارسیه،حیفه متد، ریسپانس و ... که بیشتر تو محیط های آیتی انقدر اشباه تلفظ میشه که تلفظ اشتباهش فسیل شده.

    • @sa-es-ir
      @sa-es-ir 2 месяца назад

      ممنون از اینکه با دقت ویدیو رو تماشا میکنی! هر کشوری لهجه خودشو داره اگر تو محیط انیترنشنال کار کرده باشی به راحتی متوجه لهجه انگلیسی حرف زدن هندی ها، فرانسوی ها(وحشتناک)، روسی ها و.... کاملا طبیعی هست!

    • @amirkian1181
      @amirkian1181 2 месяца назад

      @@sa-es-ir منظورم لهجه نیست ،تلفظه.

  • @arminhabibi149
    @arminhabibi149 2 месяца назад

    It's weird that still open

    • @sa-es-ir
      @sa-es-ir 2 месяца назад

      They mentioned in the ticket that it will take years to fix!!

  • @ddrsdiego
    @ddrsdiego 2 месяца назад

    Why not use Channel?

    • @sa-es-ir
      @sa-es-ir 2 месяца назад

      While using Channels is ok for doing the same purpose, I find it more complicated to work with. Basically, I always like the visibility in the code, no magic behind the scene happening.

  • @aligeovany4645
    @aligeovany4645 3 месяца назад

    ❤❤ nice

    • @sa-es-ir
      @sa-es-ir 2 месяца назад

      Thanks! I'm glad you liked it.

  • @DotNetFun
    @DotNetFun 3 месяца назад

    Great topic as always, explaining complex topics in the most simplest way ❤️ I think we can also enumerate the Blocking collection in the Consume method and yield the Item back since Blocking Collection waits for new items and in close method we give the "Complete" to the blocking collection

    • @sa-es-ir
      @sa-es-ir 3 месяца назад

      Glad you like the video and awesome suggestion about using yield, I didn't think about this option, thank you for the input.

  • @mohsenjafari634
    @mohsenjafari634 3 месяца назад

    اولین کامنت 😅 سامانه استعلام یکپارچه

    • @sa-es-ir
      @sa-es-ir 3 месяца назад

      محسن این سامانه استعلام یکپارچه دیگه بخشی از خاطرات ماندگار منو تو شده:)))

  • @lucasrambo7217
    @lucasrambo7217 3 месяца назад

    Excellent! It helped me a lot!!

    • @sa-es-ir
      @sa-es-ir 3 месяца назад

      Glad you enjoyed:)

  • @juleseastlondoncockney8131
    @juleseastlondoncockney8131 3 месяца назад

    Very well explained. Simplicity at at its best.

    • @sa-es-ir
      @sa-es-ir 3 месяца назад

      Happy you like the video

  • @NgocDucDo
    @NgocDucDo 3 месяца назад

    Thank you very much for your videos.

    • @sa-es-ir
      @sa-es-ir 3 месяца назад

      You are very welcome

  • @pieceofcode_
    @pieceofcode_ 3 месяца назад

    Hello @Saeed, at 16:32 you said, if we make changes in proto file and if API is referring it directly, then it will break API. So, it will not impact if sdk referring to same proto file (if proto file changes and bulid)?

    • @sa-es-ir
      @sa-es-ir 3 месяца назад

      Well in the video I created a decorator on top of the `Generated` grpc service in the SDK, so basically API depends on the SDK (the decorator service), what we want is not depend on any generated grpc classes from the caller side (the API). If there are some changes on the GRPC server and there is some direct dependencies to it then all those clients will be failed but if inside the sdk decorator we handle all the exceptions then we are safe from breaking those callers, at least until we change the SDK!

    • @pieceofcode_
      @pieceofcode_ 3 месяца назад

      @@sa-es-ir sounds good. I got your point. :) thank you

  • @aming2446
    @aming2446 3 месяца назад

    Thank you so much! What about synchronization between application instances. Do you have any solution for this?

    • @sa-es-ir
      @sa-es-ir 3 месяца назад

      The best way is using a message queue, so one instance will send a message and the other side there is a consumer listening on same queue to process and sync the state.

  • @OPauloChagas
    @OPauloChagas 4 месяца назад

    Muito bom conteúdo.

    • @sa-es-ir
      @sa-es-ir 3 месяца назад

      Thank you:)

  • @balagurunathanmarimuthu2807
    @balagurunathanmarimuthu2807 4 месяца назад

    Great work Saseed! You are explaining the exact scenario what we faced. As you mentioned We never aware of this problem. You taught me not only how to use nvarchar with EF, we should always keep an eye on the all bugs and discussion in the repo. Thanks again and keep doing the great work. 👍

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Very happy it was helpful to you, please support me by sharing my videos to your network, would be appreciated 🙏

    • @balagurunathanmarimuthu2807
      @balagurunathanmarimuthu2807 4 месяца назад

      @@sa-es-ir I already shared to my network. 👍

  • @mahdiyar6725
    @mahdiyar6725 4 месяца назад

    nice tip for ef core but don't use database for storing big file , SQL server design for fast and small request/response . file stream is good option for storing that as binary , also there is azurite (Azure Storage API) for free write on node.js . you can use that as well . tip: as much as you can don'tuse max on varchar or nvarchar .always have limit . nice work keep going.

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      @@mahdiyar6725 Thanks for the great sum up and totally agree.

  • @SamH-h1v
    @SamH-h1v 4 месяца назад

    Great work Saeed, keep continue 🙂

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      @@SamH-h1v Thanks and happy you like it

  • @cvetomiranedelcheva9946
    @cvetomiranedelcheva9946 4 месяца назад

    This video was very helpful, but is there any chance you know why I get the error " Connect to ipv4#127.0.0.1:9092 failed: Unknown error (after 2032ms in state CONNECT)" with both the producer and consumer? Thanks!

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Thank you and happy it was helpful. About the error, please follow the code in my repo the link is in the description, better to use localhost:9092 and make sure both Kafka and zookeeper are using same network.

    • @cvetomiranedelcheva9946
      @cvetomiranedelcheva9946 4 месяца назад

      @@sa-es-ir But that's what I'm doing. Is it possible that my error comes from not using docker?

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      @@cvetomiranedelcheva9946 Are you run kafka and zookeeper both? they have access to call each other? I think better to run in docker to make sure the problem is not in your code

    • @cvetomiranedelcheva9946
      @cvetomiranedelcheva9946 4 месяца назад

      @@sa-es-ir Okay, thank you very much!!

  • @coding-in
    @coding-in 4 месяца назад

    Greate! thanks Saeed. how if we have many DoNothing(). are we should put Yield as many method as we called? the second, how process long running sub method as background proses?

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Glad you like the video, you can use Task.Yield as many as you can, no issue with that but better to use it when needed to avoid extra overhead for runtime. I didn't get the second question, can you explain more.

  • @philskay8724
    @philskay8724 4 месяца назад

    Thank you, very useful tips you have shared here ❤

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Glad it was helpful!

  • @researcher_m
    @researcher_m 4 месяца назад

    Thank you for your useful tips

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Happy you like it

  • @keithjairam8452
    @keithjairam8452 4 месяца назад

    Great content

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Glad you like it 🙏

  • @coding-in
    @coding-in 4 месяца назад

    Hi Saeed, could you creating video about keycloak?

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      I didn't use it in a production project, I'll check it.

  • @coding-in
    @coding-in 4 месяца назад

    Hi saeed, thanks for great explanation with short duration. I want to ask, how if the consumer fails saving data because maybe there's any field required(consumer side) but the not provided by producer.

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Good question, the Consumer needs to tell kafka to commit the message, either auto-commit by kafka lib or manually commit by developer, the point is you need to handle the validation on consumer so if there is a invalid message you just skip that message and commit it without processing.

  • @bjornandersson8032
    @bjornandersson8032 4 месяца назад

    Try Apache.Avro without the ReflectReader/Writer. That one is significantly slower than the SpecificReader/Writer since it uses a ton of reflection.

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Nice point and thanks for that, I'll check it later.

  • @Blended-familyy
    @Blended-familyy 4 месяца назад

    Beautifully described bro. Loved the explanation 😇

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Glad you like it, thanks

  • @abdalrahmanal-yaqoub4974
    @abdalrahmanal-yaqoub4974 4 месяца назад

    thank you saeed 👌🏻

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Thank you

  • @teraformerr
    @teraformerr 4 месяца назад

    this channel is pure gold

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Much appreciate the support, please help me by sharing my video with your friends.

  • @nutchachanwuttikhun8812
    @nutchachanwuttikhun8812 4 месяца назад

    Woww❤ about to implement this in my project. This provides a good aspect that I’ve never thought of. Thank you Saeed 😊

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      I appreciate Jan, please help me by sharing my video with your friends.

  • @shojaedin
    @shojaedin 4 месяца назад

    Thank you Saeed I enjoyed your explanation

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Glad you enjoy it.

  • @10Totti
    @10Totti 4 месяца назад

    Good tutorial!

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Thank you

  • @DaniLearnsIT
    @DaniLearnsIT 4 месяца назад

    I think a video on MessagePack would be awesome 👀I don't think anyone has made one for that library yet!

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      Thanks for the suggestion, I'll put it in the list

  • @johnnyvlee
    @johnnyvlee 5 месяцев назад

    using Select to query a subset of columns is what I'd love to do, but my query is quite complex with a number of layers of Include/ThenInclude. When I try to use this technique just on the top level table I get runtime errors with the data in joined tables. For example, the model generated database-first has both a Foreignkeyid property and Childentity property. If I select the Foreignkeyid field, it does not know how to bring in the Childentity model. In your example you have a Dto record which I presume is a more flattened representation of the Employee model. You reference a child entity property x.User.UserName. In my case I want the x.User. And probably some child entity of x.User as well. I haven't seen great examples of optimizing columns selected by EF queries (or in my case EF Core). There are only really simple cases being demoed.

    • @sa-es-ir
      @sa-es-ir 4 месяца назад

      You got the main idea about having required columns only, if you have time to create a simple repo about what you need then we can fix it together, I'd would say it is easy to tell EF core to generate what we want.

    • @johnnyvlee
      @johnnyvlee 4 месяца назад

      @@sa-es-ir Thanks for the reply. I was able to work out the syntax to get what I want in the long run. However, I am now realizing that if you try to include more than one child MANY relationship, performance tanks noticeably. I am aware of the Split() function, but I've come to the conclusion it's just better for me to run multiple queries rather than one or two big complex queries.

  • @VioletClaw816
    @VioletClaw816 5 месяцев назад

    I might missed something here. How did you get the token in the first place before you call the getweather?

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      I generated the token from auth0.com for my user, basically, I didn't want to cover token generation in this video and I've tried to show how to `validate` that token, no matter where it comes from.

  • @rafazieba9982
    @rafazieba9982 5 месяцев назад

    Change the order of tasks in the final list to "new List<Task> { taskThree, taskTwo, taskOne }" to see why it doesn't work the way you want it to. It will wait for three seconds before it cancels the "CancelationToken".

    • @igormelnikov5166
      @igormelnikov5166 5 месяцев назад

      Yes, it can be improving by dequeueing waiting each task via WaitAny mutiple times, but it can increase memory and CPU allocation.

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      In the worst case, it just behaves like Task.WhenAll()!

    • @igormelnikov5166
      @igormelnikov5166 5 месяцев назад

      @@sa-es-ir U didnt get what he want to say, it is not about worst case, it is about reordering await affects execution time in you approach, if last task will wait 1 sec before exeption, you still will wait 3 sec because of first task 3 sec delay

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      @@igormelnikov5166 Yes your scenario is perfectly fine and can happen because there is no way to know task priorities, my point is, even in worst case (taking 3 sec) is the same Task.WhenAll which always takes 3 sec. Am I correct?

    • @igormelnikov5166
      @igormelnikov5166 5 месяцев назад

      @@sa-es-ir There is a way to respect task priorities, read my first comment. Worst cases are same in all soulutions ofcourse. But in average solutions have different time

  • @nitishkumar-dt2tx
    @nitishkumar-dt2tx 5 месяцев назад

    Awesome explanation

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      Glad you like it, I would appreciate it if you share this video on your network🙏

  • @sergeantskeleton7392
    @sergeantskeleton7392 5 месяцев назад

    Great!

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      Glad you like it, I would appreciate it if you share this video on your network🙏

  • @nztzn
    @nztzn 5 месяцев назад

    Thank you for the content ❤

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      Glad you like it, I would appreciate it if you share this video on your network🙏

  • @MikyLestat
    @MikyLestat 5 месяцев назад

    There is a new Task.`WhenEach` static method in .NET 9

  • @sanjivranjan5782
    @sanjivranjan5782 5 месяцев назад

    Please make a separate video on execution plan in detail. Thanks in advance

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      Noted with thanks, stay tunned.

  • @حسینمحسنی-ب7ق
    @حسینمحسنی-ب7ق 5 месяцев назад

    ❤❤❤❤❤❤❤❤❤❤❤

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      Thank you baba♥

  • @dr.angerous
    @dr.angerous 5 месяцев назад

    could be explained under 5minutes. Stupid m o ha mmads content, fkin cancer

  • @Happyprogrammer-p6z
    @Happyprogrammer-p6z 5 месяцев назад

    Perfect

    • @sa-es-ir
      @sa-es-ir 5 месяцев назад

      Thank you