예제 #1
0
        protected override void EndProcessing()
        {
            if (this.Value == null)
            {
                this.Value = new string[0];
            }

            using (PathVariable variable = new PathVariable(this.Name, this.Target))
            {
                variable.Set(this.Value);
            }
        }
예제 #2
0
 protected override void EndProcessing()
 {
     using (PathVariable variable = new PathVariable(this.Name, this.Target))
     {
         if (this.Prepend)
         {
             variable.Prepend(this.Value);
         }
         else
         {
             variable.Append(this.Value);
         }
     }
 }
예제 #3
0
        private PscxContext()
        {
            this.Preferences = new Hashtable(StringComparer.OrdinalIgnoreCase);
            this.Session     = new Hashtable(StringComparer.OrdinalIgnoreCase);
            this.Home        = Path.GetDirectoryName(GetType().Assembly.Location);
            this.AppsDir     = Path.Combine(this.Home, "Apps");

            using (var variable = new PathVariable("Path", EnvironmentVariableTarget.Process))
            {
                variable.Append(this.AppsDir);
            }

            this.Is64BitProcess = (IntPtr.Size == 8);
            this.IsWow64Process = GetIsWow64Process() ?? false;

            InitializePscxPreferences();
        }