iRacingSdkWrapper.SessionInfo.TryGetValue C# (CSharp) Method

TryGetValue() public method

Gets a value from the session info YAML. Returns true if successfull, false if there is an error.
public TryGetValue ( string query, string &value ) : bool
query string The YAML query path to the value.
value string When this method returns, contains the requested value if the query was valid, or null if the query was invalid.
return bool
        public bool TryGetValue(string query, out string value)
        {
            if (!this.IsValidYaml)
            {
                value = null;
                return false;
            }
            try
            {
                value = YamlParser.Parse(_yaml, query);
                return true;
            }
            catch (Exception)
            {
                value = null;
                return false;
            }
        }

Same methods

SessionInfo::TryGetValue ( string query ) : string