public async Task <string> QrCode() { if (Logger.IsEnabled(LogLevel.Trace)) { Logger.LogTrace("qrcode()"); } string puppetId; try { puppetId = Puppet !.SelfId !; } catch (Exception exception) { throw new InvalidOperationException("Can not get qrcode, user might be either not logged in or already logged out", exception); } if (Id != puppetId) { throw new InvalidOperationException("only can get qrcode for the login userself"); } var qrCodeValue = await Puppet.ContactSelfQRCode(); return(qrCodeValue.GuardQrCodeValue()); }