Provides some extensions which define a bridge for the differences between Type and TypeInfo.
This library can be used for the following Frameworks:
- net2.0
- net3.5
- net4.0
- net4.5
- net4.5.x
- net4.6
- net4.6.1
- netcore4.5 Windows Store apps [only up until version 0.0.12]
- netcore4.5.1 Windows Store apps (Windows 8.1) [only up until version 0.0.12]
- netcore5.0 Windows Universal [only up until version 0.0.12]
- dnx451 [only up until version 0.0.12]
- dnxcore5 [only up until version 0.0.12]
- uap10.0
- sl5 (SilverLight 5.0) [only up until version 0.0.12]
- netstandard1.3 and up
So instead of doing this in your code:
strings="example";
#if (!(NET40||NET35||NET20))Typet=s.BaseType;
#else
Typet=s.GetTypeInfo().BaseType;
#endifYou can just do:
strings="example";Typet=s.BaseType();An extension method in this project like this does the if-def:
publicstaticTypeBaseType(thisTypetype){
#if REFLECTIONBRIDGE&&(!(NET40||NET35||NET20))returntype.GetTypeInfo().BaseType;
#else
returntype.BaseType;
#endif
}Please provide feedback on this project.