コード例 #1
0
ファイル: LogAI.cs プロジェクト: sharon-jm/Norad-Eduapp4syria
        public void LogInfo(string session, InfoEvent infoEvent, string parametersString = "")
        {
            if (AppManager.I.DB == null)
            {
                Debug.Log("No DB to log to. Player profile is probably not set");
                return;
            }
            var data = new LogInfoData(session, infoEvent, parametersString);

            db.Insert(data);
        }
コード例 #2
0
        public void LogInfo(int appSession, InfoEvent infoEvent, string parametersString = "")
        {
            if (!AppManager.I.DB.HasLoadedPlayerProfile())
            {
                Debug.Log("No player profile DB to log to. Player profile is probably not set");
                return;
            }

            var data = new LogInfoData(appSession, infoEvent, AppManager.I.NavigationManager.GetCurrentScene(), parametersString);

            db.Insert(data);
        }
コード例 #3
0
        public void TestInsertLogInfoData()
        {
            var newData = new LogInfoData();

            newData.AppSession = GenericHelper.GetTimestampForNow();
            newData.Timestamp  = GenericHelper.GetTimestampForNow();

            newData.Event          = InfoEvent.Book;
            newData.AdditionalData = "test:1";

            this.dbManager.Insert(newData);
            PrintOutput("Inserted new LogInfoData: " + newData.ToString());
        }
コード例 #4
0
        public void TestInsertLogInfoData()
        {
            var newData = new LogInfoData();

            newData.Session   = UnityEngine.Random.Range(0, 10).ToString();
            newData.Timestamp = GenericUtilities.GetTimestampForNow();

            newData.Event      = InfoEvent.Book;
            newData.Parameters = "test:1";

            this.dbManager.Insert(newData);
            PrintOutput("Inserted new LogInfoData: " + newData.ToString());
        }
コード例 #5
0
        public void InsertDynamicDB()
        {
            var dbManager = new DatabaseManager();

            dbManager.LoadDatabaseForPlayer("TEST");
            var newLogInfoData = new LogInfoData();

            newLogInfoData.AppSession     = GenericHelper.GetTimestampForNow();
            newLogInfoData.Timestamp      = GenericHelper.GetTimestampForNow();
            newLogInfoData.Event          = InfoEvent.Book;
            newLogInfoData.AdditionalData = "test:1";
            dbManager.Insert(newLogInfoData);
        }
コード例 #6
0
 public static LogInfo ToModel(this LogInfoData node)
 {
     return(new LogInfo()
     {
         Id = node.Id,
         MeterId = node.MeterId,
         GroupId = node.GroupId,
         ActionId = node.ActionId,
         UpdatingTime = node.UpdatingTime,
         IsSuccess = node.IsSuccess,
         OperatorId = node.OperatorId,
         OperatorName = node.OperatorName,
         ConfigName = node.ConfigName,
     });
 }