Beispiel #1
0
 /// <summary>This method is called when a part's headers have been parsed, before its data is parsed.
 ///     </summary>
 /// <remarks>This method is called when a part's headers have been parsed, before its data is parsed.
 ///     </remarks>
 public void StartedPart(IDictionary <string, string> headers)
 {
     if (_docReader != null)
     {
         throw new InvalidOperationException("_docReader is already defined");
     }
     Log.V(Tag, "{0}: Starting new document; headers ={1}", this, headers);
     Log.V(Tag, "{0}: Starting new document; ID={1}".Fmt(this, headers.Get("X-Doc-Id")));
     _docReader = new MultipartDocumentReader(db);
     _docReader.SetContentType(headers.Get("Content-Type"));
     _docReader.StartedPart(headers);
 }
Beispiel #2
0
        /// <summary>This method is called when a part's headers have been parsed, before its data is parsed.
        ///     </summary>
        /// <remarks>This method is called when a part's headers have been parsed, before its data is parsed.
        ///     </remarks>
        public void StartedPart(IDictionary <string, string> headers)
        {
            if (_docReader != null)
            {
                Log.To.Sync.E(Tag, "StartedPart called on an already started object");
                throw new InvalidOperationException("StartedPart called on an already started object");
            }

            Log.To.Sync.V(Tag, "{0}: Starting new document; ID={1}", this, headers.Get("X-Doc-ID"));
            _docReader = new MultipartDocumentReader(_db);
            _docReader.SetContentType(headers.Get("Content-Type"));
            _docReader.StartedPart(headers);
        }
Beispiel #3
0
 /// <summary>This method is called when a part's headers have been parsed, before its data is parsed.
 ///     </summary>
 /// <remarks>This method is called when a part's headers have been parsed, before its data is parsed.
 ///     </remarks>
 public virtual void StartedPart(IDictionary headers)
 {
     if (_docReader != null)
     {
         throw new InvalidOperationException("_docReader is already defined");
     }
     Log.V(Log.TagSync, "%s: Starting new document; headers =%s", this, headers);
     Log.V(Log.TagSync, "%s: Starting new document; ID=%s", this, headers.Get("X-Doc-Id"
                                                                              ));
     _docReader = new MultipartDocumentReader(null, _db);
     _docReader.SetContentType((string)headers.Get("Content-Type"));
     _docReader.StartedPart(headers);
 }