// 获取js的封装的className
 private static string GetJsClassName(Type type, Dictionary <string, object> args)
 {
     if (args.ContainsKey("dataClassName"))
     {
         return(args["dataClassName"].ToString());
     }
     else
     {
         ScriptAttribute attr = ReflectHelper.GetScriptAttribute(type);
         return((attr != null && attr.ClassName != null) ? attr.ClassName : type.Name);
     }
 }
Exemple #2
0
        /// <summary>获取类型文件的缓存时间</summary>
        public static int GetCacheDuration(this Type type)
        {
            ScriptAttribute attr = ReflectHelper.GetScriptAttribute(type);

            return((attr != null) ? attr.CacheDuration : 0);
        }