/// <summary>
        /// Initializes a new instance of the <see cref="CSharpDocumentationCompletionSource"/> class for the
        /// specified text buffer and provider.
        /// </summary>
        /// <param name="textBuffer">The text buffer associated with this completion source.</param>
        /// <param name="provider">The completion source provider.</param>
        /// <exception cref="ArgumentNullException">
        /// If <paramref name="textBuffer"/> is <see langword="null"/>.
        /// <para>-or-</para>
        /// <para>If <paramref name="provider"/> is <see langword="null"/>.</para>
        /// </exception>
        public CSharpDocumentationCompletionSource(ITextBuffer textBuffer,
          CSharpDocumentationCompletionSourceProvider provider)
        {
            if(textBuffer == null)
                throw new ArgumentNullException("textBuffer");

            if(provider == null)
                throw new ArgumentNullException("provider");

            _textBuffer = textBuffer;
            _provider = provider;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CSharpDocumentationCompletionSource"/> class for the
        /// specified text buffer and provider.
        /// </summary>
        /// <param name="textBuffer">The text buffer associated with this completion source.</param>
        /// <param name="provider">The completion source provider.</param>
        /// <exception cref="ArgumentNullException">
        /// If <paramref name="textBuffer"/> is <see langword="null"/>.
        /// <para>-or-</para>
        /// <para>If <paramref name="provider"/> is <see langword="null"/>.</para>
        /// </exception>
        public CSharpDocumentationCompletionSource(ITextBuffer textBuffer,
                                                   CSharpDocumentationCompletionSourceProvider provider)
        {
            if (textBuffer == null)
            {
                throw new ArgumentNullException("textBuffer");
            }

            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }

            _textBuffer = textBuffer;
            _provider   = provider;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSharpDocumentationCompletionSource"/> class for the
 /// specified text buffer and provider.
 /// </summary>
 /// <param name="textBuffer">The text buffer associated with this completion source.</param>
 /// <param name="provider">The completion source provider.</param>
 /// <exception cref="ArgumentNullException">
 /// If <paramref name="textBuffer"/> is <see langword="null"/>.
 /// <para>-or-</para>
 /// <para>If <paramref name="provider"/> is <see langword="null"/>.</para>
 /// </exception>
 public CSharpDocumentationCompletionSource(ITextBuffer textBuffer,
                                            CSharpDocumentationCompletionSourceProvider provider)
 {
     _textBuffer = textBuffer ?? throw new ArgumentNullException(nameof(textBuffer));
     _provider   = provider ?? throw new ArgumentNullException(nameof(provider));
 }