IMutableAnnotatable IMutableAnnotatable Interface

Definition

A class that exposes annotations that can be modified. Annotations allow for arbitrary metadata to be stored on an object.

This interface is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IMutableAnnotatable : IAnnotatable
Public Interface IMutableAnnotatable
    Inherits IAnnotatable

Properties

Item[String] Item(String)

Gets or sets the value of the annotation with the given name.

object this[string name] { get; set; }
Property Item(name As String) As Object
Parameters
name
System.String System.String

The key of the annotation.

Value
System.Object System.Object

The value of the existing annotation if an annotation with the specified name already exists. Otherwise, null.

Methods

AddAnnotation(String, Object) AddAnnotation(String, Object)

Adds an annotation to this object. Throws if an annotation with the specified name already exists.

Annotation AddAnnotation(string name, object value)
Function AddAnnotation(name As String, value As Object) As Annotation
Parameters
name
System.String System.String

The key of the annotation to be added.

value
System.Object System.Object

The value to be stored in the annotation.

Returns

The newly added annotation.

FindAnnotation(String) FindAnnotation(String)

Gets the annotation with the given name, returning null if it does not exist.

Annotation FindAnnotation(string name)
Function FindAnnotation(name As String) As Annotation
Parameters
name
System.String System.String

The key of the annotation to find.

Returns

The existing annotation if an annotation with the specified name already exists. Otherwise, null.

GetAnnotations() GetAnnotations()

Gets all annotations on the current object.

IEnumerable<Annotation> GetAnnotations()
Function GetAnnotations As IEnumerable(Of Annotation)
Returns
System.Collections.Generic.IEnumerable<Annotation> System.Collections.Generic.IEnumerable(Of Annotation)

RemoveAnnotation(String) RemoveAnnotation(String)

Removes the given annotation from this object.

Annotation RemoveAnnotation(string name)
Function RemoveAnnotation(name As String) As Annotation
Parameters
name
System.String System.String

The annotation to remove.

Returns

The annotation that was removed.