Exemplo n.º 1
0
        /// <summary>
        /// Makes an instance with a predefined problem description. Note that for aux.error 
        /// (see <see cref="Data.Error.AuxMessage"/>) special separate constructor of
        /// <see cref="TrackerState"/> should be used - one that takes string.
        /// </summary>
        /// <param name="errCode"></param>
        /// <param name="tag">Debug string specific to the foreign system, see also <see cref="Tag"/> for details.</param>
        public TrackerState( Data.ErrorType errCode, string tag )
        {
            if ( errCode == Data.ErrorType.AuxError )
            throw new ArgumentException(
              string.Format( "This constructor doesn't accept error state {0}, another constructor should be used for that.", errCode ) );

              Error = new Data.Error( errCode, null );
              Tag = tag;
        }
Exemplo n.º 2
0
        protected TrackerState( Data.Position position, Data.Error error, string tag )
        {
            if ( position == null && error == null )
            throw new ArgumentException( "At least one parameter should be not null" );

              Position = position;
              Error = error;
              Tag = tag;
        }
Exemplo n.º 3
0
        /// <summary>Makes an instance with aux.error message.</summary>
        /// <param name="auxErrorMessage"></param>
        /// <param name="tag">Debug string specific to the foreign system, see also <see cref="Tag"/> for details.</param>
        public TrackerState( string auxErrorMessage, string tag )
        {
            if ( auxErrorMessage == null )
            throw new ArgumentNullException( "auxErrorMessage" );

              Error = new Data.Error( Data.ErrorType.AuxError, auxErrorMessage );
              Tag = tag;
        }