GitVersion.GitVersionCacheKeyFactory.GetConfigFileHash C# (CSharp) Method

GetConfigFileHash() private static method

private static GetConfigFileHash ( IFileSystem fileSystem, GitVersion.GitPreparer gitPreparer ) : string
fileSystem IFileSystem
gitPreparer GitVersion.GitPreparer
return string
        private static string GetConfigFileHash(IFileSystem fileSystem, GitPreparer gitPreparer)
        {
            // will return the same hash even when config file will be moved
            // from workingDirectory to rootProjectDirectory. It's OK. Config essentially is the same.
            var configFilePath = ConfigurationProvider.SelectConfigFilePath(gitPreparer, fileSystem);
            if (!fileSystem.Exists(configFilePath))
            {
                return string.Empty;
            }

            var configFileContent = fileSystem.ReadAllText(configFilePath);
            return GetHash(configFileContent);
        }