Example #1
0
        public IPatronusClient GetClient(string tableName)
        {
            if (Clients.ContainsKey(tableName))
            {
                return(Clients[tableName]);
            }
            var dynamoClientFactory = DynamoClientFactory.GetInstance();
            var patronusClient      = new PatronusClient(dynamoClientFactory, tableName);

            Clients.TryAdd(tableName, patronusClient);
            return(Clients[tableName]);
        }
        private static IPatronusUatClient BuildClient(IDataStoreConfig config)
        {
            if (Clients.ContainsKey(config.Name))
            {
                return(Clients[config.Name]);
            }
            var dynamoClientFactory = DynamoClientFactory.GetInstance();
            var patronusUatClient   = new PatronusUatClient(dynamoClientFactory, config.TableName);

            Clients.TryAdd(config.Name, patronusUatClient);
            return(Clients[config.Name]);
        }