Skip to content
DocsTry Aspire
DocsTry

IResourceCollection Methods

InterfaceMethods1 member
Represents a collection of resources.
TryGetByName(string, IResource?)Section titled TryGetByName(string, IResource?)virtualbool
Attempts to find a resource by its name.
public interface IResourceCollection
{
public virtual bool TryGetByName(
string name,
out IResource? resource)
{
// ...
}
}
namestringThe name of the resource to find.
resourceIResource?When this method returns, contains the resource with the specified name, if found; otherwise, null.
booltrue if a resource with the specified name was found; otherwise, false.
The resource name comparison is case-insensitive.