Here are the examples of the csharp api System.Predicate.Invoke(TReturn) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
19
Source : PersistentDictionaryEnumerator.cs
with MIT License
from microsoft
with MIT License
from microsoft
private bool MoveToMatch()
{
return this.dictionary.ReturnReadLockedOperation(
() =>
{
TReturn candidate = this.getter(this.cursor);
while (!this.predicate(candidate))
{
if (!this.cursor.TryMoveNext())
{
return false;
}
candidate = this.getter(this.cursor);
}
this.Current = candidate;
return true;
});
}
19
Source : PersistentDictionaryReverseEnumerator.cs
with MIT License
from microsoft
with MIT License
from microsoft
private bool MoveToMatch()
{
TReturn candidate = this.getter(this.cursor);
while (!this.predicate(candidate))
{
if (!this.cursor.TryMovePrevious())
{
return false;
}
candidate = this.getter(this.cursor);
}
this.Current = candidate;
return true;
}