예제 #1
0
        public void SaveAndLoad()
        {
            var campaign = "campaign";
            var name     = "save1";
            var data1    = new DataContainer {
                value = 42
            };

            Assert.True(_service.Save(campaign, name, data1));
            Assert.True(_service.Load(campaign, name, out DataContainer data2));

            Assert.AreEqual(data1.value, data2.value);
        }
예제 #2
0
        public async void Login(PassportVo tryLogin)
        {
            this.userVo = await this.net.Send <UserVo>(ActionIDDefine.Login, new Dictionary <string, string> {
                { "Pid", tryLogin.username },
                { "Pwd", tryLogin.password }
            }, (ErrorInfo e) =>
            {
                App.Facade.SendNotification(NoticeConst.LOGIN_FAILED, e);
            });

            save.Save <string>("pid", tryLogin.username);
            Facade.SendNotification(NoticeConst.LOGIN_SUCCESS);
        }
예제 #3
0
 void OnGUI()
 {
     GUILayout.BeginVertical();
     if (GUILayout.Button("Modify"))
     {
         someService.ChangeValues();
     }
     if (GUILayout.Button("Save"))
     {
         saveService.Save(someService);
     }
     GUILayout.EndVertical();
 }
예제 #4
0
        public ServiceDetail SaveService(SaveService ss)
        {
            Debug.Enter();
            ServiceDetail sd = new ServiceDetail();

            try
            {
                ss.Save();
                sd.BusinessServices = ss.BusinessServices;
            }
            catch (Exception e)
            {
                DispositionReport.Throw(e);
            }

            return(sd);
        }
예제 #5
0
 public void Save()
 {
     saveService.Save();
 }
예제 #6
0
 public Record Update([FromBody] Record record)
 {
     return(SaveService.Save(record));
 }