public ClarifyContext(DovetailDatabaseSettings settings, IContainer container, ILogger logger, DovetailCRMSettings crmSettings)
 {
     _settings           = settings;
     _container          = container;
     _logger             = logger;
     _crmSettings        = crmSettings;
     _clarifyApplication = InitializeClarifyApplication();
 }
 public ClarifyContext(DovetailDatabaseSettings settings, IContainer container, ILogger logger, DovetailCRMSettings crmSettings)
 {
     _settings = settings;
     _container = container;
     _logger = logger;
     _crmSettings = crmSettings;
     _clarifyApplication = InitializeClarifyApplication();
 }
        private static NameValueCollection GetDovetailSdkConfiguration(DovetailDatabaseSettings settings, DovetailCRMSettings crmSettings)
        {
            var configuration = new NameValueCollection
            {
                { "fchoice.dbtype", settings.Type },
                { "fchoice.connectionstring", settings.ConnectionString },
                { "fchoice.disableloginfromfcapp", "false" },
                { "fchoice.sessionpasswordrequired", "false" },
                { "fchoice.nocachefile", "true" }
            };

            var source = configuration;

            if (crmSettings.DatabaseConnectionString.IsNotEmpty())
            {
                source = new NameValueCollection
                {
                    { "fchoice.dbtype", crmSettings.DatabaseType },
                    { "fchoice.connectionstring", crmSettings.DatabaseConnectionString },
                    { "fchoice.disableloginfromfcapp", "false" },
                    { "fchoice.sessionpasswordrequired", "false" },
                    { "fchoice.nocachefile", "true" }
                };
            }

            return(Merge(source, ConfigurationManager.AppSettings));
        }
        private static NameValueCollection GetDovetailSdkConfiguration(DovetailDatabaseSettings settings, DovetailCRMSettings crmSettings)
        {
            var configuration = new NameValueCollection
            {
                {"fchoice.dbtype", settings.Type},
                {"fchoice.connectionstring", settings.ConnectionString},
                {"fchoice.disableloginfromfcapp", "false"},
                {"fchoice.sessionpasswordrequired", "false"},
                {"fchoice.nocachefile", "true"}
            };

            var source = configuration;
            if (crmSettings.DatabaseConnectionString.IsNotEmpty())
            {
                source = new NameValueCollection
                {
                    {"fchoice.dbtype", crmSettings.DatabaseType},
                    {"fchoice.connectionstring", crmSettings.DatabaseConnectionString},
                    {"fchoice.disableloginfromfcapp", "false"},
                    {"fchoice.sessionpasswordrequired", "false"},
                    {"fchoice.nocachefile", "true"}
                };
            }

            return Merge(source, ConfigurationManager.AppSettings);
        }