Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
Source: Fine Code Coverage – Visual Studio Marketplace
- Open the Fine Code Coverage window
- Run all unit tests
- See stats in Fine Code Coverage window
- Exclude the test project itself from coverage calculation:
(Below excludes project that ends with .Test and all its types (*
* => matches zero or more characters
[*]* => All types in all assemblies (nothing is instrumented)
[coverlet.*]Coverlet.Core.Coverage => The Coverage class in the Coverlet.Core namespace belonging to any assembly that matches coverlet.* (e.g coverlet.core)
[*]Coverlet.Core.Instrumentation.* => All types belonging to Coverlet.Core.Instrumentation namespace in any assembly
[coverlet.*.tests]* => All types in any assembly starting with coverlet. and ending with .tests
Both 'Exclude' and 'Include' options can be used together but 'Exclude' takes precedence.
JSON deserialization in C# refers to the process of forming up .NET objects from a JSON string. Most of the time, this means creating strongly-typed POCOs. However, there are certain situations when we may prefer flexibility over type-inference. For example, cherry-picking a small portion of JSON data, dealing with external JSON data whose structure is largely unknown or changes very often, etc. Dynamic deserialization comes into play for such cases. This does not necessarily mean the use of language’s inbuilt dynamic keyword. There are other ways as well.We are going to see how we can do this using the native System.Text.Json library and the popular Newtonsoft.Json library.
Source: How to Deserialize JSON Into Dynamic Object in C# – Code Maze
Note that you may need to enable telnet on your workstation (see this Article: How to enable telnet for troubleshooting when CMD reports: “‘telnet’ is not recognized as an internal or external command”)
Once you have telnet enabled, follow these steps:
- Open a command prompt
- Type in “telnet <IP ADDRESS OF SERVER PC> <PORT>” and press enter.
- For example, you would type “telnet 18.104.22.168 1521”
- If a blank screen appears then the port is open, and the test is successful.
- If you receive a connecting… message or an error message then something is blocking that port. It could be the Windows firewall, a third party firewall like your anti-virus software, or an institutional hardware firewall between the workstation and the server.
Source: Using telnet as a tool for troubleshooting connection problems on hosted Voyager servers – Ex Libris Knowledge Center
Very good offical Angular video explaining reasons why the dreaded error might occur and solutions.
Allows you to associate a color with a solution and display it in various locations within Visual Studio. Inspired by the Peacock extension for VS Code.
Source: Solution Colors – Visual Studio Marketplace
I wanted to see how many listeners there was for a certain subject, and where they reside in the source code.
Here is how in chrome devtools, put a breakpoint before the subjects .next() call. And inspect the subject:
observers array count = number of “listeners”
FunctionLocation = source code reference
(Context: Angular v11, rxjs)
Introduction to Storybook for Angular Storybook is a tool for UI development. It makes development faster and easier by isolating components. This allows you to work on one component at a time. You can develop entire UIs without needing to start up a complex dev stack, force certain data into your database, or navigate around your application.
Source: Introduction to Storybook