Skip to content

Commit 3d6f1e1

Browse files
rheoneahsteele
authored andcommitted
Cleanup MAC Address documentation
* fixed MacAddress.rst reference in index.rst * fixing the headings * further heading fixing Issue: #29
1 parent 5e90538 commit 3d6f1e1

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

docs/MacAddress.rst

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ The ``MacAddress`` class implements ``IEquatable<MacAddress>``, ``IComparable<Ma
1111

1212
Unless otherwise stated recognized readable MAC Address formats include only the following formats:
1313

14-
- **IEEE 802** format for printing **EUI-48** and **MAC-48** addresses in six groups of two hexadecimal digits, separated by a dash (``-``). *E.g.* ``AA-BB-CC-DD-EE-FF``
15-
- **Common** Six groups of two hexadecimal digits separated by colons (``:``). *E.g.* ``AA:BB:CC:DD:EE:FF``
14+
- IEEE 802 format for printing **EUI-48** and **MAC-48** addresses in six groups of two hexadecimal digits, separated by a dash (``-``). *E.g.* ``AA-BB-CC-DD-EE-FF``
15+
- Common Six groups of two hexadecimal digits separated by colons (``:``). *E.g.* ``AA:BB:CC:DD:EE:FF``
1616
- Six groups of two hexadecimal digits separated by a space character. *E.g.* ``AA BB CC DD EE FF``
1717
- 12 hexadecimal digits with no delimitation. *E.g.* ``AABBCCDDEEFF``
18-
- **Cisco** three groups of four hexadecimal digits separated by dots (``.``). *E.g.* ``AABB.CCDD.EEFF``
18+
- Cisco three groups of four hexadecimal digits separated by dots (``.``). *E.g.* ``AABB.CCDD.EEFF``
1919

2020
For the sake of parsing and reading these formats are case insensitive.
2121

@@ -30,17 +30,23 @@ The ``MacAddress`` class implements ``IEquatable<MacAddress>``, ``IComparable<Ma
3030
Creation
3131
--------
3232

33-
constructor ``IEnumerable<byte>``
34-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33+
Constructor
34+
^^^^^^^^^^^
35+
36+
``IEnumerable<byte>``
37+
+++++++++++++++++++++
3538

3639
A new ``MacAddress`` may be constructed by providing an ``IEnumerable<byte>`` of six bytes to the constructor.
3740

3841
.. code-block:: c#
3942
4043
public MacAddress(IEnumerable<byte> bytes)
4144
42-
parse Parse ``string``
43-
^^^^^^^^^^^^^^^^^^^^^^
45+
Factory
46+
^^^^^^^
47+
48+
Parse ``string``
49+
++++++++++++++++
4450

4551
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.
4652

@@ -52,8 +58,8 @@ A ``MacAddress`` may also be created via either the ``Parse`` or safe ``TryParse
5258
5359
public static bool TryParse(string input, out MacAddress macAddress)
5460
55-
parse ParseAny ``string``
56-
^^^^^^^^^^^^^^^^^^^^^^^^^
61+
ParseAny ``string``
62+
+++++++++++++++++++
5763

5864
``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.
5965

@@ -131,7 +137,7 @@ Operators
131137

132138
.. rubric:: Footnotes
133139

134-
.. [#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.
140+
.. [#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.
135141
136142
.. [#EUI-48Default] The recommended null or default value for **EUI-48** is ``FF-FF-FF-FF-FF-FF``
137143

0 commit comments

Comments
 (0)