Elastacloud.AzureManagement.Fluent.Clients.MobileServiceClient.UpdateAuth C# (CSharp) Method

UpdateAuth() private method

Used to update the authentication for the mobile service
private UpdateAuth ( ) : void
return void
        private void UpdateAuth()
        {
            // setup the providers
            var providers = new List<MobileServicesAuthProvider>();
            var googleProvider = new MobileServicesAuthProvider(Constants.GoogleProvider, GoogleClientId, GoogleClientSecret);
            var facebookProvider = new MobileServicesAuthProvider(Constants.FacebookProvider, FacebookClientId, FacebookClientSecret);
            var twitterProvider = new MobileServicesAuthProvider(Constants.TwitterProvider, TwitterClientId, TwitterClientSecret);
            //check whether they are empty or not
            if (!(String.IsNullOrEmpty(GoogleClientId) && String.IsNullOrEmpty(GoogleClientSecret)))
            {
                providers.Add(googleProvider);
            }
            if (!(String.IsNullOrEmpty(TwitterClientId) && String.IsNullOrEmpty(TwitterClientSecret)))
            {
                providers.Add(twitterProvider);
            }
            if (!(String.IsNullOrEmpty(FacebookClientId) && String.IsNullOrEmpty(FacebookClientSecret)))
            {
                providers.Add(facebookProvider);
            }
            // execute the command
            var converted = JsonConvert.SerializeObject(providers);
            var command = new UpdateMobileServiceSettingsCommand(MobileServiceName, Constants.MobileServicesAuthSettings, converted)
            {
                SubscriptionId = SubscriptionId,
                Certificate = ManagementCertificate
            };
            command.Execute();
        }