示例#1
0
        public OrganizationUnitController(IOrganizationUnitService organizationUnitProvider, IBrowseSuperiorProviderService browseSuperiorProvider,
                                          IJobTitleService jobTitleProvider, IMapper mapper)
        {
            _organizationUnitProvider = organizationUnitProvider;
            _browseSuperiorProvider   = browseSuperiorProvider;
            _jobTitleProvider         = jobTitleProvider;


            _mapper = mapper;
        }
        /// <summary>重新加载</summary>
        private void Reload()
        {
            if (this.restartCount > 0)
            {
                KernelContext.Log.Info(string.Format(I18n.Strings["application_is_reloading"], MembershipConfiguration.ApplicationName));

                // 重新加载配置信息
                MembershipConfigurationView.Instance.Reload();
            }
            else
            {
                KernelContext.Log.Info(string.Format(I18n.Strings["application_is_loading"], MembershipConfiguration.ApplicationName));
            }

            // 创建对象构建器(Spring.NET)
            string springObjectFile = MembershipConfigurationView.Instance.Configuration.Keys["SpringObjectFile"].Value;

            SpringObjectBuilder objectBuilder = SpringObjectBuilder.Create(MembershipConfiguration.ApplicationName, springObjectFile);

            this.m_PasswordEncryptionManagement = objectBuilder.GetObject <IPasswordEncryptionManagement>(typeof(IPasswordEncryptionManagement));

            this.m_AuthorizationObjectService = objectBuilder.GetObject <IAuthorizationObjectService>(typeof(IAuthorizationObjectService));
            this.m_AccountService             = objectBuilder.GetObject <IAccountService>(typeof(IAccountService));
            this.m_AccountLogService          = objectBuilder.GetObject <IAccountLogService>(typeof(IAccountLogService));
            this.m_AccountGrantService        = objectBuilder.GetObject <IAccountGrantService>(typeof(IAccountGrantService));
            this.m_AccountBindingService      = objectBuilder.GetObject <IAccountBindingService>(typeof(IAccountBindingService));
            this.m_AccountFriendService       = objectBuilder.GetObject <IAccountFriendService>(typeof(IAccountFriendService));
            this.m_MemberService                   = objectBuilder.GetObject <IMemberService>(typeof(IMemberService));
            this.m_OrganizationUnitService         = objectBuilder.GetObject <IOrganizationUnitService>(typeof(IOrganizationUnitService));
            this.m_RoleService                     = objectBuilder.GetObject <IRoleService>(typeof(IRoleService));
            this.m_GeneralRoleService              = objectBuilder.GetObject <IGeneralRoleService>(typeof(IGeneralRoleService));
            this.m_StandardGeneralRoleService      = objectBuilder.GetObject <IStandardGeneralRoleService>(typeof(IStandardGeneralRoleService));
            this.m_StandardRoleService             = objectBuilder.GetObject <IStandardRoleService>(typeof(IStandardRoleService));
            this.m_StandardOrganizationUnitService = objectBuilder.GetObject <IStandardOrganizationUnitService>(typeof(IStandardOrganizationUnitService));
            this.m_GroupService                    = objectBuilder.GetObject <IGroupService>(typeof(IGroupService));
            this.m_ComputerService                 = objectBuilder.GetObject <IComputerService>(typeof(IComputerService));
            this.m_CatalogService                  = objectBuilder.GetObject <ICatalogService>(typeof(ICatalogService));
            this.m_CatalogItemService              = objectBuilder.GetObject <ICatalogItemService>(typeof(ICatalogItemService));
            this.m_ContactService                  = objectBuilder.GetObject <IContactService>(typeof(IContactService));
            this.m_AssignedJobService              = objectBuilder.GetObject <IAssignedJobService>(typeof(IAssignedJobService));
            this.m_JobFamilyService                = objectBuilder.GetObject <IJobFamilyService>(typeof(IJobFamilyService));
            this.m_JobGradeService                 = objectBuilder.GetObject <IJobGradeService>(typeof(IJobGradeService));
            this.m_JobService         = objectBuilder.GetObject <IJobService>(typeof(IJobService));
            this.m_SettingService     = objectBuilder.GetObject <ISettingService>(typeof(ISettingService));
            this.m_CatalogService     = objectBuilder.GetObject <ICatalogService>(typeof(ICatalogService));
            this.m_CatalogItemService = objectBuilder.GetObject <ICatalogItemService>(typeof(ICatalogItemService));

            KernelContext.Log.Info(string.Format(I18n.Strings["application_is_successfully_loaded"], MembershipConfiguration.ApplicationName));
        }
示例#3
0
 public OrganizationUnitController(
     IOrganizationUnitService orgUnitService
     )
 {
     _orgUnitService = orgUnitService;
 }