示例#1
0
        public ScriptInformation(
            AssemblyProxyInfo assemblyFileInfo,
            Type type)
        {
            //스크립트 클래스 인지 확인
            if (System.Attribute.IsDefined(type, typeof(ScriptAttribute)) == true)
            {
                AssemblyFileInfo = assemblyFileInfo;

                //class type
                ClassType = type.FullName;

                //method list
                var t = type.GetMethods();
                MethodTypeList = new List <ScriptMethodType>(t.Length);
                MethodInfoList = new List <ScriptMethodInfo>(t.Length);

                foreach (var info in t)
                {
                    var v = new ScriptMethodType(type, info);
                    MethodTypeList.Add(v);
                    MethodInfoList.Add(new ScriptMethodInfo(v));
                }
            }
        }
示例#2
0
        public ScriptMethodInfo(ScriptMethodType scriptMethodType)
        {
            if (scriptMethodType == null)
            {
                throw new ArgumentNullException("ScriptMethodType is Null");
            }

            _CodeFunctionName = scriptMethodType.MethodInfo.Name;
            _AttributeType    = _GetAttributeName(scriptMethodType);
            _ReturnType       = scriptMethodType.MethodInfo.ReturnType.FullName;
        }
示例#3
0
 private string _GetAttributeName(ScriptMethodType scriptMethodType)
 {
     if (System.Attribute.IsDefined(scriptMethodType.MethodInfo, typeof(Attribute.MethodAttribute)) == true)
     {
         return("Method");
     }
     else if (System.Attribute.IsDefined(scriptMethodType.MethodInfo, typeof(Attribute.ScriptEventMethod)) == true)
     {
         return("Event");
     }
     else
     {
         return("Undefined");
     }
 }