Пример #1
0
 /// <summary>
 /// Checks if currently executing application is a root process.
 /// </summary>
 /// <returns>true if currently executing app is root process; false otherwise</returns>
 public static bool AmIRootProcess()
 {
     return(JobEnvVariables.GetNestLevel() == 0);
 }
Пример #2
0
 /// <summary>
 /// Checks for nest level of currently executing application.
 /// </summary>
 /// <returns>nest level of currently executing application (0 for root process, 1 for first level one etc.)</returns>
 public static int GetMyNestLevel()
 {
     return(JobEnvVariables.GetNestLevel());
 }