Interface IAnnotatable
- Namespace
- ICSharpCode.Decompiler.CSharp.Syntax
- Assembly
- ICSharpCode.Decompiler.dll
Provides an interface to handle annotations in an object.
public interface IAnnotatable
Properties
Annotations
Gets all annotations stored on this IAnnotatable.
IEnumerable<object> Annotations { get; }
Property Value
Methods
AddAnnotation(object)
Adds an annotation to this instance.
void AddAnnotation(object annotation)
Parameters
annotation
objectThe annotation to add.
Annotation(Type)
Gets the first annotation of the specified type. Returns null if no matching annotation exists.
object Annotation(Type type)
Parameters
type
TypeThe type of the annotation.
Returns
Annotation<T>()
Gets the first annotation of the specified type. Returns null if no matching annotation exists.
T Annotation<T>() where T : class
Returns
- T
Type Parameters
T
The type of the annotation.
RemoveAnnotations(Type)
Removes all annotations of the specified type.
void RemoveAnnotations(Type type)
Parameters
type
TypeThe type of the annotations to remove.
RemoveAnnotations<T>()
Removes all annotations of the specified type.
void RemoveAnnotations<T>() where T : class
Type Parameters
T
The type of the annotations to remove.