Exemplo n.º 1
0
        public void Record(byte[] fieldContent, bool isFinal)
        {
            if (this._currentField == null)
            {
                this._currentField = new RequestField(this._encoding);
            }
            bool flag = this._currentField.Header != null;

            this._currentField.AddData(fieldContent, isFinal);
            if (!flag && (this._currentField.Header != null))
            {
                this.Fields.Add(this._currentField);
            }
            if (isFinal)
            {
                this._currentField = null;
            }
        }
 private bool isFileField(RequestField field)
 {
     return (((field.Header is FileHeaderInfo) && field.Complete) && !string.IsNullOrEmpty(((FileHeaderInfo)field.Header).FileName));
 }
 public void Record(byte[] fieldContent, bool isFinal)
 {
     if (this._currentField == null)
     {
         this._currentField = new RequestField(this._encoding);
     }
     bool flag = this._currentField.Header != null;
     this._currentField.AddData(fieldContent, isFinal);
     if (!flag && (this._currentField.Header != null))
     {
         this.Fields.Add(this._currentField);
     }
     if (isFinal)
     {
         this._currentField = null;
     }
 }