public EventServiceListener(IFeatureRepositoryContext repository, IFeatureHubConfig config) { _repository = repository; _featureHost = config; // tell the repository about how evaluation works // this means features don't need to know about the IEdgeService _repository.ServerSideEvaluation = config.ServerEvaluation; }
public IClientContext NewContext(IFeatureRepositoryContext repository = null, EdgeServiceSource edgeServiceSource = null) { if (repository == null) { repository = Repository; } if (edgeServiceSource == null) { edgeServiceSource = (repo, config) => FeatureHubConfig.defaultEdgeProvider(repo, config); } if (_serverEvaluation) { return(new ServerEvalFeatureContext(repository, this, edgeServiceSource)); } return(new ClientEvalFeatureContext(repository, this, edgeServiceSource)); }
public BaseClientContext(IFeatureRepositoryContext repository, IFeatureHubConfig config) { _repository = repository; _config = config; }
public ClientEvalFeatureContext(IFeatureRepositoryContext repository, IFeatureHubConfig config, EdgeServiceSource edgeServiceSource) : base(repository, config) { _edgeService = edgeServiceSource(repository, config); _weCreatedSources = false; }