public int Compare(int x, int y) { // TODO: Be more efficient at ruling out no-hopes by using the hash values KeyNodeCell cell = _hive.GetCell <KeyNodeCell>(x); int result = string.Compare(((KeyNodeCell)cell).Name, _searchName, StringComparison.OrdinalIgnoreCase); if (result == 0) { CellIndex = x; } return(result); }
/// <summary> /// Gets the Security Descriptor applied to the registry key. /// </summary> /// <returns>The security descriptor as a RegistrySecurity instance.</returns> public RegistrySecurity GetAccessControl() { if (_cell.SecurityIndex > 0) { SecurityCell secCell = _hive.GetCell <SecurityCell>(_cell.SecurityIndex); return(secCell.SecurityDescriptor); } return(null); }