Class AbstractAnnotatable
- Namespace
- ICSharpCode.Decompiler.CSharp.Syntax
- Assembly
- ICSharpCode.Decompiler.dll
Base class used to implement the IAnnotatable interface. This implementation is thread-safe.
public abstract class AbstractAnnotatable : IAnnotatable
- Inheritance
-
AbstractAnnotatable
- Implements
- Derived
- Inherited Members
Constructors
AbstractAnnotatable()
protected AbstractAnnotatable()
Properties
Annotations
Gets all annotations stored on this AstNode.
public IEnumerable<object> Annotations { get; }
Property Value
Methods
AddAnnotation(object)
public virtual void AddAnnotation(object annotation)
Parameters
annotation
object
Annotation(Type)
public object Annotation(Type type)
Parameters
type
Type
Returns
Annotation<T>()
public T Annotation<T>() where T : class
Returns
- T
Type Parameters
T
CloneAnnotations()
Clones all annotations. This method is intended to be called by Clone() implementations in derived classes.
AstNode copy = (AstNode)MemberwiseClone();
copy.CloneAnnotations();
protected void CloneAnnotations()
RemoveAnnotations(Type)
public virtual void RemoveAnnotations(Type type)
Parameters
type
Type
RemoveAnnotations<T>()
public virtual void RemoveAnnotations<T>() where T : class
Type Parameters
T