You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classFoo{privateobject?_obj=null;privatereadonlyConcurrentDictionary<int,object>_dictionary=new();voidM(){if(_dictionary.TryGetValue(100,outobject?obj)){N(obj);// warning: obj must be locked before calling this methodlock(obj){N(obj);// no warning}}}voidN([MustBeLocked]objectx){if(xisList<int>list){list.Add(0);}}}
The text was updated successfully, but these errors were encountered:
ronnygunawan
changed the title
New analyzer: [MustLock] attribute to ensure all callers lock a field or parameter before invoking a method
New analyzer: [MustBeLocked] attribute to ensure all callers lock a field or parameter before invoking a method
Mar 11, 2021
ronnygunawan
changed the title
New analyzer: [MustBeLocked] attribute to ensure all callers lock a field or parameter before invoking a method
New analyzer: [MustBeLocked] attribute to ensure all callers lock an argument before invoking a method
Mar 11, 2021
The text was updated successfully, but these errors were encountered: