Skip to content
DocsTry Aspire
DocsTry

NetworkEndpointSnapshotList Methods

ClassMethods4 members
Holds a list of NetworkEndpointSnapshot for an Endpoint, providing thread-safe enumeration and addition.
AddOrUpdateAllocatedEndpoint(NetworkIdentifier, AllocatedEndpoint)Section titled AddOrUpdateAllocatedEndpoint(NetworkIdentifier, AllocatedEndpoint)
Adds or updates an AllocatedEndpoint value associated with a specific network in the snapshot list.
public class NetworkEndpointSnapshotList
{
public void AddOrUpdateAllocatedEndpoint(
NetworkIdentifier networkID,
AllocatedEndpoint endpoint)
{
// ...
}
}
Gets an AllocatedEndpoint for a given network ID, waiting for it to appear if it is not already present.
public class NetworkEndpointSnapshotList
{
public Task<AllocatedEndpoint> GetAllocatedEndpointAsync(
NetworkIdentifier networkID,
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
cancellationTokenCancellationTokenoptional
Provides a thread-safe enumerator over the network endpoint snapshots.
public class NetworkEndpointSnapshotList
{
public IEnumerator<NetworkEndpointSnapshot> GetEnumerator()
{
// ...
}
}
TryAdd(NetworkIdentifier, ValueSnapshot<AllocatedEndpoint>)Section titled TryAdd(NetworkIdentifier, ValueSnapshot<AllocatedEndpoint>)bool
Adds an AllocatedEndpoint snapshot for a specific network if one does not already exist.
public class NetworkEndpointSnapshotList
{
public bool TryAdd(
NetworkIdentifier networkID,
ValueSnapshot<AllocatedEndpoint> snapshot)
{
// ...
}
}
snapshotValueSnapshot<AllocatedEndpoint>