MutableAnnotatableExtensions MutableAnnotatableExtensions Class

Definition

Extension methods for IMutableAnnotatable.

public static class MutableAnnotatableExtensions
Public Module MutableAnnotatableExtensions
Inheritance
System.ObjectSystem.Object
MutableAnnotatableExtensionsMutableAnnotatableExtensions

Inherited Members

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Methods

AddAnnotations(IMutableAnnotatable, IEnumerable) AddAnnotations(IMutableAnnotatable, IEnumerable(Of IAnnotation))

Adds annotations to an object.

public static void AddAnnotations(this IMutableAnnotatable annotatable, IEnumerable<IAnnotation> annotations)
<ExtensionAttribute>
Public Shared Sub AddAnnotations(annotatable As IMutableAnnotatable, annotations As IEnumerable(Of IAnnotation))
Parameters
annotatable
IMutableAnnotatable IMutableAnnotatable

The object to add the annotations to.

annotations
System.Collections.Generic.IEnumerable<IAnnotation> System.Collections.Generic.IEnumerable(Of IAnnotation)

The annotations to be added.

GetOrAddAnnotation(IMutableAnnotatable, String, String) GetOrAddAnnotation(IMutableAnnotatable, String, String)

Gets the existing annotation with a given key, or adds a new annotation if one does not exist.

public static Annotation GetOrAddAnnotation(this IMutableAnnotatable annotatable, string annotationName, string value)
<ExtensionAttribute>
Public Shared Function GetOrAddAnnotation(annotatable As IMutableAnnotatable, annotationName As String, value As String) As Annotation
Parameters
annotatable
IMutableAnnotatable IMutableAnnotatable

The object to find or add the annotation to.

annotationName
System.String System.String

The key of the annotation to be found or added.

value
System.String System.String

The value to be stored in the annotation if a new one is created.

Returns

The found or added annotation.