public CallForPapersController(IConferenceService conferenceService, IImageUploader imageUploader, ApplicationDbContext dbContext)
 {
     _conferenceService            = conferenceService;
     _imageUploader                = imageUploader;
     _dbContext                    = dbContext;
     _cfpSpeakerImageContainerName = ConfigurationManager.AppSettings["Storage.Container.CallForPaper.SpeakerImages"];
 }
 public ConferenceController(ApplicationDbContext dbContext)
 {
     this.conferenceSlug = "swetugg-2015";
     this.conferenceService = new CachedConferenceService(new ConferenceService(dbContext));
     this.appInsightsInstrumentationKey = ConfigurationManager.AppSettings["ApplicationInsights.InstrumentationKey"];
     this.facebookAppId = ConfigurationManager.AppSettings["Facebook_Api_AppId"];
 }
 public ConferenceController(IConferenceService conferenceService
                             , IExchangeServiceClient exchangeServiceClient)
 {
     this.conferenceService     = conferenceService;
     this.exchangeServiceClient = exchangeServiceClient;
     mailboxPolling             = new MailboxPolling(exchangeServiceClient);
 }
 public ConferenceController(ApplicationDbContext dbContext)
 {
     this.conferenceSlug                = "swetugg-2016";
     this.conferenceService             = new CachedConferenceService(new ConferenceService(dbContext));
     this.appInsightsInstrumentationKey = ConfigurationManager.AppSettings["ApplicationInsights.InstrumentationKey"];
     this.facebookAppId = ConfigurationManager.AppSettings["Facebook_Api_AppId"];
 }
 public CallForPapersController(IConferenceService conferenceService, IImageUploader imageUploader, ApplicationDbContext dbContext)
 {
     _conferenceService = conferenceService;
     _imageUploader = imageUploader;
     _dbContext = dbContext;
     _cfpSpeakerImageContainerName = ConfigurationManager.AppSettings["Storage.Container.CallForPaper.SpeakerImages"];
 }
Example #6
0
 public ConferencesController(
     IUser user,
     IMediatorHandler mediator,
     INotificationHandler <DomainNotification> notifications,
     IConferenceService conferenceService) : base(user, mediator, notifications)
 {
     _conferenceService = conferenceService;
 }
 public ConferenceController(IBaseControllerServiceFacade serviceFacade, IUserService userService, IPrivateMessageService privateMessageService, IConferenceService conferenceService, IPublicMessageService publicMessageService, IConferenceMessageService conferenceMessageService) : base(serviceFacade)
 {
     _userService = userService;
     _privateMessageService = privateMessageService;
     _conferenceService = conferenceService;
     _publicMessageService = publicMessageService;
     _conferenceMessageService = conferenceMessageService;
 }
Example #8
0
 public ConferencesController(
     IConferenceService conferenceService,
     ILoggerAdapter <ConferencesController> logger
     )
 {
     _logger            = logger;
     _conferenceService = conferenceService;
 }
Example #9
0
 public ConferenceHub(ISecurityUserService securityUserService, IUnitOfWorkFactory unitOfWorkFactory, IPrivateMessageService privateMessageService, IPublicMessageService publicMessageService, IConferenceService conferenceService, IViewModelConfigService viewModelConfigService)
     : base(viewModelConfigService)
 {
     _securityUserService = securityUserService;
     _unitOfWorkFactory = unitOfWorkFactory;
     _privateMessageService = privateMessageService;
     _publicMessageService = publicMessageService;
     _conferenceService = conferenceService;
 }
Example #10
0
 public ProposalController(ILogger <ProposalController> logger,
                           IConferenceService conferenceService, IProposalService proposalService,
                           IDataProtectionProvider protectionProvider, PurposeStringConstants purposeStringConstants)
 {
     protector              = protectionProvider.CreateProtector(purposeStringConstants.ConferenceIdQueryString);
     this.logger            = logger;
     this.conferenceService = conferenceService;
     this.proposalService   = proposalService;
 }
Example #11
0
        public ConferenceModule(IConferenceService conferenceService) : base("/sqadays")
        {
            _conferenceService = conferenceService;

            Get("/{conferencename}/speakers", async parameters =>
            {
                string conferenceName = parameters.conferenceName;
                var speakers          = await _conferenceService.FetchSpeakersForConferenceAsync(conferenceName);
                return(Response.AsJson(speakers).WithStatusCode(HttpStatusCode.OK));
            });
        }
Example #12
0
        public SessionViewModel(IConferenceService conferenceService)
        {
            _conferenceService = conferenceService;

            MessengerInstance.Register <SessionSelected>(this, message =>
            {
                var session = _conferenceService.LoadSession(message.SessionId);
                _id         = message.SessionId;
                Speaker     = session.Speaker;
                Title       = session.Title;
            });
        }
        public ConferenceOverviewViewModel(
            IConferenceService conferenceService,
            INavigationService navigationService)
        {
            Title = "Conference Overview";
            _conferenceService  = conferenceService;
            _navigationService  = navigationService;
            Conferences         = new ObservableCollection <ConferenceModelGrouping>();
            SelectedItemCommand = new Command <Conference>(OnSelectedItem);

            Initialize();
        }
Example #14
0
        public ConferenceServiceTests()
        {
            // Arrange
            var mappingProfile = new MapperConfigurationExpression();

            mappingProfile.AddProfile(new APIMappingProfile());

            var config = new MapperConfiguration(mappingProfile);

            _mapper  = new Mapper(config);
            _service = new ConferenceService(_mapper);
        }
Example #15
0
        public ConferenceViewModel(IConferenceService conferenceService)
        {
            _conferenceService = conferenceService;

            foreach (var session in _conferenceService.GetSessions())
            {
                _sessions.Add(new SessionHeaderViewModel
                {
                    Id    = session.Id,
                    Title = session.Title
                });
            }
        }
 public ProposalController(IConferenceService conferenceService,
                           IProposalService proposalService)
 {
     this.conferenceService = conferenceService;
     this.proposalService   = proposalService;
 }
Example #17
0
 public StatisticsMemoryRepo(IConferenceService conferenceService)
 {
     _conferenceService = conferenceService;
 }
Example #18
0
 public ConferenceController(IConferenceRepository conferenceRepository, IConferenceService conferenceService)
 {
     _conferenceRepository = conferenceRepository;
     _conferenceService    = conferenceService;
 }
Example #19
0
 public ConferenceController(IConferenceService conferenceService)
 {
     this._conferenceService = conferenceService;
 }
Example #20
0
 public GroupController(GroupService groupService, UserService userService, ConferenceService conferService)
 {
     _groupService  = groupService;
     _userService   = userService;
     _conferService = conferService;
 }
Example #21
0
 public ConferenceController()
 {
     resEvSer = new ConferenceService();
     EmpServ  = new EmployeeService();
     assSer   = new AssignEmployee();
 }
 public ScheduleApiController(ApplicationDbContext dbContext)
 {
     this.dbContext         = dbContext;
     this.conferenceService = new CachedConferenceService(new ConferenceService(dbContext));
 }
 public ProposalController(IConferenceService conferenceService, IProposalService proposalService, IDataProtectionProvider dataProtProvider, PurposeKeys purposeKeys)
 {
     _dataProtector         = dataProtProvider.CreateProtector(purposeKeys.ConferenceIdKey);
     this.conferenceService = conferenceService;
     this.proposalService   = proposalService;
 }
 public SessionPartHandler(IConferenceService conferenceService)
 {
     _conferenceService = conferenceService;
     OnActivated <SessionPart>(SetupLazyFields);
 }
Example #25
0
 public SummaryViewComponent(IConferenceService conferenceService)
 {
     this.conferenceService = conferenceService;
 }
 public SpeakerPartHandler(IConferenceService conferenceService) {
     _conferenceService = conferenceService;
     OnActivated<SpeakerPart>(SetupLazyFields);
 }
Example #27
0
 public ConferenceController(IConferenceService confSevice, ILogger <ConferenceController> logger)
 {
     conferenceService = confSevice;
     this.logger       = logger;
 }
Example #28
0
 public ConferenceController(IConferenceService service, ILogger <ConferenceController> logger)
 {
     confService = service;
     confLogger  = logger;
 }
 public StatisticsController(IConferenceService conferenceService)
 {
     _conferenceService = conferenceService;
 }
Example #30
0
 public ConferenceController(IConferenceService conferenceService)
 {
 }
Example #31
0
        public ConferenceModule(IInboundDependency apiServe)
        {
            this.RequiresAuthentication();
            this.confService = new ConferenceService();

            #region Get All Conferences
            Get["/Accounts/{AccountSid}/Conferences"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                { return HttpStatusCode.Unauthorized; }
                else
                {
                    var AccountSid = Context.CurrentUser.UserName;
                    IQueryable<Conference> res = confService.GetAllConferences(AccountSid);
                    return Response.AsXml<IQueryable<Conference>>(res);
                }
            };
            Get["/Accounts/{AccountSid}/Conferences.json"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                { return HttpStatusCode.Unauthorized; }
                else
                {
                    var AccountSid = Context.CurrentUser.UserName;
                    IQueryable<Conference> res = confService.GetAllConferences(AccountSid);
                    return Response.AsJson<IQueryable<Conference>>(res);
                }
            };
            #endregion

            #region Get Conference
            Get["/Accounts/{AccountSid}/Conferences/{ConferenceSid}"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    Conference res = confService.GetConference(x.ConferenceSid);
                    return Response.AsXml<Conference>(res);
                }
            };

            Get["/Accounts/{AccountSid}/Conferences/{ConferenceSid}.json"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    Conference res = confService.GetConference(x.ConferenceSid);
                    return Response.AsJson<Conference>(res);
                }
            };
            #endregion

            #region Get All Conference Participants
            Get["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                { return HttpStatusCode.Unauthorized; }
                else
                {
                    var AccountSid = Context.CurrentUser.UserName;
                    var ConferenceSid = x.ConfenrenceSid;
                    IQueryable<Participant> res = confService.GetAllConferenceParticipants(AccountSid, ConferenceSid);
                    return Response.AsXml<IQueryable<Participant>>(res);
                }
            };
            Get["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                { return HttpStatusCode.Unauthorized; }
                else
                {
                    var AccountSid = Context.CurrentUser.UserName;
                    var ConferenceSid = x.ConfenrenceSid;
                    IQueryable<Participant> res = confService.GetAllConferenceParticipants(AccountSid, ConferenceSid);
                    return Response.AsJson<IQueryable<Participant>>(res);
                }
            };
            #endregion

            #region Get Participant
            Get["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    Participant res = confService.GetParticipant(x.ConferenceSid,x.CallSid);
                    return Response.AsXml<Participant>(res);
                }
            };

            Get["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    Participant res = confService.GetParticipant(x.ConferenceSid, x.CallSid);
                    return Response.AsJson<Participant>(res);
                }
            };
            #endregion

            #region Mute/Unmute Participant
            Post["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    var request = this.Bind<MuteParticipantRequest>();
                    //Todo
                    //Validation
                    MuteParticipantResponse res = apiserver.GetServer().ConferenceMuteParticipant(request);
                    return Response.AsXml<MuteParticipantResponse>(res);
                }
            };

            Post["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    var request = this.Bind<MuteParticipantRequest>();
                    //Todo
                    //Validation
                    MuteParticipantResponse res = apiserver.GetServer().ConferenceMuteParticipant(request);
                    return Response.AsJson<MuteParticipantResponse>(res);
                }
            };
            #endregion

            #region Kick Participant
            Delete["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    if (apiserver.GetServer().ConferenceKickParticipant(x.ConferenceSid, x.CallSid))
                    { return HttpStatusCode.NoContent; }
                    else { return HttpStatusCode.NoResponse; }
                }
            };
            #endregion

            #region Record Conference
            Post["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Record"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    var request = this.Bind<ConferenceRecordRequest>();
                    //Todo
                    //Validation
                    ConferenceRecordResponse res = apiserver.GetServer().ConferenceRecord(request);
                    return Response.AsXml<ConferenceRecordResponse>(res);
                }
            };

            Post["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Record.json"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    var request = this.Bind<ConferenceRecordRequest>();
                    //Todo
                    //Validation
                    ConferenceRecordResponse res = apiserver.GetServer().ConferenceRecord(request);
                    return Response.AsJson<ConferenceRecordResponse>(res);
                }
            };
            #endregion

            #region Stop Record Conference
            Delete["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Record"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    if (x.AccountSid != Context.CurrentUser.UserName)
                    { return HttpStatusCode.Unauthorized; }
                    else
                    {
                        if (apiserver.GetServer().ConferenceStopRecord(x.ConferenceSid))
                        { return HttpStatusCode.NoContent; }
                        else { return HttpStatusCode.NoResponse; }
                    }
                }
            };
            #endregion

            #region Conference Play
            Post["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Play"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    var request = this.Bind<ConferencePlayRequest>();
                    //Todo
                    //Validation
                    ConferencePlayResponse res = apiserver.GetServer().ConferencePlay(request);
                    return Response.AsXml<ConferencePlayResponse>(res);
                }
            };

            Post["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Play.json"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    var request = this.Bind<ConferencePlayRequest>();
                    //Todo
                    //Validation
                    ConferencePlayResponse res = apiserver.GetServer().ConferencePlay(request);
                    return Response.AsJson<ConferencePlayResponse>(res);
                }
            };
            #endregion

            #region Conference Stop Play
            Delete["/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Play"] = x =>
            {
                if (x.AccountSid != Context.CurrentUser.UserName)
                {
                    return HttpStatusCode.Unauthorized;
                }
                else
                {
                    if (x.AccountSid != Context.CurrentUser.UserName)
                    { return HttpStatusCode.Unauthorized; }
                    else
                    {
                        if (apiserver.GetServer().ConferenceStopCall(x.ConferenceSid))
                        { return HttpStatusCode.NoContent; }
                        else { return HttpStatusCode.NoResponse; }
                    }
                }
            };
            #endregion
        }
Example #32
0
 public ConferenceController(IConferenceService service)
 {
     _service = service;
 }
 public ConferenceControllerTest()
 {
     conferenceService    = Substitute.For <IConferenceService>();
     logger               = Substitute.For <ILogger <ConferenceController> >();
     conferenceController = new ConferenceController(conferenceService, logger);
 }
 public StatisticsViewComponent(IConferenceService service)
 {
     this.service = service;
 }
 public ConferencesController(IConferenceService conferenceService)
 {
     _conferenceService = conferenceService;
 }
 public StatisticsMemoryRepository(IConferenceService conferenceService)
 {
     this._conferenceService = conferenceService;
 }