resharper

What is the correct way of code comments in JavaScript

强颜欢笑 提交于 2021-02-04 11:26:30
问题 What is the correct way of code comments in Javascript - is the same syntax as in Java? And which tools actually would take advantage of these comments: /* * Add an element to the group * @param {Object} overlayElement * @param {Object} [element2] optional element */ I found new Resharper 6 (I write JS in VisualStudio 2010) offers the same comments as in C#, but only within the functions body, something like /// <param name="overlayElement"></param> . The JS code comments are not highlighted

Visual Studio(VS) F12 查看DLL源代码

南楼画角 提交于 2021-01-30 14:02:46
前言 我在VS中调试某个函数时,突发奇想“能不能使用VS的F12(转到定义)查看这个dll中当前函数的实现(源码),而不是像VS自带功能那样只能看到函数名和参数?” 回想起来在安装Resharp时,我注意到Resharp默认会勾选 Dot Peek 这个组件,并且家里的电脑在某次安装完Resharp之后,按12会发现有个选项自定义F12的行为,我选了Resharxxxx,之后惊喜地发现F12可以导航进DLL的源代码,但由于系统重装,我想不起来是做了什么特殊设置。 Dot Peek 今天在调试时,又有这个需求,想查看dll的源代码,我决定从dot peek这个程序入手去查找相关的资料 dot peek官网: https://www.jetbrains.com/decompiler/ 从官网的简介来看它可以反编译.net 的dll,pdb为源代码,并能生成解决方案,但没有很明显介绍这货如何和vs紧密的结合起来,达到我需要的F12查看dll的源码 经过搜索,查找到这篇文章,豁然开朗: https://knowledge.zomers.eu/visualstudio/Pages/How-to-enable-the-decompiler-in-ReSharper-for-Visual-Studio.aspx 使用方法 resharper官网: https://www.jetbrains

Resharper is not identifying not used members of an interface

醉酒当歌 提交于 2021-01-28 11:11:45
问题 When a method is declared in an interface and implemented in a class, but is not called anywhere in the project, Resharper does not detect it as an unused member. I have to clean a project and delete these kind of members, how do I do this? Thanks 回答1: Thank you, I have activated the Option 'Analyze errors in whole solution' .and Resharper list All the members that are not referenced. Resharper - turn off solution wide analysis 来源: https://stackoverflow.com/questions/49945009/resharper-is-not

ReSharper suggests changing pattern matching code to object pattern

邮差的信 提交于 2021-01-02 06:27:47
问题 ReSharper suggests changing the following code: if (MyString is string myString) { //... } to object pattern: if (MyString is { } myString) { //... } It says: The source expression is always of pattern's type, matches on all non-null values. I have never seen this syntax before, and I cannot find any documentation of it. What is it and what does it do? 回答1: {} stand for not null , but not invokes != operator, so it's safe like is null operator which not invoke == operator. There is lack of

Event handler and null-conditional operator [duplicate]

孤人 提交于 2021-01-02 05:38:45
问题 This question already has answers here : Checking for null before event dispatching… thread safe? (6 answers) Closed 3 hours ago . For example, implement INotifyPropertyChanged interface: public event PropertyChangedEventHandler PropertyChanged; private void OnPropertyChanged([CallerMemberName] string propertyName = null) { var handler = PropertyChanged; if (handler != null) handler.Invoke(this, new PropertyChangedEventArgs(propertyName)); } Two things: Copy event to local variable to prevent

Ctrl+K, Ctrl+C is a command no longer working in Visual Studio 2010

五迷三道 提交于 2020-12-31 04:44:29
问题 I am using Visual Studio and Resharper 8. For some reasons, my favorite shortcut Ctrl + K , Ctrl + C or Ctrl + D no longer works. Indeed, the application shows in the status bar the message: The key combination is(Ctrl K Ctrl C ) is not a command . Any ideas how to reset them? Many thanks. 回答1: Very strange problem. Yes, it is possible to edit the command in Visual Studio. Select Tools and then Options . Once the window is shown, select the Environment option group and then Keyboard , as

Ctrl+K, Ctrl+C is a command no longer working in Visual Studio 2010

*爱你&永不变心* 提交于 2020-12-31 04:44:27
问题 I am using Visual Studio and Resharper 8. For some reasons, my favorite shortcut Ctrl + K , Ctrl + C or Ctrl + D no longer works. Indeed, the application shows in the status bar the message: The key combination is(Ctrl K Ctrl C ) is not a command . Any ideas how to reset them? Many thanks. 回答1: Very strange problem. Yes, it is possible to edit the command in Visual Studio. Select Tools and then Options . Once the window is shown, select the Environment option group and then Keyboard , as