Exemple #1
0
 public static void Check(string macAddress)
 {
     if (!MacAddressEx.IsValid(macAddress))
     {
         throw new InvalidMacAddressException(macAddress);
     }
 }
Exemple #2
0
 public static bool TryParse(string macAddress, out byte[] macBuffer)
 {
     if (MacAddressEx.IsValid(macAddress))
     {
         macBuffer = new byte[0];
         return(false);
     }
     else
     {
         macBuffer = ConvertEx.FromHexString(macAddress.Replace("-", "").Replace(":", ""));
         return(true);
     }
 }