in plugin-sdk-core/src/main/kotlin/com/jetbrains/teamcity/plugins/framework/resource/location/windows/registry/WindowsRegistryParser.kt [26:37]
fun tryParseValue(text: String): WindowsRegistryEntry.Value? {
val matchResult = valuePattern.matchEntire(text)
return if (matchResult != null) {
logger.debug("Line matches registry value pattern. Line: $text")
val (_, name, _, type, _, data) = matchResult.destructured
WindowsRegistryEntry.Value(name, WindowsRegistryValueType.tryParse(type)!!, data)
} else {
logger.debug("Line doesn't match registry value pattern. Line: $text")
null
}
}