Exemple #1
0
        protected void WithExtsProxy <T1, T2>(Action <T1, T2> run) where T1 : RdBindableBase where T2 : class
        {
            var c = CFacade.Activator.ActivateBind <T1>(TestLifetime, ClientProtocol);
            var s = SFacade.ActivateProxy <T2>(TestLifetime, ServerProtocol);

            run(c, s);
        }
Exemple #2
0
    private static void RunApplication(bool isServer, ReflectionSerializersFacade facade, Lifetime lifetime, Protocol protocol)
    {
      IRootExt root;
      if (isServer)
      {
        root = facade.ActivateProxy<IRootExt>(lifetime, protocol);
      }
      else
      {
        root = facade.InitBind(new RootExt(), lifetime, protocol);
      }
      (root as RdExtReflectionBindableBase).Connected.Advise(lifetime, v => Console.WriteLine("RootExt connected: " + v));

      root.OnChar.Advise(lifetime, Console.Write);
      OnChar += c => root.OnChar.Fire(c);
    }
Exemple #3
0
        private static void RunApplication(bool isServer, ReflectionSerializersFacade facade, Lifetime lifetime, Protocol protocol)
        {
            IRootExt root;

            if (isServer)
            {
                root = facade.ActivateProxy <IRootExt>(lifetime, protocol);
            }
            else
            {
                root = facade.InitBind(new RootExt(), lifetime, protocol);
            }

            root.OnChar.Advise(lifetime, Console.Write);
            OnChar += c => root.Greet(c.ToString());
        }