Exemple #1
0
        /// <summary>
        /// 생성된 인스턴스 객체에 대한 invoke를 지원해주는 객체
        /// </summary>
        /// <param name="instanceObject"></param>
        /// <param name="scriptInformation"></param>
        public Invoker(object instanceObject, ScriptInformation scriptInformation)
        {
            _InstanceObject   = instanceObject;
            _ScriptInfomation = scriptInformation;

            _MethodDictionary = _CreateMethodDictionary(_ScriptInfomation);
        }
Exemple #2
0
        /// <summary>
        /// 순수 메소드에 대한 정보를 수집해서 사전화 함
        /// </summary>
        /// <param name="scriptInformation"></param>
        /// <returns></returns>
        private IDictionary <string, ScriptMethodType> _CreateMethodDictionary(ScriptInformation scriptInformation)
        {
            if (scriptInformation.MethodInfoList.Count != scriptInformation.MethodTypeList.Count)
            {
                throw new ArgumentException("전달된 ScriptInformation의 메소드 정보들이 비유효 합니다.");
            }

            var dictionary = new Dictionary <string, ScriptMethodType>();

            for (int i = 0; i < scriptInformation.MethodInfoList.Count; ++i)
            {
                dictionary.Add(
                    scriptInformation.MethodInfoList[i].CodeFunctionName,
                    scriptInformation.MethodTypeList[i]);
            }

            return(dictionary);
        }