اشتراک‌ها
کتاب C# Code Contracts Succinctly

Developed by Microsoft’s Research in Software Engineering, Code Contracts provide a way to convey code assumptions in your .NET applications. They can take the form of preconditions, postconditions, and state invariants. In C# Code Contracts Succinctly, author Dirk Strauss demonstrates how to use Code Contracts to validate logical correctness in code, how they can be integrated with abstract classes and interfaces, and even how they can be used to make writing documentation less painful.

کتاب C# Code Contracts Succinctly
مطالب
خلاصه‌ای از مبحث نمایش اطلاعات hierarchical در WPF

در این مطلب خلاصه‌ای را در مورد نحوه‌ی نمایش اطلاعات hierarchical (سلسله مراتبی، درختی) در WPF به همراه یک سری لینک مرتبط ملاحظه خواهید نمود.

کلاس زیر را در نظر بگیرید:
using System.Collections.Generic;

namespace WpfTests.Hierarchy.Raw.Model
{
public class Person
{
private readonly List<Person> _children = new List<Person>();
public IList<Person> Children
{
get { return _children; }
}

public string Name { get; set; }
}
}
و همچنین یک ObservableCollection ساخته شده از آن‌را با مقدار دهی اولیه:
using System.Collections.ObjectModel;

namespace WpfTests.Hierarchy.Raw.Model
{
public class People : ObservableCollection<Person>
{
public People()
{
this.Add(
new Person
{
Name = "P1",
Children =
{
new Person
{
Name="P2",
Children=
{
new Person
{
Name="P3",
Children=
{
new Person
{
Name="P4",
}
}
}
}
}
}
}
);
}
}
}
قصد داریم این اطلاعات را در یک TreeView نمایش دهیم.
روش صحیح Binding این نوع اطلاعات در WPF استفاده از HierarchicalDataTemplate است به صورت زیر :
<TreeView ItemsSource="{Binding People}">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>


یک سری منبع آموزشی برای آشنایی بیشتر با HierarchicalDataTemplate
Hierarchical Databinding in WPF
Binding WPF Treeview and Objects
A TreeView, a HierarchicalDataTemplate, and a 2D collection
Non-recursive WPF TreeView controls

همچنین هنگام کار با بانک‌های اطلاعاتی:
- یک Extension method عالی قابل استفاده در LINQ to SQL و همچنین Entity framework به نام AsHierarchy
- مثالی دیگر از کاربرد LINQ to SQL برای این منظور
- و یا مثالی از ADO.NET و DataSets و مثالی دیگر

اشتراک‌ها
نحوه ساخت قالبهای سفارشی DotNET Core در 4 گام

Learn how you can save time by creating your own reusable .NET Core templates in just a few steps.

Do you ever develop prototypes, or starter projects/accelerators, that you’d like to use again in the future? A good way to do that is by creating custom templates for dotnet. Once completed, anytime you want to create a new project of that type in the future, you can key in “dotnet new ” and you’re off, complete with correct namespaces. You can even do conditional checks, or variable replacements. 

نحوه ساخت قالبهای سفارشی DotNET Core در 4 گام
اشتراک‌ها
نسخه بتا گیت هاب برای اندروید به زودی منتشر می‌شود

There’s a lot you can do on GitHub that doesn’t require a complex development environment, like sharing feedback on a design discussion or reviewing a few lines of code. We’re making these tasks easier to complete while you’re on the go, with a fully-native experience. With GitHub for mobile, you have the flexibility to move work forward and stay in touch with your team, wherever you are 

نسخه بتا گیت هاب برای اندروید به زودی منتشر می‌شود
اشتراک‌ها
استفاده از کلمه کلیدی new در عنوان متدی که با متدی در base class آن همنام است
When used as a declaration modifier, the new keyword explicitly hides a member that is inherited from a base class. When you hide an inherited member, the derived version of the member replaces the base class version. Although you can hide members without using the new modifier, you get a compiler warning. If you use new to explicitly hide a member, it suppresses this warning. 
استفاده از کلمه کلیدی new در عنوان متدی که با متدی در base class آن همنام است
اشتراک‌ها
نگاهی به مشخصات SQL Server 2019

SQL Server 2019 is designed to solve challenges of the modern data professional including:

  • Store enterprise data in a data lake and offer SQL and Spark query capability overall data
  • Reduce the need for Extract, Transform, and Load (ETL) applications by eliminating data movement
  • Integrate and secure machine learning applications with scalable performance
  • Reduce the need for application and query changes to gain a boost in performance
  • Increase confidential computing of data through hardware enclaves
  • Increase application and database uptime and availability through features like ADR (Advanced Database Recovery)
  • Extend the power of the T-SQL language in a secure and robust fashion
  • Run applications and deploy databases across multiple operating systems and platforms with compatibility
  • Reduce the risk of upgrades while using new SQL capabilities when you are ready though inbuilt database compatibility levels 
نگاهی به مشخصات SQL Server 2019
اشتراک‌ها
Uno Platform و انتقال Windows Calculator به Linux

We’ve ported the open-source Windows Calculator to yet another platform: Linux! With all the rumors of a Microsoft browser – Edge – coming to Linux soon, we thought it would be good to show that the open source community can be effective in bringing a piece of Windows to Linux. 

Uno Platform و انتقال Windows Calculator به Linux
اشتراک‌ها
خودکارسازی فرآیند اعمال GlobalQueryFilter در EF Core

Entity Framework Core 2.0 introduces global query filters that can be applied to entities when a model is created. It makes it easier to build multi-tenant applications and support soft deleting of entities. This blog post gives a deeper overview of how to use global query filters in real-life applications and how to apply global query filters to domain entities automatically. 

خودکارسازی فرآیند اعمال GlobalQueryFilter در EF Core
اشتراک‌ها
کانورتور عمومی برای مقادیر در WPF

This post provides a simple IValueConverter implementation that makes use of the framework type converters in order to convert between a large range of source / target types. This converter can be used both within bindings and in code-behind to give more concise property setters. 

کانورتور عمومی برای مقادیر در WPF
اشتراک‌ها
اشکال زدایی Profiling ،Historical و ابزارهای جدید Diagnostic در Visual Studio 2015
Scott Hanselman takes a look at the new Diagnostics Toolbox features in Visual Studio 2015, and highlights a number of IDE features which are really useful and can even be used if you are working on older applications targeting earlier versions of the .NET Framework 
اشکال زدایی  Profiling ،Historical و ابزارهای جدید Diagnostic در Visual Studio 2015