CompanyPublicIpExtensions
Customer-builder sugar for stamping the public (WAN) IPv4 onto a Company. The IP is the single source of truth for downstream consumers (NixDnsTemplate, firewall, port-forward docs). Stored process-statically because the Company entity from netbase has no IP slot; LiberatorWithWinDCTranslator reads it after Translate() and assigns config.DirectoryService.PublicIP.
public static class CompanyPublicIpExtensions
1. Methods
1.1. Clear()
Test seam: drop all registered entries.
public static void Clear()
1.2. TryGetPublicIp(Company)
Lookup the stamped public IP for a company. Returns null when no WithPublicIP call referenced this company name.
public static string TryGetPublicIp(Company company)
| Name | Type | Description |
|---|---|---|
company |
Company |
Returns: string
1.3. WithPublicIP(Company, string)
Stamp the public (WAN) IPv4 on the company entity (post-Build).
var company = Company.CreateBuilder("test.zh", "CH", "Zurich")
.AddDevice(...).Build()
.WithPublicIP("203.0.113.5");
public static Company WithPublicIP(this Company company, string publicIp)
| Name | Type | Description |
|---|---|---|
company |
Company |
|
publicIp |
string |
Returns: Company