OpenTAP 9.25
API Reference
|
A collection of annotations. Used to store high-level information about an object. More...
Inherits IEnumerable< IAnnotation >.
Public Member Functions | |
AnnotationCollection | Clone () |
Creates a new shallow clone of the object. The Annotations list is clone, but the elements are not. More... | |
AnnotationCollection () | |
void | Add (IAnnotation annotation) |
Adds an annotation. More... | |
void | Add (params IAnnotation[] elements) |
adds a list of annotations. More... | |
void | AddRange (IEnumerable< IAnnotation > elements) |
adds a list of annotations. More... | |
void | RemoveType< T > () |
Removes all annotations of a specific type from the collection. | |
void | Remove (IAnnotation item) |
Removes a specific annotation from the collection. | |
IEnumerator< IAnnotation > | GetEnumerator () |
Returns an enumerator that iterates through the collection. | |
T | Get< T > (bool recursive=false, object from=null) |
Gets the first annotation of a specific kind. Note this goes by the most-recently added principle. More... | |
void | Read (object source) |
Updates the annotation based on a source object. More... | |
void | Read () |
Updates the annotation based on that last specified source object. | |
void | Write () |
Writes the annotation data to the last specified source object. | |
void | Write (object target) |
Writes the annotation data to a specific source object. More... | |
IEnumerable< T > | GetAll< T > (bool recursive=false) |
Gets all the annotations of a specific kind. More... | |
AnnotationCollection | AnnotateMember (IMemberData member, object Source, params IAnnotation[] extraAnnotations) |
Annotates a member of the object annotated by this. More... | |
AnnotationCollection | AnnotateMember (IMemberData member, params IAnnotation[] extraAnnotations) |
Annotates a member of the object annotated by this. More... | |
AnnotationCollection | AnnotateSub (ITypeData reflect, object obj, params IAnnotation[] extraAnnotations) |
Annotates a sub-object of the object annotated by this. More... | |
override string | ToString () |
Creates a string from this. This is useful for debugging. More... | |
void | Insert (int index, IAnnotation v) |
Insert an annotation at a location. More... | |
Static Public Member Functions | |
static AnnotationCollection | Create (object @object, IReflectionData member, params IAnnotation[] extraAnnotations) |
Creates a new data annotation. More... | |
static AnnotationCollection | Annotate (object @object, params IAnnotation[] extraAnnotations) |
Annotates an object. More... | |
Public Attributes | |
IAnnotation[] | ExtraAnnotations = Array.Empty<IAnnotation>() |
Additional annotations added to the current one. | |
Properties | |
AnnotationCollection | ParentAnnotation [get] |
The annotation that created this annotation. | |
object | Source [get] |
The source object currently used for this annotation. | |
A collection of annotations. Used to store high-level information about an object.
|
inline |
Adds an annotation.
annotation |
|
inline |
adds a list of annotations.
elements |
|
inline |
adds a list of annotations.
elements |
|
inlinestatic |
Annotates an object.
object | |
extraAnnotations |
|
inline |
Annotates a member of the object annotated by this.
member | |
Source | |
extraAnnotations |
|
inline |
Annotates a member of the object annotated by this.
member | |
extraAnnotations |
|
inline |
Annotates a sub-object of the object annotated by this.
reflect | |
obj | |
extraAnnotations |
|
inline |
Creates a new shallow clone of the object. The Annotations list is clone, but the elements are not.
|
inlinestatic |
Creates a new data annotation.
object | |
member | |
extraAnnotations |
|
inline |
Gets the first annotation of a specific kind. Note this goes by the most-recently added principle.
T | The kind of annotation to look for. |
recursive | Whether to include parent annotation search. |
from | Where the search should start. |
T | : | IAnnotation |
|
inline |
Gets all the annotations of a specific kind.
T |
recursive |
T | : | IAnnotation |
|
inline |
Insert an annotation at a location.
index | |
v |
|
inline |
Updates the annotation based on a source object.
source |
|
inline |
Creates a string from this. This is useful for debugging.
|
inline |
Writes the annotation data to a specific source object.
target |
OpenTAP 9.25 API built Tue Aug 6 2024 07:49:23