本文整理汇总了C#中RubyContext.DefineGlobalVariableNoLock方法的典型用法代码示例。如果您正苦于以下问题:C# RubyContext.DefineGlobalVariableNoLock方法的具体用法?C# RubyContext.DefineGlobalVariableNoLock怎么用?C# RubyContext.DefineGlobalVariableNoLock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RubyContext
的用法示例。
在下文中一共展示了RubyContext.DefineGlobalVariableNoLock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DefineVariablesNoLock
//
// Defines variables backed by a field on RubyContext or Scope and variables that derived from them.
// Also variables that need type check on assignment are defined here.
//
// Other variables are simply looked up in the dictionary on RubyContext. All uses of such variables in libraries
// go thru alias table so they don't need a direct reference from RubyContext.
//
internal static void DefineVariablesNoLock(RubyContext/*!*/ context) {
// scope based variables (regex and input line):
context.DefineGlobalVariableNoLock(Symbols.MatchData, MatchData);
context.DefineGlobalVariableNoLock(Symbols.EntireMatch, EntireMatch);
context.DefineGlobalVariableNoLock(Symbols.MatchLastGroup, MatchLastGroup);
context.DefineGlobalVariableNoLock(Symbols.PreMatch, PreMatch);
context.DefineGlobalVariableNoLock(Symbols.PostMatch, PostMatch);
context.DefineGlobalVariableNoLock(Symbols.LastInputLine, LastInputLine);
// directly accessed variables provided by execution context:
context.DefineGlobalVariableNoLock(Symbols.CommandLineProgramPath, CommandLineProgramPath);
context.DefineGlobalVariableNoLock(Symbols.CurrentException, CurrentException);
context.DefineGlobalVariableNoLock(Symbols.CurrentExceptionBacktrace, CurrentExceptionBacktrace);
context.DefineGlobalVariableNoLock(Symbols.CommandLineArguments, CommandLineArguments);
context.DefineGlobalVariableNoLock(Symbols.InputSeparator, InputSeparator);
context.DefineGlobalVariableNoLock(Symbols.ItemSeparator, ItemSeparator);
context.DefineGlobalVariableNoLock(Symbols.StringSeparator, StringSeparator);
context.DefineGlobalVariableNoLock(Symbols.OutputSeparator, OutputSeparator);
context.DefineGlobalVariableNoLock(Symbols.InputContent, InputContent);
context.DefineGlobalVariableNoLock(Symbols.OutputStream, OutputStream);
context.DefineGlobalVariableNoLock(Symbols.LoadedFiles, LoadedFiles);
context.DefineGlobalVariableNoLock(Symbols.LoadPath, LoadPath);
context.DefineGlobalVariableNoLock(Symbols.LastInputLineNumber, LastInputLineNumber);
context.DefineGlobalVariableNoLock(Symbols.ChildProcessExitStatus, ChildProcessExitStatus);
}