Why are DispatcherObject.CheckAccess() and VerifyAccess() hidden from Intellisense?

亡梦爱人 提交于 2019-12-01 02:13:41

A Microsoft employee recently stated CheckAccess is used only for "advanced scenarios", so they hid it from Intellisense.

"CheckAccess and VerifyAccess have always been marked to be not visible, maybe IntelliSense wasn't respecting it. You can use Reflector to confirm. The idea here is that CheckAccess and VerifyAccess are advances scenarios, that normal developers don't need.

However, I do think that EditorBrowsableState.Advanced would have been a more appropriate level."

There's a Microsoft Connect case for this shortcoming. Vote for it if it's important to you.

I can't find any documentation that says you shouldn't use those methods directly, but I haven't looked very long.

Also you refer to the EditorVisibleAttribute, which doesn't exist. According to Reflector it's the EditorBrowsableAttribute.

Reflector disassembly:

[EditorBrowsable(EditorBrowsableState.Never)]
public bool CheckAccess()
{
//CODE
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!