PortAllocator
Class sealed net10.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.