本文整理汇总了C#中JavaScriptPropertyId类的典型用法代码示例。如果您正苦于以下问题:C# JavaScriptPropertyId类的具体用法?C# JavaScriptPropertyId怎么用?C# JavaScriptPropertyId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JavaScriptPropertyId类属于命名空间,在下文中一共展示了JavaScriptPropertyId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: JsHasProperty
internal static extern JavaScriptErrorCode JsHasProperty(JavaScriptValue obj, JavaScriptPropertyId propertyId, out bool hasProperty);
示例2: JsGetOwnPropertyDescriptor
internal static extern JavaScriptErrorCode JsGetOwnPropertyDescriptor(JavaScriptValue obj, JavaScriptPropertyId propertyId, out JavaScriptValue propertyDescriptor);
示例3: JsSetProperty
internal static extern JavaScriptErrorCode JsSetProperty(JavaScriptValue obj, JavaScriptPropertyId propertyId, JavaScriptValue value, bool useStrictRules);
示例4: JsGetPropertyNameFromId
internal static extern JavaScriptErrorCode JsGetPropertyNameFromId(JavaScriptPropertyId propertyId, out string name);
示例5: JsGetProperty
internal static extern JavaScriptErrorCode JsGetProperty(JavaScriptValue obj, JavaScriptPropertyId propertyId, out JavaScriptValue value);
示例6: GetOwnPropertyDescriptor
/// <summary>
/// Gets a property descriptor for an object's own property.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="propertyId">The ID of the property.</param>
/// <returns>The property descriptor.</returns>
public JavaScriptValue GetOwnPropertyDescriptor(JavaScriptPropertyId propertyId)
{
JavaScriptValue descriptorReference;
Native.ThrowIfError(Native.JsGetOwnPropertyDescriptor(this, propertyId, out descriptorReference));
return descriptorReference;
}
示例7: JsGetPropertyIdFromName
internal static extern JavaScriptErrorCode JsGetPropertyIdFromName(string name, out JavaScriptPropertyId propertyId);
示例8: JsGetPropertyIdType
internal static extern JavaScriptErrorCode JsGetPropertyIdType(JavaScriptPropertyId propertyId, out JavaSciptPropertyIdType propertyIdType);
示例9: JsGetSymbolFromPropertyId
internal static extern JavaScriptErrorCode JsGetSymbolFromPropertyId(JavaScriptPropertyId propertyId, out JavaScriptValue symbol);
示例10: DeleteProperty
/// <summary>
/// Deletes an object's property.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="propertyId">The ID of the property.</param>
/// <param name="useStrictRules">The property set should follow strict mode rules.</param>
/// <returns>Whether the property was deleted.</returns>
public JavaScriptValue DeleteProperty(JavaScriptPropertyId propertyId, bool useStrictRules)
{
JavaScriptValue returnReference;
Native.ThrowIfError(Native.JsDeleteProperty(this, propertyId, useStrictRules, out returnReference));
return returnReference;
}
示例11: DefineProperty
/// <summary>
/// Defines a new object's own property from a property descriptor.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="propertyId">The ID of the property.</param>
/// <param name="propertyDescriptor">The property descriptor.</param>
/// <returns>Whether the property was defined.</returns>
public bool DefineProperty(JavaScriptPropertyId propertyId, JavaScriptValue propertyDescriptor)
{
bool result;
Native.ThrowIfError(Native.JsDefineProperty(this, propertyId, propertyDescriptor, out result));
return result;
}
示例12: SetProperty
/// <summary>
/// Sets an object's property.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="id">The ID of the property.</param>
/// <param name="value">The new value of the property.</param>
/// <param name="useStrictRules">The property set should follow strict mode rules.</param>
public void SetProperty(JavaScriptPropertyId id, JavaScriptValue value, bool useStrictRules)
{
Native.ThrowIfError(Native.JsSetProperty(this, id, value, useStrictRules));
}
示例13: GetProperty
/// <summary>
/// Gets an object's property.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="id">The ID of the property.</param>
/// <returns>The value of the property.</returns>
public JavaScriptValue GetProperty(JavaScriptPropertyId id)
{
JavaScriptValue propertyReference;
Native.ThrowIfError(Native.JsGetProperty(this, id, out propertyReference));
return propertyReference;
}
示例14: HasProperty
/// <summary>
/// Determines whether an object has a property.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="propertyId">The ID of the property.</param>
/// <returns>Whether the object (or a prototype) has the property.</returns>
public bool HasProperty(JavaScriptPropertyId propertyId)
{
bool hasProperty;
Native.ThrowIfError(Native.JsHasProperty(this, propertyId, out hasProperty));
return hasProperty;
}
示例15: JsDeleteProperty
internal static extern JavaScriptErrorCode JsDeleteProperty(JavaScriptValue obj, JavaScriptPropertyId propertyId, bool useStrictRules, out JavaScriptValue result);