예제 #1
0
        public static void DoTrack(this NativeActivityContext context, IDbContext dbContext, TrackRecord record)
        {
            if (record == null)
            {
                return;
            }
            var process = Process.GetProcessFromContext(context);

            record.ProcessId = process.Id;
            record.Update(dbContext);
            context.TrackRecord($"TrackRecord written successfully {{Id:{record.Id}}}");
        }
예제 #2
0
파일: Track.cs 프로젝트: sshaddicts/A2v10
        protected override void Execute(CodeActivityContext context)
        {
            var    process = Process.GetProcessFromContext(context);
            String msg     = Message.Get <String>(context);

            var track = new TrackRecord()
            {
                ProcessId = process.Id,
                Message   = msg
            };

            track.Update(process.DbContext);
        }
예제 #3
0
        void DoTrack(IDbContext dbContext, TrackRecord record, NativeActivityContext context, Int64?userId = null)
        {
            if (record == null)
            {
                return;
            }
            var process = Process.GetProcessFromContext(context.DataContext);

            record.ProcessId = process.Id;
            if (record.UserId == 0 && userId.HasValue)
            {
                record.UserId = userId.Value;
            }
            record.Update(dbContext);
            TrackRecord(context, $"TrackRecord written successfully {{Id:{record.Id}}}");
        }