예제 #1
0
 public static bool TryParse(string value, out CPUKey cpuKey)
 {
     return(TryParse(CPUKeyUtils.HexStringToBytes(value), out cpuKey));
 }
예제 #2
0
 public static CPUKey Parse(string value)
 {
     return(Parse(CPUKeyUtils.HexStringToBytes(value)));
 }
예제 #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));
 }
예제 #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()));
 }
예제 #5
0
 public bool TryUpdate(string value)
 {
     return(TryUpdate(CPUKeyUtils.HexStringToBytes(value)));
 }