-
Notifications
You must be signed in to change notification settings - Fork 1
Code Analysis & Inspection
All ReSharper code inspections have one of the following four severity levels. According to the severity level, the code issue is highlighted in a particular way and the corresponding mark is added to the marker bar on the right hand side of the code window in Visual Studio.
Severity Levels - Error, Warnings, Suggestions & Hints. More information can be found on the JetBrains website for [Reshaprer] (http://www.jetbrains.com/resharper/webhelp/Code_Analysis__Code_Highlighting.html).
List of supported inspections:
Missing calls to method AsObservable()
Adds a hint highlight to public properties & methods which expose an IObservable<T> instance which has not called AsObservable to hide declaring stream types.
MSDN description of AsObservable can be found at http://msdn.microsoft.com/en-us/library/hh211761(v=vs.103).aspx.
Imagine we have the following class with a public property exposing a Subject<T>, it doesn't have to be a Subject<T> it could be any type implementing the IObservable<T> interface:
public class ExampleClass
{
private readonly Subject<Unit> _subject = new Subject<Unit>();
public IObservable<Unit> ExampleProperty
{
get { return _subject; }
}
}
With the plugin installed this would be annotated with a Resharper hint as follows: