public string GetApplicationId()
{
try
{
using (var stream = _fileSystem.OpenRead(ConfigurationFile.FullName))
{
using (var reader = new StreamReader(stream))
{
return reader.ReadToEnd();
}
}
}
catch (FileNotFoundException)
{
}
try
{
return _repositoryConfigurer.GetApplicationId();
}
catch (RepositoryConfigurationException)
{
}
throw new ApplicationConfigurationException("Application is not configured in this directory. Configure it by creating (\"create\") an application or by linking (\"link\") an existing application.");
}