예제 #1
0
        public DatastoreDbProvider(IConfigurationService configurationService, IDataEntityObjectFactory dataEntityObjectFactory)
        {
            var project = configurationService.Get("DATASTOREDB_PROJECT");

            _db = DatastoreDb.Create(project);
            _dataEntityObjectFactory = dataEntityObjectFactory;
        }
예제 #2
0
 public UserProfileService(ITaskThreadManagementService taskThreadManagementService,
                           IUserProfileRepository userProfileRepository,
                           IDataEntityObjectFactory dataEntityObjectFactory)
 {
     _taskThreadManagementService = taskThreadManagementService;
     _userProfileRepository       = userProfileRepository;
     _dataEntityObjectFactory     = dataEntityObjectFactory;
 }
        public EmulatedDatastoreDbProvider(IConfigurationService configurationService, IDataEntityObjectFactory dataEntityObjectFactory)
        {
            var host    = configurationService.Get("DATASTOREDB_HOST");
            var project = configurationService.Get("DATASTOREDB_PROJECT");
            var port    = Convert.ToInt32(configurationService.Get("DATASTOREDB_PORT"));

            var channel = new Channel(host, port, ChannelCredentials.Insecure);
            var client  = DatastoreClient.Create(channel);

            _db = DatastoreDb.Create(project, "", client);
            _dataEntityObjectFactory = dataEntityObjectFactory;
        }