当前位置: 首页>>代码示例>>C#>>正文


C# ScriptContext.GetPrototype方法代码示例

本文整理汇总了C#中ScriptContext.GetPrototype方法的典型用法代码示例。如果您正苦于以下问题:C# ScriptContext.GetPrototype方法的具体用法?C# ScriptContext.GetPrototype怎么用?C# ScriptContext.GetPrototype使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ScriptContext的用法示例。


在下文中一共展示了ScriptContext.GetPrototype方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SessionScope

        /// <summary>
        /// Constructs a new instance of an <see cref="AppScope"/>.
        /// </summary>
        /// <param name="name">The unique name for the scope.</param>
        /// <param name="parent">The parent scope to attach to the scope.</param>
        /// <param name="context">The execution context that is used to execute scripts.</param>
        internal SessionScope(string name, AppScope parent, ScriptContext context)
            : base(name, parent, context, context.GetPrototype("Session"))
        {
            // Create a new channel linked to the session
            this.SessionChannel = new Channel(context);

            // When creating, set the current thread channel
            Channel.Current = this.SessionChannel;
        }
开发者ID:mizzunet,项目名称:spike-box,代码行数:15,代码来源:SessionScope.cs

示例2: ConsoleObject

 /// <summary>
 /// Creates a new container that servers as an application container for a scope.
 /// </summary>
 /// <param name="prototypeName">The name of the prototype to use.</param>
 public ConsoleObject(ScriptContext context)
     : this(context.GetPrototype("Console"))
 {
 }
开发者ID:mizzunet,项目名称:spike-box,代码行数:8,代码来源:ConsoleObject.cs

示例3: RemoteObject

 /// <summary>
 /// Creates a new container that servers as an application container for a scope.
 /// </summary>
 /// <param name="prototypeName">The name of the prototype to use.</param>
 public RemoteObject(ScriptContext context)
     : this(context.GetPrototype("Remote"))
 {
 }
开发者ID:mizzunet,项目名称:spike-box,代码行数:8,代码来源:RemoteObject.cs

示例4: FileObject

 /// <summary>
 /// Creates a new instance of an object.
 /// </summary>
 /// <param name="prototypeName">The name of the prototype to use.</param>
 public FileObject(ScriptContext context)
     : this(context.GetPrototype(TypeName))
 {
 }
开发者ID:mizzunet,项目名称:spike-box,代码行数:8,代码来源:FileObject.cs

示例5: AppScope

 /// <summary>
 /// Constructs a new instance of an <see cref="AppScope"/>.
 /// </summary>
 /// <param name="application">The owner application.</param>
 /// <param name="context">The scripting context for this scope.</param>
 internal AppScope(App application, ScriptContext context)
     : base("app" + application.Key, null, context, context.GetPrototype("Application"))
 {
     context.AttachGlobal("app" + application.Key, this);
 }
开发者ID:mizzunet,项目名称:spike-box,代码行数:10,代码来源:AppScope.cs

示例6: BufferObject

 /// <summary>
 /// Creates a new instance of an object.
 /// </summary>
 /// <param name="prototypeName">The name of the prototype to use.</param>
 /// <param name="param">Either the size of the buffer, a string or the array of octets.</param>
 /// <param name="encoding">The encoding of a string.</param>
 public BufferObject(ScriptContext context, BoxedValue param, BoxedValue encoding)
     : this(context.GetPrototype("Buffer"), param, encoding)
 {
 }
开发者ID:mizzunet,项目名称:spike-box,代码行数:10,代码来源:BufferObject.cs


注:本文中的ScriptContext.GetPrototype方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。