Exemplo n.º 1
0
        //
        // GET: /

        public HomeController(IPortalFrontendSettings settings, IUserAgentVerifier userAgentVerifier, IEmailSenderService emailSenderService)
            : base(settings)
        {
            _settings           = settings;
            _userAgentVerifier  = userAgentVerifier;
            _emailSenderService = emailSenderService;
        }
Exemplo n.º 2
0
        //
        // GET: /

        public HomeController(IPortalFrontendSettings settings, IUserAgentVerifier userAgentVerifier, IEmailSenderService emailSenderService)
            : base(settings)
        {
            _settings = settings;
            _userAgentVerifier = userAgentVerifier;
            _emailSenderService = emailSenderService;
        }
 public AccountRecoveryController(IUserService userService,
                                  IPasswordRecoveryService passwordRecoveryService,
                                  IPortalFrontendSettings settings)
 {
     _userService             = userService;
     _passwordRecoveryService = passwordRecoveryService;
     _settings = settings;
 }
 public AccountRecoveryController(IUserService userService,
     IPasswordRecoveryService passwordRecoveryService,
     IPortalFrontendSettings settings)
 {
     _userService = userService;
     _passwordRecoveryService = passwordRecoveryService;
     _settings = settings;
 }
Exemplo n.º 5
0
        public ExtensionController(IPortalFrontendSettings settings) : base(settings)
        {
            _settings = settings;

            // Set current player version
            ViewBag.ExtensionUri = _settings.ExtensionUri;
            ViewBag.ExtensionUri = _settings.ExtensionUri;
        }
Exemplo n.º 6
0
        public ExtensionController(IPortalFrontendSettings settings) : base(settings)
        {
            _settings = settings;

            // Set current player version
            ViewBag.ExtensionUri = _settings.ExtensionUri;
            ViewBag.ExtensionUri = _settings.ExtensionUri;
        }
        public OdnoklassnikiTokenDataExtractor(IPortalFrontendSettings settings)
        {
            // Pass your credentials to the service
            string applicationId = settings.OkApplicationId;
            string appSecret     = settings.OkApplicationSecret;
            string appPublic     = settings.OkApplicationPublic;

            _service = new OkClient(applicationId, appSecret, appPublic);
        }
Exemplo n.º 8
0
 public ExternalController(
     IExternalVideoService externalVideoService,
     IProjectService projectService,
     IPortalFrontendSettings settings)
     : base(projectService)
 {
     _externalVideoService = externalVideoService;
     _settings             = settings;
 }
Exemplo n.º 9
0
 public EmbedController(
     IWatchProjectService watchProjectRepository,
     IProjectScreenshotService screenshotService,
     IProjectUriProvider projectUriProvider,
     IPortalFrontendSettings settings)
     : base(screenshotService, projectUriProvider, settings)
 {
     _watchProjectRepository = watchProjectRepository;
 }
Exemplo n.º 10
0
 public ExternalController(
     IExternalVideoService externalVideoService,
     IProjectService projectService,
     IPortalFrontendSettings settings)
     : base(projectService)
 {
     _externalVideoService = externalVideoService;
     _settings = settings;
 }
Exemplo n.º 11
0
 public EmbedController(
     IWatchProjectService watchProjectRepository,
     IProjectScreenshotService screenshotService,
     IProjectUriProvider projectUriProvider,
     IPortalFrontendSettings settings)
     : base(screenshotService, projectUriProvider, settings)
 {
     _watchProjectRepository = watchProjectRepository;
 }
Exemplo n.º 12
0
 protected VideoControllerBase(
     IProjectScreenshotService screenshotService,
     IProjectUriProvider projectUriProvider,
     IPortalFrontendSettings settings)
     : base(settings)
 {
     _screenshotService = screenshotService;
     _projectUriProvider = projectUriProvider;
 }
Exemplo n.º 13
0
 protected VideoControllerBase(
     IProjectScreenshotService screenshotService,
     IProjectUriProvider projectUriProvider,
     IPortalFrontendSettings settings)
     : base(settings)
 {
     _screenshotService  = screenshotService;
     _projectUriProvider = projectUriProvider;
 }
        public OdnoklassnikiTokenDataExtractor(IPortalFrontendSettings settings)
        {
            // Pass your credentials to the service
            string applicationId = settings.OkApplicationId;
            string appSecret = settings.OkApplicationSecret;
            string appPublic = settings.OkApplicationPublic;

            _service = new OkClient(applicationId, appSecret, appPublic);
        }
Exemplo n.º 15
0
        public CassandraClient(IPortalFrontendSettings settings)
        {
            string[] nodeAddresses    = settings.CassandraNodes;
            var      privateAddresses = settings.CassandraPrivateAddresses;

            if (nodeAddresses.Length == 0)
            {
                throw new ArgumentException("settings");
            }

            // Credetials
            Builder clusterBuilder = Cluster.Builder();

            if (!string.IsNullOrEmpty(settings.CassandraUsername) && !string.IsNullOrEmpty(settings.CassandraPassword))
            {
                clusterBuilder = clusterBuilder.WithCredentials(settings.CassandraUsername, settings.CassandraPassword);
            }

            // Hosts
            clusterBuilder.AddContactPoints(nodeAddresses);

            if (privateAddresses.Length > 0)
            {
                if (privateAddresses.Length != nodeAddresses.Length)
                {
                    throw new ArgumentException("settings");
                }

                const int cqlPort    = 9042;
                var       addressMap = new Dictionary <IPEndPoint, IPEndPoint>(nodeAddresses.Length);
                for (int i = 0; i < nodeAddresses.Length; i++)
                {
                    // Create address map for cassandra nodes behind azure firewall
                    IPHostEntry host           = Dns.GetHostEntry(nodeAddresses[i]);
                    var         privateAddress = IPAddress.Parse(privateAddresses[i]);
                    var         publicAddress  = host.AddressList.First();

                    addressMap.Add(new IPEndPoint(privateAddress, cqlPort), new IPEndPoint(publicAddress, cqlPort));
                }

                clusterBuilder.WithAddressTranslator(new CassandraAddressTranslator(addressMap));
            }

            // Set heartbeat interval
            clusterBuilder.SocketOptions.SetIdleTimeoutMillis((int)TimeSpan.FromMinutes(3).TotalMilliseconds);

            _cluster = clusterBuilder.Build();
        }
Exemplo n.º 16
0
        public CassandraClient(IPortalFrontendSettings settings)
        {
            string[] nodeAddresses = settings.CassandraNodes;
            var privateAddresses = settings.CassandraPrivateAddresses;

            if (nodeAddresses.Length == 0)
            {
                throw new ArgumentException("settings");
            }

            // Credetials
            Builder clusterBuilder = Cluster.Builder();
            if (!string.IsNullOrEmpty(settings.CassandraUsername) && !string.IsNullOrEmpty(settings.CassandraPassword))
            {
                clusterBuilder = clusterBuilder.WithCredentials(settings.CassandraUsername, settings.CassandraPassword);
            }

            // Hosts
            clusterBuilder.AddContactPoints(nodeAddresses);

            if (privateAddresses.Length > 0)
            {
                if (privateAddresses.Length != nodeAddresses.Length)
                {
                    throw new ArgumentException("settings");
                }

                const int cqlPort = 9042;
                var addressMap = new Dictionary<IPEndPoint, IPEndPoint>(nodeAddresses.Length);
                for (int i = 0; i < nodeAddresses.Length; i++)
                {
                    // Create address map for cassandra nodes behind azure firewall
                    IPHostEntry host = Dns.GetHostEntry(nodeAddresses[i]);
                    var privateAddress = IPAddress.Parse(privateAddresses[i]);
                    var publicAddress = host.AddressList.First();

                    addressMap.Add(new IPEndPoint(privateAddress, cqlPort), new IPEndPoint(publicAddress, cqlPort));
                }

                clusterBuilder.WithAddressTranslator(new CassandraAddressTranslator(addressMap));
            }

            // Set heartbeat interval
            clusterBuilder.SocketOptions.SetIdleTimeoutMillis((int)TimeSpan.FromMinutes(3).TotalMilliseconds);

            _cluster = clusterBuilder.Build();
        }
Exemplo n.º 17
0
 public EmailNotificationService(
     IRepositoryFactory repositoryFactory,
     IEmailSenderService emailSenderService,
     IPortalFrontendSettings settings,
     IUserService userService,
     IProductIdExtractor productIdExtractor,
     IProjectUriProvider projectUriProvider,
     IUserUriProvider userUriProvider)
 {
     _emailSenderService = emailSenderService;
     _settings           = settings;
     _productIdExtractor = productIdExtractor;
     _userService        = userService;
     _projectUriProvider = projectUriProvider;
     _userUriProvider    = userUriProvider;
     _emailRepository    = repositoryFactory.Create <SendEmailEntity>();
 }
Exemplo n.º 18
0
 public EmailNotificationService(
     IRepositoryFactory repositoryFactory,
     IEmailSenderService emailSenderService,
     IPortalFrontendSettings settings,
     IUserService userService,
     IProductIdExtractor productIdExtractor,
     IProjectUriProvider projectUriProvider,
     IUserUriProvider userUriProvider)
 {
     _emailSenderService = emailSenderService;
     _settings = settings;
     _productIdExtractor = productIdExtractor;
     _userService = userService;
     _projectUriProvider = projectUriProvider;
     _userUriProvider = userUriProvider;
     _emailRepository = repositoryFactory.Create<SendEmailEntity>();
 }
Exemplo n.º 19
0
 public PasswordRecoveryService(
     IRepositoryFactory repositoryFactory,
     IUserRepository userRepository,
     IMailerRepository mailerRepository,
     IPasswordRecoveryFactory passwordRecoveryFactory,
     IPortalFrontendSettings settings,
     IRecoveryLinkService recoveryLinkService,
     IPasswordService passwordService)
 {
     _userRepository = userRepository;
     _passwordRecoveryFactory = passwordRecoveryFactory;
     _settings = settings;
     _recoveryLinkService = recoveryLinkService;
     _passwordService = passwordService;
     _mailerRepository = mailerRepository;
     _passwordRecoverRepository = repositoryFactory.Create<PasswordRecoveryEntity>();
 }
Exemplo n.º 20
0
 public VideoController(IWatchProjectService watchProjectRepository,
                        IProjectScreenshotService screenshotService,
                        IProjectUriProvider projectUriProvider,
                        IPortalFrontendSettings settings,
                        IUserAgentVerifier userAgentVerifier,
                        IProjectLikesService projectLikesService,
                        IUserService userService,
                        IUserAvatarProvider userAvatarProvider)
     : base(screenshotService, projectUriProvider, settings)
 {
     _watchProjectRepository = watchProjectRepository;
     _userAgentVerifier      = userAgentVerifier;
     _projectLikesService    = projectLikesService;
     _settings           = settings;
     _userService        = userService;
     _userAvatarProvider = userAvatarProvider;
 }
Exemplo n.º 21
0
 public VideoController(IWatchProjectService watchProjectRepository,
     IProjectScreenshotService screenshotService,
     IProjectUriProvider projectUriProvider,
     IPortalFrontendSettings settings,
     IUserAgentVerifier userAgentVerifier,
     IProjectLikesService projectLikesService,
     IUserService userService,
     IUserAvatarProvider userAvatarProvider)
     : base(screenshotService, projectUriProvider, settings)
 {
     _watchProjectRepository = watchProjectRepository;
     _userAgentVerifier = userAgentVerifier;
     _projectLikesService = projectLikesService;
     _settings = settings;
     _userService = userService;
     _userAvatarProvider = userAvatarProvider;
 }
Exemplo n.º 22
0
 public PasswordRecoveryService(
     IRepositoryFactory repositoryFactory,
     IUserRepository userRepository,
     IMailerRepository mailerRepository,
     IPasswordRecoveryFactory passwordRecoveryFactory,
     IPortalFrontendSettings settings,
     IRecoveryLinkService recoveryLinkService,
     IPasswordService passwordService)
 {
     _userRepository          = userRepository;
     _passwordRecoveryFactory = passwordRecoveryFactory;
     _settings                  = settings;
     _recoveryLinkService       = recoveryLinkService;
     _passwordService           = passwordService;
     _mailerRepository          = mailerRepository;
     _passwordRecoverRepository = repositoryFactory.Create <PasswordRecoveryEntity>();
 }
Exemplo n.º 23
0
 public WatchProjectService(IProjectUriProvider projectUriProvider,
                            ICommentRepository commentRepository,
                            IProjectRepository projectRepository,
                            IUserRepository userRepository,
                            IMapper mapper,
                            IPortalFrontendSettings settings,
                            IFileUriProvider uriProvider,
                            IUserAvatarProvider userAvatarProvider)
 {
     _projectUriProvider = projectUriProvider;
     _commentRepository  = commentRepository;
     _userRepository     = userRepository;
     _projectRepository  = projectRepository;
     _mapper             = mapper;
     _settings           = settings;
     _uriProvider        = uriProvider;
     _userAvatarProvider = userAvatarProvider;
 }
Exemplo n.º 24
0
 public WatchProjectService(IProjectUriProvider projectUriProvider,
     ICommentRepository commentRepository,
     IProjectRepository projectRepository,
     IUserRepository userRepository,
     IMapper mapper,
     IPortalFrontendSettings settings,
     IFileUriProvider uriProvider,
     IUserAvatarProvider userAvatarProvider)
 {
     _projectUriProvider = projectUriProvider;
     _commentRepository = commentRepository;
     _userRepository = userRepository;
     _projectRepository = projectRepository;
     _mapper = mapper;
     _settings = settings;
     _uriProvider = uriProvider;
     _userAvatarProvider = userAvatarProvider;
 }
Exemplo n.º 25
0
 public UserService(IUserRepository userRepository,
                    IProjectRepository projectRepository,
                    IFileRepository fileRepository,
                    ICompanyRepository companyRepository,
                    ICommentRepository commentRepository,
                    IMapper mapper,
                    IProjectService projectService,
                    IPortalFrontendSettings settings)
 {
     _userRepository          = userRepository;
     _projectRepository       = projectRepository;
     _fileRepository          = fileRepository;
     _companyRepository       = companyRepository;
     _commentRepository       = commentRepository;
     _mapper                  = mapper;
     _projectService          = projectService;
     _defaultUserStorageSpace = settings.DefaultMaxUserCapacity;
     _cryptoService           = new CryptoService();
 }
Exemplo n.º 26
0
 public UserService(IUserRepository userRepository,
     IProjectRepository projectRepository,
     IFileRepository fileRepository,
     ICompanyRepository companyRepository,
     ICommentRepository commentRepository,
     IMapper mapper,
     IProjectService projectService,
     IPortalFrontendSettings settings)
 {
     _userRepository = userRepository;
     _projectRepository = projectRepository;
     _fileRepository = fileRepository;
     _companyRepository = companyRepository;
     _commentRepository = commentRepository;
     _mapper = mapper;
     _projectService = projectService;
     _defaultUserStorageSpace = settings.DefaultMaxUserCapacity;
     _cryptoService = new CryptoService();
 }
Exemplo n.º 27
0
 public AccountController(
     IAuthenticationService authenticationService,
     IUserService userService,
     IEmailNotificationService emailNotificationService,
     IPortalFrontendSettings settings,
     ITokenDataExtractorFactory tokenDataExtractorFactory,
     ISocialNetworkNotificationFactory notificationFactory,
     IProductIdExtractor productIdExtractor,
     IPendingClientService pendingClientService,
     IPasswordService passwordService,
     ICompanyService companyService)
     : base(settings)
 {
     _emailNotificationService  = emailNotificationService;
     _tokenDataExtractorFactory = tokenDataExtractorFactory;
     _notificationFactory       = notificationFactory;
     _productIdExtractor        = productIdExtractor;
     _pendingClientService      = pendingClientService;
     _passwordService           = passwordService;
     _companyService            = companyService;
     _authenticationService     = authenticationService;
     _userService = userService;
 }
Exemplo n.º 28
0
 public AccountController(
     IAuthenticationService authenticationService,
     IUserService userService,
     IEmailNotificationService emailNotificationService,
     IPortalFrontendSettings settings,
     ITokenDataExtractorFactory tokenDataExtractorFactory,
     ISocialNetworkNotificationFactory notificationFactory,
     IProductIdExtractor productIdExtractor,
     IPendingClientService pendingClientService,
     IPasswordService passwordService,
     ICompanyService companyService)
     : base(settings)
 {
     _emailNotificationService = emailNotificationService;
     _tokenDataExtractorFactory = tokenDataExtractorFactory;
     _notificationFactory = notificationFactory;
     _productIdExtractor = productIdExtractor;
     _pendingClientService = pendingClientService;
     _passwordService = passwordService;
     _companyService = companyService;
     _authenticationService = authenticationService;
     _userService = userService;
 }
Exemplo n.º 29
0
 public ExamplesController(IPortalFrontendSettings settings) : base(settings)
 {
 }
 public WsFederationController(IIdentityFactory identityFactory, IPortalFrontendSettings settings)
 {
     _identityFactory = identityFactory;
     _settings        = settings;
 }
Exemplo n.º 31
0
 public FacebookService(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
 public TwitterTokenDataExtractor(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 33
0
 public StatisticsInitializer(ICassandraClient cassandraClient, IPortalFrontendSettings settings)
 {
     _cassandraClient = cassandraClient;
     _keyspace = settings.CassandraKeyspace;
 }
 public FrontEndConfigurationInitializer(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 35
0
 public ClientsController(IPortalFrontendSettings settings)
     : base(settings)
 {
     _settings = settings;
 }
Exemplo n.º 36
0
 public ExamplesController(IPortalFrontendSettings settings) : base(settings)
 {
 }
 public SocialNetworkNotificationFactory(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 38
0
 public TwitterServiceService(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 39
0
 public StatisticsInitializer(ICassandraClient cassandraClient, IPortalFrontendSettings settings)
 {
     _cassandraClient = cassandraClient;
     _keyspace        = settings.CassandraKeyspace;
 }
Exemplo n.º 40
0
 protected SpaControllerBase(IPortalFrontendSettings settings)
     : base(settings)
 {
     _settings = settings;
 }
Exemplo n.º 41
0
 /// <summary>
 ///     Set configuration provider.
 /// </summary>
 /// <param name="settings"></param>
 public static void SetConfigurationProvider(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
 public FrontEndConfigurationInitializer(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 43
0
 protected ControllerBase(IPortalFrontendSettings settings)
 {
     ViewBag.GoogleAnalyticsId = settings.GoogleAnalyticsId;
 }
 public TokenDataExtractorFactory(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 45
0
 public UserAvatarProvider(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 46
0
 public FacebookNotifier(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 47
0
 public TwitterServiceService(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 48
0
 public EmailController(IEmailSenderService emailSender, IPortalFrontendSettings settings)
 {
     _emailSender = emailSender;
     _settings = settings;
 }
Exemplo n.º 49
0
 public IdentityFactory(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
 public TwitterTokenDataExtractor(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 51
0
 public CassandraSession(ICassandraClient client, IPortalFrontendSettings settings)
 {
     _session = new Lazy<ISession>(() => client.GetSession(settings.CassandraKeyspace));
 }
Exemplo n.º 52
0
 public EmailController(IEmailSenderService emailSender, IPortalFrontendSettings settings)
 {
     _emailSender = emailSender;
     _settings    = settings;
 }
Exemplo n.º 53
0
 protected SpaControllerBase(IPortalFrontendSettings settings)
     : base(settings)
 {
     _settings = settings;
 }
 public OkSecurityTokenService(SecurityTokenServiceConfiguration configuration, IPortalFrontendSettings settings)
     : base(configuration)
 {
     _settings = settings;
 }
Exemplo n.º 55
0
 public IdentityFactory(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 56
0
 protected ControllerBase(IPortalFrontendSettings settings)
 {
     ViewBag.GoogleAnalyticsId = settings.GoogleAnalyticsId;
 }
Exemplo n.º 57
0
 public CassandraSession(ICassandraClient client, IPortalFrontendSettings settings)
 {
     _session = new Lazy <ISession>(() => client.GetSession(settings.CassandraKeyspace));
 }
Exemplo n.º 58
0
 public FacebookService(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 59
0
 public VkSecurityTokenService(SecurityTokenServiceConfiguration configuration, IPortalFrontendSettings settings)
     : base(configuration)
 {
     _settings = settings;
 }
Exemplo n.º 60
0
 /// <summary>
 ///     Set configuration provider.
 /// </summary>
 /// <param name="settings"></param>
 public static void SetConfigurationProvider(IPortalFrontendSettings settings)
 {
     _settings = settings;
 }