Exemple #1
0
        protected INoSqlContext GetNoSqlContext(string provider, string host, string key, string user, string password)
        {
            INoSqlContext ctx = null;

            ctx = FactoryNoSqlContext.CreateNoSqlObject(provider);
            ctx.Authenticate(host, key, user, password);

            return(ctx);
        }
        private void Authen(INoSqlContext ctx)
        {
            string host     = Environment.GetEnvironmentVariable("ONIX_FIREBASE_DATABASE");
            string key      = Environment.GetEnvironmentVariable("ONIX_FIREBASE_KEY");
            string username = Environment.GetEnvironmentVariable("ONIX_FIREBASE_USERNAME");
            string password = Environment.GetEnvironmentVariable("ONIX_FIREBASE_PASSWORD");

            //This is for unit testing only, DO NOT put any production data in this DB
            ctx.Authenticate(host,
                             key,
                             username,
                             password);
        }