Class Tools
Various general-purpose helpers.
public static class Tools
- Inheritance
-
objectTools
Methods
CreateEmptyQuery<T>()
public static IQueryable<T> CreateEmptyQuery<T>()
Returns
- IQueryable<T>
Type Parameters
T
IsNullOrEmpty(ICollection?)
Checks that collection is not null and have at least one element.
public static bool IsNullOrEmpty(this ICollection? array)
Parameters
arrayICollectionCollection to check.
Returns
IsProviderAssemblyPresent(string)
Determines whether a provider backend assembly with the given simple name is present — that is,
it is already loaded, can be loaded via Load(string), or its .dll is
physically deployed next to the linq2db assembly.
public static bool IsProviderAssemblyPresent(string assemblyName)
Parameters
assemblyNamestringSimple name of the provider assembly to look for.
Returns
Remarks
As a side effect this may load assemblyName into the current context.
The file-existence fallback is intentionally disabled under PublishSingleFile deployments
(where Location is empty) and never probes the current working directory —
that current-directory fallback was the original single-file detection bug (linq2db#5488).
ToDebugDisplay(string)
public static string ToDebugDisplay(string str)
Parameters
strstring
Returns
TryLoadAssembly(string?, string?)
public static Assembly? TryLoadAssembly(string? assemblyName, string? providerFactory)