Exemplo n.º 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);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates and inserts a <see cref="ICompilerSourceError"/>
        /// with the <paramref name="message"/>, <paramref name="column"/>, <paramref name="line"/>,
        /// and <paramref name="source"/> provided.
        /// </summary>
        /// <param name="message">The <see cref="ICompilerReferenceError"/> value associated which
        /// defines the base message text.</param>
        /// <param name="start">The <see cref="LineColumnPair"/> value which denotes
        /// the start of the <see cref="ICompilerSourceError"/> which results.</param>
        /// <param name="end">The <see cref="LineColumnPair"/> value which denotes
        /// the end of the <see cref="ICompilerSourceError"/> which results.</param>
        /// <param name="source">The <see cref="Uri"/> value relative to where the file
        /// can be found.</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="ICompilerSourceError"/> instance
        /// which denotes the details of the compiler error.</returns>
        public ICompilerSourceError SourceError(ICompilerReferenceError message, LineColumnPair start, LineColumnPair end, Uri source, params string[] replacements)
        {
            CompilerSourceError error = new CompilerSourceError(message, source, start, end, replacements);

            base.AddImpl(error);
            return(error);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates and inserts a <see cref="ICompilerSourceModelError{T1, T2, T3}"/>
        /// with the <paramref name="message"/>, <paramref name="start"/>, <paramref name="end"/>,
        /// <paramref name="source"/>, <paramref name="item1"/>, <paramref name="item2"/>, <paramref name="item3"/>
        /// 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>
        /// <param name="message">The <see cref="ICompilerReferenceError"/> value associated which
        /// defines the base message text.</param>
        /// <param name="start">The <see cref="LineColumnPair"/> value which denotes
        /// the start of the <see cref="ICompilerSourceModelError{T1, T2, T3}"/> which results.</param>
        /// <param name="end">The <see cref="LineColumnPair"/> value which denotes
        /// the end of the <see cref="ICompilerSourceModelError{T1, T2, T3}"/> which results.</param>
        /// <param name="source">The <see cref="Uri"/> value relative to where the file
        /// can be found.</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="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="ICompilerSourceModelError{T1, T2, T3}"/> which represents the error.</returns>
        public ICompilerSourceModelError <T1, T2, T3> SourceModelError <T1, T2, T3>(ICompilerReferenceError message, LineColumnPair start, LineColumnPair end, Uri source, T1 item1, T2 item2, T3 item3, params string[] replacements)
        {
            var error = new CompilerSourceModelError <T1, T2, T3>(message, item1, item2, item3, source, start, end, replacements);

            base.AddImpl(error);
            return(error);
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
 public CompilerSourceError(ICompilerReferenceError message, Uri source, LineColumnPair start, LineColumnPair end, params string[] replacements)
 {
     if (message == null)
     {
         throw new ArgumentNullException("message");
     }
     this.Source       = source;
     this.replacements = replacements;
     this.message      = message;
     this.Start        = start;
     this.End          = end;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Creates a new <see cref="CompilerSourceModelError{T1}"/>
 /// with the <paramref name="message"/>, <paramref name="item1"/>,
 /// <paramref name="source"/>, <paramref name="start"/>,
 /// <paramref name="end"/>, and <paramref name="replacements"/>.
 /// </summary>
 /// <param name="message">The <see cref="ICompilerReferenceError"/>
 /// which defines the string value that the current error is
 /// built off of.</param>
 /// <param name="item1">The <typeparamref name="T1"/> value which
 /// denotes where within the model the error is derived.</param>
 /// <param name="source">The <see cref="Uri"/> value denoting
 /// the file in which the warning occurred.</param>
 /// <param name="start">The <see cref="LineColumnPair"/> which
 /// denotes the line and column of the start of the error.</param>
 /// <param name="end">The <see cref="LineColumnPair"/> which denotes
 /// the line and column of the end of the error.</param>
 /// <param name="replacements">The <see cref="String"/> array of elements
 /// which denotes the replacements within <paramref name="message"/> to build a unique
 /// message relative to the current error.</param>
 public CompilerSourceModelError(ICompilerReferenceError message, T1 item1, Uri source, LineColumnPair start, LineColumnPair end, params string[] replacements)
     : base(message, source, start, end, replacements)
 {
     this.Item1 = item1;
 }
Exemplo n.º 7
0
 public CompilerModelError(ICompilerReferenceError message, T1 item1, params string[] replacements)
 {
     this.message      = message;
     this.Item1        = item1;
     this.replacements = replacements;
 }