پروژه CircuitBreaker.Net
With the new Version 7, Entity Framework is moving away from legacy systems and duplications which have accumulated in recent years. As a slim-line new development it will be available for .NET Core, and therefore also WinRT, whilst in addition allowing access to NoSQL databases.This session will show exactly what has changed and how you can benefit from the new possibilities.
These are the customer-reported issues addressed in 15.7.3:
- VS2017 compiler creates broken debug build using Qt framework and generates 'Invalid address specified to RtlValidateHeap' error.
- Incorrect code generation for matrix multiplication.
- VS 2017 Update 7: Git History Codelens only showing entries for the past 6 months.
- UWP projects reference multiple NetStandard 2.0 dlls after 15.7.1 upgrade.
- Building C++ code in VS 15.7 with /std:c++17 breaks binary compatibility for std::_Ptr_move_cat.
- Visual Studio 15.7 stuck when opening XAML files.
- CMake configuration fails and generates message "C++ IntelliSense information may be out of date, generate the CMake cache to refresh".
- Unable to start second process for debugging.
- After update to Visual Studio 15.7.1, some test programs fail in start-up due to reading access violation.
- Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert'.
- Build fails after 15.7.0 update on older project using .NET 3.5 .
- Coloring, typing, tooltips and IntelliSense slow in F# in VS2017 editor.
- F# editing experience takes up to a minute for tooltips and dropdowns to display.
- Certain class member variable value are incorrectly read as zero.
- Attempt to open XAML file for the first time causes VS to sit with the "Opening the file ..." message for about 10 minutes before XAML file opens.
- Visual Studio slows down and freezes, creating work loss.
- The target "GetBuiltProjectOutputRecursive" does not exist in the project.
- Internal error with lambda C++17 after 15.7.1 update.
- UWP App is slow to return a stopped state in IDE.
- MSVC auto-vectorization produces incorrect code or incorrect results.
- Visual Studio closed debug a new instance project1, when a new debug new instance project2 has started.
- Latest update breaks "start without debugging" on multiple projects.
- UWP XAML is very very slow on open.
- XAML viewer freezes on 15.7.2 and 15.8.0 preview 1.1.
- Xamarin UI Test App project template missing.
- Xamarin project creation problem.
- Visual Studio crashes when creating new Mobile APP Xamarin.
- Unable to create Xamarin.Forms-Projects.
- Não consigo criar novos projetos Xamarin Forms - Can't create new projects Xamarin Forms.
- Blank project crash after update.
ExtCore allows you to decouple your application into the modules (or extensions) and reuse that modules in other applications in various combinations. Each ExtCore extension may consist of one or more projects and each project may include everything you want (as any other ASP.NET Core project). Controllers, view components, views (added as resources and/or precompiled), static content (added as resources) will be resolved automatically. These projects (extension pieces) may be added to the application directly as dependencies in project.json of your main application project (as source code or NuGet packages), or by copying compiled DLL-files to the Extensions folder. ExtCore supports both of these approaches out of the box and at the same time.
«تبدیل HTML به PDF با استفاده از کتابخانهی iTextSharp»
هرچند کلاس HTMLWorker دیگر توسعه نخواهد یافت (با کتابخانه XML Worker جایگزین شدهاست)، اما برای تبدیل یک سری از کارهای ابتدایی بسیار مناسب است. در این بین اگر تگ خاصی توسط کلاس HTMLWorker پشتیبانی نشود یا پیاده سازی آن ناقص باشد، امکان جایگزین کردن کامل آن با پیاده سازی اینترفیس IHTMLTagProcessor وجود دارد. در کدهای ذیل نحوه جایگزین کردن پردازش کننده تصاویر آنرا ملاحظه میکنید. در اینجا پشتیبانی از تصاویر base64 مدفون شده در صفحات html به آن اضافه شده است:
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using iTextSharp.text; using iTextSharp.text.html; using iTextSharp.text.html.simpleparser; using iTextSharp.text.pdf; namespace CustomHtmlWorkerTag { /// <summary> /// Our custom HTML Tag to add an IElement. /// </summary> public class CustomImageHTMLTagProcessor : IHTMLTagProcessor { /// <summary> /// Tells the HTMLWorker what to do when a close tag is encountered. /// </summary> public void EndElement(HTMLWorker worker, string tag) { } /// <summary> /// Tells the HTMLWorker what to do when an open tag is encountered. /// </summary> public void StartElement(HTMLWorker worker, string tag, IDictionary<string, string> attrs) { Image image; var src = attrs["src"]; if (src.StartsWith("data:image/")) { // data:[<MIME-type>][;charset=<encoding>][;base64],<data> var base64Data = src.Substring(src.IndexOf(",") + 1); var imagedata = Convert.FromBase64String(base64Data); image = Image.GetInstance(imagedata); } else { image = Image.GetInstance(src); } worker.UpdateChain(tag, attrs); worker.ProcessImage(image, attrs); worker.UpdateChain(tag); } } class Program { static void Main(string[] args) { using (var pdfDoc = new Document(PageSize.A4)) { PdfWriter.GetInstance(pdfDoc, new FileStream("Test.pdf", FileMode.Create)); pdfDoc.Open(); FontFactory.Register("c:\\windows\\fonts\\tahoma.ttf"); var tags = new HTMLTagProcessors(); // Replace the built-in image processor tags[HtmlTags.IMG] = new CustomImageHTMLTagProcessor(); var html = "<img alt='' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAodJREFUeNpsk0tME1EUhv87UwlCREhRFpi4cGMMRrTE4MaoxBhAsDyMssFHfCQu3BlXGuNKNy5NmqALoqEEMJWCgEUjYojllSpofIUNBNqmIKU6OnQennunUxvgJF86957z/+d27hkGigMlDJfOAmV7AcYsKGqIZljRSvhNE+CMTwEtXmBy2gQb7mCQJUBKkTIQYtfJYCNMAxO9hzq5CYmFiWFY6ISE9VFLRedc1SONeqwf+uJLuKreNPI9nltbLG0orhpqUCM90DRVoEbJ5MSLho1MMg1O0bHOuyoD9crCcxL+xa0HqwL+rEQHsb/CW89reO1aAyEuq+yp+zXvg66rgng8LrDXSmwYpUc8dZkmDsJNL+NCeVVXbWK+O32cpJ7E6OgkwuEwrl8phaHrVsfYD+x03XTPjN3nzZnD0HGxvPppTSLcLwo0I4lldRFK8jdCoZBlJquAbBnr0BD9GUTRvubahclW5qDukqkpIqlodGQ1At3UxZXaIUvauqsyjBV+jZJEJ3s83HO5j+UWI7E6C4mp2EQCTixyV2CvbbKzNmN2zNfHtbzPM3p4FOy/M5CXtwsOKZmmsOi2IHMvyyFhJhgY4BqutQ/aRRstocEngZzswnQnO+x1lqTjy8hIgNdyDc+x5nomxrKJhpcSp2lSrx48WlZhGArynG5hsLLoE7/jQ59f0aR7ZBkdbf7U6Ge+mKYaBvdx8wwZXjtWvfswfTrp3Over29J8NAXYO1t/v/7csZA5U5/Q35nH+aKt8OMR2POPSUFOyRmorvje3BiCt4b9zBANTmwGvP/aMoZRluJbURB8APmnPlQliNLzk8flxbeh9Du8eId5bYQ2SnxH36b/wQYABNFRsIaESsTAAAAAElFTkSuQmCC' />"; var styles = new StyleSheet(); styles.LoadTagStyle(HtmlTags.BODY, HtmlTags.FONTFAMILY, "tahoma"); styles.LoadTagStyle(HtmlTags.BODY, HtmlTags.ENCODING, "Identity-H"); PdfPCell pdfCell = new PdfPCell { Border = 0 }; pdfCell.RunDirection = PdfWriter.RUN_DIRECTION_LTR; using (var reader = new StringReader(html)) { var parsedHtmlElements = HTMLWorker.ParseToList(reader, styles, tags, null); foreach (var htmlElement in parsedHtmlElements) { pdfCell.AddElement(htmlElement); } } var table1 = new PdfPTable(1); table1.AddCell(pdfCell); pdfDoc.Add(table1); } Process.Start("Test.pdf"); } } }
var tags = new HTMLTagProcessors(); // Replace the built-in image processor tags[HtmlTags.IMG] = new CustomImageHTMLTagProcessor();
HTMLWorker.ParseToList(reader, styles, tags, null)
In this post, we are going to write about what we consider to be the best practices while developing the .NET Core Web API project. How we can make it better and how to make it more maintainable.
We are going to go through the following sections:
چهار قانون بهتر برای طراحی نرمافزار
Kent’s rules, from Extreme Programming Explained are:
- Runs all the tests
- Has no duplicated logic. Be wary of hidden duplication like parallel class hierarchies
- States every intention important to the programmer
- Has the fewest possible classes and methods
In my experience, these don’t quite serve the needs of software design. My four rules might be that a well-designed system:
- is well-covered by passing tests.
- has no abstractions not directly needed by the program.
- has unambiguous behavior.
- requires the fewest number of concepts.
The team said that “most of their effort to improve the .NET Core Docker experience in the last year has been focused on .NET Core 3.0.” “This is the first release in which we’ve made substantive runtime changes to make CoreCLR much more efficient, honor Docker resource limits better by default, and offer more configuration for you to tweak”.