public DataValueInstance DeepClone() { DataValueInstance dataValueInstance = new DataValueInstance(); if (this.m_name != null) { dataValueInstance.Name = string.Copy(this.m_name); } if (this.m_value != null) { object value = default(object); CustomReportItem.CloneObject(this.m_value, out value); dataValueInstance.Value = value; } return(dataValueInstance); }
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); }