本文整理汇总了C#中Scriptable.GetClassName方法的典型用法代码示例。如果您正苦于以下问题:C# Scriptable.GetClassName方法的具体用法?C# Scriptable.GetClassName怎么用?C# Scriptable.GetClassName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scriptable
的用法示例。
在下文中一共展示了Scriptable.GetClassName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DefaultObjectToString
internal static string DefaultObjectToString(Scriptable obj)
{
return "[object " + obj.GetClassName() + ']';
}
示例2: AddAsConstructor
/// <summary>Define this function as a JavaScript constructor.</summary>
/// <remarks>
/// Define this function as a JavaScript constructor.
/// <p>
/// Sets up the "prototype" and "constructor" properties. Also
/// calls setParent and setPrototype with appropriate values.
/// Then adds the function object as a property of the given scope, using
/// <code>prototype.getClassName()</code>
/// as the name of the property.
/// </remarks>
/// <param name="scope">
/// the scope in which to define the constructor (typically
/// the global object)
/// </param>
/// <param name="prototype">the prototype object</param>
/// <seealso cref="Scriptable.SetParentScope(Scriptable)">Scriptable.SetParentScope(Scriptable)</seealso>
/// <seealso cref="Scriptable.SetPrototype(Scriptable)">Scriptable.SetPrototype(Scriptable)</seealso>
/// <seealso cref="Scriptable.GetClassName()">Scriptable.GetClassName()</seealso>
public virtual void AddAsConstructor(Scriptable scope, Scriptable prototype)
{
InitAsConstructor(scope, prototype);
DefineProperty(scope, prototype.GetClassName(), this, ScriptableObject.DONTENUM);
}