All Projects β†’ StefH β†’ ReflectionBridge

StefH / ReflectionBridge

Licence: MIT License
ReflectionBridge : Provides some extensions which define a bridge for the differences between Type and TypeInfo.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to ReflectionBridge

KuttSharp
πŸ”ͺ .NET Package for kutt.it url shortener
Stars: ✭ 29 (+16%)
Mutual labels:  netstandard
morestachio
Lightweight, powerful, flavorful, template engine.
Stars: ✭ 45 (+80%)
Mutual labels:  netstandard
ObviousAwait
🧡 Expressive aliases to ConfigureAwait(true) and ConfigureAwait(false)
Stars: ✭ 55 (+120%)
Mutual labels:  netstandard
REstate
Portable state-flows (state-machine based workflows)
Stars: ✭ 35 (+40%)
Mutual labels:  netstandard
ZeroDepJson
A .NET Json parser in one .cs file, with zero dependencies.
Stars: ✭ 20 (-20%)
Mutual labels:  netstandard
firebase-auth-dotnet
A .NET API client for Firebase Rest Authentication API that follows Google's API spec as precisely as possible.
Stars: ✭ 16 (-36%)
Mutual labels:  netstandard
Amazon
Simple access to Amazon's web services.
Stars: ✭ 20 (-20%)
Mutual labels:  netstandard
dotnet
.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
Stars: ✭ 865 (+3360%)
Mutual labels:  netstandard
Math-Expression-Evaluator
A C# library for parsing mathemitical expressions with support for parentheses and variables.
Stars: ✭ 97 (+288%)
Mutual labels:  netstandard
PCLExt.FileStorage
Portable Storage APIs
Stars: ✭ 35 (+40%)
Mutual labels:  netstandard
sledge-formats
C# parsers and formats for Half-Life 1 and related engines.
Stars: ✭ 35 (+40%)
Mutual labels:  netstandard
Portable-WebDAV-Library
Moved to codeberg.org - https://codeberg.org/DecaTec/Portable-WebDAV-Library - The Portable WebDAV Library is a strongly typed, async WebDAV client library which is fully compliant to RFC 4918, RFC 4331 and "Additional WebDAV Collection Properties". It is implemented as .NETStandard 1.1 library in oder to be used on any platform supporting .NETS…
Stars: ✭ 45 (+80%)
Mutual labels:  netstandard
AlphaVantage.Net
.Net client library for Alpha Vantage API
Stars: ✭ 65 (+160%)
Mutual labels:  netstandard
Vortice.Vulkan
Cross platform .NET bindings for Vulkan, VMA, SPIRV-Cross and shaderc
Stars: ✭ 172 (+588%)
Mutual labels:  netstandard
NetStandardPolyfills
Type and Reflection polyfill extension methods. .NET 3.5+ and .NET Standard 1.0+.
Stars: ✭ 22 (-12%)
Mutual labels:  netstandard
InTouch
πŸ‘₯ InTouch - is a programming SDK build around vk.com API exposing most of the social platform features including messaging, news feed fetching, communities, and media management.
Stars: ✭ 33 (+32%)
Mutual labels:  netstandard
Decor.NET
A simple way to decorate a class with additional functionality using attributes.
Stars: ✭ 29 (+16%)
Mutual labels:  netstandard
Xid.Net
Ported from https://github.com/rs/xid - A fast, low allocation, zero config, thread-safe 12 byte UUID generator based on the Mongo Object Id algorithm.
Stars: ✭ 17 (-32%)
Mutual labels:  netstandard
ActiveLogin.Identity
Parsing and validation of Swedish identities such as Personal Identity Number (svenskt personnummer) in .NET.
Stars: ✭ 51 (+104%)
Mutual labels:  netstandard
oxyplot-avalonia
A cross-platform plotting library for .NET. This package targets Avalonia apps.
Stars: ✭ 102 (+308%)
Mutual labels:  netstandard

ReflectionBridge

Build status

NuGet Badge

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:

string s = "example";
#if (!(NET40 || NET35 || NET20))
Type t = s.BaseType;
#else
Type t = s.GetTypeInfo().BaseType;
#endif

You can just do:

string s = "example";
Type t = s.BaseType();

An extension method in this project like this does the if-def:

        public static Type BaseType(this Type type)
        {
#if REFLECTIONBRIDGE && (!(NET40 || NET35 || NET20))
            return type.GetTypeInfo().BaseType;
#else
            return type.BaseType;
#endif
        }

Please provide feedback on this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].