src/Shared/EntityFramework/Infrastructure/Annotations/IndexAnnotation.cs
/// <summary>
/// Merges this annotation with the given annotation and returns a new annotation containing the merged indexes.
/// </summary>
/// <remarks>
/// Each index annotation contains at most one <see cref="IndexAttribute"/> with a given name.
/// The merged annotation will contain IndexAttributes from both this and the other annotation.
/// If both annotations contain an IndexAttribute with the same name, then the merged annotation
/// will contain one IndexAttribute with that name.
/// </remarks>
/// <param name="other">The annotation to merge with this one.</param>
/// <returns>A new annotation with indexes from both annotations merged.</returns>
/// <exception cref="InvalidOperationException">
/// The other annotation contains indexes that are not compatible with indexes in this annotation.
/// </exception>
Merges this annotation with the given annotation and returns a new annotation containing the merged indexes.
Merges this annotation with the given annotation and returns a new annotation containing the merged indexes .
public virtual object MergeWith(object other)
        {
            if (ReferenceEquals(this, other)
                || other == null)
            {
                return this;
            }
            var otherAnnotation = other as IndexAnnotation;
            if (otherAnnotation == null)
            {
                throw new ArgumentException(Strings.IncompatibleTypes(other.GetType().Name, typeof(IndexAnnotation).Name));
            }
            var merged = _indexes.ToList();
            MergeLists(merged, otherAnnotation._indexes, null);
            return new IndexAnnotation(merged);
        }
public virtual object MergeWith ( object other ) { if ( ReferenceEquals ( this , other ) || other == null ) { return this ; } var otherAnnotation = other as IndexAnnotation ; if ( otherAnnotation == null ) { throw new ArgumentException ( Strings . IncompatibleTypes ( other . GetType ( ) . Name , typeof ( IndexAnnotation ) . Name ) ) ; } var merged = _indexes . ToList ( ) ; MergeLists ( merged , otherAnnotation . _indexes , null ) ; return new IndexAnnotation ( merged ) ; }
Merges this annotation with the given annotation and returns a new annotation containing the merged indexes.
Merges this annotation with the given annotation and returns a new annotation containing the merged indexes .
A new annotation with indexes from both annotations merged.
A new annotation with indexes from both annotations merged .
The other annotation contains indexes that are not compatible with indexes in this annotation.
The other annotation contains indexes that are not compatible with indexes in this annotation .
other
object
The annotation to merge with this one.
The annotation to merge with this one .
remarks
Each index annotation contains at most one  with a given name.
The merged annotation will contain IndexAttributes from both this and the other annotation.
If both annotations contain an IndexAttribute with the same name, then the merged annotation
will contain one IndexAttribute with that name.
Each index annotation contains at most one with a given name . The merged annotation will contain IndexAttributes from both this and the other annotation . If both annotations contain an IndexAttribute with the same name then the merged annotation will contain one IndexAttribute with that name .