/// <summary> Gets the method defined by <code>name</code> and /// <code>params</code> for the Class <code>c</code>. /// /// </summary> /// <param name="c">Class in which the method search is taking place /// </param> /// <param name="name">Name of the method being searched for /// </param> /// <param name="params">An array of Objects (not Classes) that describe the /// the parameters /// /// </param> /// <returns> The desired Method object. /// </returns> /// <throws> IllegalArgumentException When the parameters passed in can not be used for introspection. </throws> /// <throws> MethodMap.AmbiguousException When the method map contains more than one match for the requested signature. </throws> public virtual MethodEntry GetMethod(Type c, string name, object[] parameters) { if (c == null) { throw new System.ArgumentException("class object is null!"); } IIntrospectorCache ic = IntrospectorCache; ClassMap classMap = ic.Get(c); if (classMap == null) { classMap = ic.Put(c); } return(classMap.FindMethod(name, parameters)); }
public virtual PropertyEntry GetProperty(Type c, string name) { if (c == null) { throw new System.ArgumentException("class object is null!"); } IIntrospectorCache ic = IntrospectorCache; ClassMap classMap = ic.Get(c); if (classMap == null) { classMap = ic.Put(c); } return(classMap.FindProperty(name)); }