private static void RecalculateWorkingEntityType (string entityType, RuleEntityContextMetadata ruleEntityMetadata, ref string workingEntityType, ref Type workingType, string property) { string alias; string propertyWithoutAlias; string calcProp; string calcEntType; if (TryGetAlias(property, out alias, out propertyWithoutAlias)) { calcEntType = ruleEntityMetadata.GetDynamicTypeFromAlias(alias); calcProp = propertyWithoutAlias; } else { calcProp = property; calcEntType = entityType; } var childType = ruleEntityMetadata.GetChildDynamicType(calcEntType, calcProp); if (childType != null) { workingEntityType = childType.EntityType; workingType = childType.ChildType; } }