text: public StaticCredentialsProvider(IClientProfile clientProfile){this.clientProfile = clientProfile;var legacyCredential = this.clientProfile.GetCredential();if (null != legacyCredential.SecurityToken){credentials = new BasicSessionCredentials(legacyCredential.AccessKeyId,legacyCredential.AccessSecret,legacyCredential.SecurityToken);}else{credentials = new LegacyCredentials(legacyCredential);}}