Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / mscorlib / system / reflection / introspectionextensions.cs
1 // ==++==
2 // 
3 //   Copyright (c) Microsoft Corporation.  All rights reserved.
4 // 
5 // ==--==
6 /*=============================================================================
7 **
8 ** Class: TypeInfoExtension
9 **
10 ** <OWNER>[....]</OWNER>
11 **
12 **
13 ** Purpose: go from type to type info
14 **
15 **
16 =============================================================================*/
17
18 namespace System.Reflection
19 {
20     using System.Reflection;
21
22     public static class IntrospectionExtensions
23     {
24             public static TypeInfo GetTypeInfo(this Type type){
25             if(type == null){
26                 throw new ArgumentNullException("type");
27             }
28             var rcType=(IReflectableType)type;
29             if(rcType==null){
30                 return null;
31             }else{
32                 return rcType.GetTypeInfo();
33             }
34         }   
35     }
36 }
37