Ejemplo n.º 1
0
        public string GetNamingAttribute(MethodInfo info)
        {
            var naming = info.GetCustomAttribute(typeof(JSNamingAttribute), false) as JSNamingAttribute;

            if (naming != null && !string.IsNullOrEmpty(naming.name))
            {
                return(naming.name);
            }

            if (info.IsSpecialName)
            {
                switch (info.Name)
                {
                case "get_Item": return("$GetValue");

                case "set_Item": return("$SetValue");
                }
            }

            return(bindingManager.ApplyNameRule(transform.GetNameRule(info), info.Name));
        }