public bool Contains(StateType state)
{
// Do not trust cache for Enabled; see BNC#596801
// TODO: Eventually remove this work-around
if (accessible != null && state == StateType.Enabled && (states & (ulong)StateType.Defunct) == 0) {
try {
uint [] data = accessible.proxy.GetState ();
states = (ulong)(data [1] << (sizeof (int) * 8)) | (ulong)data [0];
} catch (System.Exception) {
return false;
}
}
return (states & (ulong)state) != 0? true: false;
}