Skip to content

Commit 65efac3

Browse files
Merge pull request #614 from StephenHodgson/HTK-local
Fixed improper namespace with TypeUtils and missing reference
2 parents 470517c + 84a0b15 commit 65efac3

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Assets/HoloToolkit/CrossPlatform/Scripts/Reflection/ReflectionExtensions.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace HoloToolkit
99
using System.Collections.Generic;
1010
using System.Linq;
1111
using System.Reflection;
12-
using System.Text;
1312

1413
public static class ReflectionExtensions
1514
{
@@ -38,7 +37,7 @@ public static MethodInfo GetMethod(this Type type, string methodName, BindingFla
3837
return result;
3938
}
4039

41-
public static MethodInfo GetMethod(this Type type, string methodName, BindingFlags bindingAttr, Object binder, Type[] parameters, Object[] modifiers)
40+
public static MethodInfo GetMethod(this Type type, string methodName, BindingFlags bindingAttr, Object binder, Type[] parameters, Object[] modifiers)
4241
{
4342
var result = type.GetTypeInfo().GetDeclaredMethod(methodName);
4443
if (result == null)
@@ -101,7 +100,7 @@ public static IEnumerable<MethodInfo> GetMethods(this TypeInfo type, BindingFlag
101100

102101
public static IEnumerable<FieldInfo> GetFields(this Type type)
103102
{
104-
return GetFields(type, (BindingFlags)0x0);
103+
return GetFields(type, (BindingFlags)0x0);
105104
}
106105

107106
public static IEnumerable<FieldInfo> GetFields(this Type type, BindingFlags flags)
@@ -126,12 +125,12 @@ public static PropertyInfo GetProperty(this Type type, string propertyName)
126125

127126
public static PropertyInfo GetProperty(this Type type, string propertyName, BindingFlags flags)
128127
{
129-
return type.GetRuntimeProperty (propertyName);
128+
return type.GetRuntimeProperty(propertyName);
130129
}
131130

132131
public static PropertyInfo GetProperty(this Type type, string propertyName, Type returnType)
133132
{
134-
return type.GetRuntimeProperty (propertyName);
133+
return type.GetRuntimeProperty(propertyName);
135134
}
136135

137136
public static IEnumerable<TypeInfo> GetTypes(this Assembly assembly)
@@ -202,4 +201,4 @@ public static bool IsValueType(this Type type)
202201
}
203202

204203
#endif
205-
}
204+
}

Assets/HoloToolkit/CrossPlatform/Scripts/Reflection/TypeUtils.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using System;
5+
#if UNITY_METRO && !UNITY_EDITOR
6+
using System.Reflection;
7+
#endif
58

6-
namespace HoloToolkit.Unity
9+
namespace HoloToolkit
710
{
811
public static class TypeUtils
912
{

0 commit comments

Comments
 (0)