Skip to content
DocsTry Aspire
DocsTry

HostingTypeHelpers Methods

ClassMethods4 members
Provides helper methods for identifying well-known Aspire hosting types by full name.
IsDistributedApplicationBuilderType(Type?)Section titled IsDistributedApplicationBuilderType(Type?)staticbool
Determines whether the specified type is the IDistributedApplicationBuilder interface.
public static class HostingTypeHelpers
{
public static bool IsDistributedApplicationBuilderType(
Type? type)
{
// ...
}
}
typeType?
IsDistributedApplicationType(Type?)Section titled IsDistributedApplicationType(Type?)staticbool
Determines whether the specified type is the DistributedApplication class.
public static class HostingTypeHelpers
{
public static bool IsDistributedApplicationType(
Type? type)
{
// ...
}
}
typeType?
IsResourceBuilderType(Type?)Section titled IsResourceBuilderType(Type?)staticbool
Determines whether the specified type implements the generic IResourceBuilder interface.
public static class HostingTypeHelpers
{
public static bool IsResourceBuilderType(
Type? type)
{
// ...
}
}
typeType?
IsResourceType(Type?)Section titled IsResourceType(Type?)staticbool
Determines whether the specified type implements the IResource interface.
public static class HostingTypeHelpers
{
public static bool IsResourceType(
Type? type)
{
// ...
}
}
typeType?