private static Range <T> TryCreateCore <T>( T from, RangeBoundaryFromKind fromKind, T to, RangeBoundaryToKind toKind) => RangeBoundaryFrom <T> .IsValid(from) && RangeBoundaryTo <T> .IsValid(to) ? TryCreate( RangeBoundaryFrom <T> .AdjustAndCreate(from, fromKind), RangeBoundaryTo <T> .AdjustAndCreate(to, toKind)) : Range <T> .Empty;
private static Range <T> TryCreateCore <T>( T from, RangeBoundaryFromKind fromKind, T to, RangeBoundaryToKind toKind) => IsValid(from, to) #pragma warning disable 618 // Validation not required: IsValid() called. ? new Range <T>( RangeBoundaryFrom <T> .AdjustAndCreate(from, fromKind), RangeBoundaryTo <T> .AdjustAndCreate(to, toKind), SkipsArgValidation) #pragma warning restore 618 : Range <T> .Empty;
public static RangeBoundaryFrom <T> BoundaryFromExclusive <T>(T fromValue) => RangeBoundaryFrom <T> .AdjustAndCreate(fromValue, RangeBoundaryFromKind.Exclusive);
internal static RangeBoundaryFrom <T> GetCompareToBoundary <T>(T value) => RangeBoundaryFrom <T> .AdjustAndCreate(value, RangeBoundaryFromKind.Inclusive);