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); } }
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); } } }
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(); }