private void CacheAccessCheck(LUID luidModifiedID, bool isAccessAllowed) { if (null == accessCheckCache) { throw Fx.AssertAndThrowFatal("AcessCheckCache must not be NULL"); } lock (this) { accessCheckCache[luidModifiedID] = isAccessAllowed; } }
internal static unsafe extern bool LookupPrivilegeValue(IntPtr lpSystemName, string lpName, LUID* lpLuid);
private bool IsAccessCached(LUID luidModifiedID, out bool isAccessAllowed) { if (null == accessCheckCache) { throw Fx.AssertAndThrowFatal("AcessCheckCache must not be NULL"); } bool retValue = false; lock (this) { retValue = accessCheckCache.TryGetValue(luidModifiedID, out isAccessAllowed); } return retValue; }