Share via


IMergeableAnnotation Interface

Definition

Types used as custom annotations can implement this interface to indicate that an attempt to use multiple annotations with the same name on a given table or column may be possible by merging the multiple annotations into one.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Mergeable")]
public interface IMergeableAnnotation
type IMergeableAnnotation = interface
Public Interface IMergeableAnnotation
Derived
Attributes

Remarks

Normally there can only be one custom annotation with a given name on a given table or column. If a table or column ends up with multiple annotations, for example, because multiple CLR properties map to the same column, then an exception will be thrown. However, if the annotation type implements this interface, then the two annotations will be checked for compatibility using the IsCompatibleWith(Object) method and, if compatible, will be merged into one using the MergeWith(Object) method.

Methods

IsCompatibleWith(Object)

Returns true if this annotation does not conflict with the given annotation such that the two can be combined together using the MergeWith(Object) method.

MergeWith(Object)

Merges this annotation with the given annotation and returns a new merged annotation. This method is only expected to succeed if IsCompatibleWith(Object) returns true.

Applies to