Exemple #1
0
        public static void TrySetSecre(this ITencentSecret target, ITencentSecret source)
        {
            if (string.IsNullOrWhiteSpace(target.SecretId))
            {
                target.SecretId = source.SecretId;
            }

            if (string.IsNullOrWhiteSpace(target.SecretKey))
            {
                target.SecretKey = source.SecretKey;
            }
        }
Exemple #2
0
 public static Credential GetCredential(this ITencentSecret secret) => new Credential
 {
     SecretId = secret.SecretId, SecretKey = secret.SecretKey
 };