66using System ;
77using System . Collections . Concurrent ;
88using System . Collections . Generic ;
9- using System . Diagnostics ;
109using System . Linq ;
1110using System . Linq . Expressions ;
1211using System . Reflection ;
@@ -195,7 +194,7 @@ protected void Goto(Type s)
195194 {
196195 // If the state is not a state of the monitor, then report an error and exit.
197196 this . Assert ( StateTypeMap [ this . GetType ( ) ] . Any ( val => val . DeclaringType . Equals ( s . DeclaringType ) && val . Name . Equals ( s . Name ) ) ,
198- "Monitor '{0}' is trying to transition to non-existing state '{1}'." , this . Id , s . Name ) ;
197+ "Monitor '{0}' is trying to transition to non-existing state '{1}'." , this . GetType ( ) . Name , s . Name ) ;
199198 this . Raise ( new GotoStateEvent ( s ) ) ;
200199 }
201200
@@ -297,7 +296,7 @@ private void HandleEvent(Event e)
297296 /// <summary>
298297 /// Invokes an action.
299298 /// </summary>
300- [ DebuggerStepThrough ]
299+ [ System . Diagnostics . DebuggerStepThrough ]
301300 private void Do ( string actionName )
302301 {
303302 MethodInfo action = this . ActionMap [ actionName ] ;
@@ -308,7 +307,7 @@ private void Do(string actionName)
308307 /// <summary>
309308 /// Executes the on entry function of the current state.
310309 /// </summary>
311- [ DebuggerStepThrough ]
310+ [ System . Diagnostics . DebuggerStepThrough ]
312311 private void ExecuteCurrentStateOnEntry ( )
313312 {
314313 this . Runtime . NotifyEnteredState ( this ) ;
@@ -330,7 +329,7 @@ private void ExecuteCurrentStateOnEntry()
330329 /// <summary>
331330 /// Executes the on exit function of the current state.
332331 /// </summary>
333- [ DebuggerStepThrough ]
332+ [ System . Diagnostics . DebuggerStepThrough ]
334333 private void ExecuteCurrentStateOnExit ( string eventHandlerExitActionName )
335334 {
336335 this . Runtime . NotifyExitedState ( this ) ;
@@ -360,7 +359,7 @@ private void ExecuteCurrentStateOnExit(string eventHandlerExitActionName)
360359 /// <summary>
361360 /// Executes the specified action.
362361 /// </summary>
363- [ DebuggerStepThrough ]
362+ [ System . Diagnostics . DebuggerStepThrough ]
364363 private void ExecuteAction ( MethodInfo action )
365364 {
366365 try
@@ -598,7 +597,7 @@ internal void InitializeStateInformation()
598597 ( state . IsCold && ! state . IsHot ) ||
599598 ( ! state . IsCold && state . IsHot ) ||
600599 ( ! state . IsCold && ! state . IsHot ) ,
601- "State '{0}' of monitor '{1}' cannot be both cold and hot." , type . FullName , this . Id ) ;
600+ "State '{0}' of monitor '{1}' cannot be both cold and hot." , type . FullName , this . GetType ( ) . Name ) ;
602601
603602 StateMap [ monitorType ] . Add ( state ) ;
604603 }
@@ -655,8 +654,8 @@ internal void InitializeStateInformation()
655654 }
656655
657656 var initialStates = StateMap [ monitorType ] . Where ( state => state . IsStart ) . ToList ( ) ;
658- this . Assert ( initialStates . Count != 0 , "Monitor '{0}' must declare a start state." , this . Id ) ;
659- this . Assert ( initialStates . Count == 1 , "Monitor '{0}' can not declare more than one start states." , this . Id ) ;
657+ this . Assert ( initialStates . Count != 0 , "Monitor '{0}' must declare a start state." , this . GetType ( ) . Name ) ;
658+ this . Assert ( initialStates . Count == 1 , "Monitor '{0}' can not declare more than one start states." , this . GetType ( ) . Name ) ;
660659
661660 this . ConfigureStateTransitions ( initialStates . Single ( ) ) ;
662661 this . State = initialStates . Single ( ) ;
@@ -750,7 +749,7 @@ private void ReportUnhandledException(Exception ex, string actionName)
750749 {
751750 var state = this . CurrentState is null ? "<unknown>" : this . CurrentStateName ;
752751 this . Runtime . WrapAndThrowException ( ex , $ "Exception '{ ex . GetType ( ) } ' was thrown " +
753- $ "in monitor '{ this . Id } ', state '{ state } ', action '{ actionName } ', " +
752+ $ "in monitor '{ this . GetType ( ) . Name } ', state '{ state } ', action '{ actionName } ', " +
754753 $ "'{ ex . Source } ':\n " +
755754 $ " { ex . Message } \n " +
756755 $ "The stack trace is:\n { ex . StackTrace } ") ;
@@ -761,7 +760,7 @@ private void ReportUnhandledException(Exception ex, string actionName)
761760 /// </summary>
762761 internal HashSet < string > GetAllStates ( )
763762 {
764- this . Assert ( StateMap . ContainsKey ( this . GetType ( ) ) , "Monitor '{0}' hasn't populated its states yet." , this . Id ) ;
763+ this . Assert ( StateMap . ContainsKey ( this . GetType ( ) ) , "Monitor '{0}' hasn't populated its states yet." , this . GetType ( ) . Name ) ;
765764
766765 var allStates = new HashSet < string > ( ) ;
767766 foreach ( var state in StateMap [ this . GetType ( ) ] )
@@ -777,7 +776,7 @@ internal HashSet<string> GetAllStates()
777776 /// </summary>
778777 internal HashSet < Tuple < string , string > > GetAllStateEventPairs ( )
779778 {
780- this . Assert ( StateMap . ContainsKey ( this . GetType ( ) ) , "Monitor '{0}' hasn't populated its states yet." , this . Id ) ;
779+ this . Assert ( StateMap . ContainsKey ( this . GetType ( ) ) , "Monitor '{0}' hasn't populated its states yet." , this . GetType ( ) . Name ) ;
781780
782781 var pairs = new HashSet < Tuple < string , string > > ( ) ;
783782 foreach ( var state in StateMap [ this . GetType ( ) ] )
0 commit comments