Beispiel #1
0
        /// <summary>
        /// 클론 생성 함수
        /// </summary>
        /// <returns></returns>
        public UdtServiceInfo Clone()
        {
            UdtServiceInfo cloneUdtServiceInfo = new UdtServiceInfo();

            cloneUdtServiceInfo.ServiceName = this.ServiceName;
            cloneUdtServiceInfo.InputType   = this.InputType;
            cloneUdtServiceInfo.ReturnType  = this.ReturnType;
            cloneUdtServiceInfo.DicParams   = this.DicParams;
            cloneUdtServiceInfo.ConnectName = this.ConnectName;

            return(cloneUdtServiceInfo);
        }
Beispiel #2
0
        /// <summary>
        /// 서비스 정보 객체 생성 함수
        /// </summary>
        /// <param name="sServiceName">Constant.Service.ServiceName 에서 선택</param>
        /// <param name="dicParams">Dictionary에 정리 한 파라미터</param>
        /// <returns></returns>
        public IMRUtils.UdtServiceInfo CreateServiceInfo(string sServiceName, Dictionary <string, string> dicParams)
        {
            IMRUtils.UdtServiceInfo udtServiceInfo = new IMRUtils.UdtServiceInfo();

            udtServiceInfo.ServiceName = sServiceName;
            udtServiceInfo.ConnectName = Constant.Service.ConnectName.TEST;
            udtServiceInfo.InputType   = Constant.Service.Type.JSON;
            udtServiceInfo.ReturnType  = Constant.Service.Type.XML;

            // 파라미터 있는지 체크
            if (null != dicParams || 0 < dicParams.Count)
            {
                udtServiceInfo.DicParams = dicParams;
            }

            return(udtServiceInfo);
        }
Beispiel #3
0
        /// <summary>
        /// 서비스 호출 파라미터 생성 함수(JSON)
        /// </summary>
        /// <param name="udtServiceInfo">서비스 호출 통합 객체</param>
        public string CreateParams(UdtServiceInfo udtServiceInfo)
        {
            try
            {
                if (null == jObject)
                {
                    Init();
                }

                jObject = JObject.FromObject(udtServiceInfo);

                return(jObject.ToString());
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }