示例#1
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            _log.InfoFormat("inside register routes");
            if (routes != null)
            {
                _log.InfoFormat("about to attach routes");
                if (Config.StartAlertService)
                {
                    routes.Add(new ServiceRoute("AlertService", new WebServiceHostFactory(), typeof(Alert)));
                }
                if (Config.StartContentService)
                {
                    routes.Add(new ServiceRoute("ContentService", new WebServiceHostFactory(), typeof(Content)));
                }
                if (Config.StartMembershipService)
                {
                    routes.Add(new ServiceRoute("ASAMemberService", new WebServiceHostFactory(), typeof(ASAMember)));
                }
                if (Config.StartReminderService)
                {
                    routes.Add(new ServiceRoute("ReminderService", new WebServiceHostFactory(), typeof(Reminder)));
                }
                if (Config.StartSearchService)
                {
                    routes.Add(new ServiceRoute("SearchService", new WebServiceHostFactory(), typeof(Search)));
                }
                if (Config.StartSelfReportedService)
                {
                    routes.Add(new ServiceRoute("SelfReportedService", new WebServiceHostFactory(), typeof(SelfReported)));
                }
                if (Config.StartSurveyService)
                {
                    routes.Add(new ServiceRoute("SurveyService", new WebServiceHostFactory(), typeof(Survey)));
                }

                routes.Add(new ServiceRoute("LessonsService", new WebServiceHostFactory(), typeof(Lessons)));
            }
            else
            {
                _log.Error("The RoutesCollection is null!");
            }
        }