PortAllocator
Classsealednet10.0
Allocates and manages a range of ports for use in an application context.
namespace Aspire.Hosting.ApplicationModel;
public sealed class PortAllocator : Aspire.Hosting.ApplicationModel.IPortAllocator{ // ...}Remarks
Section titled Remarks This class starts allocating ports from a specified initial port (default is 8000) and ensures that allocated ports do not overlap with ports already marked as used.
Constructors1
Section titled Constructors Allocates and manages a range of ports for use in an application context.
Methods2
Section titled Methods Marks a port as used to prevent it from being allocated.