Skip to content

Commit c840978

Browse files
committed
Change TypeInfo to Type.
1 parent ec41cc0 commit c840978

File tree

15 files changed

+167
-151
lines changed

15 files changed

+167
-151
lines changed

Resources/Dependencies/DapperExtensions.StrongName/DapperExtensionsConfiguration.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ protected virtual Type GetMapType(Type entityType)
9898
select type).SingleOrDefault();
9999
};
100100

101-
Type result = getType(entityType.GetTypeInfo().Assembly);
101+
Type result = getType(entityType.Assembly);
102102
if (result != null)
103103
{
104104
return result;
@@ -113,7 +113,7 @@ protected virtual Type GetMapType(Type entityType)
113113
}
114114
}
115115

116-
return getType(entityType.GetTypeInfo().Assembly);
116+
return getType(entityType.Assembly);
117117
}
118118
}
119-
}
119+
}

Resources/Dependencies/DapperExtensions.StrongName/ReflectionHelper.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static class ReflectionHelper
3030
typeof(DateTimeOffset),
3131
typeof(byte[])
3232
};
33-
33+
3434
public static MemberInfo GetProperty(LambdaExpression lambda)
3535
{
3636
Expression expr = lambda;
@@ -84,7 +84,7 @@ public static string AppendStrings(this IEnumerable<string> list, string seperat
8484
public static bool IsSimpleType(Type type)
8585
{
8686
Type actualType = type;
87-
if (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
87+
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
8888
{
8989
actualType = type.GetGenericArguments()[0];
9090
}
@@ -104,4 +104,4 @@ public static string SetParameterName(this IDictionary<string, object> parameter
104104
return name;
105105
}
106106
}
107-
}
107+
}

Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private void RunIL2CPU(string kernelFileName, string outputFile)
253253
xArgs.Insert(0, "run");
254254
xArgs.Insert(1, "--no-build");
255255
xArgs.Insert(2, " -- ");
256-
RunProcess("dotnet", xIL2CPUPath, xArgs, true);
256+
RunProcess("dotnet", xIL2CPUPath, xArgs);
257257
}
258258
}
259259
}

Tests/Cosmos.TestRunner.Core/Engine.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1+
using Cosmos.Build.Common;
12
using System;
23
using System.Collections.Generic;
34
using System.IO;
4-
using System.Reflection;
5-
6-
using Cosmos.Build.Common;
75

86
namespace Cosmos.TestRunner.Core
97
{
@@ -59,7 +57,7 @@ public bool Execute()
5957
{
6058
foreach (var xAssemblyFile in KernelsToRun)
6159
{
62-
mBaseWorkingDirectory = Path.Combine(Path.GetDirectoryName(typeof(Engine).GetTypeInfo().Assembly.Location), "WorkingDirectory");
60+
mBaseWorkingDirectory = Path.Combine(Path.GetDirectoryName(typeof(Engine).Assembly.Location), "WorkingDirectory");
6361
if (Directory.Exists(mBaseWorkingDirectory))
6462
{
6563
Directory.Delete(mBaseWorkingDirectory, true);

Tests/Cosmos.TestRunner.Core/TestKernelSets.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ public static class TestKernelSets
88
// Kernel types to run: the ones that will run in test runners that use the default engine configuration.
99
public static IEnumerable<Type> GetKernelTypesToRun()
1010
{
11-
yield return typeof(KernelGen3.Boot);
12-
//return GetStableKernelTypes();
11+
//yield return typeof(KernelGen3.Boot);
12+
return GetStableKernelTypes();
1313
}
1414

1515
// Stable kernel types: the ones that are stable and will run in AppVeyor

Tests/Cosmos.TestRunner.UnitTest/MyEngine.cs

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
using System;
2-
using System.IO;
3-
using System.Reflection;
4-
5-
using Cosmos.Build.Common;
1+
using Cosmos.Build.Common;
62
using Cosmos.TestRunner.Core;
7-
83
using NUnit.Framework;
4+
using System;
5+
using System.IO;
96

107
namespace Cosmos.TestRunner.UnitTest
118
{
@@ -19,7 +16,7 @@ public void Test(Type kernelToRun)
1916
{
2017
try
2118
{
22-
Directory.SetCurrentDirectory(Path.GetDirectoryName(typeof(RunKernels).GetTypeInfo().Assembly.Location));
19+
Directory.SetCurrentDirectory(Path.GetDirectoryName(typeof(RunKernels).Assembly.Location));
2320

2421
var xEngine = new Engine();
2522

@@ -41,7 +38,7 @@ public void Test(Type kernelToRun)
4138
xEngine.StackCorruptionChecksLevel = StackCorruptionDetectionLevel.MethodFooters;
4239

4340
// Select kernels to be tested by adding them to the engine
44-
xEngine.AddKernel(kernelToRun.GetTypeInfo().Assembly.Location);
41+
xEngine.AddKernel(kernelToRun.Assembly.Location);
4542

4643
xEngine.OutputHandler = new TestOutputHandler();
4744

Tests/Cosmos.TestRunner/Cosmos.TestRunner.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
<OutputType>Exe</OutputType>
56
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
67
<DebugType>Full</DebugType>
78
<SignAssembly>True</SignAssembly>
89
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
9-
<OutputType>Exe</OutputType>
1010
</PropertyGroup>
1111

1212
<ItemGroup>

Tools/Cosmos.IL2CPU.Profiler/Cosmos.IL2CPU.Profiler.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
<RuntimeIdentifiers>win7-x86</RuntimeIdentifiers>
5+
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
66
<DebugType>Full</DebugType>
77
<SignAssembly>True</SignAssembly>
88
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>

Tools/PlugsInspector/PlugsInspector.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net462</TargetFramework>
5-
<RuntimeIdentifiers>win7-x86</RuntimeIdentifiers>
5+
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
66
<DebugType>Full</DebugType>
77
<SignAssembly>True</SignAssembly>
88
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
@@ -36,4 +36,4 @@
3636
</Compile>
3737
</ItemGroup>
3838

39-
</Project>
39+
</Project>

source/Cosmos.Build.Common/EnumValue.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using System.Reflection;
5-
using System.Text;
6-
using System.ComponentModel;
74

85
namespace Cosmos.Build.Common
96
{
@@ -24,7 +21,7 @@ public static T Parse<T>(string value, T @default)
2421
T result = @default;
2522

2623
Type valueType = typeof(T);
27-
if (valueType.GetTypeInfo().IsEnum == false)
24+
if (valueType.IsEnum == false)
2825
{
2926
throw new ArgumentException("Enum types only supported.", "T");
3027
}
@@ -55,7 +52,7 @@ public static EnumValue Find(System.Collections.IEnumerable items, Enum value)
5552

5653
public static EnumValue[] GetEnumValues(Type enumType, bool aSort)
5754
{
58-
if (!enumType.GetTypeInfo().IsEnum)
55+
if (!enumType.IsEnum)
5956
{
6057
throw new Exception("Invalid type, only enum types allowed.");
6158
}

0 commit comments

Comments
 (0)