public override void SetupExprHost(IParameterDef aParamDef)
 {
     AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportProcessingContext legacyContext = this.GetLegacyContext();
     if (legacyContext.ReportRuntime.ReportExprHost != null)
     {
         ((ParameterDef)aParamDef).SetExprHost(legacyContext.ReportRuntime.ReportExprHost, legacyContext.ReportObjectModel);
     }
 }
 public override void Cleanup()
 {
     AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportProcessingContext legacyContext = this.GetLegacyContext();
     if (legacyContext.ReportRuntime != null)
     {
         legacyContext.ReportRuntime.Close();
     }
 }
 public LegacyProcessReportParameters(Report aReport, AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportProcessingContext aContext)
     : base(aContext)
 {
     this.m_report = aReport;
 }
        public override void InitParametersContext(ParameterInfoCollection parameters)
        {
            int dataSourceCount = this.m_report.DataSourceCount;

            AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportProcessingContext legacyContext = this.GetLegacyContext();
            Global.Tracer.Assert(null == legacyContext.ReportObjectModel, "(null == processingContext.ReportObjectModel)");
            legacyContext.ReportObjectModel = new ObjectModelImpl(legacyContext);
            legacyContext.ReportObjectModel.ParametersImpl  = new ParametersImpl(parameters.Count);
            legacyContext.ReportObjectModel.FieldsImpl      = new FieldsImpl();
            legacyContext.ReportObjectModel.ReportItemsImpl = new ReportItemsImpl();
            legacyContext.ReportObjectModel.AggregatesImpl  = new AggregatesImpl(null);
            legacyContext.ReportObjectModel.GlobalsImpl     = new GlobalsImpl(legacyContext.ReportContext.ItemName, legacyContext.ExecutionTime, legacyContext.ReportContext.HostRootUri, legacyContext.ReportContext.ParentPath);
            legacyContext.ReportObjectModel.UserImpl        = new UserImpl(legacyContext.RequestUserName, legacyContext.UserLanguage.Name, legacyContext.AllowUserProfileState);
            legacyContext.ReportObjectModel.DataSetsImpl    = new DataSetsImpl();
            legacyContext.ReportObjectModel.DataSourcesImpl = new DataSourcesImpl(dataSourceCount);
            if (legacyContext.ReportRuntime == null)
            {
                legacyContext.ReportRuntime = new ReportRuntime(legacyContext.ReportObjectModel, legacyContext.ErrorContext);
                legacyContext.ReportRuntime.LoadCompiledCode(this.m_report, true, legacyContext.ReportObjectModel, legacyContext.ReportRuntimeSetup);
            }
        }
        public override ReportParameterDataSetCache ProcessReportParameterDataSet(ParameterInfo aParam, IParameterDef aParamDef, IParameterDataSource paramDS, bool aRetrieveValidValues, bool aRetrievalDefaultValues)
        {
            EventHandler eventHandler = null;
            LegacyReportParameterDataSetCache legacyReportParameterDataSetCache = new LegacyReportParameterDataSetCache(this, aParam, (ParameterDef)aParamDef, aRetrieveValidValues, aRetrievalDefaultValues);

            AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportProcessingContext legacyContext = this.GetLegacyContext();
            try
            {
                this.m_runtimeDataSourceNode = new AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode(this.m_report, this.m_report.DataSources[paramDS.DataSourceIndex], paramDS.DataSetIndex, legacyContext, legacyReportParameterDataSetCache);
                eventHandler = this.AbortHandler;
                legacyContext.AbortInfo.ProcessingAbortEvent += eventHandler;
                if (Global.Tracer.TraceVerbose)
                {
                    Global.Tracer.Trace(TraceLevel.Verbose, "Abort handler registered.");
                }
                this.m_runtimeDataSourceNode.InitProcessingParams(false, true);
                this.m_runtimeDataSourceNode.ProcessConcurrent(null);
                legacyContext.CheckAndThrowIfAborted();
                AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode runtimeDataSetNode = this.m_runtimeDataSourceNode.RuntimeDataSetNodes[0];
                return(legacyReportParameterDataSetCache);
            }
            finally
            {
                if (eventHandler != null)
                {
                    legacyContext.AbortInfo.ProcessingAbortEvent -= eventHandler;
                }
                if (this.m_runtimeDataSourceNode != null)
                {
                    this.m_runtimeDataSourceNode.Cleanup();
                }
            }
        }