Interface ITranslationProviderCredentialStore
This interface represents a storage mechanism for translation provider credentials. The host application will provide an implementation of this object, which will be passed on to the ITranslationProviderFactory and ITranslationProviderWinFormsUI components so they can retrieve and add credentials from and to the store. It is up to the store implementation whether it for instance persists its contents or not.
Namespace: SdlSdl.LanguagePlatformTranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public interface ITranslationProviderCredentialStore
Methods
AddCredential(Uri, TranslationProviderCredential)
Adds or updates the credential for the specified URI.
Declaration
void AddCredential(Uri uri, TranslationProviderCredential credential)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The URI for which to add or update the credential. Note that this does not necessarily have to be the translation provider URI itself. It can be a more general URI, for instance identifying the server on which the translation provider lives. This allows for reusing credentials for different translation providers hosted on the same server. |
TranslationProviderCredential | credential | A serialized credential. |
Clear()
Removes all credentials stored in this store.
Declaration
void Clear()
GetCredential(Uri)
Gets a credential for the given URI.
Declaration
TranslationProviderCredential GetCredential(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The URI for which to retrieve the credential. Note that this does not necessarily have to be the translation provider URI itself. It can be a more general URI, for instance identifying the server on which the translation provider lives. This allows for reusing credentials for different translation providers hosted on the same server. |
Returns
Type | Description |
---|---|
TranslationProviderCredential | A serialized credential; or null if no credential for the given URI is available. |
RemoveCredential(Uri)
Removes the credential for the specified URI.
Declaration
void RemoveCredential(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The URI for which to remove the credential. Note that this does not necessarily have to be the translation provider URI itself. It can be a more general URI, for instance identifying the server on which the translation provider lives. This allows for reusing credentials for different translation providers hosted on the same server. |