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; }
public void Process() { EntityTypeDescriptor entityTypeDescriptor = EntityTypes.Types[this.Object.Type]; OperationDescriptor operationDescriptor = entityTypeDescriptor.Operations[this.Operation]; int num = entityTypeDescriptor.Static ? 0 : 1; this.ProcessedArguments = new object[num + operationDescriptor.Parameters.Length]; if (!entityTypeDescriptor.Static) { this.ProcessedArguments[0] = (object)this.Object.Identifier.Value; } for (int index = 0; index < operationDescriptor.Parameters.Length; ++index) { ParameterDescriptor parameterDescriptor = operationDescriptor.Parameters[index]; this.ProcessedArguments[num + index] = this.Arguments.Length > index?Convert.ChangeType((object)this.Arguments[index], parameterDescriptor.Type, (IFormatProvider)CultureInfo.InvariantCulture) : (!(parameterDescriptor.Type == typeof(string)) ? Activator.CreateInstance(parameterDescriptor.Type) : (object)string.Empty); } this.Invoke = operationDescriptor.Call; }