private bool AllPruningPerformed(UniqueAddress removed) { return(_dataEntries.All(x => { var key = x.Key; var envelope = x.Value.Item1; var data = envelope.Data; var pruning = envelope.Pruning; if (data is IRemovedNodePruning) { var z = pruning[removed]; return (z != null) && !(z.Phase is PruningInitialized); } return false; })); }
public bool Equals(CompositeCacheKey other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (BaseCacheKey != other.BaseCacheKey) { return(false); } var allOthersMatch = other.SubKeys.All(kvp => SubKeys.ContainsKey(kvp.Key) && kvp.Value == SubKeys[kvp.Key] ); var otherContainsAll = SubKeys.All(kvp => other.SubKeys.ContainsKey(kvp.Key)); return(allOthersMatch && otherContainsAll); }
private bool HasAllFieldsValid(ImmutableDictionary <string, string> fields) => fields.All(kv => GetValidationFromFactory(kv.Key).Invoke(kv.Value));