System.Configuration.ConfigurationErrorsException.ConfigurationErrorsException C# (CSharp) Метод

ConfigurationErrorsException() защищенный Метод

protected ConfigurationErrorsException ( SerializationInfo info, StreamingContext context ) : System.Configuration.Internal
info SerializationInfo
context System.Runtime.Serialization.StreamingContext
Результат System.Configuration.Internal
        protected ConfigurationErrorsException(SerializationInfo info, StreamingContext context) : 
                base(info, context) { 

            string  firstFilename;
            int     firstLine;
            int     count;
            string  numPrefix;
            string  currentType;
            Type    currentExceptionType;

            // Retrieve out members
            firstFilename = info.GetString(SERIALIZATION_PARAM_FILENAME);
            firstLine     = info.GetInt32(SERIALIZATION_PARAM_LINE);
            
            Init(firstFilename, firstLine);

            // Retrieve errors for _errors object
            count = info.GetInt32(SERIALIZATION_PARAM_ERROR_COUNT);
            
            if (count != 0) {
                _errors = new ConfigurationException[count];
                
                for (int i = 0; i < count; i++) {
                    numPrefix = i.ToString(CultureInfo.InvariantCulture);

                    currentType = info.GetString(numPrefix + SERIALIZATION_PARAM_ERROR_TYPE);
                    currentExceptionType = Type.GetType(currentType, true);

                    // Only allow our exception types
                    if ( ( currentExceptionType != typeof( ConfigurationException ) ) &&
                         ( currentExceptionType != typeof( ConfigurationErrorsException ) ) ) {
                        throw ExceptionUtil.UnexpectedError( "ConfigurationErrorsException" );
                    }

                    _errors[i] = (ConfigurationException) 
                                    info.GetValue(numPrefix + SERIALIZATION_PARAM_ERROR_DATA,
                                                  currentExceptionType);
                }
            }
        }

Same methods

ConfigurationErrorsException::ConfigurationErrorsException ( ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( ArrayList coll ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( ConfigurationException e ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( ICollection coll ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, Exception inner ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, Exception inner, IConfigErrorInfo errorInfo ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, Exception inner, XmlNode node ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, Exception inner, XmlReader reader ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, Exception inner, string filename, int line ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, IConfigErrorInfo errorInfo ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, XmlNode node ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, XmlReader reader ) : System.Configuration.Internal
ConfigurationErrorsException::ConfigurationErrorsException ( string message, string filename, int line ) : System.Configuration.Internal