<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />

ReflectionUtils

static class ReflectionUtils
public static readonly Type[] EmptyTypes

public static bool CanReadMemberValue(MemberInfo member, bool nonPublic)

Determines whether the specified MemberInfo can be read.

public static bool CanSetMemberValue(MemberInfo member, bool nonPublic, bool canSetReadOnly)

Determines whether the specified MemberInfo can be set.

public static Type EnsureNotNullableType(Type t)

public static T GetAttribute<T>(object attributeProvider) where T : Attribute

public static T GetAttribute<T>(object attributeProvider, bool inherit) where T : Attribute

public static T[] GetAttributes<T>(object attributeProvider, bool inherit) where T : Attribute

public static Attribute[] GetAttributes(object attributeProvider, Type attributeType, bool inherit)

public static MethodInfo GetBaseDefinition(this PropertyInfo propertyInfo)

public static Type GetCollectionItemType(Type type)

Gets the type of the typed collection's items.

public static ConstructorInfo GetDefaultConstructor(Type t, bool nonPublic)

public static object GetDefaultValue(Type type)

public static void GetDictionaryKeyValueTypes(Type dictionaryType, out Type keyType, out Type valueType)

public static IEnumerable<FieldInfo> GetFields(Type targetType, BindingFlags bindingAttr)

public static List<MemberInfo> GetFieldsAndProperties(Type type, BindingFlags bindingAttr)

public static MemberInfo GetMemberInfoFromType(Type targetType, MemberInfo memberInfo)

public static Type GetMemberUnderlyingType(MemberInfo member)

Gets the member's underlying type.

public static object GetMemberValue(MemberInfo member, object target)

Gets the member's value on the object.

public static Type GetObjectType(object v)

public static IEnumerable<PropertyInfo> GetProperties(Type targetType, BindingFlags bindingAttr)

public static string GetTypeName(Type t, FormatterAssemblyStyle assemblyFormat, SerializationBinder binder)

public static bool HasDefaultConstructor(Type t, bool nonPublic)

public static bool ImplementsGenericDefinition(Type type, Type genericInterfaceDefinition)

public static bool ImplementsGenericDefinition(Type type, Type genericInterfaceDefinition, out Type implementingType)

public static bool InheritsGenericDefinition(Type type, Type genericClassDefinition)

public static bool InheritsGenericDefinition(Type type, Type genericClassDefinition, out Type implementingType)

public static bool IsGenericDefinition(Type type, Type genericInterfaceDefinition)

public static bool IsIndexedProperty(MemberInfo member)

Determines whether the member is an indexed property.

public static bool IsIndexedProperty(PropertyInfo property)

Determines whether the property is an indexed property.

public static bool IsMethodOverridden(Type currentType, Type methodDeclaringType, string method)

public static bool IsNullable(Type t)

public static bool IsNullableType(Type t)

public static bool IsPublic(PropertyInfo property)

public static bool IsVirtual(this PropertyInfo propertyInfo)

public static BindingFlags RemoveFlag(this BindingFlags bindingAttr, BindingFlags flag)

public static void SetMemberValue(MemberInfo member, object target, object value)

Sets the member's value on the target object.

public static void SplitFullyQualifiedTypeName(string fullyQualifiedTypeName, out string typeName, out string assemblyName)