Пример #1
0
        private InternRoot <object> CreateProtocolInternRoot(Lifetime lifetime)
        {
            var root = new InternRoot <object>();

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

            return(root);
        }
Пример #2
0
 public HeavySingleContextHandler(RdContext <T> context, ProtocolContexts handler)
 {
     myHandler                    = handler;
     Context                      = context;
     myInternRoot                 = new InternRoot <T>(context.ReadDelegate, context.WriteDelegate);
     myProtocolValueSet           = new RdSet <T>(context.ReadDelegate, context.WriteDelegate, new ViewableSet <T>(new ConcurrentSet <T>()));
     myModificationCookieValueSet = new ModificationCookieViewableSet <T, ProtocolContexts.SendWithoutContextsCookie>(myHandler.CreateSendWithoutContextsCookie, myProtocolValueSet);
 }
Пример #3
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);
        }
Пример #4
0
        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);
        }