示例#1
0
        public void Process()
        {
            EntityTypeDescriptor entityTypeDescriptor = EntityTypes.Types[this.Object.Type];
            PropertyDescriptor   propertyDescriptor   = entityTypeDescriptor.Properties[this.Property];

            this.processedValue = Convert.ChangeType((object)this.Value, propertyDescriptor.Type, (IFormatProvider)CultureInfo.InvariantCulture);
            this.GetValue       = propertyDescriptor.GetValue;
            if (this.Operator != ComparisonOperator.Equal && this.Operator != ComparisonOperator.NotEqual)
            {
                this.processedNumber = (float)this.processedValue;
            }
            ScriptCondition scriptCondition = this;

            object[] objArray;
            if (!entityTypeDescriptor.Static)
            {
                objArray = new object[1]
                {
                    (object)this.Object.Identifier
                }
            }
            ;
            else
            {
                objArray = new object[0];
            }
            scriptCondition.processedArguments = objArray;
        }
示例#2
0
        public ScriptCondition Clone()
        {
            ScriptCondition scriptCondition = new ScriptCondition();

            scriptCondition.Object   = this.Object == null ? (Entity)null : this.Object.Clone();
            scriptCondition.Operator = this.Operator;
            scriptCondition.Property = this.Property;
            scriptCondition.Value    = this.Value;
            return(scriptCondition);
        }
示例#3
0
 public ScriptCondition Clone()
 {
   ScriptCondition scriptCondition = new ScriptCondition();
   scriptCondition.Object = this.Object == null ? (Entity) null : this.Object.Clone();
   scriptCondition.Operator = this.Operator;
   scriptCondition.Property = this.Property;
   scriptCondition.Value = this.Value;
   return scriptCondition;
 }