Example #1
0
 void Regulus.Remoting.PhotonExpansion.IPhotonFramework.ObtainController(Regulus.Remoting.Soul.SoulProvider provider)
 {
     var soul = new CTestSoul();
     provider.Bind<TestRemotingCommon.ITest>(soul);
     soul.invoke();
     //provider.Unbind<TestRemotingCommon.ITest>(soul);
 }
Example #2
0
 void Regulus.Game.ICore.ObtainController(Regulus.Remoting.ISoulBinder binder)
 {
     binder.Bind<TestNativeGameCore.IMessager>(this);
     binder.BreakEvent += () =>
     {
         binder.Unbind<TestNativeGameCore.IMessager>(this);
     };
 }
Example #3
0
        // 如果有使用者連線進來則會呼叫此方法
        // Call this method if there is a user connection.
        void Regulus.Remoting.ICore.AssignBinder(Regulus.Remoting.ISoulBinder binder)
        {
            // 綁定_SampleClass客戶端將會收到Custom.ISample實體
            // Binding _SampleClass client will receive Custom.ISample entities
            binder.Bind<Custom.ISample>(_SampleClass);

            // 如果客戶端斷線則會發生此事件
            // This event occurs if the client is disconnected
            binder.BreakEvent += () => { _View.WriteLine("There is a user to leave"); };

            _View.WriteLine("There is a user to join.");
        }