示例#1
0
        protected virtual void OnStatusUpdated(ProfilerState state, string msg = null)
        {
            // copy to avoid race conditions - we're playing it safe :)
            // at least according to: http://msdn.microsoft.com/en-us/library/w369ty8x.aspx
            EventHandler <ProfilerStatusUpdatedArgs> handler = StatusUpdated;

            // Event will be null if there are no subscribers
            if (handler != null)
            {
                // Use the () operator to raise the event.
                handler(this, new ProfilerStatusUpdatedArgs(state, msg));
            }
        }
示例#2
0
        public Profiler(ProfilerState profilerState, Log log)
        {
            this.log = log;
            this.log.AddLine("New Profiler Created");
            Trackers  = new List <Tracker>();
            Markers   = new List <Marker>();
            Stopwatch = new Stopwatch();
            State     = profilerState;
            Stopwatch.Reset();
            CaptureInterval = 500;

            updateTimer          = new Timer();
            updateTimer.Interval = 10;
            updateTimer.Tick    += UpdateLoop;
            updateTimer.Enabled  = true;
            name = "*";
        }
示例#3
0
 public ProfilerStatusUpdatedArgs(ProfilerState state, string msg)
 {
     State   = state;
     Message = msg;
 }
		public ProfilerStateEventArgs (ProfilerState state)
		{
			this.state = state;
		}
 public ProfilerStatusUpdatedArgs(ProfilerState state, string msg)
 {
     State = state;
     Message = msg;
 }
        protected virtual void OnStatusUpdated(ProfilerState state, string msg = null)
        {
            // copy to avoid race conditions - we're playing it safe :)
            // at least according to: http://msdn.microsoft.com/en-us/library/w369ty8x.aspx
            EventHandler<ProfilerStatusUpdatedArgs> handler = StatusUpdated;

            // Event will be null if there are no subscribers
            if (handler != null)
            {

                // Use the () operator to raise the event.
                handler(this, new ProfilerStatusUpdatedArgs(state, msg));
            }
        }
示例#7
0
 public ProfilerStateEventArgs(ProfilerState state)
 {
     this.state = state;
 }