Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Merge two TypeExtensions classes into Common\TypeExtensions.cs (again) #100

Closed
wants to merge 4 commits into from

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented Mar 18, 2014

Merge two TypeExtensions classes into Common\TypeExtensions.cs (again)

  • add missing [NotNull] attributes
  • remove now-unneeded usings for ...ModelBinding.Internal namespace
  • remove TypeExtensionTests.cs; don't add .NET 4.5-only
    [InternalsVisibleTo] for low-level IsCompatibleWith() extension

- add missing `[NotNull]` attributes
- remove now-unneeded usings for ...ModelBinding.Internal namespace
- remove TypeExtensionTests.cs; don't add .NET 4.5-only
  `[InternalsVisibleTo]` for low-level `IsCompatibleWith()` extension
- reduce #if use
- remove outdated comment
- get test project working under K as well
- create separate k10 and net45 folders under test in VS
- add [InternalsVisibleTo] to make TestExtensions visible to test assembly
- correct test's CultureInfo use to compile under K
- ifdef out K tests depending on Moq, ReadOnly, ...
- remove a couple of tests expecting TypeConverter to work
@dougbu
Copy link
Member Author

dougbu commented Mar 18, 2014

Added a commit which restores TypeExtensionTests

  • demonstrates use of [InternalsVisibleTo]

@dougbu
Copy link
Member Author

dougbu commented Mar 18, 2014

One more commit that @rynowak should like.

@rynowak
Copy link
Member

rynowak commented Mar 18, 2014

:shipit:

return type.GetTypeInfo().DeclaredConstructors
.Where(c => c.IsPublic)
.SingleOrDefault(c => c.GetParameters()
.Select(p => p.ParameterType).ToArray().EqualTo(types));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SequenceEquals instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense but would be very short-lived -- just 'til we fix issue #105.

@pranavkm
Copy link
Contributor

🚢

@dougbu
Copy link
Member Author

dougbu commented Mar 19, 2014

Squashed and merged: 4bc7c36

@dougbu dougbu closed this Mar 19, 2014
@dougbu dougbu deleted the common.type.extensions.again branch March 19, 2014 17:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants