Пример #1
0
        /// <summary>
        /// Creates and inserts a <see cref="ICompilerModelError{T1}"/>
        /// with the <paramref name="message"/>, <paramref name="item1"/>
        /// and <paramref name="replacements"/> provided.
        /// </summary>
        /// <typeparam name="T1">The kind of <paramref name="item1"/> used to
        /// reference to the primary model element which caused the error.</typeparam>
        /// <param name="message">The <see cref="ICompilerReferenceError"/> value associated which
        /// defines the base message text.</param>
        /// <param name="item1">The primary target of the error.</param>
        /// <param name="replacements">A sequence of <see cref="String"/> values
        /// which denote the data points to replace within the <paramref name="message"/> provided.</param>
        /// <returns>A <see cref="ICompilerModelError{T1}"/> which represents the error.</returns>
        public ICompilerModelError <T1> ModelError <T1>(ICompilerReferenceError message, T1 item1, params string[] replacements)
        {
            var error = new CompilerModelError <T1>(message, item1, replacements);

            base.AddImpl(error);
            return(error);
        }
Пример #2
0
        /// <summary>
        /// Creates and inserts a <see cref="ICompilerModelError{T1, T2, T3, T4}"/>
        /// with the <paramref name="message"/>, <paramref name="item1"/>, <paramref name="item2"/>,
        /// <paramref name="item3"/>, <paramref name="item4"/> and
        /// <paramref name="replacements"/> provided.
        /// </summary>
        /// <typeparam name="T1">The kind of <paramref name="item1"/> used to
        /// reference to the primary model element which caused the error.</typeparam>
        /// <typeparam name="T2">The kind of <paramref name="item2"/> used to
        /// reference to the secondary model element which caused the error.</typeparam>
        /// <typeparam name="T3">The kind of <paramref name="item3"/> used to
        /// reference to the tertiary model element which caused the error.</typeparam>
        /// <typeparam name="T4">The kind of <paramref name="item4"/> used to
        /// reference to the quaternary model element which caused the error.</typeparam>
        /// <param name="message">The <see cref="ICompilerReferenceError"/> value associated which
        /// defines the base message text.</param>
        /// <param name="item1">The primary target of the error.</param>
        /// <param name="item2">The secondary target of the error.</param>
        /// <param name="item3">The tertiary target of the error.</param>
        /// <param name="item4">The quaternary target of the error.</param>
        /// <param name="replacements">A sequence of <see cref="String"/> values
        /// which denote the data points to replace within the <paramref name="message"/> provided.</param>
        /// <returns>A <see cref="ICompilerModelError{T1, T2, T3, T4}"/> which represents the error.</returns>
        public ICompilerModelError <T1, T2, T3, T4> ModelError <T1, T2, T3, T4>(ICompilerReferenceError message, T1 item1, T2 item2, T3 item3, T4 item4, params string[] replacements)
        {
            var error = new CompilerModelError <T1, T2, T3, T4>(message, item1, item2, item3, item4, replacements);

            base.AddImpl(error);
            return(error);
        }