internal void Initialize(string prefix, int rowIndex, int cellIndex, bool isCustomProperty, InitializationContext context)
        {
            int count = Count;
            CustomPropertyUniqueNameValidator validator = new CustomPropertyUniqueNameValidator();

            for (int i = 0; i < count; i++)
            {
                Global.Tracer.Assert(this[i] != null);
                this[i].Initialize(CreatePropertyNameString(prefix, rowIndex + 1, cellIndex + 1, i + 1), isCustomProperty, validator, context);
            }
        }
        internal DataValueInstanceList EvaluateExpressions(ObjectType objectType, string objectName, string prefix, int rowIndex, int cellIndex, ReportProcessing.ProcessingContext pc)
        {
            int count = 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, 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(dataValue.Value != null);
                    if (ExpressionInfo.Types.Constant != dataValue.Value.Type)
                    {
                        dataValueInstance.Value = pc.ReportRuntime.EvaluateDataValueValueExpression(dataValue, objectType, objectName, CreatePropertyNameString(prefix, rowIndex + 1, cellIndex + 1, i + 1) + ".Value");
                    }
                }
                dataValueInstanceList.Add(dataValueInstance);
            }
            return(dataValueInstanceList);
        }
Exemple #3
0
 internal void Initialize(string propertyName, bool isCustomProperty, CustomPropertyUniqueNameValidator validator, InitializationContext context)
 {
     context.ExprHostBuilder.DataValueStart();
     if (m_name != null)
     {
         m_name.Initialize(propertyName + ".Name", context);
         if (isCustomProperty && ExpressionInfo.Types.Constant == m_name.Type)
         {
             validator.Validate(Severity.Error, context.ObjectType, context.ObjectName, m_name.Value, context.ErrorContext);
         }
         context.ExprHostBuilder.DataValueName(m_name);
     }
     if (m_value != null)
     {
         m_value.Initialize(propertyName + ".Value", context);
         context.ExprHostBuilder.DataValueValue(m_value);
     }
     m_exprHostID = context.ExprHostBuilder.DataValueEnd(isCustomProperty);
 }