本文整理汇总了C#中IronRuby.Runtime.RubyScope.GetInnerMostModuleForClassVariableLookup方法的典型用法代码示例。如果您正苦于以下问题:C# RubyScope.GetInnerMostModuleForClassVariableLookup方法的具体用法?C# RubyScope.GetInnerMostModuleForClassVariableLookup怎么用?C# RubyScope.GetInnerMostModuleForClassVariableLookup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IronRuby.Runtime.RubyScope
的用法示例。
在下文中一共展示了RubyScope.GetInnerMostModuleForClassVariableLookup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetClassVariable
public static object SetClassVariable(object value, RubyScope/*!*/ scope, string/*!*/ name) {
return SetClassVariableInternal(scope.GetInnerMostModuleForClassVariableLookup(), name, value);
}
示例2: TryGetClassVariable
public static object TryGetClassVariable(RubyScope/*!*/ scope, string/*!*/ name) {
object value;
// owner is the first module in scope:
scope.GetInnerMostModuleForClassVariableLookup().TryResolveClassVariable(name, out value);
return value;
}
示例3: IsDefinedClassVariable
public static bool IsDefinedClassVariable(RubyScope/*!*/ scope, string/*!*/ name) {
// owner is the first module in scope:
RubyModule owner = scope.GetInnerMostModuleForClassVariableLookup();
object value;
return owner.TryResolveClassVariable(name, out value) != null;
}
示例4: GetClassVariable
public static object GetClassVariable(RubyScope/*!*/ scope, string/*!*/ name) {
// owner is the first module in scope:
RubyModule owner = scope.GetInnerMostModuleForClassVariableLookup();
return GetClassVariableInternal(owner, name);
}