public Group(List <Func <IEntity, ReactiveProperty <bool> > > predicates) { foreach (var predicate in predicates) { Predicates.Add(predicate); } }
/// <summary> /// Visits the given input data node. /// </summary> /// <param name="data">Input data node.</param> public override void Visit(InputData.PDDL.PredicateInitElement data) { int predicateNameId = IdManager.Predicates.GetId(data.Name, data.Terms.Count); List <ITerm> terms = GetTerms(data.Terms); Predicates.Add(new Atom(predicateNameId, terms)); }
internal void AddPredicate(SQLQueryPredicate predicate, string andOr) { Predicates.Add(predicate); if (!string.IsNullOrEmpty(andOr)) { ArgumentJoiningMap[predicate] = andOr; } }
public ActionNotice(Object subject, NoticeVerb verb, INoticePredicate predicate) : base(subject, verb.ToString(), predicate == null ? null : new List <INoticePredicate>()) { if (predicate != null) { Predicates.Add(predicate); } }
/// <summary> /// Constructor for notices with a single predicate. /// </summary> /// <param name="subject"></param> /// <param name="verb"></param> /// <param name="predicate"></param> public GameActionNotice(Object subject, string verb, INoticePredicate predicate) : this(subject, verb, predicate == null ? null : new List <INoticePredicate>()) { if (predicate != null) { Predicates.Add(predicate); } }
public AttributeFilter <TAttribute> Where(Func <TAttribute, bool> predicate) { if (predicate != null) { Predicates.Add(predicate); } return(this); }
/// <summary> /// Adds the predicate to the state. /// </summary> /// <param name="predicate">Predicate to be added.</param> public void AddPredicate(IAtom predicate) { if (Predicates == null) { Predicates = new HashSet <IAtom>(); } Predicates.Add(predicate); }
public void SatisfyExact(Packet predicate) { if (predicate == null) { throw new ArgumentNullException(nameof(predicate)); } Predicates.Add(predicate); }
public Group(HashSet <Type> components, List <Func <IEntity, IReadOnlyReactiveProperty <bool> > > predicates) { Components = components; foreach (var predicate in predicates) { Predicates.Add(predicate); } }
public Group(Type[] components, List <Func <IEntity, ReactiveProperty <bool> > > predicates) { Components = components; foreach (var predicate in predicates) { Predicates.Add(predicate); } }
public ActionNotice(Object subject, NoticeVerb verb, INoticePredicate[] predicates) : base(subject, verb.ToString(), predicates == null ? null : new List <INoticePredicate>()) { if (predicates != null) { foreach (var predicate in predicates) { Predicates.Add(predicate); } } }
public ExcelConfig <TSource> Map <TMember>(Expression <Func <TSource, TMember> > sourceMember, string alias, Expression <Func <TSource, bool> > @if, Expression <Action <ExcelStyle> > style) { var memberInfo = ReflectionHelper.FindProperty(sourceMember); MemberMappers.Add(new KeyValuePair <string, string>(memberInfo.Name, alias)); Predicates.Add(@if); Styles.Add(style); return(this); }
public virtual void ReadFrom(XElement xE) { Fields = null; Predicates = null; DateRange = null; Ordering = null; Paging = null; foreach (var xItem in xE.Elements()) { var localName = xItem.Name.LocalName; if (localName == "fields") { if (Fields == null) { Fields = new List <string>(); } Fields.Add(xItem.Value); } else if (localName == "predicates") { if (Predicates == null) { Predicates = new List <Predicate>(); } var predicatesItem = new Predicate(); predicatesItem.ReadFrom(xItem); Predicates.Add(predicatesItem); } else if (localName == "dateRange") { DateRange = new DateRange(); DateRange.ReadFrom(xItem); } else if (localName == "ordering") { if (Ordering == null) { Ordering = new List <OrderBy>(); } var orderingItem = new OrderBy(); orderingItem.ReadFrom(xItem); Ordering.Add(orderingItem); } else if (localName == "paging") { Paging = new Paging(); Paging.ReadFrom(xItem); } } }
public override void Setup(IEventSystem eventSystem, IPoolManager poolManager) { Components = new Type[] { typeof(HealthComponent) }; Func <IEntity, ReactiveProperty <bool> > checkIsDead = (e) => { var health = e.GetComponent <HealthComponent> (); health.CurrentHealth.Value = health.StartingHealth; var isDead = health.CurrentHealth.DistinctUntilChanged().Select(value => value <= 0).ToReactiveProperty(); return(isDead); }; Predicates.Add(checkIsDead); base.Setup(eventSystem, poolManager); }
public Selector <TField> AddPredicate(TField field, PredicateOperator @operator, params object[] values) { var predicate = new Predicate(); predicate.Field = field.ToString(); predicate.Operator = @operator; predicate.Values = new List <string>(); foreach (var value in values) { predicate.Values.Add(value.ToString()); } if (Predicates == null) { Predicates = new List <Predicate>(); } Predicates.Add(predicate); return(this); }
public ail.net.parser.FsaTransition AddTransition(int xi_start, int xi_end, string xi_predicate, char xi_switch_char, string xi_context, int xi_rank) { ail.net.framework.Assert.NonEmptyString(xi_predicate, "xi_predicate"); ail.net.parser.FsaTransition result = null; ail.net.parser.FsaState state = (ail.net.parser.FsaState)States[xi_start]; ail.net.framework.Assert.NonNullReference(state, "state"); int transition_id = TransitionCounter.Next(); result = new ail.net.parser.FsaTransition(transition_id, xi_start, xi_end, xi_predicate, xi_switch_char, xi_context, xi_rank); state.Transitions.Add(transition_id, result); if (!Predicates.Contains(xi_predicate)) { Predicates.Add(xi_predicate, result.Predicate); } return(result); }
/// <summary> /// Adds list of predicates which are list of strings. /// </summary> /// <param name="predicates"></param> /// <param name="operationType"></param> public void AddPredicate(List <string> predicates, OperationType innerOperation, OperationType operationType) { var expression = "("; var operation = ""; switch (innerOperation) { case OperationType.Or: operation = " OR "; break; case OperationType.And: operation = " AND "; break; case OperationType.Not: operation = " NOT "; break; } if (predicates.Count > 1) { expression += predicates[0]; for (var i = 1; i < predicates.Count; i++) { expression += operation + predicates[i]; } } else { expression += predicates[0]; } expression += ")"; var predicate = new Predicate(expression); predicate.OperationType = operationType; Predicates.Add(predicate); }
public void Add(ref TKey key, ref TValue value) { IList <TValue> Predicates; //Attempt to get the value bool hadValue = TryGetValueList(ref key, out Predicates); //Skip CoreAdd because the value list is local if (hadValue) { Predicates.Add(value); return; } //Add the new key and value if (false == CoreAdd(ref key, ref value, Predicates, hadValue, false)) { //Todo, possibly expand here. //Could wrap this method and throw a TaggedException which would be able to be used to update the item. //throw new ArgumentException("The given key was already present in the dictionary"); } }
public void Add(IInventAppPredicate <TAggregateRoot> inventAppPredicate) { Predicates.Add(inventAppPredicate); }
public Query(Expression <Func <T, bool> > expression) { Predicates.Add(expression); }
public void AddPredicate(Func <IEntity, T1, T2, ReactiveProperty <bool> > predicate) { Predicates.Add(entity => predicate(entity, entity.Get <T1>(), entity.Get <T2>())); }
/// <summary> /// Adds the predicate object to list with Or and And methods. /// </summary> /// <param name="expression">Of Predicate object type</param> public void AddPredicate(Predicate predicate, OperationType operationType) { predicate.OperationType = operationType; Predicates.Add(predicate); }
/// <summary> /// Adds predicate using a string without the operation type. /// </summary> /// <param name="expression"></param> public void AddPredicate(string expression) { var predicate = new Predicate(expression); Predicates.Add(predicate); }
public Query <T> AddPredicate(Expression <Func <T, bool> > predicate) { Predicates.Add(predicate); return(this); }
public void AddPredicate(Func <IEntity, T1, T2, T3, T4, T5, T6, T7, ReactiveProperty <bool> > predicate) { Predicates.Add(entity => predicate(entity, entity.Get <T1>(), entity.Get <T2>(), entity.Get <T3>(), entity.Get <T4>(), entity.Get <T5>(), entity.Get <T6>(), entity.Get <T7>())); }
/// <summary> /// Add binary representation of predicate. /// </summary> /// <param name="predicate">The predicate.</param> public void SatisfyExact(Packet predicate) { Condition.Requires(predicate, "predicate"); Predicates.Add(predicate); }
/// <summary> /// Adds a predicate to the stub /// </summary> /// <param name="predicate">The predicate object designating what the stub will match on</param> /// <returns>The stub that the predicate was added to</returns> public HttpStub On(PredicateBase predicate) { Predicates.Add(predicate); return(this); }
public void Add(Predicate <T> item) { Predicates.Add(item); }
internal async Task AddPredicates(Func <Tweet, bool> func) { await Task.Run(() => Predicates.Add(func)).ConfigureAwait(false); }