private static SelectListItem[] GetJobTemplates(string authToken) { List <SelectListItem> jobTemplates = new List <SelectListItem>(); NameValueCollection templates = MediaClient.GetJobTemplates(authToken); foreach (string templateName in templates.Keys) { SelectListItem jobTemplate = new SelectListItem() { Text = templateName, Value = templates[templateName] }; jobTemplates.Add(jobTemplate); } return(jobTemplates.ToArray()); }