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

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 object CreateGeneric(Type genericTypeDefinition, Type innerType, object[] args)

public static object CreateGeneric(Type genericTypeDefinition, IList<Type> innerTypes, object[] args)

public static object CreateGeneric(Type genericTypeDefinition, IList<Type> innerTypes, Func<Type, IList<object>, object> instanceCreator, object[] args)

public static object CreateInstance(Type type, object[] args)

public static Type EnsureNotNullableType(Type t)

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

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

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

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 Type GetDictionaryKeyType(Type dictionaryType)

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

public static Type GetDictionaryValueType(Type dictionaryType)

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)

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

public static bool HasDefaultConstructor(Type t)

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 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 IsInstantiatableType(Type t)

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 IsVirtual(this PropertyInfo propertyInfo)

public static Type MakeGenericType(Type genericTypeDefinition, Type[] innerTypes)

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)