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

MobileServiceClient() public method

Used to construct a mobile service client
public MobileServiceClient ( string subscriptionId, X509Certificate2 certificate, string mobileServiceName = null ) : System
subscriptionId string the subscription id referenced
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The management certificate to access the subscription
mobileServiceName string The name of the mobile service
return System
        public MobileServiceClient(string subscriptionId, X509Certificate2 certificate, string mobileServiceName = null)
        {
            SubscriptionId = subscriptionId;
            ManagementCertificate = certificate;
            MobileServiceSqlName = "ZumoSqlServer_" + Guid.NewGuid().ToString("n");
            MobileServiceDbName = "ZumoSqlDatabase_" + Guid.NewGuid().ToString("n");

            if (mobileServiceName == null) return;
            MobileServiceName = mobileServiceName;
            try
            {
                Refresh();
            }
            catch (Exception)
            {
                throw new FluentManagementException("mobile service does not exist!", "MobileServiceClient");
            }
        }