Exemplo n.º 1
0
        /// <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>());
        }
Exemplo n.º 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>());
 }
Exemplo n.º 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>());
 }