v2.0.3
版本发布时间: 2021-07-14 00:10:07
georg-jung/ArpLookup最新发布版本:v2.0.3(2021-07-14 00:10:07)
Breaking Changes
- In version 1.x, when calling
Lookup
orLookupAsync
on Windows and no MAC address could be associated with the given IP adress (i.e. if the IP is not on the same subnet), aWin32Exception
withNativeErrorCode == 67
(ERROR_BAD_NET_NAME
) was thrown.- This was inconsistent with our docs, which state
<returns>The mac address if found, null otherwise.</returns>
. - This was different then what the Linux version did, which sticks to what the docs say.
- For a method called
Lookup
, that provides internals about a network that might change, it feels natural that "I did not find a result" is not a result that is exceptional. Rather, the return value is of typePhysicalAddress?
and thus expresses "an address might be found". - As what was throwing before (and thus needed to be handled i.e. by
catch
), returns null now (=> needs to be handled i.e. byif
), this is a breaking change.
- This was inconsistent with our docs, which state
Upgrading
Change code that might be run on Windows and does something comparable to
try
{
var x = Arp.Lookup(IPAddress.Parse("128.0.0.1"));
// found
}
catch (Win32Exception ex)
when (ex.NativeErrorCode == 67)
{
// not found
}
to something like
var x = Arp.Lookup(IPAddress.Parse("128.0.0.1"));
if (x == null)
{
// not found
}
else
{
// found
}
Changes:
- d3f5194b3f598ffca2aa0e0611b27f87ce6b401b Set version to '2.0'
- 9d32f2a736607be613b0fb438044c405c8ccf214 Improve/clarify library description
- e486ad8fe29f726f675ccce5f7505836b6ed17d2 Return null on Windows if address could not be found [ #7 ]
- 6c6917148e1e11a0a7d62e2127209de38aeb889f Format/markdownlint README.md
- cd2fbb86218e6c881a93f60e42ea42053c0da319 remove code that was based on nikeee/wake-on-lan
- 0c2745fcdc01560ea28c1c663abeabb3e9ad2d58 Merge branch 'release/v1.2'
- 9bc65f18c461c95047ca2821cc348c18dadcf24d Set version to '1.3-alpha'
This list of changes was auto generated.
1、 ArpLookup.2.0.3.nupkg 13.17KB
2、 ArpLookup.2.0.3.snupkg 25.38KB