public List <JiraProject> getProjects() { #if PLVS_133_WORKAROUND object[] results = service.getProjectsNoSchemes(Token); return((from pobj in results.ToList() let id = pobj.GetType().GetProperty("id") let key = pobj.GetType().GetProperty("key") let name = pobj.GetType().GetProperty("name") select new JiraProject( int.Parse((string)id.GetValue(pobj, null)), (string)key.GetValue(pobj, null), (string)name.GetValue(pobj, null))) .ToList()); #else RemoteProject[] pTable = service.getProjectsNoSchemes(Token); return(pTable.Select(p => new JiraProject(int.Parse(p.id), p.key, p.name)).ToList()); #endif }
public List <JiraProject> getProjects() { RemoteProject[] pTable = service.getProjectsNoSchemes(token); List <JiraProject> list = new List <JiraProject>(); foreach (RemoteProject p in pTable) { list.Add(new JiraProject(int.Parse(p.id), p.key, p.name)); } return(list); }
public List <JiraProject> getProjects() { object[] results = service.getProjectsNoSchemes(Token); return((from pobj in results.ToList() let id = pobj.GetType().GetProperty("id") let key = pobj.GetType().GetProperty("key") let name = pobj.GetType().GetProperty("name") select new JiraProject( int.Parse((string)id.GetValue(pobj, null)), (string)key.GetValue(pobj, null), (string)name.GetValue(pobj, null))) .ToList()); }