private void UpdateThisDevice()

in src/Amazon.Extensions.CognitoAuthentication/CognitoDevice.cs [258:273]


        private void UpdateThisDevice(DeviceType device)
        {
            if (device == null)
            {
                throw new InternalErrorException("Service returned null object, this device was not updated.");
            }

            if (!string.Equals(device.DeviceKey, this.DeviceKey))
            {
                throw new InternalErrorException("Device keys don't match, this device was not updated.");
            }

            DeviceAttributes = CreateDictionaryFromAttributeList(device.DeviceAttributes);
            LastModified = device.DeviceLastModifiedDate;
            LastAuthenticated = device.DeviceLastAuthenticatedDate;
        }