public bool AddProfileRecord(LogProfile profile) { bool result; try { this.LogProfiles.InsertOnSubmit(profile); result = true; } catch (Exception value) { Console.WriteLine(value); result = false; } return(result); }
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; }