Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify code in Match.Matches and It.IsAny<T> #911

Merged
merged 6 commits into from
Aug 29, 2019

Commits on Aug 29, 2019

  1. Configuration menu
    Copy the full SHA
    eb8ddd4 View commit details
    Browse the repository at this point in the history
  2. Turn second if into else

    stakx committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    081f8e7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95465bd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ca229eb View commit details
    Browse the repository at this point in the history
  5. Remove redundant is check in It

    ... because `Match` matchers will already have checked `value is T`
    by the time the predicate delegate gets invoked.
    stakx committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    3fbed15 View commit details
    Browse the repository at this point in the history
  6. Simplify It.IsAny<T>, It.IsNotNull<T> matchers

    by documenting that `IsAssignableFrom` generally yields the same
    results as the `is` operator when run on an `object`-typed variable.
    
    Note that this is removing the `IsComObject` check as well. This check
    was originally added because it was found that `IsAssignableFrom` does
    not always work properly for COM interfaces whereas the `is` works.
    Since we're generally going back on `is`, the COM check becomes redun-
    dant.
    stakx committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    950870c View commit details
    Browse the repository at this point in the history