private string ReadConfigContent(string path)
{
string configString = "";
FileInfo configFile = new FileInfo(path);
if (!configFile.Exists)
{
throw new Exception("SOA配置文件不存在");
}
using (StreamReader reader = configFile.OpenText())
{
configString = reader.ReadToEnd();
}
if (string.IsNullOrWhiteSpace(configString))
{
throw new Exception("配置文件内容为空");
}
return configString;
}