public IEnumerable<Subscription> LoadSubscriptions(string name, SubscriptionRole role) { using (var session = _store.OpenSession()) { return session.Query<Subscription>().Where(x => x.NodeName == name && x.Role == role); } }
public IEnumerable<Subscription> LoadSubscriptions(string name, SubscriptionRole role) { using (var session = _store.OpenSession()) { return session.Query<Subscription>() .Customize(x => x.WaitForNonStaleResultsAsOfLastWrite()) .Where(x => x.NodeName == name && x.Role == role) .ToList(); } }
public IEnumerable <Subscription> LoadSubscriptions(string name, SubscriptionRole role) { using (var session = _store.OpenSession()) { return(session.Query <Subscription>() .Customize(x => x.WaitForNonStaleResultsAsOfLastWrite()) .Where(x => x.NodeName == name && x.Role == role) .ToList()); } }
private void persist(Subscription[] requirements, SubscriptionRole subscriptionRole) { requirements.Each(x => { x.NodeName = _graph.Name; x.Role = subscriptionRole; }); var existing = _persistence.LoadSubscriptions(_graph.Name, subscriptionRole); var newReqs = requirements.Where(x => !existing.Contains(x)).ToArray(); newReqs.Each(x => x.Id = Guid.NewGuid()); _persistence.Persist(newReqs); }
public IEnumerable <Subscription> LoadSubscriptions(SubscriptionRole role) { return(_persistence.LoadSubscriptions(_graph.Name, role)); }
public IEnumerable<Subscription> LoadSubscriptions(SubscriptionRole role) { return _persistence.LoadSubscriptions(_graph.Name, role); }
public IEnumerable<Subscription> LoadSubscriptions(string name, SubscriptionRole role) { return _subscriptions.Where(x => x.NodeName.EqualsIgnoreCase(name) && x.Role == role).ToArray(); }
public IEnumerable <Subscription> LoadSubscriptions(string name, SubscriptionRole role) { return(_lock.Read(() => { return _subscriptions.Where(x => x.NodeName.EqualsIgnoreCase(name) && x.Role == role).ToArray(); })); }
public IEnumerable<Subscription> PersistedSubscriptions(SubscriptionRole role = SubscriptionRole.Publishes) { return _runtime.Factory.Get<ISubscriptionRepository>().LoadSubscriptions(role); }
public IEnumerable <Subscription> PersistedSubscriptions(SubscriptionRole role = SubscriptionRole.Publishes) { return(_runtime.Factory.Get <ISubscriptionRepository>().LoadSubscriptions(role)); }