Exemple #1
0
        /// <inheritdoc />
        public int CompareTo(ModelPublicSetGenericParent <TFirst, TSecond> other)
        {
            if (ReferenceEquals(other, null))
            {
                return(1);
            }

            var relativeSortOrder = this.CompareToForRelativeSortOrder(other);

            switch (relativeSortOrder)
            {
            case RelativeSortOrder.ThisInstancePrecedesTheOtherInstance:
                return(-1);

            case RelativeSortOrder.ThisInstanceOccursInTheSamePositionAsTheOtherInstance:
                return(0);

            case RelativeSortOrder.ThisInstanceFollowsTheOtherInstance:
                return(1);

            default:
                throw new NotSupportedException(Invariant($"This {nameof(RelativeSortOrder)} is not supported: {relativeSortOrder}."));
            }
        }
Exemple #2
0
 /// <inheritdoc />
 public bool Equals(ModelPublicSetGenericParent <TFirst, TSecond> other) => this == other;
Exemple #3
0
 /// <inheritdoc />
 public virtual RelativeSortOrder CompareToForRelativeSortOrder(ModelPublicSetGenericParent <TFirst, TSecond> other)
 {
     throw new NotImplementedException("This method should be abstract.  It was generated as virtual so that you aren't forced to override it when you create a new model that derives from this model.  It will be overridden in the generated designer file.");
 }