getContextEntityResolutionRules method
The current EntityResolutionRules of the current context.
Implementation
EntityResolutionRules? getContextEntityResolutionRules() {
var singleContextProvider = _singleContextProvider;
if (singleContextProvider != null) {
var resolutionRules = singleContextProvider
.getContextEntityResolutionRules(contextZone: Zone.current);
return resolutionRules;
} else if (_cotextProviders.isEmpty) {
return null;
}
var zone = Zone.current;
EntityResolutionRules? contextRule;
for (var c in _cotextProviders) {
var resolutionRules =
c.getContextEntityResolutionRules(contextZone: zone);
if (resolutionRules != null) {
if (contextRule != null) {
contextRule = contextRule.merge(resolutionRules);
} else {
contextRule = resolutionRules;
}
}
}
return contextRule;
}