partial void DeleteDatabaseTimeline(DatabaseTimeline instance);
 partial void InsertDatabaseTimeline(DatabaseTimeline instance);
 partial void UpdateDatabaseTimeline(DatabaseTimeline instance);
Ejemplo n.º 4
0
        /// <summary>
        /// 時間軸としてのTimelineにロギングする
        /// </summary>
        /// <param name="database"></param>
        private void AddingTimeline(int appId, TimeSpan activeInterval)
        {
            DatabaseTimeline log = new DatabaseTimeline();

            log.AppId = appId;
            log.Today = DateTime.Today;
            log.Now = DateTime.Now;
            log.UsageTime = activeInterval.ToString();

            RetryHelper.Retry(() =>
            {
                database.DatabaseTimeline.InsertOnSubmit(log);
                database.SubmitChanges();
            },
            ex => ExceptionDispatchInfo.Capture(ex).Throw(),
            ex => ex is SqlException);

            //Timeline更新のイベント発生
            if (TimelineLog_Updated != null)
            {
                TimelineLog_Updated(this, EventArgs.Empty);
            }
        }