Ejemplo n.º 1
0
        // Find a config record.
        // If found, nextIndex == parts.Length and the resulting record is in currentRecord.
        // If not found, nextIndex is the index of the part of the path not found, and currentRecord
        // is the record that has been found so far (nexIndex - 1).
        private void HlFindConfigRecord(string[] parts, out int nextIndex, out BaseConfigurationRecord currentRecord)
        {
            currentRecord = RootConfigRecord;
            nextIndex     = 0;
            for (; nextIndex < parts.Length; nextIndex++)
            {
                BaseConfigurationRecord childRecord = currentRecord.HlGetChild(parts[nextIndex]);
                if (childRecord == null)
                {
                    break;
                }

                currentRecord = childRecord;
            }
        }
Ejemplo n.º 2
0
        // Find a config record.
        // If found, nextIndex == parts.Length and the resulting record is in currentRecord.
        // If not found, nextIndex is the index of the part of the path not found, and currentRecord
        // is the record that has been found so far (nexIndex - 1).
        private void HlFindConfigRecord(string[] parts, out int nextIndex, out BaseConfigurationRecord currentRecord)
        {
            currentRecord = RootConfigRecord;
            nextIndex = 0;
            for (; nextIndex < parts.Length; nextIndex++)
            {
                BaseConfigurationRecord childRecord = currentRecord.HlGetChild(parts[nextIndex]);
                if (childRecord == null)
                    break;

                currentRecord = childRecord;
            }
        }