اشتراک‌ها
بررسی Micro-Optimization with ValueTask

در این ویدیو به موضوع تسک‌ها و ولیو تسک‌ها پرداختیم که چی هست و چه کاربردی دارند و کجاها باید استفاده کنیم. و در آخر هم یه نمونه از کد‌های داخلی انتیتی فریمورک رو بررسی کردیم

0:00 What is a task 

1:00 Describe a senario 

8:00 ValueTask 

10:52 Example of ValueTask in EF Core Source Code 

بررسی Micro-Optimization with ValueTask
اشتراک‌ها
آموزش Unit Testing در #C با xUnit

How to become a Zero to Hero in Unit Testing with C# and xUnit ?

Timeline:
Background   0:00:00
Introduction To Fluent Assertions   0:01:12
Setting Up Fluent Assertions 0:02:39
Basic Assertions with Fluent Assertions   0:09:19
Advanced Assertions with Fluent Assertions 0:20:28
Custom Assertions with Fluent Assertions 0:28:32
Test the Custom Person Assertions 0:47:56
Best Practices For Using Fluent Assertions 0:54:21 

آموزش  Unit Testing در #C با xUnit
اشتراک‌ها
مایکروسافت: NET Core. آینده‌ی NET. است

All future investment in .NET will be in .NET Core. This includes:  Runtime,   JIT , AOT,   GC,  BCL (Base Class Library),  C#, VB .NET , F#, ASP.NET,  Entity Framework ML.NET,  WinForms, WPF  and Xamarin.  

مایکروسافت: NET Core. آینده‌ی NET. است
اشتراک‌ها
پیاده سازی سرویس‌های gRPC در دات نت 7

gRPC Service with .NET 7
In this video we build a gRPC service with 5 methods: Create, Read (single), List (multiple), Update and Delete. We then employ JSON transcoding (a new feature added in .NET 7) to allow our gRPC service to act as a REST based API. This allows web-based endpoints to consume our service, while at the same time continuing to allow native gRPC clients to consume as well.


⏲️ Time Codes ⏲️

- 0:33 - Welcome
- 2:00 - gRPC Overview
- 5:08 - Scaffold the prject
- 9:58 - Test "greeter" service with Postman
- 12:32 - Add package dependencies
- 14:48 - Create the Model
- 16:38 - Create DB Context & migrations
- 22:37 - Define the protobuf file
- 32:39 - Build the first service method
- 40:55 - Test method with postman
- 42:52 - Read method
- 48:42 - List method
- 52:39 - Update method
- 59:14 - Delete method
- 1:03:24 - Add the annotation files
- 1:06:07 - Annotate the first gRPC method
- 1:09:26 - Annotate remaining methods
- 1:12:42 - Test with Postman
- 1:16;00 - Patreon supporter credits 

پیاده سازی سرویس‌های gRPC در دات نت 7
اشتراک‌ها
به ویژوال استودیو 2022 خوش آمدید - توسط Scott Hanselman و دوستان

Want to learn about the latest and greatest in the 64-bit Visual Studio 2022? Join Scott Hanselman and Visual Studio product team as they take Visual Studio 2022 for a spin.


00:00 Intro 
00:39 Why you should care about Visual Studio 2022? 
02:20 Performance improvements in Visual Studio 2022 
04:39 Why 64-bit now? 
08:00 IntelliCode, type less code more 
11:35 Hot reload for C++ 
13:47 New for WPF and WinForms (Hot Reload, Design time data, XAML
17:20 Hot Reload in ASP.NET 

20:27 Profiling .NET apps in Visual Studio 2022 

23:19 Cross platform apps with WSL and CMake in Visual Studio 2022 

26:07 Testing your .NET app on Linux 

28:00 Easily create CI/CD pipelines using GitHub actions with Visual Studio  2022

30:40 Balloon drop! 

به ویژوال استودیو 2022 خوش آمدید - توسط Scott Hanselman و دوستان
اشتراک‌ها
مقایسه کارآیی بین C# Wasm AOT ،C# Wasm Interpreted ،C# Runtime و JavaScript

The conclusion of the analysis:
C# Wasm AOT still has a long way to become a general and performant client side web programming platform. Note: The usage of the Uno.Wasm.Bootstrap toolchain may have affected the performance of some of the benchmarks. Thus, this analysis should not be regarded as a benchmark of the finalized product. However, note that the Uno platform is using ".NET 6 WebAssembly Mixed mode AOT/Interpreter" (source). 

مقایسه کارآیی بین C# Wasm AOT ،C# Wasm Interpreted ،C# Runtime و JavaScript
اشتراک‌ها
چگونه در پروژه‌های سورس باز مشارکت کنیم؟

Complete Guide to Open Source - How to Contribute 
⭐️ Course Contents ⭐️
⌨️ (00:00) Introduction
⌨️ (01:11) What is Open Source
⌨️ (01:46) Why you should care about Open Source
⌨️ (04:06) What is Git
⌨️ (04:56) What is GitHub
⌨️ (05:24) Example custom GitHub profile
⌨️ (06:01) GitHub features
⌨️ (13:37) GitHub Actions for Continuous Integration (CI)
⌨️ (14:49) Insights tab for more project information
⌨️ (15:04) GitHub Discussions for threaded conversations
⌨️ (15:41) GitHub Projects board like Trello
⌨️ (16:10) GitHub Wiki
⌨️ (17:15) How to find Open Source projects
⌨️ (19:40) How to write Markdown
⌨️ (27:58) Draft a Pull Request (PR)
⌨️ (29:06) Make money directly with GitHub Sponsors
⌨️ (30:15) Make money indirectly from Open Source
⌨️ (32:19) freeCodeCamp.org Open Source resources
⌨️ (34:04) Everyone is a Project Maintainer
⌨️ (39:49) How to customize your GitHub profile
⌨️ (40:46) Conclusion 

چگونه در پروژه‌های سورس باز مشارکت کنیم؟
اشتراک‌ها
AvaloniaUI v11 منتشر شد
New Features 
A11y (Accessibility)
IME (Input Method Editor) Support
Compositing Renderer
WebAssembly (WASM) Support
iOS and Android Support
Full Rich Text support
Smooth Virtualization (Reworked ItemsControl)
Performance Improvements
Control Themes, Nested Styles, and Theme Variants
Bitmap Effects
3D Transforms
AOT (Ahead-Of-Time) Compilation and Trimming
GPU Interop
Experimental Metal Support 
AvaloniaUI v11 منتشر شد
نظرات مطالب
کوئری نویسی در EF Core - قسمت ششم - کار با تاریخ و زمان
اگر جستجوی مدنظر چنین شکلی را داشته باشد:

مدلسازی نمونه‌ی آن به صورت زیر است:

    public class UIModel
    {
        public int PersianYear { set; get; }

        public int[] SelectedPersianMonths { set; get; }
    }
برای مثال اگر اطلاعات دریافتی از کاربر به صورت زیر باشد:
var model = new UIModel
{
    PersianYear = 1391,
    SelectedPersianMonths = new[] { 4, 5 }
};
کوئری گرفتن بر اساس ماه‌های انتخابی را (new DateTime را می‌توانید با پارامتر PersianCalendar تعریف کنید و ... کار می‌کند) باید بر اساس OR نوشت (حالت پیش‌فرض زنجیروار نوشتن Whereها And است):
var itemsQuery = context.Members.AsQueryable();

// Linq chaining where clauses as an `Or` instead of `And`
var predicate = PredicateBuilder.False<Member>();

foreach (var month in model.SelectedPersianMonths)
{
    var start = new DateTime(model.PersianYear, month, 1, new PersianCalendar());
    var end = new DateTime(model.PersianYear, month, month <= 6 ? 31 : 30, new PersianCalendar());

    // We can chain `IQueryable`s.
    // itemsQuery = itemsQuery.Where(x => x.JoinDate.Date >= start && x.JoinDate.Date <= end);
    // But it will be translated as an `AND`, not `OR`

    predicate = predicate.Or(x => x.JoinDate.Date >= start && x.JoinDate.Date <= end);
}

itemsQuery = itemsQuery.Where(predicate);

var items = itemsQuery.Select(x => new { x.FirstName, x.Surname }).ToList();
که یک چنین خروجی SQL ای را تولید می‌کند:
SELECT [m].[FirstName],
       [m].[Surname]
FROM   [Members] AS [m]
WHERE  ((CONVERT (DATE, [m].[JoinDate]) >= '2012-06-21T00:00:00')
        AND (CONVERT (DATE, [m].[JoinDate]) <= '2012-07-21T00:00:00'))
       OR ((CONVERT (DATE, [m].[JoinDate]) >= '2012-07-22T00:00:00')
           AND (CONVERT (DATE, [m].[JoinDate]) <= '2012-08-21T00:00:00'));
مثال کامل آن
نظرات مطالب
انجام کارهای زمانبندی شده در برنامه‌های ASP.NET توسط DNT Scheduler
شرط رو به این صورت گذاشتم : return now.Minute % 50 == 0  && now.Second==1 
انتظار این بود که در لحظاتی که دقیقه صفر و ثانیه یک و یا دقیقه 50 و ثانیه یک باشد عملیات مورد نظر (در اینجا تهیه نسخه پشتیبان صورت پذیرد ) به عبارتی در هر ساعت دو بار این شرایط مهیا می‌شود ولی نتیجه به صورت ذیل شد :
12:50:01      12:50:02   13:00:01   13:00:02   13:50:01   13:50:02    14:00:01   14:50:01   15:00:01   15:00:02

زمانهایی که بولد شدند قاعدتا نباید جاب اجرا می‌شد . احتمالا مشکل چی می‌تونه باشه ؟