public static string GetMySqlPassword() { string password = ZohoOAuth.GetConfigValue("mysql_password"); if (password == null) { return(""); } return(password); }
public static string GetPortNumber() { string port = ZohoOAuth.GetConfigValue(ZohoOAuthConstants.MYSQL_PORT); if (port == null) { return("3306"); } return(port); }
public static string GetMySqlUserName() { string userName = ZohoOAuth.GetConfigValue("mysql_username"); if (userName == null) { return("root"); } return(userName); }
public static string GetDataBaseName() { string database = ZohoOAuth.GetConfigValue(ZohoOAuthConstants.MYSQL_DATABASE); if (database == null) { return("zohooauth"); } return(database); }
public static string GetServerName() { string server = ZohoOAuth.GetConfigValue(ZohoOAuthConstants.MYSQL_SERVER); if (server == null) { return("localhost"); } return(server); }
public static string GetMySqlPassword() { string password = ZohoOAuth.GetConfigValue(ZohoOAuthConstants.MYSQL_PASSWORD); if (password == null) { return(""); } return(password); }
public static string GetMySqlUserName() { string userName = ZohoOAuth.GetConfigValue(ZohoOAuthConstants.MYSQL_USERNAME); if (userName == null) { return("root"); } return(userName); }
private bool IsTokenGenerated(string currentUserEmail) { try { ZohoOAuthTokens tokens = ZohoOAuth.GetPersistenceHandlerInstance().GetOAuthTokens(currentUserEmail); return(tokens != null ? true : false); } catch (Exception ex) { Trace.TraceError("Is Token Generated Error: " + ex.Message); return(false); } }
public static void Initialize(bool initOAuth, Stream configStream, Dictionary <string, string> configData) { Assembly assembly = Assembly.GetAssembly(typeof(ZCRMConfigUtil)); ConfigProperties = CommonUtil.GetFileAsDict(assembly.GetManifestResourceStream(assembly.GetName().Name + ".Resources.configuration.txt")); if (configStream == null && configData == null) { Dictionary <string, string> keyValuePairs = CommonUtil.GetConfigFileAsDict("zcrm_configuration"); foreach (KeyValuePair <string, string> keyValues in keyValuePairs) { ConfigProperties[keyValues.Key] = keyValues.Value; } } if (configStream != null) { configData = CommonUtil.GetFileAsDict(configStream); configStream = null; } if (configData != null) { AddConfigurationData(configData); } ZCRMLogger.Init(); if (initOAuth) { HandleAuthentication = true; try { ZohoOAuth.Initialize(ConfigProperties.ContainsKey(APIConstants.DOMAIN_SUFFIX) ? (string)ConfigProperties[APIConstants.DOMAIN_SUFFIX] : null, configData); if (ConfigProperties.ContainsKey(APIConstants.DOMAIN_SUFFIX)) { SetAPIBaseUrl(ConfigProperties[APIConstants.DOMAIN_SUFFIX]); } } catch (Exception e) { throw new ZCRMException(e); } } ZCRMLogger.LogInfo("C# Client Library Configuration Properties : " + CommonUtil.DictToString(ConfigProperties)); }
public static string GetPersistenceHandlerFilePath() { return(ZohoOAuth.GetConfigValue("oauth_tokens_file_path")); }