Beispiel #1
0
        /// <summary>
        /// 创建服务
        /// </summary>
        /// <param name="messageContext">上下文对象</param>
        public static ResponseService_ConfigurationSupport CreateOrGetService(CustomMessageContext messageContext)
        {
            //创建实例
            ResponseService_ConfigurationSupport result = ResponseService.CreateOrGetService <ResponseService_ConfigurationSupport>(messageContext) as ResponseService_ConfigurationSupport;

            return(result);
        }
Beispiel #2
0
        /// <summary>
        /// 创建服务
        /// </summary>
        /// <param name="messageContext">上下文对象</param>
        /// <param name="createServicFunction">外部方法</param>
        public static ResponseService_MemorySupport CreateOrGetService(CustomMessageContext messageContext, Func <string, NodeInstanceService> createServicFunction)
        {
            //参数检查
            if (createServicFunction == null)
            {
                throw new ArgumentNullException("createServicFunction");
            }

            //创建实例
            ResponseService_MemorySupport result = ResponseService.CreateOrGetService <ResponseService_MemorySupport>(messageContext) as ResponseService_MemorySupport;

            result.CreateServicFunction = createServicFunction;
            return(result);
        }