コード例 #1
0
        public bool AddProfileRecord(LogProfile profile)
        {
            bool result;

            try
            {
                this.LogProfiles.InsertOnSubmit(profile);
                result = true;
            }
            catch (Exception value)
            {
                Console.WriteLine(value);
                result = false;
            }
            return(result);
        }
コード例 #2
0
        public void Stop()
        {
            this.watch.Stop();
            LogProfile item = new LogProfile
            {
                TimeStamp          = DateTime.Now,
                ElapsedMillisecond = this.watch.ElapsedMilliseconds,
                ElapsedTicks       = this.watch.ElapsedTicks,
                EntitySize         = 0,
                Operation          = this.operation
            };

            this.profileCache.Add(item);
            this.watch.Reset();
            this.isWorking = false;
        }