Example #1
0
        private InternRoot CreateProtocolInternRoot(Lifetime lifetime)
        {
            var root = new InternRoot();

            root.RdId = RdId.Nil.Mix(ProtocolInternRootRdId);
            Scheduler.Queue(() =>
            {
                root.Bind(lifetime, this, ProtocolInternRootRdId);
            });
            return(root);
        }
Example #2
0
        protected override void Init(Lifetime lifetime)
        {
            base.Init(lifetime);

            Assertion.Assert(myHandler.IsSendWithoutContexts, "Must bind context handler without sending contexts to prevent reentrancy");

            myInternRoot.RdId       = RdId.Mix("InternRoot");
            myProtocolValueSet.RdId = RdId.Mix("ValueSet");

            myInternRoot.Bind(lifetime, this, "InternRoot");
            myProtocolValueSet.Bind(lifetime, this, "ValueSet");

            myProtocolValueSet.Advise(lifetime, HandleProtocolSetEvent);
        }
Example #3
0
File: Protocol.cs Project: yvvan/rd
        private InternRoot <object> CreateProtocolInternRoot(Lifetime lifetime)
        {
            var root = new InternRoot <object>();

            root.RdId = RdId.Nil.Mix(ProtocolInternRootRdId);

            Scheduler.InvokeOrQueue(() =>
            {
                if (!lifetime.IsAlive)
                {
                    return;
                }
                root.Bind(lifetime, this, ProtocolInternRootRdId);
            });
            return(root);
        }