コード例 #1
0
        public void Initialize(string prefix, int rowIndex, int cellIndex, bool isCustomProperty, InitializationContext context)
        {
            int count = this.Count;
            CustomPropertyUniqueNameValidator validator = new CustomPropertyUniqueNameValidator();

            for (int i = 0; i < count; i++)
            {
                Global.Tracer.Assert(null != this[i]);
                this[i].Initialize(DataValueList.CreatePropertyNameString(prefix, rowIndex + 1, cellIndex + 1, i + 1), isCustomProperty, validator, context);
            }
        }
コード例 #2
0
        public DataValueInstanceList EvaluateExpressions(ObjectType objectType, string objectName, string prefix, int rowIndex, int cellIndex, ReportProcessing.ProcessingContext pc)
        {
            int count = this.Count;
            DataValueInstanceList dataValueInstanceList = new DataValueInstanceList(count);
            bool flag = rowIndex < 0;
            CustomPropertyUniqueNameValidator customPropertyUniqueNameValidator = null;

            if (flag)
            {
                customPropertyUniqueNameValidator = new CustomPropertyUniqueNameValidator();
            }
            for (int i = 0; i < count; i++)
            {
                DataValue         dataValue         = this[i];
                DataValueInstance dataValueInstance = new DataValueInstance();
                bool   flag2             = true;
                string propertyNameValue = null;
                if (dataValue.Name != null)
                {
                    if (ExpressionInfo.Types.Constant != dataValue.Name.Type)
                    {
                        dataValueInstance.Name = pc.ReportRuntime.EvaluateDataValueNameExpression(dataValue, objectType, objectName, DataValueList.CreatePropertyNameString(prefix, rowIndex + 1, cellIndex + 1, i + 1) + ".Name");
                        propertyNameValue      = dataValueInstance.Name;
                    }
                    else
                    {
                        propertyNameValue = dataValue.Name.Value;
                    }
                }
                if (flag)
                {
                    flag2 = customPropertyUniqueNameValidator.Validate(Severity.Warning, objectType, objectName, propertyNameValue, pc.ErrorContext);
                }
                if (flag2)
                {
                    Global.Tracer.Assert(null != dataValue.Value);
                    if (ExpressionInfo.Types.Constant != dataValue.Value.Type)
                    {
                        dataValueInstance.Value = pc.ReportRuntime.EvaluateDataValueValueExpression(dataValue, objectType, objectName, DataValueList.CreatePropertyNameString(prefix, rowIndex + 1, cellIndex + 1, i + 1) + ".Value");
                    }
                }
                dataValueInstanceList.Add(dataValueInstance);
            }
            return(dataValueInstanceList);
        }
コード例 #3
0
 public void Initialize(string propertyName, bool isCustomProperty, CustomPropertyUniqueNameValidator validator, InitializationContext context)
 {
     context.ExprHostBuilder.DataValueStart();
     if (this.m_name != null)
     {
         this.m_name.Initialize(propertyName + ".Name", context);
         if (isCustomProperty && ExpressionInfo.Types.Constant == this.m_name.Type)
         {
             validator.Validate(Severity.Error, context.ObjectType, context.ObjectName, this.m_name.Value, context.ErrorContext);
         }
         context.ExprHostBuilder.DataValueName(this.m_name);
     }
     if (this.m_value != null)
     {
         this.m_value.Initialize(propertyName + ".Value", context);
         context.ExprHostBuilder.DataValueValue(this.m_value);
     }
     this.m_exprHostID = context.ExprHostBuilder.DataValueEnd(isCustomProperty);
 }