コード例 #1
0
 public ProjectController(IProjectServiceCP projectService, IMapper mapper, IRecentActivityService recentActivityService, IContractServiceCrossSite contractsService)
 {
     _projectService        = projectService;
     _mapper                = mapper;
     _recentActivityService = recentActivityService;
     _contractsService      = contractsService;
 }
コード例 #2
0
 public ContractServiceCrossSite(IContractsRepository contractRepository, IRecentActivityService recentActivityService,
                                 IGroupUserService groupUserService)
 {
     _contractRepository    = contractRepository;
     _recentActivityService = recentActivityService;
     _groupUserService      = groupUserService;
 }
コード例 #3
0
        /// <summary>
        /// Renders the specified recent activities.
        /// </summary>
        /// <param name="recentActivities">The recent activities.</param>
        /// <returns></returns>
        public static string Render(IList <RecentActivity> recentActivities)
        {
            StringBuilder builder = new StringBuilder();
            int           sum     = recentActivities.Sum(o => o.Count);

            if (recentActivities == null)
            {
                throw new System.ArgumentNullException("recentActivities", "Parameter 'recentActivities' is null, value expected");
            }

            if (recentActivities.Count > 0 && sum > 0)
            {
                IRecentActivityService service = DependencyInjection.Resolve <IRecentActivityService>();
                builder.AppendLine("<h3>recent activity</h3>");
                builder.AppendLine("<ul  class=\"comments lightgrey\">");

                foreach (RecentActivity activity in recentActivities.Where(activity => activity.Count > 0))
                {
                    builder.AppendLine(string.Format("<li>{0}</li>", service.RenderActivity(activity)));
                }

                builder.AppendLine("</ul>");
            }

            return(builder.ToString());
        }
コード例 #4
0
ファイル: HomeController.cs プロジェクト: zyc576/QSWebProject
 public HomeController(ISuggestionService suggestionService, IRecentActivityService recentService)
 {
     _suggestionService = suggestionService;
     _recentService     = recentService;
 }
コード例 #5
0
 public ProjectServiceCP(IProjectRepositoryCP projectRepository, IRecentActivityService recentActivityService, IContractServiceCrossSite contractsService)
 {
     _projectRepository     = projectRepository;
     _recentActivityService = recentActivityService;
     _contractsService      = contractsService;
 }
コード例 #6
0
 public ActivityManageController(IRecentActivityService recentService)
 {
     _recentService = recentService;
 }