Is there a way of finding out the Network cost on .Net Core 2.0?
This is how I get the Network cost in my c++ code:
hr = pNetworkCostManager->GetCost(&dwCost, NULL);
if (hr == S_OK) {
switch (dwCost) {
case NLM_CONNECTION_COST_UNRESTRICTED:
case NLM_CONNECTION_COST_FIXED:
case NLM_CONNECTION_COST_VARIABLE:
case NLM_CONNECTION_COST_OVERDATALIMIT:
case NLM_CONNECTION_COST_CONGESTED:
case NLM_CONNECTION_COST_ROAMING:
case NLM_CONNECTION_COST_APPROACHINGDATALIMIT:
case NLM_CONNECTION_COST_UNKNOWN:
}
}
One thing that .Net Core (2.0) has is NetworkInterfaceType (https://docs.microsoft.com/en-us/dotnet/api/system.net.networkinformation.networkinterfacetype?view=netcore-1.0)
Based on the NetworkInterfaceType I can see if it has wifi, network or mobile connection but that will not translate to a cost.
Is there any way finding out the Network cost on .Net Core 2.0?