Skip to content

Commit

Permalink
Fix bench
Browse files Browse the repository at this point in the history
  • Loading branch information
etishor committed Nov 21, 2011
1 parent a5e8167 commit 185259b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
12 changes: 12 additions & 0 deletions Serialization.Bench/Program.cs
Expand Up @@ -6,13 +6,25 @@
using SerializersTests;
using SerializersTests.Messages;
using System.Text;
using System.Reflection;
using Newtonsoft.Json.Serialization;

namespace Serialization.Bench
{
class Program
{
static void Main(string[] args)
{
AppDomain.CurrentDomain.AssemblyResolve += (s, o) =>
{
var name = new AssemblyName(o.Name);
if (name.Name.Contains("Newtonsoft.Json"))
{
return typeof(JsonContract).Assembly;
}
return null;
};

SerializationBenchmark.Run();

Console.WriteLine("Done");
Expand Down
12 changes: 3 additions & 9 deletions Serialization.Bench/Serialization.Bench.csproj
Expand Up @@ -36,25 +36,18 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\lib\Newtonsoft.Json\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=4.0.4.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.4.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\NServiceBus\NServiceBus.dll</HintPath>
</Reference>
<Reference Include="protobuf-net">
<HintPath>..\lib\protobuf-net\protobuf-net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Web" />
<Reference Include="System.Web.DataVisualization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Benchmark.cs" />
Expand All @@ -74,6 +67,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
2 changes: 1 addition & 1 deletion Serialization.Bench/app.config
Expand Up @@ -7,7 +7,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
1 change: 1 addition & 0 deletions packages/repositories.config
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\SerializersTests\packages.config" />
<repository path="..\Serialization.Bench\packages.config" />
</repositories>

0 comments on commit 185259b

Please sign in to comment.