예제 #1
0
 public EntitySchemasController(
     IEntitySchemaRepository entitySchemaRepository,
     IEntitySchemaService entitySchemaService,
     IServiceLogger <EntitySchemasController> logger)
 {
     _entitySchemaRepository = entitySchemaRepository;
     _entitySchemaService    = entitySchemaService;
     _logger = logger;
 }
        /// <summary>重新加载</summary>
        private void Reload()
        {
            if (this.restartCount > 0)
            {
                // 重新加载配置信息
                EntitiesConfigurationView.Instance.Reload();
            }

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

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

            this.m_EntityClickService        = objectBuilder.GetObject <IEntityClickService>(typeof(IEntityClickService));
            this.m_EntityDocObjectService    = objectBuilder.GetObject <IEntityDocObjectService>(typeof(IEntityDocObjectService));
            this.m_EntityDraftService        = objectBuilder.GetObject <IEntityDraftService>(typeof(IEntityDraftService));
            this.m_EntityFeedbackService     = objectBuilder.GetObject <IEntityFeedbackService>(typeof(IEntityFeedbackService));
            this.m_EntityLifeHistoryService  = objectBuilder.GetObject <IEntityLifeHistoryService>(typeof(IEntityLifeHistoryService));
            this.m_EntityMetaDataService     = objectBuilder.GetObject <IEntityMetaDataService>(typeof(IEntityMetaDataService));
            this.m_EntityOperationLogService = objectBuilder.GetObject <IEntityOperationLogService>(typeof(IEntityOperationLogService));
            this.m_EntitySchemaService       = objectBuilder.GetObject <IEntitySchemaService>(typeof(IEntitySchemaService));
            this.m_EntitySnapshotService     = objectBuilder.GetObject <IEntitySnapshotService>(typeof(IEntitySnapshotService));
        }