WPF و IOC در NET Core 3.0.
At work, we are planning to migrate our WPF application from .NET Framework 4.7 to .NET Core 3.0. The main reason for doing so is that it was always a big pain to organize the updates of the .NET Framework on our customer machines. So being able to bundle .NET Core with our application is a big plus for us. Then, for sure, we are looking for the performance improvements brought by .NET Core and finally the new capabilities brought by the fast pace of innovation of .NET Core.
public class ItemInfo { public string ItemCode { get; set; } public string Description { get; set; } public decimal Price { get; set; } } public class OutOfStockException : Exception { public OutOfStockException() : base() { } public OutOfStockException(string message) : base(message) { } }
public sealed class LookupItem : CodeActivity { // Define an activity input argument of type string public InArgument<string> ItemCode { get; set; } public OutArgument<ItemInfo> Item { get; set; } // If your activity returns a value, derive from CodeActivity<TResult> // and return the value from the Execute method. protected override void Execute(CodeActivityContext context) { // Obtain the runtime value of the Text input argument ItemInfo i = new ItemInfo(); i.ItemCode = context.GetValue<string>(ItemCode); switch (i.ItemCode) { case "12345": i.Description = "Widget"; i.Price = (decimal)10.0; break; case "12346": i.Description = "Gadget"; i.Price = (decimal)15.0; break; case "12347": i.Description = "Super Gadget"; i.Price = (decimal)25.0; break; } context.SetValue(this.Item, i); } }
item.ItemCode
نکته : از کلاس Code Activity برای ارسال و دریافت مقادیر به درون Workflow استفاده میشود.
new OutOfStockException("Item Code"+item.ItemCode)
Rust – the Ultimate Programming Language?
What makes a good programming language? Syntax? Compiler? Tools and ecosystem? It is tempting to say “all of that” but in that case, why there are so many different programming languages? All these components are very important but they alone can’t make the language “good”. One of essential things is the purpose — like languages for rapid development, or development of distributed algorithms, or general purpose for high-level and low-level applications, or easy to learn, or safe to use and so on.
Rider 2022.1 منتشر شد
Rider 2022.1 includes full Unreal Engine support, which converts Rider into a full-fledged IDE for game development, no matter what game engine you use.
In v2022.1, Rider also supports a Beta version of the long-awaited remote development workflow. It allows you to connect to a remote machine running Rider’s backend from anywhere in the world.
In addition to these new features, this release also brings Docker Fast mode, updates to the main toolbar, and full-text search throughout the solution right from the Search Everywhere pop-up.
Jon P. Smith, author of Entity Framework Core in Action, explains what a multi-tenant app is and then digs into the things you need to do to make a multi-tenant app using ASP.NET Core with EF Core.
00:00 Countdown
02:19 Introduction and Community Links
18:25 What are multi-tenant web applications?
21:14 Single level multi-tenant demo
29:00 Partitioning tenants with EF Core QueryFilter
38:00 Admin features: creating users and tenants
43:00 Q&A
43:00 Hierarchical multi-tenant
59:00 How to get started
1:06:30 Database sharding and connection string management
1:16:30 Scaling with Azure SQL Elastic Pools
1:19:00 Conclusion
orchard core دیگر یک وب سایت مدیریت محتوا نیست !
در نسخه Core این پروژه ( که به صورت کامل باز طراحی و بازنویسی شده ) تبدیل به یک سایت ساز شده است .
It is a completely new thing written in ASP.NET Core. The Orchard CMS was designed as a CMS, but Orchard Core was designed to be an<< application framework >> that can be used to build a CMS, a blog or whatever you want to build
C# 6 - String Interpolation
در C# 11، متن درون {} یک عبارت string interpolation، میتواند در طی چند سطر نیز تعریف شود و متن بین {} به صورت یک عبارت #C تفسیر میشود. در اینجا هر عبارت معتبر #C ای را میتوان بکار برد. در این حالت تعریف عبارات LINQ و pattern matching switch expressions سادهتر میشوند. برای مثال:
namespace CS11Tests; public static class NewLinesStringInterpolations { public static void Test() { var month = 8; var season = $"The season is {month switch { >= 1 and <= 3 => "spring", >= 4 and <= 6 => "summer", >= 7 and <= 9 => "autumn", 10 or 11 or 12 => "winter", _ => "Wrong month number", }}."; Console.WriteLine(season); int[] numbers = { 1, 2, 3, 4, 5, 6 }; var message = $"The reversed even values of {nameof(numbers)} are {string.Join(", ", numbers.Where(n => n % 2 == 0).Reverse())}."; Console.WriteLine(message); } }
Go, also referred to as Golang is a program created by Google. It was designed by Ken Thompson, Rob Pike, and Robert Griesmer. Golang is one of the most rapidly growing languages in terms of popularity. Ken Thompson, Rob Pike, and Robert Griesmer created Go Language to be a language that has numerous cores, implements concurrency easily, works smoothly in a distributed environment and allows the programmer to write programs without too much hustle. Go language also has a lean and user-friendly syntax.