public CompilationFailedEventArgs(IList <CompilationError> errors)
        {
            if (errors == null)
            {
                throw ExceptionBuilder.ArgumentNull("errors");
            }

            _compilationErrors = new CompilationErrorCollection(errors);
        }
Exemple #2
0
        internal CompilationException(string message, IList <CompilationError> errors)
            : base(message)
        {
            if (errors == null)
            {
                throw ExceptionBuilder.ArgumentNull("errors");
            }

            _compilationErrors = new CompilationErrorCollection(errors);
        }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CompilationException"/> class with serialized data.
 /// </summary>
 /// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
 /// <param name="context"> The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
 /// <exception name="ArgumentNullException">The <paramref name="info"/> parameter is <see langword="null"/>.</exception>
 /// <exception name="SerializationException">The class name is <see langword="null"/> or <see cref="Exception.HResult"/> is zero (<c>0</c>).</exception>
 private CompilationException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _compilationErrors = (CompilationErrorCollection)info.GetValue("CompilationErrors", typeof(CompilationErrorCollection));
 }