public void Register( ICommand command ) { if ( s_current == null ) { s_root.Child.Add( command ); command.Parent = s_root; } else { s_current.Child.Insert( 0, command ); command.Parent = s_current; } s_current = command; } }