public bool StoreUpdatedVariableValue(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, int index, object value)
        {
            this.m_metaDataChanged = true;
            if (this.m_updatedVariableValues == null)
            {
                this.m_updatedVariableValues = new Dictionary <string, UpdatedVariableValues>();
            }
            string key = odpContext.SubReportUniqueName ?? "Report";
            UpdatedVariableValues    updatedVariableValues = default(UpdatedVariableValues);
            Dictionary <int, object> dictionary;

            if (this.m_updatedVariableValues.TryGetValue(key, out updatedVariableValues))
            {
                dictionary = updatedVariableValues.VariableValues;
            }
            else
            {
                dictionary            = new Dictionary <int, object>();
                updatedVariableValues = new UpdatedVariableValues();
                updatedVariableValues.VariableValues = dictionary;
                this.m_updatedVariableValues.Add(key, updatedVariableValues);
            }
            if (reportInstance != null && reportInstance.VariableValues != null)
            {
                reportInstance.VariableValues[index] = value;
            }
            dictionary[index] = value;
            return(true);
        }
 public void SetUpdatedVariableValues(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance)
 {
     if (this.m_updatedVariableValues != null)
     {
         string key = odpContext.SubReportUniqueName ?? "Report";
         UpdatedVariableValues updatedVariableValues = default(UpdatedVariableValues);
         if (this.m_updatedVariableValues.TryGetValue(key, out updatedVariableValues))
         {
             Dictionary <int, object> variableValues = updatedVariableValues.VariableValues;
             List <AspNetCore.ReportingServices.ReportIntermediateFormat.Variable> variables = odpContext.ReportDefinition.Variables;
             foreach (KeyValuePair <int, object> item in variableValues)
             {
                 reportInstance.VariableValues[item.Key] = item.Value;
                 AspNetCore.ReportingServices.ReportIntermediateFormat.Variable variable = variables[item.Key];
                 VariableImpl cachedVariableObj = variable.GetCachedVariableObj(odpContext);
                 cachedVariableObj.SetValue(item.Value, true);
             }
         }
     }
 }
        public bool TryCreateObject(ObjectType objectType, out IPersistable persistObj)
        {
            switch (objectType)
            {
            case ObjectType.DataCellInstance:
                persistObj = new DataCellInstance();
                break;

            case ObjectType.DataAggregateObjResult:
                persistObj = new DataAggregateObjResult();
                break;

            case ObjectType.DataRegionMemberInstance:
                persistObj = new DataRegionMemberInstance();
                break;

            case ObjectType.DataRegionInstance:
                persistObj = new DataRegionInstance();
                break;

            case ObjectType.DataSetInstance:
                persistObj = new DataSetInstance();
                break;

            case ObjectType.ReportInstance:
                persistObj = new ReportInstance();
                break;

            case ObjectType.OnDemandMetadata:
                persistObj = new OnDemandMetadata();
                break;

            case ObjectType.GroupTreePartition:
                persistObj = new GroupTreePartition();
                break;

            case ObjectType.IntermediateFormatVersion:
                persistObj = new IntermediateFormatVersion();
                break;

            case ObjectType.ReportSnapshot:
                persistObj = new ReportSnapshot();
                break;

            case ObjectType.SubReportInstance:
                persistObj = new SubReportInstance();
                break;

            case ObjectType.Parameters:
                persistObj = new ParametersImplWrapper();
                break;

            case ObjectType.Parameter:
                persistObj = new ParameterImplWrapper();
                break;

            case ObjectType.SubReportInfo:
                persistObj = new SubReportInfo();
                break;

            case ObjectType.CommonSubReportInfo:
                persistObj = new CommonSubReportInfo();
                break;

            case ObjectType.ParameterInfo:
                persistObj = new ParameterInfo();
                break;

            case ObjectType.ParameterInfoCollection:
                persistObj = new ParameterInfoCollection();
                break;

            case ObjectType.ParametersLayout:
                persistObj = new ParametersGridLayout();
                break;

            case ObjectType.ParameterGridLayoutCellDefinition:
                persistObj = new ParameterGridLayoutCellDefinition();
                break;

            case ObjectType.ValidValue:
                persistObj = new ValidValue();
                break;

            case ObjectType.FieldInfo:
                persistObj = new FieldInfo();
                break;

            case ObjectType.ImageInfo:
                persistObj = new ImageInfo();
                break;

            case ObjectType.TreePartitionManager:
                persistObj = new TreePartitionManager();
                break;

            case ObjectType.LookupObjResult:
                persistObj = new LookupObjResult();
                break;

            case ObjectType.ShapefileInfo:
                persistObj = new ShapefileInfo();
                break;

            case ObjectType.UpdatedVariableValues:
                persistObj = new UpdatedVariableValues();
                break;

            case ObjectType.DataCellInstanceList:
                persistObj = new DataCellInstanceList();
                break;

            default:
                persistObj = null;
                return(false);
            }
            return(true);
        }