Beispiel #1
0
 /// <summary>
 /// Gets all fields on the given <paramref name="type"/> that match the specified <paramref name="bindingFlags"/>.
 /// The resulting list of members can optionally be filtered by supplying a list of
 /// <paramref name="attributeTypes"/>, in which case only members decorated with at least one of
 /// these will be included.
 /// </summary>
 /// <param name="type">The type on which to reflect.</param>
 /// <param name="bindingFlags">The <see cref="BindingFlags"/> or <see cref="FasterflectFlags"/> combination
 /// used to define the search behavior and result filtering.</param>
 /// <param name="attributeTypes">The optional list of attribute types with which members should
 /// be decorated. If this parameter is <see langword="null"/> or empty then all fields matching the given
 /// <paramref name="bindingFlags"/> will be included in the result.</param>
 /// <returns>A list of all matching fields on the type. This value will never be null.</returns>
 public static IList <FieldInfo> FieldsWith(this Type type, FasterflectFlags bindingFlags, params Type[] attributeTypes)
 {
     return(ReflectLookup.FieldsWith(type, bindingFlags, attributeTypes));
 }