示例#1
0
        public BrainProxy GetBrainProxy(Guid guid)
        {
            BrainProxy proxy = null;

            Brains.TryGetValue(guid, out proxy);
            return(proxy);
        }
示例#2
0
        public BrainProxy InternBrain(Guid brainGuid)
        {
            BrainProxy interned = null;

            if (!Brains.TryGetValue(brainGuid, out interned))
            {
                interned = new BrainProxy(this, Channel, brainGuid);
                Brains.Add(brainGuid, interned);
            }
            return(interned);
        }
示例#3
0
        //
        public void OnContextCreated(Guid brainId, Guid contextId, Guid parentId, string label)
        {
            ProcessProxy context = InternContext(contextId);

            if (contextId != parentId)
            {
                context.Parent = GetContextProxy(parentId);
            }
            context.Label = label;
            //
            BrainProxy brain = GetBrainProxy(brainId);

            brain.FireContextCreated(context);
        }