/// <summary>
        /// Gets all annotations of the specified annotation kind.
        /// </summary>
        public IEnumerable <SyntaxAnnotation> GetAnnotations(string annotationKind)
        {
            if (_token != null)
            {
                return(_token.GetAnnotations(annotationKind));
            }

            if (_nodeOrParent != null)
            {
                return(_nodeOrParent.GetAnnotations(annotationKind));
            }

            return(SpecializedCollections.EmptyEnumerable <SyntaxAnnotation>());
        }
Beispiel #2
0
 /// <summary>
 /// Gets all the annotations of the specified annotation kind.
 /// </summary>
 public IEnumerable <SyntaxAnnotation> GetAnnotations(string annotationKind)
 {
     return(token != null
         ? token.GetAnnotations(annotationKind)
         : SpecializedCollections.EmptyEnumerable <SyntaxAnnotation>());
 }
Beispiel #3
0
 /// <summary>
 /// Get all the annotations of the specified annotation kind.
 /// </summary>
 public IEnumerable <SyntaxAnnotation> GetAnnotations(string annotationKind)
 {
     return(_triviaNode != null
         ? _triviaNode.GetAnnotations(annotationKind)
         : SpecializedCollections.EmptyEnumerable <SyntaxAnnotation>());
 }