private static void AppendCredentialsSet(StreamWriter writer, string profileName, ImmutableCredentials ic)
{
writer.WriteLine();
writer.WriteLine("; profile {0} and its credentials", profileName);
writer.WriteLine("# alternative comment marker");
writer.WriteLine("[{0}]", profileName);
writer.WriteLine("aws_access_key_id = {0}", ic.AccessKey);
writer.WriteLine("aws_secret_access_key={0}", ic.SecretKey);
if (ic.UseToken)
writer.WriteLine("aws_session_token= {0}", ic.Token);
writer.WriteLine();
}
}