AdapterHelper.FindByFullName Method
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
Finds the index of a type by full name using binary search.
public static T FindByFullName<T>(this IReadOnlyList<T> types, string fullName)
where T : ITypeType Parameters
T- The type of types in the list.
Parameters
typesIReadOnlyList<T>- The list of types, ordered by IType.FullName.
fullNamestring- The full name to search for.
Returns
- T
- The type with the specified full name, or
nullif not found.
Exceptions
- ArgumentNullException
- Thrown when
typesorfullNameisnull.
Remarks
This method uses binary search to efficiently locate a type in a sorted collection. The input collection must be ordered by type full name using ordinal string comparison; otherwise, results are undefined.
