Exemplo n.º 1
0
        public BrainProxy GetBrainProxy(Guid guid)
        {
            BrainProxy proxy = null;

            Brains.TryGetValue(guid, out proxy);
            return(proxy);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }