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


C# IoObject.rawGetSlot方法代码示例

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


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

示例1: localsUpdateSlot

 public static IoObject localsUpdateSlot(IoObject target, IoObject locals, IoObject message)
 {
     IoMessage m = message as IoMessage;
     IoSeq slotName = m.localsSymbolArgAt(locals, 0);
     if (slotName == null) return target;
     IoObject obj = target.rawGetSlot(slotName);
     if (obj != null)
     {
         IoObject slotValue = m.localsValueArgAt(locals, 1);
         target.slots[slotName] = slotValue;
         return slotValue;
     }
     else
     {
         IoObject theSelf = target.rawGetSlot(target.state.selfMessage.messageName);
         if (theSelf != null)
         {
             return theSelf.perform(theSelf, locals, m);
         }
     }
     return target.state.ioNil;
 }
开发者ID:devaspot,项目名称:io,代码行数:22,代码来源:IoObject.cs

示例2: slotAsyncCall

        public static IoObject slotAsyncCall(IoObject target, IoObject locals, IoObject message)
        {
            IoMessage msg = message as IoMessage;
            IoMessage aMessage = msg.rawArgAt(0);
            IoObject context = target;
            if (msg.args.Count >= 2)
            {
                context = msg.localsValueArgAt(locals, 1);
            }

            IoBlock o = target.rawGetSlot(aMessage.messageName) as IoBlock;
            if (o != null)
            {
                IoMessage mmm = o.containedMessage;
                mmm.async = true;

                IoContext ctx = new IoContext();
                ctx.target = context;
                ctx.locals = target;
                ctx.message = mmm;
                mmm.async = true;
                IoState state = target.state;
                IoObject future = IoObject.createObject(state);
                IEnumerator e = IoMessage.asyncCall(ctx, future);
                state.contextList.Add(e);
                return future;
            }
            else
            {
                IoCFunction cf = target.rawGetSlot(aMessage.messageName) as IoCFunction;
                if (cf != null)
                {
                    cf.async = true;
                    return cf.activate(target, locals, aMessage, null);
                }
            }
            return aMessage.localsPerformOn(target, locals);
        }
开发者ID:devaspot,项目名称:io,代码行数:38,代码来源:IoObject.cs

示例3: slotUpdateSlot

        public static IoObject slotUpdateSlot(IoObject target, IoObject locals, IoObject message)
        {
            IoMessage m = message as IoMessage;
            IoSeq slotName = m.localsSymbolArgAt(locals, 0);
            IoObject slotValue = m.localsValueArgAt(locals, 1);
            if (slotName == null) return target;

            if (target.rawGetSlot(slotName) != null)
            {
                target.slots[slotName] = slotValue;
            }
            else
            {
                Console.WriteLine("Slot {0} not found. Must define slot using := operator before updating.", slotName.value);
            }

            return slotValue;
        }
开发者ID:devaspot,项目名称:io,代码行数:18,代码来源:IoObject.cs

示例4: slotGetSlot

 public static IoObject slotGetSlot(IoObject target, IoObject locals, IoObject message)
 {
     IoMessage m = message as IoMessage;
     IoSeq slotName = m.localsSymbolArgAt(locals, 0);
     IoObject slot = target.rawGetSlot(slotName);
     return slot == null ? target.state.ioNil : slot;
 }
开发者ID:devaspot,项目名称:io,代码行数:7,代码来源:IoObject.cs


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