예제 #1
0
        public async Task SetSignature(string signature)
        {
            if (Logger.IsEnabled(LogLevel.Trace))
            {
                Logger.LogTrace($"signature({signature})");
            }
            try
            {
                var puppetId = Puppet !.SelfId;
                if (Id != puppetId)
                {
                    throw new InvalidOperationException("only can change signature for user self");
                }
            }
            catch (Exception exception)
            {
                throw new InvalidOperationException("Can not set signature for user self, user might be either not logged in or already logged out", exception);
            }
            await Puppet.ContactSelfSignature(signature);

            await Sync();
        }