Skip to content

Commit

Permalink
Update .NET Core 1.0 RTM (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
veblush committed Jun 28, 2016
1 parent 8990e5a commit 5ec62c9
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 26 deletions.
3 changes: 1 addition & 2 deletions core/TypeAlias.Tests/TypeAlias.Tests.xproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
<ProjectGuid>b32a6975-5eee-4154-8cae-354ac9bde273</ProjectGuid>
<RootNamespace>TypeAlias.Tests</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>

<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
Expand Down
14 changes: 11 additions & 3 deletions core/TypeAlias.Tests/TypeAliasTableTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ private TypeAliasTable CreateTypeAliasTable()
return new TypeAliasTable();
}

private Assembly GetAssembly()
{
#if COREFX
return GetType().GetTypeInfo().Assembly;
#else
return GetType().Assembly;
#endif
}
[Test]
public void Test_GetType_Hit()
{
Expand Down Expand Up @@ -95,14 +103,14 @@ public void Test_AddTypeAlias_UsingCalculatedAlias()
[Test]
public void Test_CreateTable_WithCustomAssemblies()
{
var table = new TypeAliasTable(new[] { GetType().Assembly });
var table = new TypeAliasTable(new[] { GetAssembly() });
Assert.AreEqual(typeof(AliceClass), table.GetType(1));
}

[Test]
public void Test_CreateTable_WithFilter()
{
var table = new TypeAliasTable(new[] { GetType().Assembly },
var table = new TypeAliasTable(new[] { GetAssembly() },
t => t.Name.StartsWith("Alice") == false);
Assert.AreEqual(null, table.GetType(1));
Assert.AreEqual(typeof(BobClass), table.GetType(2));
Expand All @@ -111,7 +119,7 @@ public void Test_CreateTable_WithFilter()
[Test]
public void Test_CreateTable_WithCustomResolveAutoAlias()
{
var table = new TypeAliasTable(new[] { GetType().Assembly },
var table = new TypeAliasTable(new[] { GetAssembly() },
null,
t => t.Name.Length);
Assert.AreEqual(typeof(AliceClass), table.GetType(1));
Expand Down
16 changes: 7 additions & 9 deletions core/TypeAlias.Tests/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"TypeAlias": { "target": "project" },
"NUnit": "3.0.0-*"
"NUnit": "3.4.0-*"
},
"frameworks": {
"net20": {
Expand All @@ -10,18 +10,16 @@
},
"net40": {
},
"dnx451": {
},
"dnxcore50": {
"compilationOptions": {
"buildOptions": {
"define": [ "COREFX" ]
},
"dependencies": {
"System.Reflection": "4.1.0-beta-23516",
"System.Reflection.Extensions": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
"System.Runtime.InteropServices": "4.0.21-beta-23516"
"System.Reflection": "4.1.0",
"System.Reflection.Extensions": "4.0.1",
"System.Collections": "4.0.11",
"System.Collections.Concurrent": "4.0.12",
"System.Runtime.InteropServices": "4.1.0"
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions core/TypeAlias/TypeAlias.xproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
<ProjectGuid>fd2d68eb-ddc6-4725-b012-3b6102bf18f1</ProjectGuid>
<RootNamespace>TypeAlias</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>

<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
Expand Down
20 changes: 10 additions & 10 deletions core/TypeAlias/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"net20": {
"frameworkAssemblies": {
},
"compilationOptions": {
"buildOptions": {
},
"dependencies": {
"NetLegacySupport.ConcurrentDictionary": "1.1.0"
Expand All @@ -14,7 +14,7 @@
"net35": {
"frameworkAssemblies": {
},
"compilationOptions": {
"buildOptions": {
},
"dependencies": {
"NetLegacySupport.ConcurrentDictionary": "1.1.0"
Expand All @@ -23,19 +23,19 @@
"net40": {
"frameworkAssemblies": {
},
"compilationOptions": {
"buildOptions": {
}
},
"dotnet5.2": {
"compilationOptions": {
"netstandard1.2": {
"buildOptions": {
"define": [ "COREFX" ]
},
"dependencies": {
"System.Reflection": "4.1.0-beta-23516",
"System.Reflection.Extensions": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
"System.Runtime.InteropServices": "4.0.21-beta-23516"
"System.Reflection": "4.1.0",
"System.Reflection.Extensions": "4.0.1",
"System.Collections": "4.0.11",
"System.Collections.Concurrent": "4.0.12",
"System.Runtime.InteropServices": "4.1.0"
}
}
}
Expand Down

0 comments on commit 5ec62c9

Please sign in to comment.