Пример #1
0
 /// <summary>
 /// Gets the object that serves as a value to $profile and the paths on it
 /// </summary>
 /// <param name="shellId">The id identifying the host or shell used in profile file names.</param>
 /// <param name="useTestProfile">used from test not to overwrite the profile file names from development boxes</param>
 /// <param name="allUsersAllHosts">path for all users and all hosts</param>
 /// <param name="currentUserAllHosts">path for current user and all hosts</param>
 /// <param name="allUsersCurrentHost">path for all users current host</param>
 /// <param name="currentUserCurrentHost">path for current user and current host</param>
 /// <param name="dollarProfile">the object that serves as a value to $profile</param>
 /// <returns></returns>
 internal static void GetProfileObjectData(string shellId, bool useTestProfile, out string allUsersAllHosts, out string allUsersCurrentHost, out string currentUserAllHosts, out string currentUserCurrentHost, out string dbgShellHost, out PSObject dollarProfile)
 {
     allUsersAllHosts       = HostUtilities.GetFullProfileFileName(null, false, useTestProfile);
     allUsersCurrentHost    = HostUtilities.GetFullProfileFileName(shellId, false, useTestProfile);
     currentUserAllHosts    = HostUtilities.GetFullProfileFileName(null, true, useTestProfile);
     currentUserCurrentHost = HostUtilities.GetFullProfileFileName(shellId, true, useTestProfile);
     dbgShellHost           = HostUtilities.GetFullDbgShellProfileFileName();
     dollarProfile          = HostUtilities.GetDollarProfile(allUsersAllHosts, allUsersCurrentHost, currentUserAllHosts, currentUserCurrentHost, dbgShellHost);
 }
Пример #2
0
 /// <summary>
 /// Used to get all profile file names for the current or all hosts and for the current or all users.
 /// </summary>
 /// <param name="shellId">null for all hosts, not null for the specified host</param>
 /// <param name="forCurrentUser">false for all users, true for the current user.</param>
 /// <returns>The profile file name matching the parameters.</returns>
 internal static string GetFullProfileFileName(string shellId, bool forCurrentUser)
 {
     return(HostUtilities.GetFullProfileFileName(shellId, forCurrentUser, false));
 }