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)); } } }
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; }
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"); } }