Ejemplo n.º 1
0
 public CategoryController(IDestinationService _destinationSvc,
                           AppSettings appsettings
                           )
 {
     this.appsettings     = appsettings;
     this._destinationSvc = _destinationSvc;
 }
Ejemplo n.º 2
0
 public DestinationController(IDestinationService destinationSvc,
                              AppSettings appsettings
                              )
 {
     this.appsettings = appsettings;
     _destinationSvc  = destinationSvc;
 }
Ejemplo n.º 3
0
 public CopyProductService(IProductService productService,
                           IProductAttributeService productAttributeService,
                           ILanguageService languageService,
                           ILocalizedEntityService localizedEntityService,
                           ILocalizationService localizationService,
                           IPictureService pictureService,
                           ICategoryService categoryService,
                           IDestinationService destinationService,
                           ISpecificationAttributeService specificationAttributeService,
                           IDownloadService downloadService,
                           IProductAttributeParser productAttributeParser,
                           IUrlRecordService urlRecordService,
                           IStoreMappingService storeMappingService)
 {
     this._productService                = productService;
     this._productAttributeService       = productAttributeService;
     this._languageService               = languageService;
     this._localizedEntityService        = localizedEntityService;
     this._localizationService           = localizationService;
     this._pictureService                = pictureService;
     this._categoryService               = categoryService;
     this._destinationService            = destinationService;
     this._specificationAttributeService = specificationAttributeService;
     this._downloadService               = downloadService;
     this._productAttributeParser        = productAttributeParser;
     this._urlRecordService              = urlRecordService;
     this._storeMappingService           = storeMappingService;
 }
Ejemplo n.º 4
0
        public DestinationRoutes(IDestinationService desService)
            : base("v1")
        {
            this.RequiresAuthentication();

            Get("/destination/{name}", _ =>
            {
                this.RequiresClaims(c => c.Type == HttpMethod.Get.Verb());
                var name = (string)_.name;
                ValidateRequest(name, Context.User().Destinations);
                Destination destination = desService.GetByName(name);
                return(AddDestinationCategoriesToProperties(destination).ToViewModel <Destination, ADModel.Destination>());
            });

            Get("/destinations", _ =>
            {
                this.RequiresClaims(c => c.Type == HttpMethod.Get.Verb());
                var destinations = desService.GetAll();

                // retrieve permitted destinations
                var permittedDestinations = FilterDestinations(destinations, Context.User().Destinations);

                return(AddListDestinationsCategoriesToProperties(permittedDestinations).ToViewModel <List <Destination>, List <ADModel.Destination> >());
            });
        }
Ejemplo n.º 5
0
 public TripService(IEventParticipantService eventParticipant,
                    IDonationService donationService,
                    IGroupService groupService,
                    IFormSubmissionService formSubmissionService,
                    MinistryPlatform.Translation.Services.Interfaces.IEventService eventService,
                    IDonorService donorService,
                    IPledgeService pledgeService,
                    ICampaignService campaignService,
                    IPrivateInviteService privateInviteService,
                    ICommunicationService communicationService,
                    IContactService contactService,
                    IContactRelationshipService contactRelationshipService,
                    IConfigurationWrapper configurationWrapper,
                    IPersonService personService,
                    IServeService serveService,
                    IDestinationService destinationService)
 {
     _eventParticipantService = eventParticipant;
     _donationService = donationService;
     _groupService = groupService;
     _formSubmissionService = formSubmissionService;
     _mpEventService = eventService;
     _mpDonorService = donorService;
     _mpPledgeService = pledgeService;
     _campaignService = campaignService;
     _privateInviteService = privateInviteService;
     _communicationService = communicationService;
     _contactService = contactService;
     _contactRelationshipService = contactRelationshipService;
     _configurationWrapper = configurationWrapper;
     _personService = personService;
     _serveService = serveService;
     _destinationService = destinationService;
 }
        public DestinationsController(IDestinationService destinationService, IMappingService mappingService, IImageService imageService)
            : base(mappingService, imageService)
        {
            Guard.WhenArgument(destinationService, "Destination service is null.").IsNull().Throw();

            this.destinationService = destinationService;
        }
Ejemplo n.º 7
0
 public HomeController(
     IDestinationService destinationsService,
     ITripsService tripsService)
 {
     this.destinationsService = destinationsService;
     this.tripsService        = tripsService;
 }
Ejemplo n.º 8
0
        public virtual async void TestDelete()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);
            var        client     = new ApiClient(testServer.CreateClient());

            client.SetBearerToken(JWTTestHelper.GenerateBearerToken());
            ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext;

            IDestinationService service = testServer.Host.Services.GetService(typeof(IDestinationService)) as IDestinationService;
            var model = new ApiDestinationServerRequestModel();

            model.SetProperties(1, "B", 2);
            CreateResponse <ApiDestinationServerResponseModel> createdResponse = await service.Create(model);

            createdResponse.Success.Should().BeTrue();

            ActionResponse deleteResult = await client.DestinationDeleteAsync(2);

            deleteResult.Success.Should().BeTrue();
            ApiDestinationServerResponseModel verifyResponse = await service.Get(2);

            verifyResponse.Should().BeNull();
        }
Ejemplo n.º 9
0
        public virtual async void TestUpdate()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);

            var client = new ApiClient(testServer.CreateClient());

            client.SetBearerToken(JWTTestHelper.GenerateBearerToken());
            var mapper = new ApiDestinationServerModelMapper();
            ApplicationDbContext context            = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext;
            IDestinationService  service            = testServer.Host.Services.GetService(typeof(IDestinationService)) as IDestinationService;
            ApiDestinationServerResponseModel model = await service.Get(1);

            ApiDestinationClientRequestModel request = mapper.MapServerResponseToClientRequest(model);

            request.SetProperties(1, "B", 2);

            UpdateResponse <ApiDestinationClientResponseModel> updateResponse = await client.DestinationUpdateAsync(model.Id, request);

            context.Entry(context.Set <Destination>().ToList()[0]).Reload();
            updateResponse.Record.Should().NotBeNull();
            updateResponse.Success.Should().BeTrue();
            updateResponse.Record.Id.Should().Be(1);
            context.Set <Destination>().ToList()[0].CountryId.Should().Be(1);
            context.Set <Destination>().ToList()[0].Name.Should().Be("B");
            context.Set <Destination>().ToList()[0].Order.Should().Be(2);

            updateResponse.Record.Id.Should().Be(1);
            updateResponse.Record.CountryId.Should().Be(1);
            updateResponse.Record.Name.Should().Be("B");
            updateResponse.Record.Order.Should().Be(2);
        }
Ejemplo n.º 10
0
 public GoogleShoppingService(IGoogleService googleService,
                              IPriceCalculationService priceCalculationService,
                              ITaxService taxService,
                              IProductService productService,
                              ICategoryService categoryService,
                              IDestinationService destinationService,
                              IPictureService pictureService,
                              ICurrencyService currencyService,
                              ILanguageService languageService,
                              ISettingService settingService,
                              IWorkContext workContext,
                              GoogleShoppingSettings googleShoppingSettings,
                              CurrencySettings currencySettings,
                              GoogleProductObjectContext objectContext)
 {
     this._googleService           = googleService;
     this._priceCalculationService = priceCalculationService;
     this._taxService             = taxService;
     this._productService         = productService;
     this._categoryService        = categoryService;
     this._destinationService     = destinationService;
     this._pictureService         = pictureService;
     this._currencyService        = currencyService;
     this._languageService        = languageService;
     this._settingService         = settingService;
     this._workContext            = workContext;
     this._googleShoppingSettings = googleShoppingSettings;
     this._currencySettings       = currencySettings;
     this._objectContext          = objectContext;
 }
Ejemplo n.º 11
0
 public UserPermissionController(IUserPermissionService service, IQueueService queueSvc, IDestinationService destinationSvc, IBrandService brandSvc)
 {
     _service        = service;
     _queueSvc       = queueSvc;
     _destinationSvc = destinationSvc;
     _brandSvc       = brandSvc;
 }
Ejemplo n.º 12
0
 public Functions(ILogService logService, ISourceService sourceService, IDestinationService destinationService, IAzureStorageService azureStorageService, IDocumentService documentService)
 {
     _logService          = logService;
     _azureStorageService = azureStorageService;
     _sourceService       = sourceService;
     _destinationService  = destinationService;
     _documentService     = documentService;
 }
 public ArticleController(
     UserManager <User> userManager,
     IDestinationService destinationService,
     IArticleService articleService)
 {
     this.userManager        = userManager;
     this.destinationService = destinationService;
     this.articleService     = articleService;
 }
 public DestinationController(
     IDestinationService destinationService,
     IRegionService regionService,
     ITagService tagService)
 {
     this.destinationService = destinationService;
     this.regionService      = regionService;
     this.tagService         = tagService;
 }
 public ResidenceEditViewModel(IResidenceService residenceService, IMessageService messageService,
                               IDistrictService districtService, IViewsService viewsService, IRealtorService realtorService,
                               IOwnershipService ownershipService, IDealVariantService dealVariantService,
                               IMaterialService materialService, IConditionService conditionalService, IDestinationService destinationService)
     : base(residenceService, messageService, districtService, realtorService, ownershipService, dealVariantService, conditionalService)
 {
     _ViewsService       = viewsService;
     _MaterialService    = materialService;
     _DestinationService = destinationService;
 }
Ejemplo n.º 16
0
 public DestinationsController(
     IUserService userService,
     IMapper mapper,
     IDestinationService destinationService
     )
 {
     this.userService        = userService;
     this.mapper             = mapper;
     this.destinationService = destinationService;
 }
Ejemplo n.º 17
0
 public CommonModelFactory(ICategoryService categoryService,
                           IProductService productService,
                           IDestinationService destinationService,
                           ITopicService topicService,
                           ILanguageService languageService,
                           ICurrencyService currencyService,
                           ILocalizationService localizationService,
                           IWorkContext workContext,
                           IStoreContext storeContext,
                           ISitemapGenerator sitemapGenerator,
                           IThemeContext themeContext,
                           IThemeProvider themeProvider,
                           IGenericAttributeService genericAttributeService,
                           IWebHelper webHelper,
                           IPermissionService permissionService,
                           ICacheManager cacheManager,
                           IPageHeadBuilder pageHeadBuilder,
                           IPictureService pictureService,
                           HttpContextBase httpContext,
                           CatalogSettings catalogSettings,
                           StoreInformationSettings storeInformationSettings,
                           CommonSettings commonSettings,
                           BlogSettings blogSettings,
                           NewsSettings newsSettings,
                           LocalizationSettings localizationSettings,
                           CaptchaSettings captchaSettings
                           )
 {
     this._categoryService         = categoryService;
     this._productService          = productService;
     this._destinationService      = destinationService;
     this._topicService            = topicService;
     this._languageService         = languageService;
     this._currencyService         = currencyService;
     this._localizationService     = localizationService;
     this._workContext             = workContext;
     this._storeContext            = storeContext;
     this._sitemapGenerator        = sitemapGenerator;
     this._themeContext            = themeContext;
     this._themeProvider           = themeProvider;
     this._genericAttributeService = genericAttributeService;
     this._webHelper                = webHelper;
     this._permissionService        = permissionService;
     this._cacheManager             = cacheManager;
     this._pageHeadBuilder          = pageHeadBuilder;
     this._pictureService           = pictureService;
     this._httpContext              = httpContext;
     this._catalogSettings          = catalogSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._commonSettings           = commonSettings;
     this._blogSettings             = blogSettings;
     this._newsSettings             = newsSettings;
     this._localizationSettings     = localizationSettings;
     this._captchaSettings          = captchaSettings;
 }
 public AbstractDestinationController(
     ApiSettings settings,
     ILogger <AbstractDestinationController> logger,
     ITransactionCoordinator transactionCoordinator,
     IDestinationService destinationService,
     IApiDestinationModelMapper destinationModelMapper
     )
     : base(settings, logger, transactionCoordinator)
 {
     this.DestinationService     = destinationService;
     this.DestinationModelMapper = destinationModelMapper;
 }
Ejemplo n.º 19
0
		public DestinationPointController(IDestinationService destinationService, IMapper mapper)
		{
			_destinationService = destinationService;
			_mapper = mapper;
			clientId = CloudConfigurationManager.GetSetting("ida:ClientId");
			aadInstance = CloudConfigurationManager.GetSetting("ida:AADInstance");
			tenantId = CloudConfigurationManager.GetSetting("ida:TenantId");
			appKey = CloudConfigurationManager.GetSetting("ida:ClientSecret");
			resourceId = CloudConfigurationManager.GetSetting("ResourceId");
			sharePointUrl = CloudConfigurationManager.GetSetting("SharePointUrl");
			authority = aadInstance + tenantId;
		}
Ejemplo n.º 20
0
        public ManageController(IUserService userService, IMappingService mappingService,
                                IDestinationService destinationService, ITripService tripService)
        {
            Guard.WhenArgument(userService, "User service is null.").IsNull().Throw();
            Guard.WhenArgument(mappingService, "Mapping service is null.").IsNull().Throw();
            Guard.WhenArgument(destinationService, "Destination service is null.").IsNull().Throw();
            Guard.WhenArgument(tripService, "Trip service is null.").IsNull().Throw();

            this.userService        = userService;
            this.mappingService     = mappingService;
            this.destinationService = destinationService;
            this.tripService        = tripService;
        }
 public DestinationPointController(IConfiguration config, IDestinationService destinationService, IMapper mapper) :
     base(config)
 {
     _destinationService = destinationService;
     _mapper             = mapper;
     clientId            = AzureAdConfig.ClientId;
     aadInstance         = AzureAdConfig.Instance;
     tenantId            = AzureAdConfig.TenantId;
     appKey        = AzureAdConfig.ClientSecret;
     resourceId    = AzureAdConfig.ResourceId;
     sharePointUrl = AzureAdConfig.SharePointUrl;
     authority     = aadInstance + tenantId;
 }
 public DestinationController(
     IOrchardServices services, 
     IDestinationService destinationService,
     IHotelService hotelService,
     IDestinationPathConstraint destinationPathConstraint, 
     IShapeFactory shapeFactory,
     ISiteService siteService) {
     this.services = services;
     this.destinationService = destinationService;
     this.hotelService = hotelService;
     this.siteService = siteService;
     this.Logger = NullLogger.Instance;
     this.Shape = shapeFactory;
 }
Ejemplo n.º 23
0
 public BackwardCompatibility2XController(IProductService productService,
                                          ICategoryService categoryService,
                                          IDestinationService destinationService,
                                          INewsService newsService,
                                          IBlogService blogService,
                                          ITopicService topicService,
                                          IVendorService vendorService)
 {
     this._productService     = productService;
     this._categoryService    = categoryService;
     this._destinationService = destinationService;
     this._newsService        = newsService;
     this._blogService        = blogService;
     this._topicService       = topicService;
 }
Ejemplo n.º 24
0
 public DestinationController(
     ApiSettings settings,
     ILogger <DestinationController> logger,
     ITransactionCoordinator transactionCoordinator,
     IDestinationService destinationService,
     IApiDestinationServerModelMapper destinationModelMapper
     )
     : base(settings, logger, transactionCoordinator)
 {
     this.DestinationService     = destinationService;
     this.DestinationModelMapper = destinationModelMapper;
     this.BulkInsertLimit        = 250;
     this.MaxLimit     = 1000;
     this.DefaultLimit = 250;
 }
Ejemplo n.º 25
0
 public TripsController(
     ITripsService tripsService,
     ICarsService carsService,
     IViewService viewsService,
     ITripRequestsService tripRequestsService,
     IDestinationService destinationService,
     UserManager <ApplicationUser> userManager)
 {
     this.tripsService        = tripsService;
     this.carsService         = carsService;
     this.viewsService        = viewsService;
     this.tripRequestsService = tripRequestsService;
     this.destinationsService = destinationService;
     this.userManager         = userManager;
 }
 public BackwardCompatibility1XController(IProductService productService,
                                          ICategoryService categoryService, IDestinationService destinationService,
                                          IProductTagService productTagService, INewsService newsService,
                                          IBlogService blogService, ITopicService topicService,
                                          IForumService forumService, ICustomerService customerService)
 {
     this._productService     = productService;
     this._categoryService    = categoryService;
     this._destinationService = destinationService;
     this._productTagService  = productTagService;
     this._newsService        = newsService;
     this._blogService        = blogService;
     this._topicService       = topicService;
     this._forumService       = forumService;
     this._customerService    = customerService;
 }
        public DestinationViewModel(IUnitOfWork unitOfWork, IDestinationService destinationService)
        {
            _unitOfWork = unitOfWork;

            _destinationService = destinationService;

            _destinationMapper = new DestinationMapper();

            modelObjects = new List <DestinationModel>();

            //_selectedDestination = new DestinationModel();

            LoadData();

            instance = this;
        }
        public DestinationViewModel()
        {
            _unitOfWork = new UnitOfWork(new ApplicationContext());

            _destinationService = new DestinationService(_unitOfWork);

            _destinationMapper = new DestinationMapper();

            modelObjects = new List <DestinationModel>();

            //_selectedDestination = new DestinationModel();

            LoadData();

            instance = this;
        }
Ejemplo n.º 29
0
        public PartiesViewModel(IPartyService dataService, IDestinationService destinationService)
        {
            if (dataService == null)
            {
                throw new ArgumentNullException("dataService");
            }
            if (dataService == null)
            {
                throw new ArgumentNullException("destinationService");
            }

            this.destService = destinationService;
            this.dataService = dataService;

            this.Parties      = dataService.GetAllActiveParties();
            this.Destinations = new ObservableCollection <string>(destinationService.GetDestinations().Select(d => d.DestinationDesc));
        }
Ejemplo n.º 30
0
        public DestinationController(ICategoryService categoryService,
                                     IDestinationService destinationService,
                                     IDestinationTemplateService destinationTemplateService,
                                     IProductService productService,
                                     ICustomerService customerService,
                                     IStoreService storeService,
                                     IStoreMappingService storeMappingService,
                                     IUrlRecordService urlRecordService,
                                     IPictureService pictureService,
                                     ILanguageService languageService,
                                     ILocalizationService localizationService,
                                     ILocalizedEntityService localizedEntityService,
                                     IExportManager exportManager,
                                     IDiscountService discountService,
                                     ICustomerActivityService customerActivityService,

                                     IAclService aclService,
                                     IPermissionService permissionService,
                                     CatalogSettings catalogSettings,
                                     IWorkContext workContext,
                                     IImportManager importManager,
                                     ICacheManager cacheManager)
        {
            this._categoryService            = categoryService;
            this._destinationTemplateService = destinationTemplateService;
            this._destinationService         = destinationService;
            this._productService             = productService;
            this._customerService            = customerService;
            this._storeService            = storeService;
            this._storeMappingService     = storeMappingService;
            this._urlRecordService        = urlRecordService;
            this._pictureService          = pictureService;
            this._languageService         = languageService;
            this._localizationService     = localizationService;
            this._localizedEntityService  = localizedEntityService;
            this._exportManager           = exportManager;
            this._discountService         = discountService;
            this._customerActivityService = customerActivityService;

            this._aclService        = aclService;
            this._permissionService = permissionService;
            this._catalogSettings   = catalogSettings;
            this._workContext       = workContext;
            this._importManager     = importManager;
            this._cacheManager      = cacheManager;
        }
Ejemplo n.º 31
0
        public HotelPartHandler(
            IDestinationService destinationService, IHotelService hotelService, RequestContext requestContext)
        {
            this.destinationService = destinationService;
            this.hotelService = hotelService;

            OnGetDisplayShape<HotelPart>(SetModelProperties);
            OnGetEditorShape<HotelPart>(SetModelProperties);
            OnUpdateEditorShape<HotelPart>(SetModelProperties);

            //OnCreated<HotelPart>((context, part) => UpdateBlogPostCount(part));
            //OnPublished<HotelPart>((context, part) => UpdateBlogPostCount(part));
            //OnUnpublished<HotelPart>((context, part) => UpdateBlogPostCount(part));
            //OnVersioned<HotelPart>((context, part, newVersionPart) => UpdateBlogPostCount(newVersionPart));
            //OnRemoved<HotelPart>((context, part) => UpdateBlogPostCount(part));

            OnRemoved<DestinationPart>(
                (context, b) =>
                hotelService.Get(context.ContentItem.As<DestinationPart>()).ToList().ForEach(
                    blogPost => context.ContentManager.Remove(blogPost.ContentItem)));
        }
Ejemplo n.º 32
0
        public static IEnumerable <SelectListItem> GetAllDestinations(IDestinationService destinationsService)
        {
            var destinations = destinationsService.GetAllDestinationsAsync();
            var groups       = new List <SelectListGroup>();

            foreach (var destinationViewModel in destinations)
            {
                if (groups.All(g => g.Name != destinationViewModel.Name))
                {
                    groups.Add(new SelectListGroup {
                        Name = destinationViewModel.Name
                    });
                }
            }

            return(destinations.Select(x => new SelectListItem
            {
                Value = x.Id.ToString(),
                Text = x.Name,
            }));
        }
        public DiscountRulesHasOneProductController(IDiscountService discountService,
                                                    ISettingService settingService,
                                                    IPermissionService permissionService,
                                                    IWorkContext workContext,
                                                    ILocalizationService localizationService,
                                                    ICategoryService categoryService,
                                                    IDestinationService destinationService,
                                                    IStoreService storeService,

                                                    IProductService productService)
        {
            this._discountService     = discountService;
            this._settingService      = settingService;
            this._permissionService   = permissionService;
            this._workContext         = workContext;
            this._localizationService = localizationService;
            this._categoryService     = categoryService;
            this._destinationService  = destinationService;
            this._storeService        = storeService;

            this._productService = productService;
        }
Ejemplo n.º 34
0
 public AdminMenu(IDestinationService destinationService) {
     this.destinationService = destinationService;
 }
 public DestinationPathConstraintUpdator(IDestinationPathConstraint destinationPathConstraint, IDestinationService destinationService)
 {
     this.destinationPathConstraint = destinationPathConstraint;
     this.destinationService = destinationService;
 }