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


C# IScope.SetValue方法代码示例

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


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

示例1: Register

 /// <summary>
 /// Add built-in debug functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.repl", new Repl());
     scope.SetValue("l3.debug.break", new Break());
     scope.SetValue("l3.debug.getTicks", new GetTicks());
     scope.SetValue("l3.throw", new Throw());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:10,代码来源:DebugFunctions.cs

示例2: Register

 /// <summary>
 /// Add built-in array functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.mapToMap", new MapToMap());
     scope.SetValue("l3.mapToArray", new MapToArray());
     scope.SetValue("l3.getMapKeys", new GetMapKeys());
     scope.SetValue("l3.getMapValues", new GetMapValues());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:10,代码来源:MapFunctions.cs

示例3: Register

 /// <summary>
 /// Add built-in array functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.combine", new Combine());
     scope.SetValue("l3.addToArray", new AddToArray());
     scope.SetValue("l3.arrayToArray", new ArrayToArray());
     scope.SetValue("l3.foldLeft", new FoldLeft());
     scope.SetValue("l3.foldRight", new FoldRight());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:11,代码来源:ArrayFunctions.cs

示例4: Register

 /// <summary>
 /// Add built-in Value functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.getScope", new GetScope());
     scope.SetValue("l3.popScope", new PopScope());
     scope.SetValue("l3.callWithScope", new CallWithScope());
     scope.SetValue("l3.evalWithScope", new EvalWithScope());
     scope.SetValue("l3.onScopeExit", new OnScopeExit());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:11,代码来源:ScopeFunctions.cs

示例5: Register

 /// <summary>
 /// Add built-in Value functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.equal?", new IsEqual());
     scope.SetValue("l3.anyEqual?", new IsAnyEqual());
     scope.SetValue("l3.and?", new LogicalAnd());
     scope.SetValue("l3.or?", new LogicalOr());
     scope.SetValue("l3.not?", new LogicalNot());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:11,代码来源:Logic.cs

示例6: AddToScope

 /// <summary>Add values from one scope onto another</summary>
 internal static void AddToScope(IScope from, IScope to)
 {
     Dictionary<string, Value> dict = from.AsMap.Raw;
     if (dict != null)
         foreach (string key in dict.Keys)
             to.SetValue(key, dict[key]);
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:8,代码来源:Utility.cs

示例7: Register

 /// <summary>
 /// Add built-in functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.toString", new ConvertToString());
     scope.SetValue("l3.intToChar", new IntToChar());
     scope.SetValue("l3.stringConcat", new StringConcat());
     scope.SetValue("l3.formatTable", new FormatTable());
     scope.SetValue("l3.formatTable2", new FormatTable2());
     scope.SetValue("l3.stringToArray", new StringToArray());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:12,代码来源:String.cs

示例8: Register

 /// <summary>
 /// Add built-in math functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.add", new Add());
     scope.SetValue("l3.addArray", new AddArray());
     scope.SetValue("l3.subtract", new Subtract());
     scope.SetValue("l3.multiply", new Multiply());
     scope.SetValue("l3.multiplyArray", new MultiplyArray());
     scope.SetValue("l3.divide", new Divide());
     scope.SetValue("l3.modulo", new Modulo());
     scope.SetValue("l3.sqrt", new SquareRoot());
     scope.SetValue("l3.power", new Power());
     scope.SetValue("l3.lt", new LessThan());
     scope.SetValue("l3.gt", new GreaterThan());
     scope.SetValue("l3.floor", new Floor());
     scope.SetValue("l3.ceiling", new Ceiling());
     scope.SetValue("l3.bitAnd", new BitAnd());
     scope.SetValue("l3.bitOr", new BitOr());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:21,代码来源:Math.cs

示例9: Register

 /// <summary>
 /// Add built-in IO functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.print", new Print());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:7,代码来源:IO.cs

示例10: Do

        /// <summary>
        /// Add a new function (prefix, postfix or infix), to the scope
        /// </summary>
        /// <param name="scope">scope to add function definition to</param>
        /// <param name="name">name of the new function</param>
        /// <param name="pattern1">null, variable name, or pattern to match for previous token</param>
        /// <param name="pattern2">null, variable name, or pattern to match for next token</param>
        /// <param name="rawLines">lines to parse and run when function is invoked</param>
        /// <param name="precedence">the order in which function should be evaled</param>
        internal static void Do(IScope scope, string name,
			Value pattern1, Value pattern2, List<Value> rawLines, Order precedence)
        {
            ValueFunction func = new UserFunction(pattern1, pattern2, rawLines, precedence);
            scope.SetValue(name, func);
        }
开发者ID:loki3,项目名称:loki-pl1,代码行数:15,代码来源:CreateFunction.cs

示例11: Register

 /// <summary>
 /// Add built-in module functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.loadModule", new LoadModule());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:7,代码来源:ModuleFunctions.cs

示例12: Eval

            internal override Value Eval(Value arg, IScope scope)
            {
                // extract the delimiter strings
                string delims = arg.AsString;
                string start = delims.Substring(0, delims.Length / 2);
                string end = delims.Substring(delims.Length / 2, delims.Length - delims.Length / 2);

                // create the delimiter & store it on the current scope
                ValueDelimiter value = new ValueDelimiter(end, DelimiterType);
                scope.SetValue(start, value);
                return value;
            }
开发者ID:loki3,项目名称:loki-pl1,代码行数:12,代码来源:Values.cs

示例13: Register

 /// <summary>
 /// Add built-in Value functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.setValue", new SetValue());
     scope.SetValue("l3.getValue", new GetValue());
     scope.SetValue("l3.copy", new Copy());
     scope.SetValue("l3.createMap", new CreateMap());
     scope.SetValue("l3.createRange", new CreateRange());
     scope.SetValue("l3.createFunction", new CreateFunction());
     scope.SetValue("l3.createDelimiter", new CreateDelimiter());
     scope.SetValue("l3.createEvalDelimiter", new CreateEvalDelimiter());
     scope.SetValue("l3.createArrayDelimiter", new CreateArrayDelimiter());
     scope.SetValue("l3.getCount", new GetCount());
     scope.SetValue("l3.getMetadata", new GetMetadata());
     scope.SetValue("l3.getType", new GetTypeFunction());
     scope.SetValue("l3.getFunctionBody", new GetFunctionBody());
     scope.SetValue("l3.eval", new EvalValue());
     scope.SetValue("l3.bindFunction", new BindFunction());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:21,代码来源:Values.cs

示例14: Register

 /// <summary>
 /// Add built-in If functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.loop", new BasicLoop());
     scope.SetValue("l3.forEach", new ForEach());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:8,代码来源:Loop.cs

示例15: Register

 /// <summary>
 /// Add built-in If functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.ifBody", new IfBody());
     scope.SetValue("l3.ifValue", new IfValue());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:8,代码来源:Conditional.cs


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