From 3d6f1e15ac2ee2c22ef68f672cbfbc4ac09ad6b9 Mon Sep 17 00:00:00 2001 From: "Robert H. Engelhardt" <1584973+rheone@users.noreply.github.com> Date: Wed, 6 Nov 2019 15:13:22 -0700 Subject: [PATCH] Cleanup MAC Address documentation * fixed MacAddress.rst reference in index.rst * fixing the headings * further heading fixing Issue: #29 --- docs/MacAddress.rst | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/MacAddress.rst b/docs/MacAddress.rst index 5d3f975..667ccf9 100644 --- a/docs/MacAddress.rst +++ b/docs/MacAddress.rst @@ -11,11 +11,11 @@ The ``MacAddress`` class implements ``IEquatable``, ``IComparable``, ``IComparable`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Constructor +^^^^^^^^^^^ + +``IEnumerable`` ++++++++++++++++++++++ A new ``MacAddress`` may be constructed by providing an ``IEnumerable`` of six bytes to the constructor. @@ -39,8 +42,11 @@ A new ``MacAddress`` may be constructed by providing an ``IEnumerable`` of public MacAddress(IEnumerable bytes) -parse Parse ``string`` -^^^^^^^^^^^^^^^^^^^^^^ +Factory +^^^^^^^ + +Parse ``string`` +++++++++++++++++ A ``MacAddress`` may also be created via either the ``Parse`` or safe ``TryParse`` method. Not that these methods are strict in that they will only succeed with a MAC address in a known format. If you wish to more liberally parse a string into a ``MacAddress`` see the ``ParseAny`` and ``TryParseAny`` defined below. @@ -52,8 +58,8 @@ A ``MacAddress`` may also be created via either the ``Parse`` or safe ``TryParse public static bool TryParse(string input, out MacAddress macAddress) -parse ParseAny ``string`` -^^^^^^^^^^^^^^^^^^^^^^^^^ +ParseAny ``string`` ++++++++++++++++++++ ``ParseAny`` and the safe ``TryParseAny`` allow the parsing of an arbitrary string that may be a Mac address into a ``MacAddress``. It looks for six hexadecimal digits within the string, joins them and interprets the result as consecutive big-endian hextets. If six, and only six, hexadecimal digits are not found the parse will fail. @@ -131,7 +137,7 @@ Operators .. rubric:: Footnotes -.. [#48-BitMAC] **48-Bit MAC** is a A Media Access Control Address (MAC) following both the now deprecated *MAC-48* and the active *EUI-48* specifications. +.. [#48-BitMAC] **48-Bit MAC** is a Media Access Control Address (MAC) following both the now deprecated *MAC-48* and the active *EUI-48* specifications. .. [#EUI-48Default] The recommended null or default value for **EUI-48** is ``FF-FF-FF-FF-FF-FF``