/// <summary> /// Gets a set of all the keys contained in the table with the specified type. /// </summary> /// <param name="types">Bitmask of types to check for; 0 is treated as a "don't care".</param> /// <returns>A set of all keys currently in the table.</returns> public HashSet <string> GetKeys(NtType types) { HashSet <string> keys = new HashSet <string>(); int prefixLen = m_path.Length + 1; foreach (EntryInfo entry in NtCore.GetEntryInfo(m_path + PathSeperatorChar, types)) { string relativeKey = entry.Name.Substring(prefixLen); if (relativeKey.IndexOf(PathSeperatorChar) != -1) { continue; } keys.Add(relativeKey); } return(keys); }
/// <summary> /// Gets a set of all the sub-tables contained in the table. /// </summary> /// <returns>A set of all subtables currently contained in the table.</returns> public HashSet <string> GetSubTables() { HashSet <string> keys = new HashSet <string>(); int prefixLen = m_path.Length + 1; foreach (EntryInfo entry in NtCore.GetEntryInfo(m_path + PathSeperatorChar, 0)) { string relativeKey = entry.Name.Substring(prefixLen); int endSubTable = relativeKey.IndexOf(PathSeperatorChar); if (endSubTable == -1) { continue; } keys.Add(relativeKey.Substring(0, endSubTable)); } return(keys); }
public ReadOnlySpan <EntryInfo> GetEntryInfo(ReadOnlySpan <char> prefix, NtType types) { return(NtCore.GetEntryInfo(this, prefix, types, Span <EntryInfo> .Empty)); }
/// <summary> /// Checks the table and tells if if contains the specified sub-table. /// </summary> /// <param name="key">The sub-table to check for</param> /// <returns>True if the table contains the sub-table, otherwise false</returns> public bool ContainsSubTable(string key) { return(NtCore.GetEntryInfo(m_path + PathSeperatorChar + key + PathSeperatorChar, 0).Count != 0); }
public ReadOnlySpan <EntryInfo> GetEntryInfo(string prefix, NtType types, Span <EntryInfo> store) { return(NtCore.GetEntryInfo(this, prefix, types, store)); }