Пример #1
0
 public CommunitiesController(ICommunitiesQuery communitiesQuery, ICustodianAccountsCommand custodianAccountsCommand, ICustodiansQuery custodiansQuery, IVerticalsCommand verticalsCommand, ILocationQuery locationQuery)
 {
     _communitiesQuery         = communitiesQuery;
     _custodianAccountsCommand = custodianAccountsCommand;
     _custodiansQuery          = custodiansQuery;
     _verticalsCommand         = verticalsCommand;
     _locationQuery            = locationQuery;
 }
Пример #2
0
        public void VerticalTestsInitialize()
        {
            var connectionFactory = Resolve <IDbConnectionFactory>();

            connectionFactory.DeleteAllTestData();

            _repository       = new VerticalsRepository(Resolve <IDataContextFactory>());
            _verticalsCommand = new VerticalsCommand(_repository);
            _verticalsQuery   = new VerticalsQuery(_repository);
        }
Пример #3
0
 public VerticalsController(IVerticalsCommand verticalsCommand, IVerticalsQuery verticalsQuery, ICommunitiesQuery communitiesQuery, IWebSiteQuery webSiteQuery, IMembersQuery membersQuery, ICandidatesQuery candidatesQuery, IResumesQuery resumesQuery, IMemberAccountsCommand memberAccountsCommand, IAccountVerificationsCommand accountVerificationsCommand)
 {
     _verticalsCommand            = verticalsCommand;
     _verticalsQuery              = verticalsQuery;
     _communitiesQuery            = communitiesQuery;
     _webSiteQuery                = webSiteQuery;
     _membersQuery                = membersQuery;
     _candidatesQuery             = candidatesQuery;
     _resumesQuery                = resumesQuery;
     _memberAccountsCommand       = memberAccountsCommand;
     _accountVerificationsCommand = accountVerificationsCommand;
 }
Пример #4
0
        protected override void OnInit()
        {
            base.OnInit();

            _verticalsCommand              = Container.Current.Resolve <IVerticalsCommand>();
            _authenticationManager         = Container.Current.Resolve <IAuthenticationManager>();
            _cookieManager                 = Container.Current.Resolve <ICookieManager>();
            _externalAuthenticationCommand = Container.Current.Resolve <IExternalAuthenticationCommand>();
            _userAccountsCommand           = Container.Current.Resolve <IUserAccountsCommand>();
            _memberAccountsCommand         = Container.Current.Resolve <IMemberAccountsCommand>();
            _memberAffiliationsCommand     = Container.Current.Resolve <IMemberAffiliationsCommand>();
            _locationQuery                 = Container.Current.Resolve <ILocationQuery>();

            _nonVerticalHost = ApplicationContext.Instance.GetProperty("website.linkme.host");
        }
Пример #5
0
        public static Vertical CreateTestVertical(this VerticalTestData data, IVerticalsCommand verticalsCommand, IContentEngine contentEngine)
        {
            if (data.Id != null)
            {
                var vertical = new Vertical
                {
                    Id                           = data.Id.Value,
                    Name                         = data.Name,
                    Url                          = data.Url,
                    Host                         = data.Host,
                    SecondaryHost                = data.SecondaryHost,
                    TertiaryHost                 = data.TertiaryHost,
                    CountryId                    = data.CountryId,
                    RequiresExternalLogin        = data.RequiresExternalLogin,
                    ExternalLoginUrl             = data.ExternalLoginUrl,
                    ExternalCookieDomain         = data.ExternalCookieDomain,
                    EmailDisplayName             = data.EmailDisplayName,
                    ReturnEmailAddress           = data.ReturnEmailAddress,
                    MemberServicesEmailAddress   = data.MemberServicesEmailAddress,
                    EmployerServicesEmailAddress = data.EmployerServicesEmailAddress
                };
                verticalsCommand.CreateVertical(vertical);

                if (contentEngine != null)
                {
                    contentEngine.CreateContent(vertical.Id, data.Header, data.Footer, data.HomePageTitle, data.ImageRootFolder, data.CandidateImageRelativePath, data.FaviconRelativePath);
                }
                return(vertical);
            }

            // Default, so just create the content.

            if (contentEngine != null)
            {
                contentEngine.CreateContent(null, data.Header, data.Footer, data.HomePageTitle, data.ImageRootFolder, data.CandidateImageRelativePath, data.FaviconRelativePath);
            }
            return(null);
        }
Пример #6
0
        public static Community CreateTestCommunity(this CommunityTestData data, ICommunitiesCommand communitiesCommand, IVerticalsCommand verticalsCommand, IContentEngine contentEngine)
        {
            data.CreateTestVertical(verticalsCommand, contentEngine);
            var community = new Community
            {
                Id               = data.Id.Value,
                Name             = data.Name,
                EmailDomain      = data.EmailDomain,
                HasMembers       = data.HasMembers,
                HasOrganisations = data.HasOrganisationalUnits,
                OrganisationsCanSearchAllMembers = data.OrganisationsCanSearchAllMembers,
                OrganisationsAreBranded          = data.OrganisationsAreBranded,
            };

            communitiesCommand.CreateCommunity(community);
            return(community);
        }
Пример #7
0
 public static Community CreateTestCommunity(this TestCommunity community, ICommunitiesCommand communitiesCommand, IVerticalsCommand verticalsCommand)
 {
     return(communitiesCommand.CreateTestCommunity(verticalsCommand, community.ToString()));
 }
Пример #8
0
 private static Community CreateTestCommunity(this ICommunitiesCommand communitiesCommand, IVerticalsCommand verticalsCommand, string name)
 {
     return(GetCommunityTestData(name).CreateTestCommunity(communitiesCommand, verticalsCommand));
 }
Пример #9
0
 public static Community CreateTestCommunity(this CommunityTestData data, ICommunitiesCommand communitiesCommand, IVerticalsCommand verticalsCommand)
 {
     return(CreateTestCommunity(data, communitiesCommand, verticalsCommand, null));
 }
Пример #10
0
 public static Vertical CreateTestVertical(this TestVertical vertical, IVerticalsCommand verticalsCommand, IContentEngine contentEngine)
 {
     return(vertical.GetVerticalTestData().CreateTestVertical(verticalsCommand, contentEngine));
 }
Пример #11
0
 public static ReadOnlyUrl GetCommunityPathUrl(this IVerticalsCommand verticalsCommand, Community community, string path)
 {
     return(verticalsCommand.GetVertical(community).GetVerticalPathUrl(path));
 }
Пример #12
0
 public static ReadOnlyUrl GetCommunityHostUrl(this IVerticalsCommand verticalsCommand, Community community, bool secure, string path)
 {
     return(verticalsCommand.GetVertical(community).GetVerticalHostUrl(secure, path));
 }
Пример #13
0
 public static Vertical GetVertical(this IVerticalsCommand verticalsCommand, Community community)
 {
     return(verticalsCommand.GetVertical(community.Id));
 }
Пример #14
0
 public AffiliateEmailsQuery(IVerticalsCommand verticalsCommand)
 {
     _verticalsCommand = verticalsCommand;
 }