Here are the examples of the csharp api System.Predicate.Invoke(Trigger) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
19
Source : TriggerCollection.cs
with MIT License
from KuromeSan
with MIT License
from KuromeSan
public Trigger Find([NotNull] Predicate<Trigger> match)
{
if (match == null)
throw new ArgumentNullException(nameof(match));
foreach (var item in this)
if (match(item)) return item;
return null;
}
19
Source : TriggerCollection.cs
with MIT License
from KuromeSan
with MIT License
from KuromeSan
public int FindIndexOf(int startIndex, int count, [NotNull] Predicate<Trigger> match)
{
if (startIndex < 0 || startIndex >= Count)
throw new ArgumentOutOfRangeException(nameof(startIndex));
if (startIndex + count > Count)
throw new ArgumentOutOfRangeException(nameof(count));
if (match == null)
throw new ArgumentNullException(nameof(match));
for (var i = startIndex; i < startIndex + count; i++)
if (match(this[i])) return i;
return -1;
}