public AgentController(IMemberService memberService, IAgentService agentService, IContactService contactService, IMedallionService medallionService, IVehicleService vehicleService, IMeterManufacturerService meterManufacturerService, IStockholderService stockholderService, IAgentVehicleService agentVehicleService, IStandardDuesService standardDueService, IVehicleMakeService vehicleMakeService, IModelYearInsuranceService modelYearInsuranceService, IVehicleModelService vehicleModelService, IInsuranceDepositAgentService insuranceDepositService, IAutoLoanSetupAgentService autoLoanSetupService, IAccountReceivableAgentService accountReceivableService, ISavingDepositAgentService savingDepositService) { this.memberService = memberService; this.agentService = agentService; this.agentVehicleService = agentVehicleService; this.contactService = contactService; this.stockholderService = stockholderService; this.meterManufacturerService = meterManufacturerService; this.medallionService = medallionService; this.vehicleService = vehicleService; this.standardDueService = standardDueService; this._vehicleMakeService = vehicleMakeService; this._modelYearInsuranceService = modelYearInsuranceService; this._vehicleModelService = vehicleModelService; this.insuranceDepositService = insuranceDepositService; this.accountReceivableService = accountReceivableService; this.autoLoanSetupService = autoLoanSetupService; this.savingDepositService = savingDepositService; }
public AjaxContentController( IMemberService _memberService , IAreaAttService _areaAttService , IAreaService _areaService , IOutDoorMediaCateService _outDoorMediaCateService , IOutDoorService _outDoorService , IFormatCateService _formatCateService , ICompanyBussinessService _companyBussinessService , ICompanyFundService _companyFundService , ICompanyScaleService _companyScaleService , IPeriodCateService _periodCateService , IOwnerCateService _ownerCateService , IAuctionCalendarService _auctionCalendarService , ISliderImgService _sliderImgService , ISourceService _sourceService , ISearchService _searchService ) { areaAttService = _areaAttService; areaService = _areaService; memberService = _memberService; outDoorMediaCateService = _outDoorMediaCateService; outDoorService = _outDoorService; formatCateService = _formatCateService; companyBussinessService = _companyBussinessService; companyFundService = _companyFundService; companyScaleService = _companyScaleService; periodCateService = _periodCateService; ownerCateService = _ownerCateService; auctionCalendarService = _auctionCalendarService; sliderImgService = _sliderImgService; sourceService = _sourceService; searchService = _searchService; }
public MediaVerifyController( IMemberService MemberService , IEmailService EmailService , IMember_ActionService Member_ActionService , IOutDoorService OutDoorService , IIndustryCateService IndustryCateService, ICrowdCateService CrowdCateService, IOwnerCateService OwnerCateService, IAreaCateService AreaCateService, IPurposeCateService PurposeCateService, IFormatCateService FormatCateService, IPeriodCateService PeriodCateService, ICityCateService CityCateService, IMediaCateService MediaCateService, ICompanyService CompanyService) { this.MemberService = MemberService; this.EmailService = EmailService; this.Member_ActionService = Member_ActionService; this.OutDoorService = OutDoorService; this.IndustryCateService = IndustryCateService; this.CrowdCateService = CrowdCateService; this.OwnerCateService = OwnerCateService; this.AreaCateService = AreaCateService; this.PurposeCateService = PurposeCateService; this.FormatCateService = FormatCateService; this.PeriodCateService = PeriodCateService; this.CityCateService = CityCateService; this.MediaCateService = MediaCateService; this.CompanyService = CompanyService; }
public MemberController( IMemberService _memberService , IGroupService _groupService) { memberService = _memberService; groupService = _groupService; }
public MemberController( IMemberService MemberService , IGroupService GroupService) { this.MemberService = MemberService; this.GroupService = GroupService; }
static void SetIsApproved(IMemberService sender, SaveEventArgs<IMember> e) { // Automatically approve all members, as we don't have an approval process now // This is needed as we added new membership after upgrading so IsApproved is // currently empty. First time a member gets saved now (login also saves the member) // IsApproved would turn false (default value of bool) so we want to prevent that // Note: Since July 23rd 2015 we need people to activate their accounts! Don't // approve automatically. var nonApprovedMembers = e.SavedEntities.Where( member => member.CreateDate < DateTime.Parse("2015-07-23") && member.Properties.Contains(Constants.Conventions.Member.IsApproved) && member.IsApproved == false); var memberService = ApplicationContext.Current.Services.MemberService; foreach (var member in nonApprovedMembers) { // Adds test for member having an Id, if they don't then it's a NEW member, // new members don't automatically get approved any more, only existing // member before July 23rd 2015 if (member.HasIdentity) { member.IsApproved = true; memberService.Save(member, false); } } }
public CustomerCompanyController( ICustomerCompanyService CustomerCompanyService , IRelationCateService RelationCateService , ICustomerCateService CustomerCateService , ICityCateService CityCateService , IIndustryCateService IndustryCateService , ICustomerService CustomerService , ITraceLogService TraceLogService , ICustomerShareService CustomerShareService , IMemberService MemberService , IPermissionsService PermissionsService , IContactRequireService ContactRequireService , IPlanLogService PlanLogService ) { this.CustomerCompanyService = CustomerCompanyService; this.RelationCateService = RelationCateService; this.CustomerCateService = CustomerCateService; this.CityCateService = CityCateService; this.IndustryCateService = IndustryCateService; this.CustomerService = CustomerService; this.TraceLogService = TraceLogService; this.CustomerShareService = CustomerShareService; this.MemberService = MemberService; this.PermissionsService = PermissionsService; this.ContactRequireService = ContactRequireService; this.PlanLogService = PlanLogService; }
/// <summary> /// Invoke dbo.[SendMemberWelcomePack] /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void MemberService_Created(IMemberService sender, NewEventArgs<IMember> e) { string Name = e.Entity.Name; string Email = e.Entity.Email; if (connection.State != System.Data.ConnectionState.Open) { connection.Open(); } SqlTransaction tran = connection.BeginTransaction(); var command = new SqlCommand("dbo.[SendMemberWelcomePack]", connection, tran); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("@name", SqlDbType.NVarChar, 256); command.Parameters["@name"].Value = Name; command.Parameters.Add("@email", SqlDbType.NVarChar, 256); command.Parameters["@email"].Value = Email; command.Parameters.Add("@ConversationHandle", SqlDbType.UniqueIdentifier); command.Parameters["@ConversationHandle"].Direction = ParameterDirection.Output; command.ExecuteNonQuery(); tran.Commit(); }
public AjaxServiceController( IIndustryCateService IndustryCateService , ICityCateService CityCateService , ICustomerCompanyService CustomerCompanyService , IRelationCateService RelationCateService , ICustomerCateService CustomerCateService , IMemberService MemberService , IDepartmentService DepartmentService , IPermissionsService PermissionsService , IJobTitleCateService JobTitleCateService , IJobCateService JobCateService , IContractCateService ContractCateService ) { this.IndustryCateService = IndustryCateService; this.CityCateService = CityCateService; this.CustomerCompanyService = CustomerCompanyService; this.RelationCateService = RelationCateService; this.CustomerCateService = CustomerCateService; this.MemberService = MemberService; this.DepartmentService = DepartmentService; this.PermissionsService = PermissionsService; this.JobTitleCateService = JobTitleCateService; this.JobCateService = JobCateService; this.ContractCateService = ContractCateService; }
public GztvipController( IMemberService _memberService , IMember_ActionService _member_ActionService , IMember_MessageService _member_MessageService , ISys_MessageService _sys_MessageService , IMember_VIPService _member_VIPService , IMember_MoneyService _member_MoneyService , IPayListService _payListService , IServerItemService _serverItemService , ISliderImgService _sliderImgService , ITopMediaService _topMediaService , ITopCompanyService _topCompanyService , IOutDoorMediaCateService _outDoorMediaCateService , IOutDoorService _outDoorService , ICompanyService _companyService ) { memberService = _memberService; member_ActionService = _member_ActionService; member_MessageService = _member_MessageService; sys_MessageService = _sys_MessageService; member_VIPService = _member_VIPService; member_MoneyService = _member_MoneyService; payListService = _payListService; serverItemService = _serverItemService; sliderImgService = _sliderImgService; topMediaService = _topMediaService; topCompanyService = _topCompanyService; outDoorMediaCateService = _outDoorMediaCateService; outDoorService = _outDoorService; companyService = _companyService; }
public AjaxContentController( ICityCateService CityCateService, IArticleCateService ArticleCateService, IMemberService MemberService, IMediaCateService MediaCateService, IFormatCateService FormatCateService, IPeriodCateService PeriodCateService, IOwnerCateService OwnerCateService, IFavoriteService FavoriteService, ISchemeItemService SchemeItemService, ISchemeService SchemeService, IOutDoorService OutDoorService, IOutDoorLuceneService OutDoorLuceneService ) { this.CityCateService = CityCateService; this.ArticleCateService = ArticleCateService; this.MemberService = MemberService; this.MediaCateService = MediaCateService; this.FormatCateService = FormatCateService; this.PeriodCateService = PeriodCateService; this.OwnerCateService = OwnerCateService; this.FavoriteService = FavoriteService; this.SchemeItemService = SchemeItemService; this.SchemeService = SchemeService; this.OutDoorService = OutDoorService; this.OutDoorLuceneService = OutDoorLuceneService; }
public MemberController(IMemberService memberService, IUserService userService, IRoleService roleService, ILevelService levelService) { _memberService = memberService; _userService = userService; _roleService = roleService; _levelService = levelService; }
public ShopController( IMemberService _memberService , ICompanyService _companyService , IAreaAttService _areaAttService , IAreaService _areaService , IOutDoorService _outDoorService , IOutDoorMediaCateService _outDoorMediaCateService , IFormatCateService _formatCateService , ICompanyBussinessService _companyBussinessService , ICompanyFundService _companyFundService , ICompanyScaleService _companyScaleService , IPeriodCateService _periodCateService , IOwnerCateService _ownerCateService , IAuctionCalendarService _auctionCalendarService ) { areaAttService = _areaAttService; areaService = _areaService; memberService = _memberService; companyService = _companyService; outDoorService = _outDoorService; outDoorMediaCateService = _outDoorMediaCateService; formatCateService = _formatCateService; companyBussinessService = _companyBussinessService; companyFundService = _companyFundService; companyScaleService = _companyScaleService; periodCateService = _periodCateService; ownerCateService = _ownerCateService; auctionCalendarService = _auctionCalendarService; }
protected void Page_Load(object sender, EventArgs e) { m_AuthFactory = new AuthFactory(); m_AuthService = m_AuthFactory.GetAuthService(); m_MemberFactory = new MemberFactory(); m_MemberService = m_MemberFactory.GetMemberService(); }
/// <summary> /// Copies first name, last name and email address from saved member to Merchello customer. /// </summary> /// <param name="sender"> /// The <see cref="IMemberService"/>. /// </param> /// <param name="e"> /// The saved <see cref="IMember"/>s. /// </param> private static void MemberServiceSaved(IMemberService sender, Umbraco.Core.Events.SaveEventArgs<Umbraco.Core.Models.IMember> e) { var members = e.SavedEntities.ToArray(); // Allowed member types for Merchello customers var customerMemberTypes = MerchelloConfiguration.Current.CustomerMemberTypes.ToArray(); // Get a reference to Merchello's customer service var customerService = MerchelloContext.Current.Services.CustomerService; foreach (var member in members) { // verify the member is a customer type if (!customerMemberTypes.Contains(member.ContentTypeAlias)) continue; var customer = customerService.GetByLoginName(member.Username); if (customer == null) continue; customer.FirstName = member.GetValue<string>("firstName") ?? string.Empty; customer.LastName = member.GetValue<string>("lastName") ?? string.Empty; customer.Email = member.Username; customerService.Save(customer); } }
public MemberAddressController(IMemberAddressService memberAddressService,IWorkContext workContext,IMemberService memberService,IAreaService areaService) { _memberAddressService = memberAddressService; _workContext = workContext; _memberService = memberService; _areaService = areaService; }
public DataManagementController(ICategoryService categoryService, IDataItemService dataItemService, IMemberService memberService, IFileService fileService) { this.categoryService = categoryService; this.dataItemService = dataItemService; this.memberService = memberService; this.fileService = fileService; }
public PermissionsService(IUnitOfWork db , IMemberService MemberService ) { this.db = db; this.MemberService = MemberService; }
public DepartmentController( IDepartmentService _DepartmentService, IMemberService MemberService ) { DepartmentService = _DepartmentService; this.MemberService = MemberService; }
public CommunityOrderController(IOrderService orderService, IProductService productService, IWorkContext workContext, IMemberAddressService memberAddressService, IMemberService memberService) { _orderService = orderService; _productService = productService; _workContext = workContext; _memberAddressService = memberAddressService; _memberService = memberService; }
public ProductCommentController(IProductCommentService productCommentService,IProductService productService,IMemberService memberService,IWorkContext workContext,IOrderDetailService orderDetailService) { _productCommentService = productCommentService; _productService = productService; _memberService = memberService; _workContext = workContext; _orderDetailService = orderDetailService; }
public MemberService() { _memberService = AppHelpers.UmbServices().MemberService; _memberGroupService = AppHelpers.UmbServices().MemberGroupService; _membershipHelper = AppHelpers.UmbMemberHelper(); _memberTypeService = AppHelpers.UmbServices().MemberTypeService; _dataTypeService = AppHelpers.UmbServices().DataTypeService; }
public DashboardController( IGroupService _groupService , IMemberService _memberService ) { groupService = _groupService; memberService = _memberService; }
/// <summary> /// Initializes a new instance of the <see cref="AccountController"/> class. /// </summary> /// <param name="userSession">The user session.</param> /// <param name="memberService">The user repository.</param> /// <param name="authenticator">The authenticator.</param> /// <param name="cryptographer">The cryptographer.</param> /// <param name="authenticationService"></param> public AccountController(IUserSession userSession, IMemberService memberService, IAuthenticator authenticator, ICryptographer cryptographer, IAuthenticationService authenticationService) : base(userSession) { this.memberService = memberService; this.authenticator = authenticator; this.cryptographer = cryptographer; this.authenticationService = authenticationService; }
public CompanyService(IUnitOfWork DB_Service , IMemberService memberService , IMember_CreditIndexService member_CreditIndexService) { this.DB_Service = DB_Service; this.memberService = memberService; this.member_CreditIndexService = member_CreditIndexService; }
public StorefrontSecurityController(ISecurityService securityService, Func<ApplicationSignInManager> signInManagerFactory, INotificationManager notificationManager, IStoreService storeService, IMemberService memberService) { _securityService = securityService; _signInManagerFactory = signInManagerFactory; _notificationManager = notificationManager; _storeService = storeService; _memberService = memberService; }
///Constructors needed for testability and DI public MemberRegisterSurfaceController(UmbracoContext umbracoContext, IMemberTypeService _memberTypeService, IMemberService _memberService) : base(umbracoContext) { this._memberTypeService = _memberTypeService; this._memberService = _memberService; }
public ServiceOrderController(IServiceOrderService serviceOrderService, IProductService productService, IWorkContext workContext, IMemberAddressService memberAddressService, IMemberService memberService) { _serviceOrderService = serviceOrderService; _productService = productService; _workContext = workContext; _memberAddressService = memberAddressService; _memberService = memberService; }
public FriendService( IMyHelper _myHelper, Database _database, IMemberService _memberService) { this._myHelper = _myHelper; this._database = _database; this._memberService = _memberService; }
public BidOnAuctionService(IAuctionRepository auctions, IBidHistoryRepository bidHistory, IMemberService memberService, IClock clock) { _auctions = auctions; _bidHistory = bidHistory; _clock = clock; _memberService = memberService; }
public MemberIndexingNotificationHandler(IUmbracoIndexingHandler umbracoIndexingHandler, IMemberService memberService) { _umbracoIndexingHandler = umbracoIndexingHandler ?? throw new ArgumentNullException(nameof(umbracoIndexingHandler)); _memberService = memberService ?? throw new ArgumentNullException(nameof(memberService)); }
public void ProcessMemberCreated(IMemberService sender, NewEventArgs <IMember> args) { var member = args.Entity; _intranetMemberGroupService.AssignDefaultMemberGroup(member.Id); }
public AuthorizationController(IMemberService service) { _service = service; }
/// <summary> /// Create member controller to test /// </summary> /// <param name="memberService">Member service</param> /// <param name="memberTypeService">Member type service</param> /// <param name="memberGroupService">Member group service</param> /// <param name="membersUserManager">Members user manager</param> /// <param name="dataTypeService">Data type service</param> /// <param name="backOfficeSecurityAccessor">Back office security accessor</param> /// <param name="mockPasswordChanger">Password changer class</param> /// <returns>A member controller for the tests</returns> private MemberController CreateSut( IMemberService memberService, IMemberTypeService memberTypeService, IMemberGroupService memberGroupService, IUmbracoUserManager <MemberIdentityUser> membersUserManager, IDataTypeService dataTypeService, IBackOfficeSecurityAccessor backOfficeSecurityAccessor, IPasswordChanger <MemberIdentityUser> passwordChanger, IOptions <GlobalSettings> globalSettings, IUser user) { var httpContextAccessor = new HttpContextAccessor(); var mockShortStringHelper = new MockShortStringHelper(); var textService = new Mock <ILocalizedTextService>(); var contentTypeBaseServiceProvider = new Mock <IContentTypeBaseServiceProvider>(); contentTypeBaseServiceProvider.Setup(x => x.GetContentTypeOf(It.IsAny <IContentBase>())).Returns(new ContentType(mockShortStringHelper, 123)); var contentAppFactories = new Mock <List <IContentAppFactory> >(); var mockContentAppFactoryCollection = new Mock <ILogger <ContentAppFactoryCollection> >(); var hybridBackOfficeSecurityAccessor = new BackOfficeSecurityAccessor(httpContextAccessor); var contentAppFactoryCollection = new ContentAppFactoryCollection( () => contentAppFactories.Object, mockContentAppFactoryCollection.Object, hybridBackOfficeSecurityAccessor); var mockUserService = new Mock <IUserService>(); var commonMapper = new CommonMapper( mockUserService.Object, contentTypeBaseServiceProvider.Object, contentAppFactoryCollection, textService.Object); var mockCultureDictionary = new Mock <ICultureDictionary>(); var mockPasswordConfig = new Mock <IOptions <MemberPasswordConfigurationSettings> >(); mockPasswordConfig.Setup(x => x.Value).Returns(() => new MemberPasswordConfigurationSettings()); IDataEditor dataEditor = Mock.Of <IDataEditor>( x => x.Type == EditorType.PropertyValue && x.Alias == Constants.PropertyEditors.Aliases.Label); Mock.Get(dataEditor).Setup(x => x.GetValueEditor()).Returns(new TextOnlyValueEditor(new DataEditorAttribute(Constants.PropertyEditors.Aliases.TextBox, "Test Textbox", "textbox"), textService.Object, Mock.Of <IShortStringHelper>(), Mock.Of <IJsonSerializer>(), Mock.Of <IIOHelper>())); var propertyEditorCollection = new PropertyEditorCollection(new DataEditorCollection(() => new[] { dataEditor })); IMapDefinition memberMapDefinition = new MemberMapDefinition( commonMapper, new CommonTreeNodeMapper(Mock.Of <LinkGenerator>()), new MemberTabsAndPropertiesMapper( mockCultureDictionary.Object, backOfficeSecurityAccessor, textService.Object, memberTypeService, memberService, memberGroupService, mockPasswordConfig.Object, contentTypeBaseServiceProvider.Object, propertyEditorCollection)); var map = new MapDefinitionCollection(() => new List <IMapDefinition>() { new global::Umbraco.Cms.Core.Models.Mapping.MemberMapDefinition(), memberMapDefinition, new ContentTypeMapDefinition( commonMapper, propertyEditorCollection, dataTypeService, new Mock <IFileService>().Object, new Mock <IContentTypeService>().Object, new Mock <IMediaTypeService>().Object, memberTypeService, new Mock <ILoggerFactory>().Object, mockShortStringHelper, globalSettings, new Mock <IHostingEnvironment>().Object, new Mock <IOptionsMonitor <ContentSettings> >().Object) }); var scopeProvider = Mock.Of <IScopeProvider>(x => x.CreateScope( It.IsAny <IsolationLevel>(), It.IsAny <RepositoryCacheMode>(), It.IsAny <IEventDispatcher>(), It.IsAny <IScopedNotificationPublisher>(), It.IsAny <bool?>(), It.IsAny <bool>(), It.IsAny <bool>()) == Mock.Of <IScope>()); _mapper = new UmbracoMapper(map, scopeProvider); return(new MemberController( new DefaultCultureDictionary( new Mock <ILocalizationService>().Object, NoAppCache.Instance), new LoggerFactory(), mockShortStringHelper, new DefaultEventMessagesFactory( new Mock <IEventMessagesAccessor>().Object), textService.Object, propertyEditorCollection, _mapper, memberService, memberTypeService, (IMemberManager)membersUserManager, dataTypeService, backOfficeSecurityAccessor, new ConfigurationEditorJsonSerializer(), passwordChanger, scopeProvider )); }
/// <summary> /// Creates a partial service context with only some services (for tests). /// </summary> /// <remarks> /// <para>Using a true constructor for this confuses DI containers.</para> /// </remarks> public static ServiceContext CreatePartial( IContentService contentService = null, IMediaService mediaService = null, IContentTypeService contentTypeService = null, IMediaTypeService mediaTypeService = null, IDataTypeService dataTypeService = null, IFileService fileService = null, ILocalizationService localizationService = null, IPackagingService packagingService = null, IEntityService entityService = null, IRelationService relationService = null, IMemberGroupService memberGroupService = null, IMemberTypeService memberTypeService = null, IMemberService memberService = null, IUserService userService = null, ITagService tagService = null, INotificationService notificationService = null, ILocalizedTextService localizedTextService = null, IAuditService auditService = null, IDomainService domainService = null, IMacroService macroService = null, IPublicAccessService publicAccessService = null, IExternalLoginService externalLoginService = null, IServerRegistrationService serverRegistrationService = null, IRedirectUrlService redirectUrlService = null, IConsentService consentService = null, IKeyValueService keyValueService = null, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider = null) { Lazy <T> Lazy <T>(T service) => service == null ? null : new Lazy <T>(() => service); return(new ServiceContext( Lazy(publicAccessService), Lazy(domainService), Lazy(auditService), Lazy(localizedTextService), Lazy(tagService), Lazy(contentService), Lazy(userService), Lazy(memberService), Lazy(mediaService), Lazy(contentTypeService), Lazy(mediaTypeService), Lazy(dataTypeService), Lazy(fileService), Lazy(localizationService), Lazy(packagingService), Lazy(serverRegistrationService), Lazy(entityService), Lazy(relationService), Lazy(macroService), Lazy(memberTypeService), Lazy(memberGroupService), Lazy(notificationService), Lazy(externalLoginService), Lazy(redirectUrlService), Lazy(consentService), Lazy(keyValueService), Lazy(contentTypeBaseServiceProvider) )); }
public CustomerExportImport(IMemberService memberService, IMemberSearchService memberSearchService) { _memberService = memberService; _memberSearchService = memberSearchService; }
public MemberController() { this._member = new MemberService(); }
public AuctionService(IMainRepository mainRepository, IMemberService memberService) { this.mainRepository = mainRepository; this.memberService = memberService; }
public FindPassWordController(IMessageService iMessageService, IMemberService iMemberService) { _iMessageService = iMessageService; _iMemberService = iMemberService; }
/// <summary> /// Initializes a new instance of the <see cref="MembersController"/> class. /// </summary> /// <param name="memberService">The member service.</param> public MembersController(IMemberService memberService) { _memberService = memberService; }
public MemberController(ILogger <MemberController> logger, IOptions <AppConfig> appConfig, IMemberService memberService) { _logger = logger; _appConfig = appConfig.Value; _memberService = memberService; }
public GetMemberByEmailTests() { _memberService = Substitute.For <IMemberService>(); _getMemberByEmailHandler = new GetMemberByEmailHandler(_memberService); }
public MemberController(IMemberService memberService) { this.memberService = memberService; }
public SetOnboardingMembersPayload(IMemberService memberService) { _memberService = memberService; Name = nameof(SetOnboardingMembersPayload); }
public PermissionController(IMemberService memberService, IPermissionService permissionService) { this._memberService = memberService; _permissionService = permissionService; }
public LoginController(ILoginService loginService, IMemberService memberService) { _memberService = memberService; _loginService = loginService; }
/// <summary> /// 建構式 /// </summary> /// <param name="logger">logger</param> /// <param name="memberService">memberService</param> public EditDataController(ILogger <EditDataController> logger, IMemberService memberService) { this.logger = logger; this.memberService = memberService; }
public RegisterPage() { Debug.WriteLine("Init register."); this.InitializeComponent(); this._memberService = new MemberService(); }
/// <summary> /// 建構式 /// </summary> /// <param name="logger">logger</param> /// <param name="memberService">memberService</param> public RegisterController(ILogger <RegisterController> logger, IMemberService memberService) { this.logger = logger; this.memberService = memberService; }
public RoomReservationService(IRoomReservationRepository reservationRepository, ICalendarService calendarService, IMemberService memberService, IRoleService roleService, ISecurityContext securityContext, IMapper mapper, IHttpContextAccessor httpContextAccessor) : base(mapper, reservationRepository) { this._memberService = memberService; this._roleService = roleService; this._securityContext = securityContext; this._httpContextAccessor = httpContextAccessor; this._reservationRepository = reservationRepository; this._calendarService = calendarService; }
public MemberController( ILogger logger, IMemberService memberService) : base(logger) { _memberService = memberService; }
public BorrowBookController(IBorrowBookService borrowBookService, IBookService bookService, IMemberService memberService) { _borrowBookService = borrowBookService; _bookService = bookService; _memberService = memberService; }
public AccountController(IMemberService memberService) { _memberService = memberService; }
public MemberController(IMemberService iMemberService, IRegionService iRegionService, IMemberLabelService iMemberLabelService) { _iMemberService = iMemberService; _iRegionService = iRegionService; _iMemberLabelService = iMemberLabelService; }
public NancyAuthApiModule(IMemberTokenService memberTokenService, IMemberService memberService, string mathod = "member", string func = "api", string modulePath = "") : base(mathod, func, modulePath) { _memberTokenService = memberTokenService; _memberService = memberService; Before += CheckAuth; }
public UmbracoIndexCreator(IProfilingLogger profilingLogger, ILocalizationService languageService, IPublicAccessService publicAccessService, IMemberService memberService) : base(profilingLogger, languageService, publicAccessService, memberService) { _publicAccessService = publicAccessService; }
/// <summary> /// 建構式 /// </summary> /// <param name="logger">logger</param> /// <param name="memberService">memberService</param> public LoginController(ILogger <LoginController> logger, IMemberService memberService) { this.logger = logger; this.memberService = memberService; }
public ValuesController(IUnitOfWork uof, ICategoryService cs, IMemberService ms, IOrderService os, IOrderDetailService ods, IPaymentService pay, IProductService ps, IShipperService ships, ISupplierService sups) : base(uof, cs, ms, os, ods, pay, ps, ships, sups) { }
public async Task PostSaveMember_SaveExistingMember_WithNoRoles_Add1Role_ExpectSuccessResponse( [Frozen] IMemberManager umbracoMembersUserManager, IMemberService memberService, IMemberTypeService memberTypeService, IMemberGroupService memberGroupService, IDataTypeService dataTypeService, IBackOfficeSecurityAccessor backOfficeSecurityAccessor, IBackOfficeSecurity backOfficeSecurity, IPasswordChanger <MemberIdentityUser> passwordChanger, IOptions <GlobalSettings> globalSettings, IUser user) { // arrange var roleName = "anyrole"; IMember member = SetupMemberTestData(out MemberSave fakeMemberData, out MemberDisplay memberDisplay, ContentSaveAction.Save); fakeMemberData.Groups = new List <string>() { roleName }; var membersIdentityUser = new MemberIdentityUser(123); Mock.Get(umbracoMembersUserManager) .Setup(x => x.FindByIdAsync(It.IsAny <string>())) .ReturnsAsync(() => membersIdentityUser); Mock.Get(umbracoMembersUserManager) .Setup(x => x.ValidatePasswordAsync(It.IsAny <string>())) .ReturnsAsync(() => IdentityResult.Success); Mock.Get(umbracoMembersUserManager) .Setup(x => x.UpdateAsync(It.IsAny <MemberIdentityUser>())) .ReturnsAsync(() => IdentityResult.Success); Mock.Get(umbracoMembersUserManager) .Setup(x => x.AddToRolesAsync(It.IsAny <MemberIdentityUser>(), It.IsAny <IEnumerable <string> >())) .ReturnsAsync(() => IdentityResult.Success); Mock.Get(memberTypeService).Setup(x => x.GetDefault()).Returns("fakeAlias"); Mock.Get(backOfficeSecurityAccessor).Setup(x => x.BackOfficeSecurity).Returns(backOfficeSecurity); Mock.Get(memberService).Setup(x => x.GetByUsername(It.IsAny <string>())).Returns(() => member); Mock.Get(memberService).Setup(x => x.GetById(It.IsAny <int>())).Returns(() => member); SetupUserAccess(backOfficeSecurityAccessor, backOfficeSecurity, user); SetupPasswordSuccess(umbracoMembersUserManager, passwordChanger); Mock.Get(memberService).SetupSequence( x => x.GetByEmail(It.IsAny <string>())) .Returns(() => null) .Returns(() => member); MemberController sut = CreateSut(memberService, memberTypeService, memberGroupService, umbracoMembersUserManager, dataTypeService, backOfficeSecurityAccessor, passwordChanger, globalSettings, user); // act ActionResult <MemberDisplay> result = await sut.PostSave(fakeMemberData); // assert Assert.IsNull(result.Result); Assert.IsNotNull(result.Value); Mock.Get(umbracoMembersUserManager) .Verify(u => u.GetRolesAsync(membersIdentityUser)); Mock.Get(umbracoMembersUserManager) .Verify(u => u.AddToRolesAsync(membersIdentityUser, new[] { roleName })); Mock.Get(memberService) .Verify(m => m.Save(It.IsAny <Member>())); AssertMemberDisplayPropertiesAreEqual(memberDisplay, result.Value); }
public LoansController(ILoanService loanService, IBookCopyService bookcopyService, IMemberService memberService, IBookCopyLoanService bookCopyLoanService) { _loanService = loanService; _bookcopyService = bookcopyService; _memberService = memberService; _bookCopyLoanService = bookCopyLoanService; }