public string getFolder(EnvironmentVariable ev, string user) { LocationPath parse_me = new LocationPath(ev, null); List <string> users = this.getUsers(ev); if (user == null) { foreach (string usr in users) { return(this.getAbsoluteRoot(parse_me, usr)); } return(this.getAbsoluteRoot(parse_me, null)); } if (users.Contains(user)) { return(this.getAbsoluteRoot(parse_me, user)); } throw new Exception("User " + user + " does not have a folder for EV " + ev.ToString()); }
private static ObjectInfo EnvironmentVariableInfo(EnvironmentVariable envVar) { return(new ObjectInfo(envVar.ToString(), new[] { new Property("Name", envVar.Name), new Property("Value", envVar.Value) })); }
public string getFolder(EnvironmentVariable ev, string user) { LocationPath parse_me = new LocationPath(ev, null); List<string> users = this.getUsers(ev); if (user == null) { foreach (string usr in users) { return this.getAbsoluteRoot(parse_me, usr); } return this.getAbsoluteRoot(parse_me, null); } if (users.Contains(user)) { return this.getAbsoluteRoot(parse_me, user); } throw new Exception("User " + user + " does not have a folder for EV " + ev.ToString()); }