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;
            }
        }
        private static bool TryGetEntityTypeFromAlias(out string entityType, RuleEntityContextMetadata ruleEntityMetadata, out Type type, string alias)
        {
            type = null;

            entityType = ruleEntityMetadata.GetDynamicTypeFromAlias(alias);
            if (string.IsNullOrEmpty(entityType))
            {
                return(false);
            }
            type = ruleEntityMetadata.GetTypeForEntityType(entityType);

            return(true);
        }