Ejemplo n.º 1
0
        public Translator(string credFilePath)
        {
            credPath = credFilePath;
            TranslationServiceClientBuilder clientBuilder = new TranslationServiceClientBuilder
            {
                CredentialsPath = credPath
            };

            this.translationClient = clientBuilder.Build();
        }
Ejemplo n.º 2
0
        public GoogleApi(string projectId, string locaionId, string jsonCredential)
        {
            this.projectId = projectId;
            this.locaionId = locaionId;

            var builder = new TranslationServiceClientBuilder()
            {
                JsonCredentials = jsonCredential,
            };

            client = builder.Build();
        }