Giter Site home page Giter Site logo

agileobjects / netstandardpolyfills Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 2.0 628 KB

Type and Reflection polyfill extension methods. .NET 3.5+ and .NET Standard 1.0+.

License: MIT License

C# 99.95% Batchfile 0.05%
polyfill netstandard reflection

netstandardpolyfills's Introduction

.NET Standard Polyfills

NuGet

A set of Type and Reflection polyfill extension methods for .NET Standard v1.0+ and .NET v3.5+.

Type Info:

  • Type.CanBeNull()
  • Type.IsAbstract()
  • Type.IsAnonymous()
  • Type.IsAssignableTo(Type type)
  • Type.IsClass()
  • Type.IsClosedTypeOf(Type genericTypeDefinition)
  • Type.IsDerivedFrom(Type parentType)
  • Type.IsEnum()
  • Type.IsEnumerable()
  • Type.IsGenericParameter()
  • Type.IsGenericType()
  • Type.IsInterface()
  • Type.IsNullableType()
  • Type.IsPrimitive()
  • Type.IsPublic()
  • Type.IsSealed()
  • Type.IsValueType()
  • Type.GetAssembly()
  • Type.GetAttributes()
  • Type.GetBaseType()
  • Type.GetConstraints()
  • Type.GetConstraintTypes()
  • Type.GetInterfaces()
  • Type.GetGenericTypeArguments()
  • Type.GetNonNullableType()
  • Type.GetTypeCode()
  • Type.HasAttribute<TAttribute>()

Constructor Retrieval:

  • Type.GetPublicInstanceConstructors()
  • Type.GetPublicInstanceConstructor(params Type[] parameterTypes)
  • Type.GetNonPublicInstanceConstructors()
  • Type.GetNonPublicInstanceConstructor(params Type[] parameterTypes)
  • Type.GetStaticConstructor()

Field Retrieval:

  • Type.GetPublicStaticFields()
  • Type.GetPublicStaticField(string name)
  • Type.GetPublicInstanceFields()
  • Type.GetPublicInstanceField(string name)
  • Type.GetNonPublicStaticFields()
  • Type.GetNonPublicStaticField(string name)
  • Type.GetNonPublicInstanceFields()
  • Type.GetNonPublicInstanceField(string name)

Property Retrieval:

  • MethodInfo.GetProperty()
  • Type.GetPublicStaticProperties()
  • Type.GetPublicStaticProperty(string name)
  • Type.GetPublicInstanceProperties()
  • Type.GetPublicInstanceProperty(string name)
  • Type.GetNonPublicStaticProperties()
  • Type.GetNonPublicStaticProperty(string name)
  • Type.GetNonPublicInstanceProperties()
  • Type.GetNonPublicInstanceProperty(string name)

Method Retrieval:

  • Type.GetPublicMethods()
  • Type.GetPublicMethod(string name)
  • Type.GetPublicMethod(string name, int parameterCount)
  • Type.GetPublicMethod(string name, params Type[] parameterTypes)* Type.GetPublicStaticMethods()
  • Type.GetPublicStaticMethod(string name)
  • Type.GetPublicStaticMethod(string name, int parameterCount)
  • Type.GetPublicStaticMethod(string name, params Type[] parameterTypes)
  • Type.GetPublicInstanceMethods()
  • Type.GetPublicInstanceMethod(string name)
  • Type.GetPublicInstanceMethod(string name, int parameterCount)
  • Type.GetPublicInstanceMethod(string name, params Type[] parameterTypes)
  • Type.GetNonPublicStaticMethods()
  • Type.GetNonPublicStaticMethod(string name)
  • Type.GetNonPublicStaticMethod(string name, int parameterCount)
  • Type.GetNonPublicStaticMethod(string name, params Type[] parameterTypes)
  • Type.GetNonPublicInstanceMethods()
  • Type.GetNonPublicInstanceMethod(string name)
  • Type.GetNonPublicInstanceMethod(string name, int parameterCount)
  • Type.GetNonPublicInstanceMethod(string name, params Type[] parameterTypes)

Member Retrieval:

  • Type.GetPublicStaticMembers()
  • Type.GetPublicStaticMembers(string name)
  • Type.GetPublicStaticMember(string name)
  • Type.GetPublicInstanceMembers()
  • Type.GetPublicInstanceMembers(string name)
  • Type.GetPublicInstanceMember(string name)
  • Type.GetNonPublicStaticMembers()
  • Type.GetNonPublicStaticMembers(string name)
  • Type.GetNonPublicStaticMember(string name)
  • Type.GetNonPublicInstanceMembers()
  • Type.GetNonPublicInstanceMembers(string name)
  • Type.GetNonPublicInstanceMember(string name)

Operator Retrieval:

  • Type.GetOperators(Action matcher = null)
  • Type.GetImplicitOperators()
  • Type.GetImplicitOperator(Action matcher = null)
  • Type.GetExplicitOperators()
  • Type.GetExplicitOperator(Action matcher = null)

Assembly Info:

  • Assembly.GetLocation()
  • Assembly.GetAllTypes()

Misc

  • ParameterInfo.IsParamsArray()
  • PropertyInfo.IsPublic()
  • PropertyInfo.IsStatic()
  • PropertyInfo.IsReadable()
  • PropertyInfo.IsWritable()
  • PropertyInfo.IsIndexer()
  • PropertyInfo.GetAccessors(bool nonPublic)
  • PropertyInfo.GetGetter(bool nonPublic)
  • PropertyInfo.GetSetter(bool nonPublic)
  • MethodInfo.IsAccessor()
  • MethodInfo.IsAccessor(out PropertyInfo property)
  • MethodInfo.IsImplicitOperator()
  • MethodInfo.IsExplicitOperator()
  • MemberInfo.HasAttribute<TAttribute>()

Download

You can download and install using the NuGet package, or clone the repository on GitHub.

netstandardpolyfills's People

Contributors

fornever avatar stevewilkes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.