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


C# RubyScope.GetInnerMostModuleForConstantLookup方法代码示例

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


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

示例1: CreateAnonymousClass

 // implements Class#new
 public static object CreateAnonymousClass(RubyScope/*!*/ scope, BlockParam body, RubyClass/*!*/ self, [DefaultParameterValue(null)]RubyClass superClass) {
     RubyContext context = scope.RubyContext;
     RubyModule owner = scope.GetInnerMostModuleForConstantLookup();
     
     // MRI is inconsistent here, it triggers "inherited" event after the body of the method is evaluated.
     // In all other cases the order is event first, body next.
     RubyClass newClass = context.DefineClass(owner, null, superClass ?? context.ObjectClass, null);
     return (body != null) ? RubyUtils.EvaluateInModule(newClass, body, new[] { newClass }, newClass) : newClass;
 }
开发者ID:kashano,项目名称:main,代码行数:10,代码来源:RubyClass.cs

示例2: GetAutoloadedConstantPath

 public static MutableString GetAutoloadedConstantPath(RubyScope/*!*/ scope, object self, [DefaultProtocol, NotNull]string/*!*/ constantName) {
     return ModuleOps.GetAutoloadedConstantPath(scope.GetInnerMostModuleForConstantLookup(), constantName);
 }
开发者ID:aceptra,项目名称:ironruby,代码行数:3,代码来源:KernelOps.cs

示例3: SetAutoloadedConstant

 public static void SetAutoloadedConstant(RubyScope/*!*/ scope, object self,
     [DefaultProtocol, NotNull]string/*!*/ constantName, [DefaultProtocol, NotNull]MutableString/*!*/ path) {
     ModuleOps.SetAutoloadedConstant(scope.GetInnerMostModuleForConstantLookup(), constantName, path);
 }
开发者ID:aceptra,项目名称:ironruby,代码行数:4,代码来源:KernelOps.cs

示例4: SetUnqualifiedConstant

 [Emitted] // ConstantVariable:
 public static object SetUnqualifiedConstant(object value, RubyScope/*!*/ scope, string/*!*/ name) {
     RubyUtils.SetConstant(scope.GetInnerMostModuleForConstantLookup(), name, value);
     return value;
 }
开发者ID:teejayvanslyke,项目名称:ironruby,代码行数:5,代码来源:RubyOps.cs

示例5: DefineNestedClass

 public static RubyModule/*!*/ DefineNestedClass(RubyScope/*!*/ scope, string/*!*/ name, object superClassObject) {
     return RubyUtils.DefineClass(scope.GlobalScope, scope.GetInnerMostModuleForConstantLookup(), name, superClassObject);
 }
开发者ID:teejayvanslyke,项目名称:ironruby,代码行数:3,代码来源:RubyOps.cs

示例6: DefineNestedModule

 public static RubyModule/*!*/ DefineNestedModule(RubyScope/*!*/ scope, string/*!*/ name) {
     return RubyUtils.DefineModule(scope.GlobalScope, scope.GetInnerMostModuleForConstantLookup(), name);
 }
开发者ID:teejayvanslyke,项目名称:ironruby,代码行数:3,代码来源:RubyOps.cs


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