Amazon.Runtime.Internal.Util.IniFile.TryParseProperty C# (CSharp) Метод

TryParseProperty() приватный статический Метод

private static TryParseProperty ( string line, string &propertyName, string &propertyValue ) : bool
line string
propertyName string
propertyValue string
Результат bool
        private static bool TryParseProperty(string line, out string propertyName, out string propertyValue)
        {
            if (line != null)
            {
                line = line.Trim();
                var separatorIndex = line.IndexOf(keyValueSeparator, StringComparison.Ordinal);
                if (separatorIndex >= 0)
                {
                    propertyName = line.Substring(0, separatorIndex).Trim();
                    var valueStartIndex = separatorIndex + keyValueSeparator.Length;
                    propertyValue = line.Substring(valueStartIndex, line.Length - valueStartIndex).Trim();
                    return true;
                }
            }
            propertyName = null;
            propertyValue = null;
            return false;
        }
    }