Table of Contents

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

IEnumerable<object>

Methods

AddAnnotation(object)

Adds an annotation to this instance.

void AddAnnotation(object annotation)

Parameters

annotation object

The 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 Type

The type of the annotation.

Returns

object

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 Type

The 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.