Adding TMs on the language-pair level

I am trying to add a server TM to a specific language pair, rather than under "All Languages".

I think to do this you have to use the targetLanguage as parameter when getting and updating the translation provider configuration as shown below.

However, when the code executes, the TM cannot be found anywhere, i.e. not under All Languages nor under the specific language pair. Is the assumption below correct?

                TranslationProviderConfiguration tmConfig = project.GetTranslationProviderConfiguration(targetLanguage);

                tmConfig.Entries.Add

                (

                    new TranslationProviderCascadeEntry

                   (

                        new TranslationProviderReference(new Uri(uriString))),  true, true, true, 0

                    )

                );

                TranslationProviderReference(tmConfig, targetLanguage);

                project.Save();