Open andrewwong0893 opened 4 months ago
Hello. Yep, you should be using the manager. DeviceIdBuilder
knows nothing about versions. You need to use DeviceIdManager
to generate your versioned device ID, using the DeviceIdManager.GetDeviceId
method (or the ToString
method).
Hello,
Correct me if I am wrong but I have the following example:
If I were to run the following
var isValid = idManager.Validate(id.ToString());
I get a failed result when I expected this to pass.
If I was to comment out the
.AddMachineName()
and then run it, version one of the ID Manager would then say it is valid.When I dived into validate method of the ID Manager, it looks like I am expecting to send a string of the following format: ${version}${deviceId}
This seems counter-intuitive as the DeviceIdBuilder does not output a version.
Looking into your other methods in DeviceIdManager, you have an override for ToString which basically does the exact same thing as the builder but it includes the version number in.
Should I be using the manager instead?