public PropertyDefOrObjectType Clone()
        {
            TestPropertyDefOrObjectType pdot = new TestPropertyDefOrObjectType
            {
                ID          = this.ID,
                PropertyDef = this.PropertyDef
            };

            return(pdot);
        }
        public TestExpression(xExpression exp)
        {
            if (exp.DataAnyFieldFTSFlags != null)
            {
                this.DataAnyFieldFTSFlags = (MFFullTextSearchFlags)exp.DataAnyFieldFTSFlags;
            }
            if (exp.DataFileValueType != null)
            {
                this.DataFileValueType = (MFFileValueType)exp.DataFileValueType;
            }

            if (exp.DataObjectIDSegmentSegmentSize != null)
            {
                this.DataObjectIDSegmentSegmentSize = exp.DataObjectIDSegmentSegmentSize;
            }
            if (exp.DataPermissionsType != null)
            {
                this.DataPermissionsType = (MFPermissionsExpressionType)exp.DataPermissionsType;
            }
            if (exp.DataPropertyValueDataFunction != null)
            {
                this.DataPropertyValueDataFunction = (MFDataFunction)exp.DataPropertyValueDataFunction;
            }
            if (exp.DataPropertyValueParentChildBehaviour != null)
            {
                this.DataPropertyValueParentChildBehaviour = (MFParentChildBehavior)exp.DataPropertyValueParentChildBehaviour;
            }
            if (exp.DataPropertyValuePropertyDef != null)
            {
                this.DataPropertyValuePropertyDef = exp.DataPropertyValuePropertyDef;
            }
            if (exp.DataStatusValueDataFunction != null)
            {
                this.DataStatusValueDataFunction = (MFDataFunction)exp.DataStatusValueDataFunction;
            }
            if (exp.DataStatusValueType != null)
            {
                this.DataStatusValueType = (MFStatusType)exp.DataStatusValueType;
            }
            try
            {
                this.DataTypedValueDataFunction = (MFDataFunction)exp.DataTypedValueDataFunction;
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
            try
            {
                this.DataTypedValueDatatype = (MFDataType)exp.DataTypedValueDatatype;
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
            try
            {
                this.DataTypedValueParentChildBehaviour = (MFParentChildBehavior)exp.DataTypedValueParentChildBehaviour;
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
            try
            {
                this.DataTypedValueValueList = exp.DataTypedValueValueList;
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
            try
            {
                this.IndirectionLevels = new PropertyDefOrObjectTypes();
                foreach (xPropertyDefOrObjectType pdot in exp.IndirectionLevels)
                {
                    TestPropertyDefOrObjectType tpdot = new TestPropertyDefOrObjectType(pdot);
                    this.IndirectionLevels.Add(-1, tpdot);
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
            try
            {
                this.Type = (MFExpressionType)exp.Type;
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
        }