Example #1
0
 public AggregateRow(FieldsImpl fields, bool getAndSave)
     : base(fields, getAndSave)
 {
     this.m_isAggregateRow        = fields.IsAggregateRow;
     this.m_aggregationFieldCount = fields.AggregationFieldCount;
     this.m_validAggregateRow     = fields.ValidAggregateRow;
 }
Example #2
0
        protected bool ProcessThisRow()
        {
            FieldsImpl fieldsImpl = m_odpContext.ReportObjectModel.FieldsImpl;

            if (fieldsImpl.IsAggregateRow && 0 > fieldsImpl.AggregationFieldCount)
            {
                return(false);
            }
            int[] groupExpressionFieldIndices = m_hierarchyDef.Grouping.GetGroupExpressionFieldIndices();
            if (groupExpressionFieldIndices == null)
            {
                fieldsImpl.ValidAggregateRow = false;
            }
            else
            {
                foreach (int num in groupExpressionFieldIndices)
                {
                    if (-1 > num || (0 <= num && !fieldsImpl[num].IsAggregationField))
                    {
                        fieldsImpl.ValidAggregateRow = false;
                    }
                }
            }
            if (fieldsImpl.IsAggregateRow && !fieldsImpl.ValidAggregateRow)
            {
                return(false);
            }
            return(true);
        }
        public bool ShouldSkipCurrentRow()
        {
            FieldsImpl fieldsImpl = this.m_odpContext.ReportObjectModel.FieldsImpl;
            bool       flag       = true;

            for (int i = 0; i < this.m_expressions.Count; i++)
            {
                if (!flag)
                {
                    break;
                }
                AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = this.m_expressions[i];
                if (expressionInfo.FieldIndex < 0)
                {
                    flag = false;
                }
                else
                {
                    FieldImpl fieldImpl = fieldsImpl[expressionInfo.FieldIndex];
                    if (fieldImpl.FieldStatus != 0)
                    {
                        return(false);
                    }
                    int num = this.m_odpContext.CompareAndStopOnError(this.m_values[i], fieldImpl.Value, this.m_scope.DataScopeObjectType, this.m_scope.Name, "GroupExpression", false);
                    flag = (num == 0);
                }
            }
            return(flag);
        }
 private bool SetupNextRow()
 {
     try
     {
         m_currentRow = ReadOneRow(out int rowIndex);
         if (m_currentRow == null)
         {
             return(false);
         }
         FieldsImpl fieldsImpl = m_odpContext.ReportObjectModel.FieldsImpl;
         fieldsImpl.NewRow();
         if (fieldsImpl.AddRowIndex)
         {
             fieldsImpl.SetRowIndex(rowIndex);
         }
         m_odpContext.ReportObjectModel.UpdateFieldValues(reuseFieldObjects: false, m_currentRow, m_dataSetInstance, base.HasServerAggregateMetadata);
         return(true);
     }
     catch (Exception)
     {
         CleanupForException();
         FinalCleanup();
         throw;
     }
 }
 internal AggregateRow(FieldsImpl fields, bool getAndSave)
     : base(fields, getAndSave)
 {
     m_isAggregateRow        = fields.IsAggregateRow;
     m_aggregationFieldCount = fields.AggregationFieldCount;
     m_validAggregateRow     = fields.ValidAggregateRow;
 }
Example #6
0
 private bool SetupNextRow()
 {
     try
     {
         int rowIndex = default(int);
         this.m_currentRow = base.ReadOneRow(out rowIndex);
         if (this.m_currentRow == null)
         {
             return(false);
         }
         FieldsImpl fieldsImpl = base.m_odpContext.ReportObjectModel.FieldsImpl;
         fieldsImpl.NewRow();
         if (fieldsImpl.AddRowIndex)
         {
             fieldsImpl.SetRowIndex(rowIndex);
         }
         base.m_odpContext.ReportObjectModel.UpdateFieldValues(false, this.m_currentRow, base.m_dataSetInstance, base.HasServerAggregateMetadata);
         return(true);
     }
     catch (Exception)
     {
         this.CleanupForException();
         this.FinalCleanup();
         throw;
     }
 }
Example #7
0
 public void AddField(string fieldName, string value)
 {
     //IL_000c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0011: Expected O, but got Unknown
     if ((object)FieldsImpl == null)
     {
         FieldsImpl = new WWWForm();
     }
     FieldsImpl.AddField(fieldName, value);
 }
Example #8
0
 internal void ApplyGroupingFieldsForServerAggregates(FieldsImpl fields)
 {
     if (m_groupingFieldIndicesForServerAggregates != null)
     {
         for (int i = 0; i < m_groupingFieldIndicesForServerAggregates.Count; i++)
         {
             fields.ConsumeAggregationField(m_groupingFieldIndicesForServerAggregates[i]);
         }
     }
 }
Example #9
0
 public void AddBinaryData(string fieldName, byte[] contents)
 {
     //IL_000c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0011: Expected O, but got Unknown
     if ((object)FieldsImpl == null)
     {
         FieldsImpl = new WWWForm();
     }
     FieldsImpl.AddBinaryData(fieldName, contents);
 }
Example #10
0
 public DataFieldRow(FieldsImpl fields, bool getAndSave)
 {
     if (getAndSave)
     {
         this.m_fields = fields.GetAndSaveFields();
     }
     else
     {
         this.m_fields = fields.GetFields();
     }
     this.m_streamOffset = fields.StreamOffset;
 }
Example #11
0
        public void RestoreAggregateInfo(OnDemandProcessingContext odpContext)
        {
            FieldsImpl fieldsImpl = odpContext.ReportObjectModel.FieldsImpl;

            fieldsImpl.AggregationFieldCount = this.m_aggregationFieldCount;
            Global.Tracer.Assert(null != this.m_aggregationFieldChecked, "(null != m_aggregationFieldChecked)");
            for (int i = 0; i < fieldsImpl.Count; i++)
            {
                fieldsImpl[i].AggregationFieldChecked = this.m_aggregationFieldChecked[i];
            }
            fieldsImpl.ValidAggregateRow = this.m_validAggregateRow;
        }
 internal DataFieldRow(FieldsImpl fields, bool getAndSave)
 {
     if (getAndSave)
     {
         m_fields = fields.GetAndSaveFields();
     }
     else
     {
         m_fields = fields.GetFields();
     }
     m_streamOffset = fields.StreamOffset;
 }
 public RecordRow(FieldsImpl fields, int fieldCount)
 {
     this.m_recordFields = new RecordField[fieldCount];
     for (int i = 0; i < fieldCount; i++)
     {
         if (!fields[i].IsMissing)
         {
             this.m_recordFields[i] = new RecordField(fields[i]);
         }
     }
     this.m_isAggregateRow        = fields.IsAggregateRow;
     this.m_aggregationFieldCount = fields.AggregationFieldCount;
 }
        protected virtual void PushBackLastRow()
        {
            FieldsImpl fieldsImplForUpdate = m_odpContext.ReportObjectModel.GetFieldsImplForUpdate(m_idcDataSet);

            if (fieldsImplForUpdate.IsAggregateRow)
            {
                m_nextDataFieldRowToProcess = new AggregateRow(fieldsImplForUpdate, getAndSave: true);
            }
            else
            {
                m_nextDataFieldRowToProcess = new DataFieldRow(fieldsImplForUpdate, getAndSave: true);
            }
        }
Example #15
0
        public void SaveAggregateInfo(OnDemandProcessingContext odpContext)
        {
            FieldsImpl fieldsImpl = odpContext.ReportObjectModel.FieldsImpl;

            this.m_aggregationFieldCount = fieldsImpl.AggregationFieldCount;
            if (this.m_aggregationFieldChecked == null)
            {
                this.m_aggregationFieldChecked = new bool[fieldsImpl.Count];
            }
            for (int i = 0; i < fieldsImpl.Count; i++)
            {
                this.m_aggregationFieldChecked[i] = fieldsImpl[i].AggregationFieldChecked;
            }
            this.m_validAggregateRow = fieldsImpl.ValidAggregateRow;
        }
        protected override void ProcessRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row, int rowNumber)
        {
            FieldsImpl fieldsImpl = base.m_odpContext.ReportObjectModel.FieldsImpl;

            fieldsImpl.NewRow();
            base.m_odpContext.ReportObjectModel.UpdateFieldValues(false, row, base.m_dataSetInstance, base.HasServerAggregateMetadata);
            bool flag = true;

            if (this.m_filters != null)
            {
                flag = this.m_filters.PassFilters(new DataFieldRow(base.m_odpContext.ReportObjectModel.FieldsImpl, false));
            }
            if (flag)
            {
                this.PostFilterNextRow();
            }
        }
Example #17
0
 public RecordRow(FieldsImpl fields, int fieldCount, FieldInfo[] fieldInfos)
 {
     this.m_recordFields = new RecordField[fieldCount];
     for (int i = 0; i < fieldCount; i++)
     {
         if (!fields[i].IsMissing)
         {
             FieldInfo fieldInfo = null;
             if (fieldInfos != null && i < fieldInfos.Length)
             {
                 fieldInfo = fieldInfos[i];
             }
             this.m_recordFields[i] = new RecordField(fields[i], fieldInfo);
         }
     }
     this.m_isAggregateRow        = fields.IsAggregateRow;
     this.m_aggregationFieldCount = fields.AggregationFieldCount;
 }
        public void NextRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row, int rowNumber, bool useRowOffset, bool readerExtensionsSupported)
        {
            FieldsImpl fieldsImplForUpdate = this.m_odpContext.ReportObjectModel.GetFieldsImplForUpdate(this.m_dataSet);

            if (useRowOffset)
            {
                fieldsImplForUpdate.NewRow();
            }
            else
            {
                fieldsImplForUpdate.NewRow(row.StreamPosition);
            }
            if (fieldsImplForUpdate.AddRowIndex)
            {
                fieldsImplForUpdate.SetRowIndex(rowNumber);
            }
            this.m_odpContext.ReportObjectModel.UpdateFieldValues(false, row, this.m_dataSetInstance, readerExtensionsSupported);
            this.m_dataSetObj.NextRow();
        }
        internal void CombineAggregateInfo(OnDemandProcessingContext odpContext, AggregateRowInfo updated)
        {
            FieldsImpl fieldsImpl = odpContext.ReportObjectModel.FieldsImpl;

            if (updated == null)
            {
                fieldsImpl.ValidAggregateRow = false;
                return;
            }
            if (!updated.m_validAggregateRow)
            {
                fieldsImpl.ValidAggregateRow = false;
            }
            for (int i = 0; i < fieldsImpl.Count; i++)
            {
                if (updated.m_aggregationFieldChecked[i])
                {
                    fieldsImpl.ConsumeAggregationField(i);
                }
            }
        }
        public bool ShouldSkipCurrentRow()
        {
            FieldsImpl fieldsImpl = m_odpContext.ReportObjectModel.FieldsImpl;
            bool       flag       = true;

            for (int i = 0; i < m_expressions.Count && flag; i++)
            {
                Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = m_expressions[i];
                if (expressionInfo.FieldIndex < 0)
                {
                    flag = false;
                    continue;
                }
                FieldImpl fieldImpl = fieldsImpl[expressionInfo.FieldIndex];
                if (fieldImpl.FieldStatus != 0)
                {
                    return(false);
                }
                flag = (m_odpContext.CompareAndStopOnError(m_values[i], fieldImpl.Value, m_scope.DataScopeObjectType, m_scope.Name, "GroupExpression", extendedTypeComparisons: false) == 0);
            }
            return(flag);
        }
 internal virtual void SetFields(FieldsImpl fields)
 {
     fields.SetFields(m_fields, m_streamOffset);
 }
Example #22
0
 internal byte[] GetEntityBody()
 {
     return (RawData != null) ? RawData : (((object)FieldsImpl == null) ? null : FieldsImpl.get_data());
 }
Example #23
0
 public virtual void SetFields(FieldsImpl fields)
 {
     fields.SetFields(this.m_fields, this.m_streamOffset);
 }
Example #24
0
 internal bool SendOutTo(Stream stream)
 {
     bool result = false;
     try
     {
         BinaryWriter binaryWriter = new BinaryWriter(stream);
         binaryWriter.Write($"{MethodType.ToString().ToUpper()} {CurrentUri.PathAndQuery} HTTP/1.1".GetASCIIBytes());
         binaryWriter.Write(EOL);
         SendHeaders(binaryWriter);
         binaryWriter.Write(EOL);
         byte[] array = (RawData != null) ? RawData : (((object)FieldsImpl == null) ? null : FieldsImpl.get_data());
         if (array != null && array.Length > 0)
         {
             binaryWriter.Write(array, 0, array.Length);
         }
         result = true;
         return result;
     }
     catch
     {
         return result;
     }
 }
 internal override void SetFields(FieldsImpl fields)
 {
     fields.SetFields(m_fields, m_streamOffset, m_isAggregateRow, m_aggregationFieldCount, m_validAggregateRow);
 }
Example #26
0
 private void SendHeaders(BinaryWriter stream)
 {
     SetHeader("Host", CurrentUri.Host);
     if (IsRedirected && !HasHeader("Referer"))
     {
         AddHeader("Referer", Uri.ToString());
     }
     if (!HasHeader("Accept-Encoding"))
     {
         AddHeader("Accept-Encoding", "gzip, deflate, identity");
     }
     if (!HasHeader("Connection"))
     {
         AddHeader("Connection", (!IsKeepAlive) ? "Close, TE" : "Keep-Alive, TE");
     }
     if (!HasHeader("TE"))
     {
         AddHeader("TE", "chunked, identity");
     }
     byte[] entityBody = GetEntityBody();
     int num = (entityBody != null) ? entityBody.Length : 0;
     if (RawData == null)
     {
         byte[] array = ((object)FieldsImpl == null) ? null : FieldsImpl.get_data();
         if (array != null && array.Length > 0 && !HasHeader("Content-Type"))
         {
             AddHeader("Content-Type", "application/x-www-form-urlencoded");
         }
     }
     if (!HasHeader("Content-Length") && num != 0)
     {
         AddHeader("Content-Length", num.ToString());
     }
     if (Credentials != null)
     {
         switch (Credentials.Type)
         {
         case AuthenticationTypes.Basic:
             SetHeader("Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(Credentials.UserName + ":" + Credentials.Password)));
             break;
         case AuthenticationTypes.Unknown:
         case AuthenticationTypes.Digest:
         {
             Digest digest = DigestStore.Get(CurrentUri);
             if (digest != null)
             {
                 string value = digest.GenerateResponseHeader(this);
                 if (!string.IsNullOrEmpty(value))
                 {
                     SetHeader("Authorization", value);
                 }
             }
             break;
         }
         }
     }
     foreach (KeyValuePair<string, List<string>> header in Headers)
     {
         byte[] aSCIIBytes = (header.Key + ": ").GetASCIIBytes();
         for (int i = 0; i < header.Value.Count; i++)
         {
             stream.Write(aSCIIBytes);
             stream.Write(header.Value[i].GetASCIIBytes());
             stream.Write(EOL);
         }
     }
 }
Example #27
0
 public override void SetFields(FieldsImpl fields)
 {
     fields.SetFields(base.m_fields, base.m_streamOffset, this.m_isAggregateRow, this.m_aggregationFieldCount, this.m_validAggregateRow);
 }