コード例 #1
0
ファイル: Client.cs プロジェクト: botworx/botworx-dotcore
        public ProcessProxy GetContextProxy(Guid guid)
        {
            ProcessProxy proxy = null;

            Contexts.TryGetValue(guid, out proxy);
            return(proxy);
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: botworx/botworx-dotcore
        public ProcessProxy InternContext(Guid contextGuid)
        {
            ProcessProxy interned = null;

            if (!Contexts.TryGetValue(contextGuid, out interned))
            {
                interned = new ProcessProxy(this, Channel, contextGuid);
                Contexts.Add(contextGuid, 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);
        }
コード例 #4
0
ファイル: BrainProxy.cs プロジェクト: botworx/botworx-dotcore
 //Invoked by client.
 public void FireContextCreated(ProcessProxy context)
 {
     ContextCreated(context);
 }