コード例 #1
0
		public AppraisalCompanyProfileController(
			IAppraisalCompanyService appraisalCompanyWizardService,
			IAppraiserManagement appraiserManagement,
			IReferenceManagement referenceManagement,
			IAppraisalCompanyBranchesService appraisalCompanyBranchesService,
			IGeocodingValidation geocodingValidation)
		{
			_appraisalCompanyWizardService = appraisalCompanyWizardService;
			_referenceManagement = referenceManagement;
			_appraiserManagement = appraiserManagement;
			var branchesService = new BranchesDatabaseService(appraisalCompanyBranchesService);
			branchesService.CurrentCompanyService = new LazeCurrentCompanyService(GetAppraisalCompanyId);
			var lazyCompanyDetails =
				new Lazy<AppraisalCompanyDetailsViewModel>(
					() => _appraisalCompanyWizardService.GetAppraisalCompanyDetails(GetAppraisalCompanyId()));
			_branchesService = new BranchesServiceSecurity(branchesService, lazyCompanyDetails);
			_branchAcceses = new BranchAcceses(lazyCompanyDetails);
			_brancheMessagesService = new BrancheMessageService(() => Session, branchesService.CurrentCompanyService)
			{
				BrancheAddedMessage = Constants.Notifications.BranchSaved,
				BranchesAddedMessage = Constants.Notifications.BranchesSaved,
				EmptyResult = string.Empty
			};
			_geocodingValidation = geocodingValidation;
		}
コード例 #2
0
		public AppraisalCompanyDetailsController(IAppraisalCompanyService appraisalCompanyWizardService, IAppraisalCompanyBranchesService appraisalCompanyAdminManagement, IReferenceManagement referenceManagement, IUserAccessHelper userAccessHelper, IGeocodingValidation geocodingValidation)
		{
			_appraisalCompanyWizardService = appraisalCompanyWizardService;
			_referenceManagement = referenceManagement;
			_userAccessHelper = userAccessHelper;
			_geocodingValidation = geocodingValidation;

			var branchesDatabaseService = new BranchesDatabaseService(appraisalCompanyAdminManagement);
			_propertyCurrentCompanyService = new PropertyCurrentCompanyService();
			branchesDatabaseService.CurrentCompanyService = _propertyCurrentCompanyService;
			var branchesSecurityService = new BranchesServiceSecurity(branchesDatabaseService,
																																new Lazy<AppraisalCompanyDetailsViewModel>(
																																	() =>
																																	_appraisalCompanyWizardService.GetAppraisalCompanyDetails(
																																		_propertyCurrentCompanyService.CurrentCompany)));
			_branchesService = branchesSecurityService;
			_brancheMessagesService = new BrancheMessageService(() => Session, _propertyCurrentCompanyService)
			{
				BrancheAddedMessage = Constants.Notifications.BranchSaved,
				BranchesAddedMessage = Constants.Notifications.BranchesSaved,
				EmptyResult = string.Empty
			};
		}