iRacingSdkWrapper.SessionInfo.TryGetValue C# (CSharp) 메소드

TryGetValue() 공개 메소드

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.
리턴 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