public CustomPropertyCollection(IReportScopeInstance romInstance, RenderingContext renderingContext, ReportElement reportElementOwner, ICustomPropertiesHolder customPropertiesHolder, ObjectType objectType, string objectName)
 {
     this.m_reportElementOwner = reportElementOwner;
     AspNetCore.ReportingServices.ReportIntermediateFormat.DataValueList customProperties = customPropertiesHolder.CustomProperties;
     if (customProperties == null)
     {
         this.m_list = new List <CustomProperty>();
     }
     else
     {
         bool flag  = InstancePathItem.IsValidContext(customPropertiesHolder.InstancePath.InstancePath);
         int  count = customProperties.Count;
         this.m_list = new List <CustomProperty>(count);
         for (int i = 0; i < count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataValue dataValue = customProperties[i];
             string   name     = null;
             object   value    = null;
             TypeCode typeCode = TypeCode.Empty;
             if (flag)
             {
                 dataValue.EvaluateNameAndValue(this.m_reportElementOwner, romInstance, customPropertiesHolder.InstancePath, renderingContext.OdpContext, objectType, objectName, out name, out value, out typeCode);
             }
             CustomProperty customProperty = new CustomProperty(this.m_reportElementOwner, renderingContext, dataValue.Name, dataValue.Value, name, value, typeCode);
             this.m_list.Add(customProperty);
             if (flag)
             {
                 this.AddPropToLookupTable(name, customProperty);
             }
         }
     }
 }
Exemple #2
0
 public DataValue(IReportScope reportScope, RenderingContext renderingContext, AspNetCore.ReportingServices.ReportIntermediateFormat.DataValue dataValue, bool isChart, IInstancePath instancePath, string objectName)
 {
     this.m_isChartValue     = isChart;
     this.m_instancePath     = instancePath;
     this.m_dataValue        = dataValue;
     this.m_name             = new ReportStringProperty(dataValue.Name);
     this.m_value            = new ReportVariantProperty(dataValue.Value);
     this.m_instance         = new InternalDataValueInstance(reportScope, this);
     this.m_renderingContext = renderingContext;
     this.m_objectName       = objectName;
 }
Exemple #3
0
 public CustomProperty CreateCustomProperty()
 {
     if (base.CriGenerationPhase != CriGenerationPhases.Definition)
     {
         throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidOperation);
     }
     this.PrepareCustomProperties();
     AspNetCore.ReportingServices.ReportIntermediateFormat.DataValue dataValue = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataValue();
     dataValue.Name  = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
     dataValue.Value = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
     if (base.m_reportItemDef.CustomProperties == null)
     {
         base.m_reportItemDef.CustomProperties = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataValueList();
     }
     base.m_reportItemDef.CustomProperties.Add(dataValue);
     return(this.CustomProperties.Add(base.RenderingContext, dataValue.Name, dataValue.Value));
 }
Exemple #4
0
 public void ConstructCustomPropertyDefinition(AspNetCore.ReportingServices.ReportIntermediateFormat.DataValue dataValueDef)
 {
     Global.Tracer.Assert(this.m_reportElementOwner != null && this.m_instance != null, "m_reportElementOwner != null && m_instance != null");
     if (this.m_instance.Name != null)
     {
         dataValueDef.Name = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(this.m_instance.Name);
     }
     else
     {
         dataValueDef.Name = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
     }
     if (this.m_instance.Value != null)
     {
         dataValueDef.Value = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression((string)this.m_instance.Value);
     }
     else
     {
         dataValueDef.Value = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
     }
     this.Init(dataValueDef.Name, dataValueDef.Value, this.m_instance.Name, this.m_instance.Value, this.m_instance.TypeCode);
 }