예제 #1
0
        /// <summary>
        /// Simple query, yields <c>ShortProject</c> objects. Can drill down later if needed.
        /// </summary>
        /// <param name="startsWith"></param>
        /// <returns></returns>
        public IList<ShortProject> Projects(string startsWith)
        {
            startsWith = startsWith.ToLowerInvariant();

              var pm = new ProjectManagement(Connection);
              var mapper = new ProjectToShortProjectMapper();
              return pm.GetProjects().Where(p => p.Name.StartsWith(startsWith, StringComparison.InvariantCultureIgnoreCase) || p.ShortName.StartsWith(startsWith, StringComparison.InvariantCultureIgnoreCase))
              .Select(mapper.Map)
              .ToList();
        }
예제 #2
0
        /// <summary>
        /// Simple query, yields <c>ShortProject</c> objects. Can drill down later if needed.
        /// </summary>
        /// <param name="startsWith"></param>
        /// <returns></returns>
        public IList <ShortProject> Projects(string startsWith)
        {
            startsWith = startsWith.ToLowerInvariant();

            var pm     = new ProjectManagement(Connection);
            var mapper = new ProjectToShortProjectMapper();

            return(pm.GetProjects().Where(p => p.Name.StartsWith(startsWith, StringComparison.InvariantCultureIgnoreCase) || p.ShortName.StartsWith(startsWith, StringComparison.InvariantCultureIgnoreCase))
                   .Select(mapper.Map)
                   .ToList());
        }