JSObject JSObject JSObject JSObject Class

定义

表示 JScript 中的对象。Represents an object in JScript. 此类属于对象和函数类别。This class belongs to the objects and functions category.

此 API 支持产品基础结构,不能在代码中直接使用。

public ref class JSObject : Microsoft::JScript::ScriptObject, System::Collections::IEnumerable, System::Runtime::InteropServices::Expando::IExpando
public class JSObject : Microsoft.JScript.ScriptObject, System.Collections.IEnumerable, System.Runtime.InteropServices.Expando.IExpando
type JSObject = class
    inherit ScriptObject
    interface IEnumerable
    interface IExpando
    interface IReflect
Public Class JSObject
Inherits ScriptObject
Implements IEnumerable, IExpando
继承
派生
实现

构造函数

JSObject() JSObject() JSObject() JSObject()

初始化 JSObject 类的新实例。Initializes a new instance of the JSObject class.

字段

engine engine engine engine

存储对脚本引擎的引用。Stores a reference to the scripting engine.

(Inherited from ScriptObject)
field_table field_table field_table field_table

存储在对象中动态添加和移除的字段的列表。Stores a list of fields that are dynamically added and removed from the object.

parent parent parent parent

存储对父对象的引用。Stores a reference to the parent object.

(Inherited from ScriptObject)

方法

AddField(String) AddField(String) AddField(String) AddField(String)

将指定的字段添加到该对象中。Adds the specified field to the object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags)

获取具有指定名称的字段。Gets a field that has the specified name.

(Inherited from ScriptObject)
GetFields(BindingFlags) GetFields(BindingFlags) GetFields(BindingFlags) GetFields(BindingFlags)

获取 FieldInfo 对象的数组,这些对象对应于当前脚本对象的所有字段。Gets an array of FieldInfo objects that correspond to all fields of the current script object.

(Inherited from ScriptObject)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags)

获取 MemberInfo 对象的数组,这些对象对应于与指定名称匹配的所有成员。Gets an array of MemberInfo objects that correspond to all members that match the specified name.

GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags)

获取 MemberInfo 对象的数组,这些对象对应于当前脚本对象的所有成员。Gets an array of MemberInfo objects that correspond to all members of the current script object.

GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags)

获取具有指定名称的方法。Gets a method that has the specified name.

(Inherited from ScriptObject)
GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])

通过使用指定的选择条件来获取具有指定名称的方法。Gets a method that has the specified name by using the specified selection criteria.

(Inherited from ScriptObject)
GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags)

获取 MethodInfo 对象的数组,这些对象对应于当前脚本对象的所有方法。Gets an array of MethodInfo objects that correspond to all methods of the current script object.

(Inherited from ScriptObject)
GetParent() GetParent() GetParent() GetParent()

获取对父对象的引用。Gets a reference to the parent object.

(Inherited from ScriptObject)
GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags)

获取 PropertyInfo 对象的数组,这些对象对应于当前脚本对象的所有属性。Gets an array of PropertyInfo objects that correspond to all properties of the current script object.

(Inherited from ScriptObject)
GetProperty(String, BindingFlags) GetProperty(String, BindingFlags) GetProperty(String, BindingFlags) GetProperty(String, BindingFlags)

获取具有指定名称的属性。Gets a property that has the specified name.

(Inherited from ScriptObject)
GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

通过使用指定的选择条件来获取具有指定名称的属性。Gets a property that has the specified name by using the specified selection criteria.

(Inherited from ScriptObject)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])

调用指定的成员。Invokes the specified member.

(Inherited from ScriptObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
SetMemberValue2(String, Object) SetMemberValue2(String, Object) SetMemberValue2(String, Object) SetMemberValue2(String, Object)

设置动态地添加到对象并存储在 field_table 中的字段的值。Sets the value of a field that was dynamically added to the object and stored in field_table.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

显式界面实现

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

返回循环访问对象成员的枚举数。Returns an enumerator that iterates through the members of the object.

IExpando.AddMethod(String, Delegate) IExpando.AddMethod(String, Delegate) IExpando.AddMethod(String, Delegate) IExpando.AddMethod(String, Delegate)

将指定的方法添加到该对象中。Adds the specified method to the object. 未在 JScript 中实现 IExpando.AddMethod(String, Delegate)IExpando.AddMethod(String, Delegate) is not implemented in JScript.

IExpando.AddProperty(String) IExpando.AddProperty(String) IExpando.AddProperty(String) IExpando.AddProperty(String)

将指定的属性添加到该对象中。Adds the specified property to the object. 此方法未在 JScript 中实现。This method is not implemented in JScript.

IExpando.RemoveMember(MemberInfo) IExpando.RemoveMember(MemberInfo) IExpando.RemoveMember(MemberInfo) IExpando.RemoveMember(MemberInfo)

从该对象中移除指定的成员。Removes the specified member from the object.

属性

Item[Double] Item[Double] Item[Double] Item[Double]

获取或设置由指定的 Double 索引值指定的脚本对象的成员。Gets or sets a member of the script object that is designated by the specified Double index value.

(Inherited from ScriptObject)
Item[Int32] Item[Int32] Item[Int32] Item[Int32]

获取或设置由指定的 Int32 索引值指定的脚本对象的成员。Gets or sets a member of the script object that is designated by the specified Int32 index value.

(Inherited from ScriptObject)
Item[Object[]] Item[Object[]] Item[Object[]] Item[Object[]]

获取或设置由指定的名称、Double 索引值或 Int32 索引值指定的脚本对象的成员。Gets or sets a member of the script object that is designated by the specified name, Double index value, or Int32 index value.

(Inherited from ScriptObject)
Item[String] Item[String] Item[String] Item[String]

获取或设置由指定名称指定的脚本对象的成员。Gets or sets a member of the script object that is designated by the specified name.

(Inherited from ScriptObject)
UnderlyingSystemType UnderlyingSystemType UnderlyingSystemType UnderlyingSystemType

获取脚本对象的类型。Gets the type of the script object.

(Inherited from ScriptObject)

扩展方法

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于