TypeScript 4.1 منتشر شد
For this release, we have some exciting new features, new checking flags, editor productivity updates, and speed improvements. Let’s get a look at what 4.1 brings!
<input @oncustompaste="HandleCustomPaste" />
<script> Blazor.registerCustomEventType('custompaste', { browserEventName: 'paste', createEventArgs: event => { // This example only deals with pasting text, but you could use arbitrary JavaScript APIs // to deal with users pasting other types of data, such as images return { eventTimestamp: new Date(), pastedData: event.clipboardData.getData('text') }; } }); </script>
namespace BlazorCustomEventArgs.CustomEvents { [EventHandler("oncustompaste", typeof(CustomPasteEventArgs), enableStopPropagation: true, enablePreventDefault: true)] public static class EventHandlers { // This static class doesn't need to contain any members. It's just a place where we can put // [EventHandler] attributes to configure event types on the Razor compiler. This affects the // compiler output as well as code completions in the editor. } public class CustomPasteEventArgs : EventArgs { // Data for these properties will be supplied by custom JavaScript logic public DateTime EventTimestamp { get; set; } public string PastedData { get; set; } } }
یک نکته: در اینجا نام oncustompaste به همان نام custompaste کدهای جاوااسکریپتی اشاره میکند. نام تعریف شدهی در قسمت سیشارپ، یک on در ابتدا اضافهتر دارد. اینکار سبب میشود که اکنون بتوان یک رویدادگردان oncustompaste@ سفارشی را که قابل مدیریت در کدهای سیشارپ است، داشت:
@page "/" <p>Try pasting into the following text box:</p> <input @oncustompaste="HandleCustomPaste" /> <p>@message</p> @code { string message; void HandleCustomPaste(CustomPasteEventArgs eventArgs) { message = $"At {eventArgs.EventTimestamp.ToShortTimeString()}, you pasted: {eventArgs.PastedData}"; } }
کتابخانه TimezZ
Fast timer plugin for countdown and count forward Demo
With this plugin you can easily put a timer on your site, it works both ways. You can use two version, one version is the version for modern browsers with the standards of the ES2017 and the version for old browsers with ES2015 standards. Using the config you can change the tags as letters and numbers, you can also change the text output next to the numbers.
Automapper به بنیاد NET. پیوست.
AutoMapper has been a popular library in the .NET open source community for a long time. As their site says:
AutoMapper is a simple little library built to solve a deceptively complex problem - getting rid of code that mapped one object to another. This type of code is rather dreary and boring to write, so why not invent a tool to do it for us?
Starting from Team Foundation Server 2017, the Code Search feature that was available for a while in VSTS, gets an on-premise equivalent.
The feature is built on top of a customized version of ElasticSearch. However the integration between the 2 products(TFS and ElasticSearch) is rather limited right now.
مستندات جدید StructureMap
StructureMap is the oldest, continuously used IoC/DI container for .Net dating back to its first public release and production usage all the way back in June 2004 on .Net 1.1. The current 3.* release represents 10+ years of lessons learned in the StructureMap and greater .Net community -- while also wiping away a great deal of legacy design decisions that no longer make sense today.