示例#1
0
        public void Commit(ClientActivated cao)
        {
            //Remoting.Server.WellKnownSingleton wko = new Remoting.Server.WellKnownSingleton();

            WellKnownSingleton wko =
                (WellKnownSingleton)Activator.GetObject(
                    typeof(WellKnownSingleton),
                    "http://localhost:13000/MyURITON.soap"
                    );

            //wko = (WellKnownSingleton)Activator.GetObject(typeof(WellKnownSingleton), "http://localhost:13000/MyURI.soap");
            foreach (var v in cao.ChangeTransaction)
            {
                if (v.Old == null)
                {
                    wko.Create(v.New);
                }
                else
                {
                    if (v.New == null)
                    {
                        wko.Delete(v.Old);
                    }
                    else
                    {
                        wko.Update(v.Old, v.New);
                    }
                }
            }
            Console.WriteLine("Remoting.Server.WellKnownSinglecall.Commit(ClientActivated cao)");
        }
示例#2
0
 private void OnClientActivated()
 {
     try
     {
         ClientActivated?.Invoke(this, new EventArgs());
     }
     catch (Exception ex)
     {
         ex.Log();
     }
 }
示例#3
0
 public void NotifyClientActivated()
 {
     try
     {
         ClientActivated?.Invoke(this, EventArgs.Empty);
     }
     catch (Exception ex)
     {
         ex.Log();
     }
     SendCommand("ACTV",
                 (sender, e) =>
     {
         // NOP
     });
 }
示例#4
0
 public void Rollback(ClientActivated cao)
 {
     cao.Clear();
     Console.WriteLine("Remoting.Server.WellKnownSinglecall.Clear()");
 }