Microsoft.JScript.LateBinding.GetMemberValue C# (CSharp) Method

GetMemberValue() private method

private GetMemberValue ( Object obj, String name ) : Object
obj Object
name String
return Object
      internal static Object GetMemberValue(Object obj, String name){
        if (obj is ScriptObject)
          return ((ScriptObject)obj).GetMemberValue(name);
        LateBinding lb = new LateBinding(name, obj);
        return lb.GetNonMissingValue();
      }

Same methods

LateBinding::GetMemberValue ( Object obj, String name, MemberInfo member, MemberInfo members ) : Object

Usage Example

Esempio n. 1
0
        public static bool hasOwnProperty(object thisob, object name)
        {
            string str = Microsoft.JScript.Convert.ToString(name);

            if (thisob is ArrayObject)
            {
                long num = ArrayObject.Array_index_for(str);
                if (num >= 0L)
                {
                    object valueAtIndex = ((ArrayObject)thisob).GetValueAtIndex((uint)num);
                    return((valueAtIndex != null) && (valueAtIndex != Microsoft.JScript.Missing.Value));
                }
            }
            if (!(thisob is JSObject))
            {
                return(!(LateBinding.GetMemberValue(thisob, str) is Microsoft.JScript.Missing));
            }
            MemberInfo[] member = ((JSObject)thisob).GetMember(str, BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly);
            int          length = member.Length;

            if (length <= 1)
            {
                if (length < 1)
                {
                    return(false);
                }
                if (member[0] is JSPrototypeField)
                {
                    return(!(((JSPrototypeField)member[0]).value is Microsoft.JScript.Missing));
                }
            }
            return(true);
        }
All Usage Examples Of Microsoft.JScript.LateBinding::GetMemberValue