From 6ff7bf8a98fc54445801eac3d33205756135a0cf Mon Sep 17 00:00:00 2001 From: nulltoken Date: Tue, 15 Apr 2014 16:53:36 +0200 Subject: Upgrade to .Net 4.0 Fix #654 --- Lib/MoQ/Moq.dll | Bin 507392 -> 659968 bytes Lib/MoQ/Moq.xml | 1013 +++++++------------- LibGit2Sharp.Tests/BlobFixture.cs | 3 +- LibGit2Sharp.Tests/LazyFixture.cs | 40 - LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj | 9 +- LibGit2Sharp.Tests/NetworkFixture.cs | 4 +- LibGit2Sharp.Tests/TupleFixture.cs | 54 -- LibGit2Sharp/BlameHunk.cs | 1 - LibGit2Sharp/Branch.cs | 1 - LibGit2Sharp/Commit.cs | 1 - LibGit2Sharp/Core/Compat/EnumExtensions.cs | 15 - LibGit2Sharp/Core/Compat/Environment.cs | 18 - LibGit2Sharp/Core/Compat/Lazy.cs | 54 -- LibGit2Sharp/Core/Compat/Tuple.cs | 65 -- LibGit2Sharp/Core/EnumExtensions.cs | 1 - LibGit2Sharp/Core/GitDiffExtensions.cs | 2 - LibGit2Sharp/Core/LazyGroup.cs | 1 - LibGit2Sharp/Core/NativeMethods.cs | 2 +- LibGit2Sharp/Core/Proxy.cs | 1 - LibGit2Sharp/Diff.cs | 1 - LibGit2Sharp/DirectReference.cs | 2 +- LibGit2Sharp/HistoryDivergence.cs | 2 +- LibGit2Sharp/Index.cs | 1 - LibGit2Sharp/LibGit2Sharp.csproj | 10 +- LibGit2Sharp/Network.cs | 1 - LibGit2Sharp/NoteCollection.cs | 1 - LibGit2Sharp/RefSpecCollection.cs | 4 +- LibGit2Sharp/ReferenceWrapper.cs | 1 - LibGit2Sharp/RemoteUpdater.cs | 1 - LibGit2Sharp/Repository.cs | 1 - LibGit2Sharp/RepositoryStatus.cs | 2 - LibGit2Sharp/TreeDefinition.cs | 1 - LibGit2Sharp/TreeEntry.cs | 1 - LibGit2Sharp/TreeEntryDefinition.cs | 1 - nuget.package/LibGit2Sharp.nuspec | 4 +- .../Tools/GetLibGit2SharpPostBuildCmd.ps1 | 2 +- 36 files changed, 364 insertions(+), 957 deletions(-) delete mode 100644 LibGit2Sharp.Tests/LazyFixture.cs delete mode 100644 LibGit2Sharp.Tests/TupleFixture.cs delete mode 100644 LibGit2Sharp/Core/Compat/EnumExtensions.cs delete mode 100644 LibGit2Sharp/Core/Compat/Environment.cs delete mode 100644 LibGit2Sharp/Core/Compat/Lazy.cs delete mode 100644 LibGit2Sharp/Core/Compat/Tuple.cs diff --git a/Lib/MoQ/Moq.dll b/Lib/MoQ/Moq.dll index 3d3b8ccd..bdd4235f 100644 Binary files a/Lib/MoQ/Moq.dll and b/Lib/MoQ/Moq.dll differ diff --git a/Lib/MoQ/Moq.xml b/Lib/MoQ/Moq.xml index 43207757..160c1b51 100644 --- a/Lib/MoQ/Moq.xml +++ b/Lib/MoQ/Moq.xml @@ -47,6 +47,62 @@ The setter expression. + + + Handle interception + + the current invocation context + shared data for the interceptor as a whole + shared data among the strategies during a single interception + InterceptionAction.Continue if further interception has to be processed, otherwise InterceptionAction.Stop + + + + Covarient interface for Mock<T> such that casts between IMock<Employee> to IMock<Person> + are possible. Only covers the covariant members of Mock<T>. + + + + + Exposes the mocked object instance. + + + + + Behavior of the mock, according to the value set in the constructor. + + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Get an eventInfo for a given event name. Search type ancestors depth first if necessary. + + Name of the event, with the set_ or get_ prefix already removed + + + + Get an eventInfo for a given event name. Search type ancestors depth first if necessary. + Searches also in non public events. + + Name of the event, with the set_ or get_ prefix already removed + + + + Given a type return all of its ancestors, both types and interfaces. + + The type to find immediate ancestors of + Defines the Callback verb and overloads. @@ -1622,6 +1678,12 @@ + + + Calls the real method of the object and returns its return value. + + The value calculated by the real method of the object. + Specifies a function that will calculate the value to return from the method, @@ -2177,6 +2239,58 @@ + + + Hook used to tells Castle which methods to proxy in mocked classes. + + Here we proxy the default methods Castle suggests (everything Object's methods) + plus Object.ToString(), so we can give mocks useful default names. + + This is required to allow Moq to mock ToString on proxy *class* implementations. + + + + + Extends AllMethodsHook.ShouldInterceptMethod to also intercept Object.ToString(). + + + + + The base class used for all our interface-inheriting proxies, which overrides the default + Object.ToString() behavior, to route it via the mock by default, unless overriden by a + real implementation. + + This is required to allow Moq to mock ToString on proxy *interface* implementations. + + + This is internal to Moq and should not be generally used. + + Unfortunately it must be public, due to cross-assembly visibility issues with reflection, + see github.com/Moq/moq4/issues/98 for details. + + + + + Overrides the default ToString implementation to instead find the mock for this mock.Object, + and return MockName + '.Object' as the mocked object's ToString, to make it easy to relate + mocks and mock object instances in error messages. + + + + + Defines async extension methods on IReturns. + + + + + Allows to specify the return value of an asynchronous method. + + + + + Allows to specify the exception thrown by an asynchronous method. + + Language for ReturnSequence @@ -2197,6 +2311,11 @@ Throws an exception + + + Calls original method + + The first method call or member access will be the @@ -2300,7 +2419,7 @@ // that expectation was not marked as verifiable. this.VerifyAll(); - At least one expectation was not met. + At least one expectation was not met. @@ -2385,6 +2504,20 @@ This is used in the auto-mocking of hierarchy access. + + + If this is a mock of a delegate, this property contains the method + on the autogenerated interface so that we can convert setup + verify + expressions on the delegate into expressions on the interface proxy. + + + + + Allows to check whether expression conversion to the + must be performed on the mock, without causing unnecessarily early initialization of + the mock instance, which breaks As{T}. + + Specifies the class that will determine the default @@ -3006,658 +3139,30 @@ that moment. + + + Calls the real property of the object and returns its return value. + + The value calculated by the real property of the object. + Implements the fluent API. - - - Encapsulates a method that has five parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has five parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has six parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has six parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has seven parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has seven parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has eight parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has eight parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has nine parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has nine parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has ten parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has ten parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has eleven parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has eleven parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has twelve parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has twelve parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has thirteen parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has thirteen parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has fourteen parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has fourteen parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has fifteen parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The type of the fifteenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - The fifteenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has fifteen parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The type of the fifteenth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - The fifteenth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. - - - - Encapsulates a method that has sixteen parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The type of the fifteenth parameter of the method that this delegate encapsulates. - The type of the sixteenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - The fifteenth parameter of the method that this delegate encapsulates. - The sixteenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that has sixteen parameters and returns a value of the type specified by the parameter. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the nineth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The type of the fifteenth parameter of the method that this delegate encapsulates. - The type of the sixteenth parameter of the method that this delegate encapsulates. - The type of the return value of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The nineth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - The fifteenth parameter of the method that this delegate encapsulates. - The sixteenth parameter of the method that this delegate encapsulates. - The return value of the method that this delegate encapsulates. + + + Provides additional methods on mocks. + + + Those methods are useful for Testeroids support. + + + + + Resets the calls previously made on the specified mock. + + The mock whose calls need to be reset. @@ -3918,6 +3423,11 @@ var mock = new Mock<MyProvider>(someArgument, 25); Behavior of the mock.Optional constructor arguments if the mocked type is a class. + + + Returns the name of the mock + + Returns the mocked object value. @@ -4090,6 +3600,15 @@ . Expression to verify.The number of times a method is allowed to be called. + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called. + Verifies that a specific invocation matching the given expression was performed on the mock, @@ -4117,6 +3636,16 @@ . Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails. + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails. + Verifies that a specific invocation matching the given expression was performed on the mock. Use @@ -4143,6 +3672,16 @@ . Expression to verify.The number of times a method is allowed to be called.Type of return value from the expression. + + + Verifies that a specific invocation matching the given + expression was performed on the mock. Use in conjuntion + with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Type of return value from the expression. + Verifies that a specific invocation matching the given @@ -4201,6 +3740,17 @@ be inferred from the expression's return type. + + + Verifies that a property was read on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + Verifies that a property was read on the mock, specifying a failure @@ -4233,6 +3783,18 @@ be inferred from the expression's return type. + + + Verifies that a property was read on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + Verifies that a property was set on the mock. @@ -4257,6 +3819,14 @@ . The number of times a method is allowed to be called.Expression to verify. + + + Verifies that a property was set on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + Verifies that a property was set on the mock, specifying @@ -4283,6 +3853,15 @@ . The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + + + Verifies that a property was set on the mock, specifying + a failure message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + Raises the event referenced in using @@ -4341,6 +3920,14 @@ Exposes the mocked object instance. + + + Allows naming of your mocks, so they can be easily identified in error messages (e.g. from failed assertions). + + + + + Provides legacy API members as extensions so that @@ -4363,7 +3950,7 @@ Obsolete. - + Provides additional methods on mocks. @@ -4372,7 +3959,7 @@ with the overloads taking Action. - + Specifies a setup on the mocked type for a call to to a property setter, regardless of its value. @@ -4395,7 +3982,7 @@ confusing the compiler with the new Action syntax. - + Verifies that a property has been set on the mock, regarless of its value. @@ -4418,7 +4005,7 @@ Type of the property to verify. Typically omitted as it can be inferred from the expression's return type. - + Verifies that a property has been set on the mock, specifying a failure error message. @@ -4443,7 +4030,7 @@ Type of the property to verify. Typically omitted as it can be inferred from the expression's return type. - + Verifies that a property has been set on the mock, regardless of the value but only the specified number of times. @@ -4470,7 +4057,7 @@ Type of the property to verify. Typically omitted as it can be inferred from the expression's return type. - + Verifies that a property has been set on the mock, regardless of the value but only the specified number of times, and specifying a failure @@ -4564,6 +4151,18 @@ is fixed. + + + Extracts, into a common form, information from a + around either a (for a normal method call) + or a (for a delegate invocation). + + + + + Tests if a type is a delegate type (subclasses ). + + Provides partial evaluation of subtrees, whenever they can be evaluated locally. @@ -4659,18 +4258,6 @@ all mocks. - - - Get an eventInfo for a given event name. Search type ancestors depth first if necessary. - - Name of the event, with the set_ or get_ prefix already removed - - - - Given a type return all of its ancestors, both types and interfaces. - - The type to find immediate ancestors of - Implements the fluent API. @@ -4720,6 +4307,11 @@ Type of the value. + + + Matches any value of the given type, except null. + Type of the value. + Matches any value that satisfies the given predicate. @@ -4757,6 +4349,66 @@ + + + Matches any value that is present in the sequence specified. + Type of the argument to check.The sequence of possible values. + The following example shows how to expect a method call + with an integer argument with value from a list. + + var values = new List<int> { 1, 2, 3 }; + + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsIn(values))) + .Returns(false); + + + + + + Matches any value that is present in the sequence specified. + Type of the argument to check.The sequence of possible values. + The following example shows how to expect a method call + with an integer argument with a value of 1, 2, or 3. + + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsIn(1, 2, 3))) + .Returns(false); + + + + + + Matches any value that is not found in the sequence specified. + Type of the argument to check.The sequence of disallowed values. + The following example shows how to expect a method call + with an integer argument with value not found from a list. + + var values = new List<int> { 1, 2, 3 }; + + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsNotIn(values))) + .Returns(false); + + + + + + Matches any value that is not found in the sequence specified. + Type of the argument to check.The sequence of disallowed values. + The following example shows how to expect a method call + with an integer argument of any value except 1, 2, or 3. + + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsNotIn(1, 2, 3))) + .Returns(false); + + + Matches a string argument if it matches the given regular expression pattern. @@ -4856,6 +4508,11 @@ Serialization information. Streaming context. + + + Indicates whether this exception is a verification fault raised by Verify() + + Made internal as it's of no use for @@ -4910,6 +4567,11 @@ Looks up a localized string similar to Can't set return value for void method {0}.. + + + Looks up a localized string similar to Constructor arguments cannot be passed for delegate mocks.. + + Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks.. @@ -5678,6 +5340,25 @@ Retrieves a fluent mock from the given setup expression. + + + Gets an autogenerated interface with a method on it that matches the signature of the specified + . + + + Such an interface can then be mocked, and a delegate pointed at the method on the mocked instance. + This is how we support delegate mocking. The factory caches such interfaces and reuses them + for repeated requests for the same delegate type. + + The delegate type for which an interface is required. + The method on the autogenerated interface. + + + + + + + Defines the number of invocations allowed by a mocked method. diff --git a/LibGit2Sharp.Tests/BlobFixture.cs b/LibGit2Sharp.Tests/BlobFixture.cs index 3092ee2a..f615aed1 100644 --- a/LibGit2Sharp.Tests/BlobFixture.cs +++ b/LibGit2Sharp.Tests/BlobFixture.cs @@ -1,5 +1,4 @@ -using System; -using System.IO; +using System.IO; using System.Linq; using System.Text; using LibGit2Sharp.Tests.TestHelpers; diff --git a/LibGit2Sharp.Tests/LazyFixture.cs b/LibGit2Sharp.Tests/LazyFixture.cs deleted file mode 100644 index 14b797ea..00000000 --- a/LibGit2Sharp.Tests/LazyFixture.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using LibGit2Sharp.Core.Compat; -using Xunit; - -namespace LibGit2Sharp.Tests -{ - public class LazyFixture - { - [Fact] - public void CanReturnTheValue() - { - var lazy = new Lazy(() => 2); - Assert.Equal(2, lazy.Value); - } - - [Fact] - public void IsLazilyEvaluated() - { - int i = 0; - - var evaluator = new Func(() => ++i); - - var lazy = new Lazy(evaluator); - Assert.Equal(1, lazy.Value); - } - - [Fact] - public void IsEvaluatedOnlyOnce() - { - int i = 0; - - var evaluator = new Func(() => ++i); - - var lazy = new Lazy(evaluator); - - Assert.Equal(1, lazy.Value); - Assert.Equal(1, lazy.Value); - } - } -} diff --git a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj index 0d5e17a4..76d100e6 100644 --- a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj +++ b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj @@ -10,15 +10,16 @@ Properties LibGit2Sharp.Tests LibGit2Sharp.Tests - v3.5 + v4.0 512 + true full false bin\Debug\ - TRACE;DEBUG;NET35 + TRACE;DEBUG;NET40 prompt 4 @@ -37,7 +38,7 @@ full false bin\Leaks\ - TRACE;DEBUG;NET35;LEAKS + TRACE;DEBUG;NET40;LEAKS prompt 4 @@ -96,7 +97,6 @@ - @@ -122,7 +122,6 @@ - diff --git a/LibGit2Sharp.Tests/NetworkFixture.cs b/LibGit2Sharp.Tests/NetworkFixture.cs index 3b505039..3bb5db73 100644 --- a/LibGit2Sharp.Tests/NetworkFixture.cs +++ b/LibGit2Sharp.Tests/NetworkFixture.cs @@ -1,6 +1,6 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Tests.TestHelpers; using Xunit; using Xunit.Extensions; diff --git a/LibGit2Sharp.Tests/TupleFixture.cs b/LibGit2Sharp.Tests/TupleFixture.cs deleted file mode 100644 index c6258648..00000000 --- a/LibGit2Sharp.Tests/TupleFixture.cs +++ /dev/null @@ -1,54 +0,0 @@ -using LibGit2Sharp.Core.Compat; -using Xunit; - -namespace LibGit2Sharp.Tests -{ - public class TupleFixture - { - const int integer = 2; - const string stringy = "hello"; - - private readonly Tuple sut = new Tuple(integer, stringy); - - [Fact] - public void Properties() - { - Assert.Equal(integer, sut.Item1); - Assert.Equal(stringy, sut.Item2); - } - - [Fact] - public void GetHashCodeIsTheSame() - { - var sut2 = new Tuple(integer, stringy); - - Assert.Equal(sut2.GetHashCode(), sut.GetHashCode()); - } - - [Fact] - public void GetHashCodeIsDifferent() - { - var sut2 = new Tuple(integer + 1, stringy); - - Assert.NotEqual(sut2.GetHashCode(), sut.GetHashCode()); - } - - [Fact] - public void VerifyEquals() - { - var sut2 = new Tuple(integer, stringy); - - Assert.True(sut.Equals(sut2)); - Assert.True(Equals(sut, sut2)); - } - - [Fact] - public void VerifyNotEquals() - { - var sut2 = new Tuple(integer + 1, stringy); - - Assert.False(sut.Equals(sut2)); - Assert.False(Equals(sut, sut2)); - } - } -} diff --git a/LibGit2Sharp/BlameHunk.cs b/LibGit2Sharp/BlameHunk.cs index 1fdbe16b..79dbf394 100644 --- a/LibGit2Sharp/BlameHunk.cs +++ b/LibGit2Sharp/BlameHunk.cs @@ -2,7 +2,6 @@ using System.Diagnostics; using System.Globalization; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/Branch.cs b/LibGit2Sharp/Branch.cs index ae2fa7d9..e13c5c57 100644 --- a/LibGit2Sharp/Branch.cs +++ b/LibGit2Sharp/Branch.cs @@ -1,7 +1,6 @@ using System; using System.Globalization; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Handlers; namespace LibGit2Sharp diff --git a/LibGit2Sharp/Commit.cs b/LibGit2Sharp/Commit.cs index 6f96ec9b..6ea9d060 100644 --- a/LibGit2Sharp/Commit.cs +++ b/LibGit2Sharp/Commit.cs @@ -5,7 +5,6 @@ using System.Diagnostics; using System.Globalization; using System.Linq; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; namespace LibGit2Sharp diff --git a/LibGit2Sharp/Core/Compat/EnumExtensions.cs b/LibGit2Sharp/Core/Compat/EnumExtensions.cs deleted file mode 100644 index beac535f..00000000 --- a/LibGit2Sharp/Core/Compat/EnumExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace LibGit2Sharp.Core.Compat -{ - internal static class EnumExtensions - { - // Based on the following Stack Overflow post - // http://stackoverflow.com/questions/93744/most-common-c-sharp-bitwise-operations-on-enums/417217#417217 - // Reused with permission of Hugo Bonacci on Jan 04 2013. - public static bool HasFlag(this Enum enumInstance, T entry) - { - return ((int)(object)enumInstance & (int)(object)entry) == (int)(object)(entry); - } - } -} diff --git a/LibGit2Sharp/Core/Compat/Environment.cs b/LibGit2Sharp/Core/Compat/Environment.cs deleted file mode 100644 index 49b8e33c..00000000 --- a/LibGit2Sharp/Core/Compat/Environment.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace LibGit2Sharp.Core.Compat -{ - /// - /// Provides information about, and means to manipulate, the current environment and platform. - /// - public static class Environment - { - /// - /// Determines whether the current process is a 64-bit process. - /// - public static bool Is64BitProcess - { - get { return IntPtr.Size == 8; } - } - } -} diff --git a/LibGit2Sharp/Core/Compat/Lazy.cs b/LibGit2Sharp/Core/Compat/Lazy.cs deleted file mode 100644 index 2f08a24a..00000000 --- a/LibGit2Sharp/Core/Compat/Lazy.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Diagnostics; - -namespace LibGit2Sharp.Core.Compat -{ - /// - /// Provides support for lazy initialization. - /// - /// Specifies the type of object that is being lazily initialized. - [DebuggerStepThrough] - public class Lazy - { - private readonly Func evaluator; - private TType value; - private bool hasBeenEvaluated; - private readonly object padLock = new object(); - - /// - /// Initializes a new instance of the class. - /// - /// The that will be called to evaluate the value of this Lazy instance. - public Lazy(Func evaluator) - { - Ensure.ArgumentNotNull(evaluator, "evaluator"); - - this.evaluator = evaluator; - } - - /// - /// Gets the lazily initialized value of the current instance. - /// - public TType Value - { - get { return Evaluate(); } - } - - private TType Evaluate() - { - if (!hasBeenEvaluated) - { - lock (padLock) - { - if (!hasBeenEvaluated) - { - value = evaluator(); - hasBeenEvaluated = true; - } - } - } - - return value; - } - } -} diff --git a/LibGit2Sharp/Core/Compat/Tuple.cs b/LibGit2Sharp/Core/Compat/Tuple.cs deleted file mode 100644 index b8cf7f00..00000000 --- a/LibGit2Sharp/Core/Compat/Tuple.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Collections.Generic; - -namespace LibGit2Sharp.Core.Compat -{ - /// - /// Represents a 2-tuple, or pair. - /// - /// The type of the tuple's first component. - /// The type of the tuple's second component. - public class Tuple - { - private readonly KeyValuePair kvp; - - /// - /// Initializes a new instance of the class. - /// - /// The value of the tuple's first component. - /// The value of the tuple's second component. - public Tuple(T1 item1, T2 item2) - { - kvp = new KeyValuePair(item1, item2); - } - - /// - /// Gets the value of the current object's second component. - /// - public T2 Item2 - { - get { return kvp.Value; } - } - - /// - /// Gets the value of the current object's first component. - /// - public T1 Item1 - { - get { return kvp.Key; } - } - - /// - /// Returns the hash code for the current object. - /// - /// A 32-bit signed integer hash code. - public override int GetHashCode() - { - return kvp.GetHashCode(); - } - - /// - /// Returns a value that indicates whether the current object is equal to a specified object. - /// - /// The object to compare with this instance. - /// true if the current instance is equal to the specified object; otherwise, false. - public override bool Equals(object obj) - { - if (!(obj is Tuple)) - { - return false; - } - return kvp.Equals(((Tuple)obj).kvp); - } - - - } -} diff --git a/LibGit2Sharp/Core/EnumExtensions.cs b/LibGit2Sharp/Core/EnumExtensions.cs index 40d6d4cd..faaf4264 100644 --- a/LibGit2Sharp/Core/EnumExtensions.cs +++ b/LibGit2Sharp/Core/EnumExtensions.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp.Core { diff --git a/LibGit2Sharp/Core/GitDiffExtensions.cs b/LibGit2Sharp/Core/GitDiffExtensions.cs index a885901a..a131d209 100644 --- a/LibGit2Sharp/Core/GitDiffExtensions.cs +++ b/LibGit2Sharp/Core/GitDiffExtensions.cs @@ -1,5 +1,3 @@ -using LibGit2Sharp.Core.Compat; - namespace LibGit2Sharp.Core { internal static class GitDiffExtensions diff --git a/LibGit2Sharp/Core/LazyGroup.cs b/LibGit2Sharp/Core/LazyGroup.cs index ec341dda..3c82fa3a 100644 --- a/LibGit2Sharp/Core/LazyGroup.cs +++ b/LibGit2Sharp/Core/LazyGroup.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp.Core { diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs index 97ecd4aa..0653503b 100644 --- a/LibGit2Sharp/Core/NativeMethods.cs +++ b/LibGit2Sharp/Core/NativeMethods.cs @@ -79,7 +79,7 @@ namespace LibGit2Sharp.Core { get { - if (Compat.Environment.Is64BitProcess) + if (Environment.Is64BitProcess) { return "amd64"; } diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs index b91e9fa1..e698d971 100644 --- a/LibGit2Sharp/Core/Proxy.cs +++ b/LibGit2Sharp/Core/Proxy.cs @@ -5,7 +5,6 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Threading; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; // ReSharper disable InconsistentNaming diff --git a/LibGit2Sharp/Diff.cs b/LibGit2Sharp/Diff.cs index c888d7a6..b276ebc3 100644 --- a/LibGit2Sharp/Diff.cs +++ b/LibGit2Sharp/Diff.cs @@ -4,7 +4,6 @@ using System.Globalization; using System.Linq; using System.Text; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; using Environment = System.Environment; diff --git a/LibGit2Sharp/DirectReference.cs b/LibGit2Sharp/DirectReference.cs index 1111a291..d5de4662 100644 --- a/LibGit2Sharp/DirectReference.cs +++ b/LibGit2Sharp/DirectReference.cs @@ -1,4 +1,4 @@ -using LibGit2Sharp.Core.Compat; +using System; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/HistoryDivergence.cs b/LibGit2Sharp/HistoryDivergence.cs index 51044bd7..c5dab176 100644 --- a/LibGit2Sharp/HistoryDivergence.cs +++ b/LibGit2Sharp/HistoryDivergence.cs @@ -1,5 +1,5 @@ +using System; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/Index.cs b/LibGit2Sharp/Index.cs index d2906ad1..1f6501b4 100644 --- a/LibGit2Sharp/Index.cs +++ b/LibGit2Sharp/Index.cs @@ -6,7 +6,6 @@ using System.Globalization; using System.IO; using System.Linq; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; namespace LibGit2Sharp diff --git a/LibGit2Sharp/LibGit2Sharp.csproj b/LibGit2Sharp/LibGit2Sharp.csproj index bcbffa84..e3c3ba0f 100644 --- a/LibGit2Sharp/LibGit2Sharp.csproj +++ b/LibGit2Sharp/LibGit2Sharp.csproj @@ -10,7 +10,7 @@ Properties LibGit2Sharp LibGit2Sharp - v3.5 + v4.0 512 @@ -19,7 +19,7 @@ full false bin\Debug\ - TRACE;DEBUG;NET35 + TRACE;DEBUG;NET40 prompt 4 false @@ -43,7 +43,7 @@ full false bin\Leaks\ - TRACE;DEBUG;NET35;LEAKS + TRACE;DEBUG;NET40;LEAKS prompt 4 false @@ -169,7 +169,6 @@ - @@ -202,12 +201,10 @@ - - @@ -253,7 +250,6 @@ - diff --git a/LibGit2Sharp/Network.cs b/LibGit2Sharp/Network.cs index 6fffc231..f494e492 100644 --- a/LibGit2Sharp/Network.cs +++ b/LibGit2Sharp/Network.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; using LibGit2Sharp.Handlers; diff --git a/LibGit2Sharp/NoteCollection.cs b/LibGit2Sharp/NoteCollection.cs index c889d22f..0caa3878 100644 --- a/LibGit2Sharp/NoteCollection.cs +++ b/LibGit2Sharp/NoteCollection.cs @@ -5,7 +5,6 @@ using System.Diagnostics; using System.Globalization; using System.Linq; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; namespace LibGit2Sharp diff --git a/LibGit2Sharp/RefSpecCollection.cs b/LibGit2Sharp/RefSpecCollection.cs index 81d4b70c..26042f9b 100644 --- a/LibGit2Sharp/RefSpecCollection.cs +++ b/LibGit2Sharp/RefSpecCollection.cs @@ -1,12 +1,10 @@ -using System; -using System.Collections; +using System.Collections; using System.Collections.Generic; using System.Linq; using System.Diagnostics; using System.Globalization; using LibGit2Sharp.Core; using LibGit2Sharp.Core.Handles; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/ReferenceWrapper.cs b/LibGit2Sharp/ReferenceWrapper.cs index 4a6eeb7a..aaf56070 100644 --- a/LibGit2Sharp/ReferenceWrapper.cs +++ b/LibGit2Sharp/ReferenceWrapper.cs @@ -2,7 +2,6 @@ using System.Diagnostics; using System.Globalization; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/RemoteUpdater.cs b/LibGit2Sharp/RemoteUpdater.cs index 74b989a3..3759ff49 100644 --- a/LibGit2Sharp/RemoteUpdater.cs +++ b/LibGit2Sharp/RemoteUpdater.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using LibGit2Sharp.Core; using LibGit2Sharp.Core.Handles; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/Repository.cs b/LibGit2Sharp/Repository.cs index a05d13c5..1dea167c 100644 --- a/LibGit2Sharp/Repository.cs +++ b/LibGit2Sharp/Repository.cs @@ -7,7 +7,6 @@ using System.Linq; using System.Reflection; using System.Text.RegularExpressions; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; using LibGit2Sharp.Handlers; diff --git a/LibGit2Sharp/RepositoryStatus.cs b/LibGit2Sharp/RepositoryStatus.cs index 92af3324..ba61d4e7 100644 --- a/LibGit2Sharp/RepositoryStatus.cs +++ b/LibGit2Sharp/RepositoryStatus.cs @@ -4,9 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Linq; -using System.Runtime.InteropServices; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; namespace LibGit2Sharp diff --git a/LibGit2Sharp/TreeDefinition.cs b/LibGit2Sharp/TreeDefinition.cs index 63bbb0ca..bedd0785 100644 --- a/LibGit2Sharp/TreeDefinition.cs +++ b/LibGit2Sharp/TreeDefinition.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; using LibGit2Sharp.Core.Handles; namespace LibGit2Sharp diff --git a/LibGit2Sharp/TreeEntry.cs b/LibGit2Sharp/TreeEntry.cs index ffdf22d3..54dd9599 100644 --- a/LibGit2Sharp/TreeEntry.cs +++ b/LibGit2Sharp/TreeEntry.cs @@ -2,7 +2,6 @@ using System; using System.Globalization; using System.Runtime.InteropServices; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/TreeEntryDefinition.cs b/LibGit2Sharp/TreeEntryDefinition.cs index e9706682..c0eb979d 100644 --- a/LibGit2Sharp/TreeEntryDefinition.cs +++ b/LibGit2Sharp/TreeEntryDefinition.cs @@ -1,6 +1,5 @@ using System; using LibGit2Sharp.Core; -using LibGit2Sharp.Core.Compat; namespace LibGit2Sharp { diff --git a/nuget.package/LibGit2Sharp.nuspec b/nuget.package/LibGit2Sharp.nuspec index 3bacd546..99c32653 100644 --- a/nuget.package/LibGit2Sharp.nuspec +++ b/nuget.package/LibGit2Sharp.nuspec @@ -17,8 +17,8 @@ - - + + diff --git a/nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1 b/nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1 index 225ad533..e1847e61 100644 --- a/nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1 +++ b/nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1 @@ -1,7 +1,7 @@ $solutionDir = [System.IO.Path]::GetDirectoryName($dte.Solution.FullName) + "\" $path = $installPath.Replace($solutionDir, "`$(SolutionDir)") -$NativeAssembliesDir = Join-Path $path "lib\net35\NativeBinaries" +$NativeAssembliesDir = Join-Path $path "lib\net40\NativeBinaries" $x86 = $(Join-Path $NativeAssembliesDir "x86\*.*") $x64 = $(Join-Path $NativeAssembliesDir "amd64\*.*") -- cgit v1.2.3