private static List<Tuple<string, string>> GetApplicationAgnosticInfo()
{
return new List<Tuple<string, string>> {
Tuple.Create("AppDomain.BaseDirectory" , AppDomain.CurrentDomain.BaseDirectory),
Tuple.Create("Assembly.Location (entry)" , Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)),
Tuple.Create("Assembly.Location (executing)" , Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)),
Tuple.Create("Assembly.EscapedCodeBase (entry)" , Path.GetDirectoryName(new Uri(Assembly.GetEntryAssembly().EscapedCodeBase).LocalPath)),
Tuple.Create("Assembly.EscapedCodeBase (executing)", Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath)),
Tuple.Create("Process.MainModule.FileName" , Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName)),
Tuple.Create("Environment.GetCommandLineArgs()" , Path.GetDirectoryName(Environment.GetCommandLineArgs()[0])),
// Свойства и методы возвращающие "текущий каталог" являются ненадежными
// НЕ ПОЛЬЗУЙТЕСь ИМИ!
Tuple.Create("Environment.CurrentDirectory" , Environment.CurrentDirectory),
Tuple.Create("Directory.GetCurrentDirectory()" , Directory.GetCurrentDirectory()),
};
}