Table of Contents

Interface IIpRangeLocationProvider

Namespace
VpnHood.Net.IpLocations
Assembly
VpnHood.Net.IpLocations.dll

Represents a provider that also gives each country's IP ranges, from a local database.

public interface IIpRangeLocationProvider : IIpLocationProvider, ICurrentIpLocationProvider, IDisposable
Inherited Members

Methods

GetCountryCodes(CancellationToken)

Gets the countries the database has IP ranges for.

Task<string[]> GetCountryCodes(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task<string[]>

A task whose result is the countries' two-letter codes, in upper case.

GetIpRanges(string, CancellationToken)

Gets a country's IP ranges.

Task<IpRangeOrderedList> GetIpRanges(string countryCode, CancellationToken cancellationToken)

Parameters

countryCode string

The country's two-letter code.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task<IpRangeOrderedList>

A task whose result is the country's ranges, in order.