private static MyPropertyInfo GeneratePropertyInfo(TableDrivedEntityDTO entity, PropertyType propertyType, MyPropertyInfo parentProperty, int id, string name, object context) { MyPropertyInfo myPropertyInfo = new MyFormulaFunctionStateFunctionLibrary.MyPropertyInfo(); myPropertyInfo.Name = name; // myPropertyInfo.FormulaObject = formulaObject; myPropertyInfo.ID = id; myPropertyInfo.ParentProperty = parentProperty; myPropertyInfo.Context = context; myPropertyInfo.PropertyType = propertyType; if (parentProperty != null) { // myPropertyInfo.RelationshipTail = parentProperty.RelationshipTail + (string.IsNullOrEmpty(parentProperty.RelationshipTail) ? "" : ",") + relationship.ID; myPropertyInfo.RelationshipLevel = parentProperty.RelationshipLevel + 1; if (parentProperty.PropertyType == PropertyType.Relationship) { myPropertyInfo.RelationshipTail = parentProperty.RelationshipTail + (string.IsNullOrEmpty(parentProperty.RelationshipTail) ? "" : ",") + parentProperty.ID; myPropertyInfo.RelationshipPropertyTail = parentProperty.RelationshipPropertyTail + (string.IsNullOrEmpty(parentProperty.RelationshipPropertyTail) ? "" : ".") + parentProperty.Name; } } else { myPropertyInfo.RelationshipTail = ""; myPropertyInfo.RelationshipPropertyTail = ""; } return(myPropertyInfo); }
private MyPropertyInfo CloneProperty(MyPropertyInfo value) { MyPropertyInfo result = new MyFormulaFunctionStateFunctionLibrary.MyPropertyInfo(); result.Context = value.Context; result.FormulaObject = value.FormulaObject; result.ID = value.ID; result.Name = value.Name; result.ParentProperty = value.ParentProperty; result.PropertyRelationship = value.PropertyRelationship; result.PropertyType = value.PropertyType; result.RelationshipID = value.RelationshipID; result.RelationshipLevel = value.RelationshipLevel; result.RelationshipPropertyTail = value.RelationshipPropertyTail; result.RelationshipTail = value.RelationshipTail; result.Tooltip = value.Tooltip; result.Type = value.Type; result.Value = value.Value; result.ValueSearched = value.ValueSearched; return(result); }