Esempio n. 1
0
 public static bool TryParse(string value, out CPUKey cpuKey)
 {
     return(TryParse(CPUKeyUtils.HexStringToBytes(value), out cpuKey));
 }
Esempio n. 2
0
 public static CPUKey Parse(string value)
 {
     return(Parse(CPUKeyUtils.HexStringToBytes(value)));
 }
Esempio n. 3
0
 /// <summary>
 /// Sanity check to verify that a <see cref="CPUKey"/> object is valid.
 /// </summary>
 /// <param name="cpukey">The <see cref="CPUKey"/> object to validate.</param>
 /// <returns>Returns <c>true</c> if the object is a valid CPUKey, <c>false</c> otherwise.</returns>
 public bool IsValid()
 {
     return(CPUKeyUtils.IsValid(this));
 }
Esempio n. 4
0
 /// <summary>
 /// Overrides base ToString() method.
 /// </summary>
 /// <returns>A UTF-16 encoded string representing the CPUKey.</returns>
 public override string ToString()
 {
     return(ToByteArray() is null
                         ? String.Empty
                         : CPUKeyUtils.BytesToHexString(ToByteArray()));
 }
Esempio n. 5
0
 public bool TryUpdate(string value)
 {
     return(TryUpdate(CPUKeyUtils.HexStringToBytes(value)));
 }