public static FieldInfo[] GetFields( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] this Type type) { Requires.NotNull(type, nameof(type)); return(type.GetFields()); }
public static MethodInfo?GetGetMethod(this PropertyInfo property) { Requires.NotNull(property, nameof(property)); return(property.GetGetMethod()); }
public static MethodInfo?GetSetMethod(this PropertyInfo property, bool nonPublic) { Requires.NotNull(property, nameof(property)); return(property.GetSetMethod(nonPublic)); }
public static Guid GetModuleVersionId(this Module module) { Requires.NotNull(module, nameof(module)); return(module.ModuleVersionId); }
public static MethodInfo[] GetAccessors(this PropertyInfo property, bool nonPublic) { Requires.NotNull(property, nameof(property)); return(property.GetAccessors(nonPublic)); }
public static MethodInfo GetBaseDefinition(this MethodInfo method) { Requires.NotNull(method, nameof(method)); return(method.GetBaseDefinition()); }
public static bool HasModuleVersionId(this Module module) { Requires.NotNull(module, nameof(module)); return(true); // not expected to fail on platforms with Module.ModuleVersionId built-in. }
public static MethodInfo?GetRaiseMethod(this EventInfo eventInfo) { Requires.NotNull(eventInfo, nameof(eventInfo)); return(eventInfo.GetRaiseMethod()); }
public static MethodInfo?GetRemoveMethod(this EventInfo eventInfo, bool nonPublic) { Requires.NotNull(eventInfo, nameof(eventInfo)); return(eventInfo.GetRemoveMethod(nonPublic)); }
public static bool IsInstanceOfType(this Type type, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object?o) { Requires.NotNull(type, nameof(type)); return(type.IsInstanceOfType(o)); }
public static Type[] GetTypes(this Assembly assembly) { Requires.NotNull(assembly, nameof(assembly)); return(assembly.GetTypes()); }
public static bool IsAssignableFrom(this Type type, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] Type?c) { Requires.NotNull(type, nameof(type)); return(type.IsAssignableFrom(c)); }
public static PropertyInfo[] GetProperties( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this Type type) { Requires.NotNull(type, nameof(type)); return(type.GetProperties()); }
public static ConstructorInfo[] GetConstructors( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] this Type type) { Requires.NotNull(type, nameof(type)); return(type.GetConstructors()); }
public static Type[] GetInterfaces(this Type type) { Requires.NotNull(type, nameof(type)); return(type.GetInterfaces()); }
public static Type[] GetGenericArguments(this Type type) { Requires.NotNull(type, nameof(type)); return(type.GetGenericArguments()); }