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; } }
public static Credential GetCredential(this ITencentSecret secret) => new Credential { SecretId = secret.SecretId, SecretKey = secret.SecretKey };