private FileHeaderInfo FindLastUploadedFile() { for (int i = this.StateStore.Fields.Count - 1; i >= 0; i--) { RequestField field = this.StateStore.Fields[i]; if (field.Header is FileHeaderInfo) { return((FileHeaderInfo)field.Header); } } return(null); }
private int GetCompleteFileCount() { int num = 0; for (int i = 0; i < this.StateStore.Fields.Count; i++) { RequestField field = this.StateStore.Fields[i]; if (this.isFileField(field)) { num++; } } return(num); }
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)); }
private bool isFileField(RequestField field) { return (((field.Header is FileHeaderInfo) && field.Complete) && !string.IsNullOrEmpty(((FileHeaderInfo)field.Header).FileName)); }