Provides the basic functionality for a backing store, such as a disk or memory.
An implementation of <b>IBackingStore</b> provides methods to create and
open <see cref="T:System.IO.Stream"/> objects bound to a specific backing store.
</summary><remarks>
Implementations of <b>IBackingStore</b> provide a way to store and recall decoded
<see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> bodies or entire Mime messages through <see cref="T:System.IO.Stream"/> objects.
<para>
Both, the <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/> and the <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
method take an instance of <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/>. The <see cref="P:dcwsolutions.MessageView.MimeParts.MimePart.UniqueID"/>
property can be used to associate a call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/> to a
previous call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>.
</para>
<para>
The implementation of <b>IBackingStore</b> may decide upon certain header values
of the <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> whether to serve a call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
or not. It may, e.g. only serve requests on <b>Create</b> for <b>MimeParts</b>, whose
'<i>content-type</i>' header value is '<i>text/html</i>'.
</para>
<para>
If an <b>IBackingStore</b> implementation cannot serve a call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/> it must return null
Opens the previously created and closed <see cref="T:System.IO.Stream"/>.
</summary><param name="mimePart">
An instance of <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> that was passed to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
previously.
</param><returns>
A <see cref="T:System.IO.Stream"/> object.
</returns><remarks>
<para>
The returned <see cref="T:System.IO.Stream"/> is required to contain the same data that was written
to the <see cref="T:System.IO.Stream"/> returned by a previous call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>.
Opens the previously created and closed <see cref="T:System.IO.Stream"/>.
</summary><param name="mimePart">
An instance of <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> that was passed to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
previously.
</param><returns>
A <see cref="T:System.IO.Stream"/> object.
</returns><remarks>
<para>
The returned <see cref="T:System.IO.Stream"/> is required to contain the same data that was written
to the <see cref="T:System.IO.Stream"/> returned by a previous call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>.
Opens the previously created and closed <see cref="T:System.IO.Stream"/>.
</summary><param name="mimePart">
An instance of <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> that was passed to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
previously.
</param><returns>
A <see cref="T:System.IO.Stream"/> object.
</returns><remarks>
<para>
The returned <see cref="T:System.IO.Stream"/> is required to contain the same data that was written
to the <see cref="T:System.IO.Stream"/> returned by a previous call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>.
<!-- No matching elements were found for the following include tag --><include file="TempFileBackingStore.cs.xml" path="Doc/Member[@name="TempFileBackingStore.TempFileBackingStore1"]/*"/>
Opens the previously created and closed <see cref="T:System.IO.Stream"/>.
</summary><param name="mimePart">
An instance of <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> that was passed to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
previously.
</param><returns>
A <see cref="T:System.IO.Stream"/> object.
</returns><remarks>
<para>
The returned <see cref="T:System.IO.Stream"/> is required to contain the same data that was written
to the <see cref="T:System.IO.Stream"/> returned by a previous call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>.
Represents an <a href="http://www.isi.edu/in-notes/rfc2822.txt">RFC 2822</a> address.
</summary><remarks>
<para>
<b>Address</b> is the base class for every address in a MIME message.
An instance of <b>Address</b> is either a <see cref="T:dcwsolutions.MessageView.Headers.Mailbox"/> or a <see cref="T:dcwsolutions.MessageView.Headers.Group"/>.
</para>
<para>
The <see cref="P:dcwsolutions.MessageView.Headers.Address.Display"/> property of an <b>Address</b> returns the
user-friendly name in an address header, if specified.
</para>
<para>
A <see cref="T:dcwsolutions.MessageView.Headers.Mailbox"/> contains exactly one email-address and optionally a
user-friendly display name, while a <see cref="T:dcwsolutions.MessageView.Headers.Group"/> can contain multiple
mailboxes and a user-friendly display name. <see cref="P:dcwsolutions.MessageView.Headers.Address.Display"/> returns
the user-friendly name or, in case of a <see cref="T:dcwsolutions.MessageView.Headers.Mailbox"/>, the email address itself
Represents a read-only collection of <see cref="T:dcwsolutions.MessageView.Headers.Address"/> objects.
</summary><remarks>
<para>
An <b>AddressCollection</b> contains all addresses from an address header, such as '<i>from</i>' or
'<i>to</i>'. An <b>AddressCollection</b> can contain <see cref="T:dcwsolutions.MessageView.Headers.Mailbox"/> and <see cref="T:dcwsolutions.MessageView.Headers.Group"/>
objects, while a <see cref="T:dcwsolutions.MessageView.Headers.MailboxCollection"/> can only contain <b>Mailbox</b> objects, and is used
Represents a collection of <see cref="T:dcwsolutions.MessageView.Headers.Address"/> objects. This is the base class for <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> and <see cref="T:dcwsolutions.MessageView.Headers.MailboxCollection"/>.
Returns a string of all items in this <see cref="T:dcwsolutions.MessageView.Headers.AddressCollectionBase"/> separated by <paramref name="separator"/>.
Gets an <see cref="T:System.Collections.ArrayList"/> containing the list of elements in the <see cref="T:dcwsolutions.MessageView.Headers.AddressCollectionBase"/> instance.
</summary><value>An <see cref="T:System.Collections.ArrayList"/> representing the <see cref="T:dcwsolutions.MessageView.Headers.AddressCollectionBase"/> itself.</value><remarks>
<b>Notes to Implementers:</b>
<para>
This class makes the underlying collection available through the <b>InnerList</b> property,
which is intended for use only by classes that are derived directly from <see cref="T:dcwsolutions.MessageView.Headers.AddressCollectionBase"/>.
The derived class must ensure that its own users cannot modify the underlying collection.
Gets the element at the specified index. In C#, this property is the indexer for the <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> class.
Gets the <see cref="T:dcwsolutions.MessageView.Headers.MailboxCollection"/> that contains the mailboxes of the <see cref="T:dcwsolutions.MessageView.Headers.Group"/>.
</summary><value>
A <see cref="T:dcwsolutions.MessageView.Headers.MailboxCollection"/>.
Gets the element at the specified index. In C#, this property is the indexer for the <see cref="T:dcwsolutions.MessageView.Headers.MailboxCollection"/> class.
Represents a collection of parameters of a MIME header.
</summary><remarks>
Structured MIME headers can have parameters. These parameters can be accessed through the
<see cref="P:dcwsolutions.MessageView.Headers.StructuredHeader.Params"/> property of the <see cref="T:dcwsolutions.MessageView.Headers.StructuredHeader"/> class.
<para>
For the <see cref="T:dcwsolutions.MessageView.Headers.ContentTypeHeader"/> and the <see cref="T:dcwsolutions.MessageView.Headers.ContentDispositionHeader"/> class,
this property returns an instance of a <b>ParameterCollection</b> derived class:
Gets the element at the specified index. In C#, this property is the indexer for the <see cref="T:dcwsolutions.MessageView.Headers.Params.ParameterCollection"/> class.
</summary><param name="parameterName">
The name of the parameter to get.
</param><value>
The element with the specified <paramref name="parameterName"/> if it could be found, null otherwise.
Gets an <see cref="T:System.Collections.Specialized.ListDictionary"/> containing the list of elements in the <see cref="T:dcwsolutions.MessageView.Headers.Params.ParameterCollection"/> instance.
</summary><value>An <see cref="T:System.Collections.Specialized.ListDictionary"/> representing the <see cref="T:dcwsolutions.MessageView.Headers.Params.ParameterCollection"/> itself.</value><remarks>
<b>Notes to Implementers:</b>
<para>
This class makes the underlying collection available through the <b>InnerList</b> property,
which is intended for use only by classes that are derived directly from <see cref="T:dcwsolutions.MessageView.Headers.Params.ParameterCollection"/>.
The derived class must ensure that its own users cannot modify the underlying collection.
Represents the value of the '<i>content-disposition</i>' header field.
</summary><remarks>
The <see cref="T:dcwsolutions.MessageView.Headers.ContentDispositionType"/> value specifies the way that the <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/>
is intended to be displayed to the user. A value of <b>ContentDispositionType.Inline</b> specifies
that the <b>MimePart</b> is for example referenced by HTML content while a value of <b>ContentDispositionType.Attachment</b>
specifies that the <b>MimePart</b> should be treated as an attachment to the message.
<para>
The default value for this property is <b>ContentDispositionType.Inline</b>.
Gets the value of the header represented by this instance.
</summary><value>
A <see cref="T:System.String"/> containing the value of the header represented by the <see cref="T:dcwsolutions.MessageView.Headers.StructuredHeader"/>.
Gets the parameters of the header represented by this instance.
</summary><value>
A <see cref="T:dcwsolutions.MessageView.Headers.Params.ParameterCollection"/> containing the parameters of the header represented by the <see cref="T:dcwsolutions.MessageView.Headers.StructuredHeader"/>.
Gets the <see cref="P:dcwsolutions.MessageView.Headers.ContentDispositionHeader.ContentDispositionType"/> that represents the value of the '<i>content-disposition</i>' header.
</summary><remarks>
The <see cref="P:dcwsolutions.MessageView.Headers.ContentDispositionHeader.ContentDispositionType"/> value specifies the way that the <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/>
is intended to be displayed to the user. A value of <b>ContentDispositionType.Inline</b> specifies
that the <b>MimePart</b> is for example referenced by HTML content while a value of <b>ContentDispositionType.Attachment</b>
specifies that the <b>MimePart</b> should be treated as an attachment to the message.
<para>
The default value for this property is <b>ContentDispositionType.Inline</b>.
</para>
</remarks><value>
A <see cref="P:dcwsolutions.MessageView.Headers.ContentDispositionHeader.ContentDispositionType"/> value.
If a content-type is not recognized by <b>MessageView</b> and the MIME part is
a subpart in a <see cref="T:dcwsolutions.MessageView.MimeParts.Multipart.MimeMultipartDigest"/> construct, <see cref="T:dcwsolutions.MessageView.MimeMessageRFC822"/> is used,
Gets an <see cref="T:System.Collections.ICollection"/> containing the headers in the <see cref="T:dcwsolutions.MessageView.Headers.HeaderCollection"/>.
</summary><value>
An <see cref="T:System.Collections.ICollection"/> containing the headers in the <see cref="T:dcwsolutions.MessageView.Headers.HeaderCollection"/>.
Copies the elements of this <see cref="T:dcwsolutions.MessageView.MimeParts.AttachmentCollection"/> to an <see cref="T:System.Array"/>, starting at a particular <B>Array</B> index.
</summary>
<param name="array">
The one-dimensional <see cref="T:System.Array"/> that ist the destination of the elements copied
from the current collection.
</param><param name="index">
A 32-bit integer that represents the index in <paramref name="array"/> at which copying begins.
Copies the elements of this <see cref="T:dcwsolutions.MessageView.MimeParts.AttachmentCollection"/> to an <see cref="T:System.Array"/>, starting at a particular <B>Array</B> index.
</summary>
<param name="array">
The one-dimensional <see cref="T:System.Array"/> that ist the destination of the elements copied
from the current collection.
</param><param name="index">
A 32-bit integer that represents the index in <paramref name="array"/> at which copying begins.
Returns a <see cref="T:System.IO.Stream"/> where the decoded content of the body of this <b>MimePart</b>
can be read from.
</summary><remarks>
When <b>GetStream</b> is called on a <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/>, it first tries to acquire the
data by calling <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/> on <see cref="P:dcwsolutions.MessageView.MimeParts.MimePart.DecodedBackingStore"/>, passing
its <see cref="P:dcwsolutions.MessageView.MimeParts.MimePart.UniqueID"/> property to it. If the request cannot be served by the
<see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/>, <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> tries to access the unprocessed data
by calling <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/> on the superior <b>MimeMessageRFC822's</b> <see cref="P:dcwsolutions.MessageView.MimeMessageRFC822.EncodedBackingStore"/>.
If <paramref name="encodedBackingStore"/> was not specified upon the creation of the <see cref="T:dcwsolutions.MessageView.MimeMessageRFC822"/>,
or the <b>MimePart</b> was created through a call on <see cref="M:dcwsolutions.MessageView.MessageView.ShowMessage(System.IO.Stream)"/> with
<see cref="F:dcwsolutions.MessageView.CacheMode.None"/>, it is tried to access the source stream.
</remarks><returns>
A <see cref="T:System.IO.Stream"/> object if it could be aquired, null otherwise.
Gets a <see cref="T:dcwsolutions.MessageView.Headers.ContentDispositionHeader"/> instance that represents the '<i>Content-Disposition</i>' header of this instance.
Gets a <see cref="T:dcwsolutions.MessageView.Headers.TransferEncoding"/> value that represents the '<i>Content-Transfer-Encoding</i>' header value of this instance.
</summary><returns>
A <see cref="T:dcwsolutions.MessageView.Headers.TransferEncoding"/> value.
<param name="stream">A <see cref="T:System.IO.Stream"/> where the message will be read from.</param><remarks>
<para>
Bytes read from <paramref name="stream"/> <b> must</b> map to 'us-ascii' encoding, that is,
one byte per character. Lines <b>must</b> be terminated by a carriage return,
followed by a line feed ("\r\n").
</para>
<para>
Normally, a <b>Stream</b> returned by <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is closed before another call to <b>Create</b> or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is made. This might not be the case when UUEncoded data is detected in a MIME message.
UUEncoded data is nested in text parts of messages. When it is detected, a new <b>MimeApplication</b>
is created to represent the UUEncoded data as an attachment. The <b>Stream</b> created by the
<see cref="T:dcwsolutions.MessageView.MimeParts.MimeText"/> object is still open when the <b>MimeApplication</b> object calls
<b>IBackingStore.Create</b>. If an <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> implementation cannot serve two
open <b>Stream</b> objects at the same time, it must return <b>null</b>.
</para>
<para>
This method does not use the input <b>Stream</b> as data source for subsequent calls to
<param name="stream">A <see cref="T:System.IO.Stream"/> where the message will be read from.</param><param name="useOriginalStream">If <b>true</b>, the <b>MimeMessageRFC822</b> will use
<paramref name="stream"/> to serve requests for MimePart data.</param><remarks>
<para>
Bytes read from <paramref name="stream"/> <b> must</b> map to 'us-ascii' encoding, that is,
one byte per character. Lines <b>must</b> be terminated by a carriage return,
followed by a line feed ("\r\n").
</para>
<para>
Normally, a <b>Stream</b> returned by <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is closed before another call to <b>Create</b> or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is made. This might not be the case when UUEncoded data is detected in a MIME message.
UUEncoded data is nested in text parts of messages. When it is detected, a new <b>MimeApplication</b>
is created to represent the UUEncoded data as an attachment. The <b>Stream</b> created by the
<see cref="T:dcwsolutions.MessageView.MimeParts.MimeText"/> object is still open when the <b>MimeApplication</b> object calls
<b>IBackingStore.Create</b>. If an <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> implementation cannot serve two
open <b>Stream</b> objects at the same time, it must return <b>null</b>.
</para>
<para>
<b class="le">Note:</b>
Using the original input stream instead of BackingStores is only encouraged if
the user has complete control over the stream and can guarantee for availability
and integrity of the stream.
</para>
<para>
An input stream that is to be used as data source for subsequent calls to
<see cref="M:dcwsolutions.MessageView.MimeParts.MimePart.GetStream"/> <b> must</b> meet the following requirements:
<para>
<p>1. The message <b>must</b> be encoded in 'us-ascii'.</p>
<p>2. Each line in the input stream <b>must</b> be terminated by "\r\n".</p>
<p>3. The input stream <b>must</b> support seeking.</p>
<p>4. The initial position of the input stream <b>must not</b> be changed.</p>
<p>5. The stream contents <b>must not</b> be changed.</p>
</para>
<para>
If any of the above requirements is not met, a stream requested by
<see cref="M:dcwsolutions.MessageView.MimeParts.MimePart.GetStream"/> may not contain the original entity of
the MimePart, or any data at all. Be careful when using this method.
</para>
</para>
</remarks>
<summary>
Initializes a new instance of the <b>MimeMessageRFC8222</b> class using input from the specified <see cref="T:System.IO.Stream"/>.
<param name="stream">A <see cref="T:System.IO.Stream"/> where the message will be read from.</param><param name="decodedBackingStore">An implementation of <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> where
on-the-fly-decoded MIME part bodies will be written to.
</param><remarks>
<para>
Bytes read from <paramref name="stream"/> <b> must</b> map to 'us-ascii' encoding, that is,
one byte per character. Lines <b>must</b> be terminated by a carriage return,
followed by a line feed ("\r\n").
</para>
<para>
If <paramref name="decodedBackingStore"/> is not null, every
<see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> created during the parsing process that is not a <see cref="T:dcwsolutions.MessageView.MimeParts.Multipart.MimeMultipart"/>
will request a <b>Stream</b> from <paramref name="decodedBackingStore"/> by calling
<see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>. The body of the <b>MimePart</b> is then decoded
on-the-fly and written to the acquired <b>Stream</b>. When the <b>MimePart</b> is finished
it calls <see cref="M:System.IO.Stream.Close"/> on the <b>Stream</b>. Any requests to <b>MimePart</b>
data through <see cref="M:dcwsolutions.MessageView.MimeParts.MimePart.GetStream"/> at a later time will request a <b>Stream</b> from
<paramref name="decodedBackingStore"/> by calling <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>.
</para>
<para>
Normally, a <b>Stream</b> returned by <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is closed before another call to <b>Create</b> or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is made. This might not be the case when UUEncoded data is detected in a MIME message.
UUEncoded data is nested in text parts of messages. When it is detected, a new <b>MimeApplication</b>
is created to represent the UUEncoded data as an attachment. The <b>Stream</b> created by the
<see cref="T:dcwsolutions.MessageView.MimeParts.MimeText"/> object is still open when the <b>MimeApplication</b> object calls
<b>Create</b>. If an <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> implementation cannot serve two
open <b>Stream</b> objects at the same time, it must return <b>null</b>
</para>
</remarks>
<summary>
Initializes a new instance of the <b>MimeMessageRFC822</b> class using input from the specified <see cref="T:System.IO.Stream"/>.
<param name="stream">A <see cref="T:System.IO.Stream"/> where the message will be read from.</param><param name="decodedBackingStore">An implementation of <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> where on-the-fly-decoded MIME part bodies will be written to.</param><param name="encodedBackingStore">An implementation of <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> where the encoded (unprocessed) message will be copied to.</param><remarks>
<para>
Bytes read from <paramref name="stream"/> <b> must</b> map to 'us-ascii' encoding, that is,
one byte per character. Lines <b>must</b> be terminated by a carriage return,
followed by a line feed ("\r\n").
</para>
<para>
If <paramref name="encodedBackingStore"/> is not null, a copy of the RFC 2822 message read from
<paramref name="stream"/> is stored to it.
If <paramref name="decodedBackingStore"/> is null or a call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/> or
<see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/> cannot be served by the <paramref name="decodedBackingStore"/>
at a subsequent request for data on a <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/>, the <b>MimeMessageRFC822</b> will
try to get the data from <paramref name="encodedBackingStore"/>.
</para>
<para>
A Stream returned by the <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/> method of the <paramref name="encodedBackingStore"/>
does not need to support seeking. If it does, the <b>MimeMessageRFC822</b> will save <b>Stream</b> positions
internally, and such positions <b>must not</b> change. If the <b>Stream</b> does not support seeking,
<b>MimeMessageRFC822</b> will only save relative positions internally. A <b>Stream</b> returned by
<see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/> must support seeking and is required to translate such
relative positions into the absolute values.
</para>
<para>
If <paramref name="decodedBackingStore"/> is not null, every
<b>MimePart</b> created during the parsing process that is not a <see cref="T:dcwsolutions.MessageView.MimeParts.Multipart.MimeMultipart"/>
will request a <b>Stream</b> from <paramref name="decodedBackingStore"/> by calling
<b>Create</b>. The body of the <b>MimePart</b> is then decoded
on-the-fly and written to the aquired <b>Stream</b>. When the <b>MimePart</b> is finished
it calls <see cref="M:System.IO.Stream.Close"/> on the <b>Stream</b>. Any requests to <b>MimePart</b>
data through <see cref="M:dcwsolutions.MessageView.MimeParts.MimePart.GetStream"/> at a later time will request a <b>Stream</b> from
<paramref name="decodedBackingStore"/> by calling <b>Open</b>.
</para>
<para>
Normally, a <b>Stream</b> returned by <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is closed before another call to <b>Create</b> or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is made. This might not be the case when UUEncoded data is detected in a MIME message.
UUEncoded data is nested in text parts of messages. When it is detected, a new <b>MimeApplication</b>
is created to represent the UUEncoded data as an attachment. The <b>Stream</b> created by the
<see cref="T:dcwsolutions.MessageView.MimeParts.MimeText"/> object is still open when the <b>MimeApplication</b> object calls
<b>IBackingStore.Create</b>. If an <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> implementation cannot serve two
open <b>Stream</b> objects at the same time, it must return <b>null</b>
</para>
</remarks>
<summary>
Initializes a new instance of the <b>MimeMessageRFC8222</b> class using input from the specified <see cref="T:System.IO.Stream"/>.
<param name="stream">A <see cref="T:System.IO.Stream"/> where the message will be read from.</param><remarks>
<para>
Bytes read from <paramref name="stream"/> <b> must</b> map to 'us-ascii' encoding, that is,
one byte per character. Lines <b>must</b> be terminated by a carriage return,
followed by a line feed ("\r\n").
</para>
<para>
Normally, a <b>Stream</b> returned by <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is closed before another call to <b>Create</b> or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is made. This might not be the case when UUEncoded data is detected in a MIME message.
UUEncoded data is nested in text parts of messages. When it is detected, a new <b>MimeApplication</b>
is created to represent the UUEncoded data as an attachment. The <b>Stream</b> created by the
<see cref="T:dcwsolutions.MessageView.MimeParts.MimeText"/> object is still open when the <b>MimeApplication</b> object calls
<b>IBackingStore.Create</b>. If an <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> implementation cannot serve two
open <b>Stream</b> objects at the same time, it must return <b>null</b>.
</para>
<para>
This method does not use the input <b>Stream</b> as data source for subsequent calls to
Initializes a new instance of the <b>MimeMessageRFC8222</b> class using input from the specified <see cref="T:System.IO.Stream"/>
with the specified <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/>.
</summary><param name="securityPlugin">The <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/> that is used during message parsing.</param>
<param name="stream">A <see cref="T:System.IO.Stream"/> where the message will be read from.</param><param name="useOriginalStream">If <b>true</b>, the <b>MimeMessageRFC822</b> will use
<paramref name="stream"/> to serve requests for MimePart data.</param><remarks>
<para>
Bytes read from <paramref name="stream"/> <b> must</b> map to 'us-ascii' encoding, that is,
one byte per character. Lines <b>must</b> be terminated by a carriage return,
followed by a line feed ("\r\n").
</para>
<para>
Normally, a <b>Stream</b> returned by <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is closed before another call to <b>Create</b> or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is made. This might not be the case when UUEncoded data is detected in a MIME message.
UUEncoded data is nested in text parts of messages. When it is detected, a new <b>MimeApplication</b>
is created to represent the UUEncoded data as an attachment. The <b>Stream</b> created by the
<see cref="T:dcwsolutions.MessageView.MimeParts.MimeText"/> object is still open when the <b>MimeApplication</b> object calls
<b>IBackingStore.Create</b>. If an <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> implementation cannot serve two
open <b>Stream</b> objects at the same time, it must return <b>null</b>.
</para>
<para>
<b class="le">Note:</b>
Using the original input stream instead of BackingStores is only encouraged if
the user has complete control over the stream and can guarantee for availability
and integrity of the stream.
</para>
<para>
An input stream that is to be used as data source for subsequent calls to
<see cref="M:dcwsolutions.MessageView.MimeParts.MimePart.GetStream"/> <b> must</b> meet the following requirements:
<para>
<p>1. The message <b>must</b> be encoded in 'us-ascii'.</p>
<p>2. Each line in the input stream <b>must</b> be terminated by "\r\n".</p>
<p>3. The input stream <b>must</b> support seeking.</p>
<p>4. The initial position of the input stream <b>must not</b> be changed.</p>
<p>5. The stream contents <b>must not</b> be changed.</p>
</para>
<para>
If any of the above requirements is not met, a stream requested by
<see cref="M:dcwsolutions.MessageView.MimeParts.MimePart.GetStream"/> may not contain the original entity of
the MimePart, or any data at all. Be careful when using this method.
</para>
</para>
</remarks>
<summary>
Initializes a new instance of the <b>MimeMessageRFC8222</b> class using input from the specified <see cref="T:System.IO.Stream"/>
with the specified <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/>.
</summary><param name="securityPlugin">The <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/> that is used during message parsing.</param>
<param name="stream">A <see cref="T:System.IO.Stream"/> where the message will be read from.</param><param name="decodedBackingStore">An implementation of <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> where
on-the-fly-decoded MIME part bodies will be written to.
</param><remarks>
<para>
Bytes read from <paramref name="stream"/> <b> must</b> map to 'us-ascii' encoding, that is,
one byte per character. Lines <b>must</b> be terminated by a carriage return,
followed by a line feed ("\r\n").
</para>
<para>
If <paramref name="decodedBackingStore"/> is not null, every
<see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> created during the parsing process that is not a <see cref="T:dcwsolutions.MessageView.MimeParts.Multipart.MimeMultipart"/>
will request a <b>Stream</b> from <paramref name="decodedBackingStore"/> by calling
<see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>. The body of the <b>MimePart</b> is then decoded
on-the-fly and written to the acquired <b>Stream</b>. When the <b>MimePart</b> is finished
it calls <see cref="M:System.IO.Stream.Close"/> on the <b>Stream</b>. Any requests to <b>MimePart</b>
data through <see cref="M:dcwsolutions.MessageView.MimeParts.MimePart.GetStream"/> at a later time will request a <b>Stream</b> from
<paramref name="decodedBackingStore"/> by calling <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>.
</para>
<para>
Normally, a <b>Stream</b> returned by <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is closed before another call to <b>Create</b> or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is made. This might not be the case when UUEncoded data is detected in a MIME message.
UUEncoded data is nested in text parts of messages. When it is detected, a new <b>MimeApplication</b>
is created to represent the UUEncoded data as an attachment. The <b>Stream</b> created by the
<see cref="T:dcwsolutions.MessageView.MimeParts.MimeText"/> object is still open when the <b>MimeApplication</b> object calls
<b>Create</b>. If an <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> implementation cannot serve two
open <b>Stream</b> objects at the same time, it must return <b>null</b>
</para>
</remarks>
<summary>
Initializes a new instance of the <b>MimeMessageRFC822</b> class using input from the specified <see cref="T:System.IO.Stream"/>
with the specified <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/>.
</summary><param name="securityPlugin">The <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/> that is used during message parsing.</param>
<param name="stream">A <see cref="T:System.IO.Stream"/> where the message will be read from.</param><param name="decodedBackingStore">An implementation of <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> where on-the-fly-decoded MIME part bodies will be written to.</param><param name="encodedBackingStore">An implementation of <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> where the encoded (unprocessed) message will be copied to.</param><remarks>
<para>
Bytes read from <paramref name="stream"/> <b> must</b> map to 'us-ascii' encoding, that is,
one byte per character. Lines <b>must</b> be terminated by a carriage return,
followed by a line feed ("\r\n").
</para>
<para>
If <paramref name="encodedBackingStore"/> is not null, a copy of the RFC 2822 message read from
<paramref name="stream"/> is stored to it.
If <paramref name="decodedBackingStore"/> is null or a call to <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/> or
<see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/> cannot be served by the <paramref name="decodedBackingStore"/>
at a subsequent request for data on a <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/>, the <b>MimeMessageRFC822</b> will
try to get the data from <paramref name="encodedBackingStore"/>.
</para>
<para>
A Stream returned by the <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/> method of the <paramref name="encodedBackingStore"/>
does not need to support seeking. If it does, the <b>MimeMessageRFC822</b> will save <b>Stream</b> positions
internally, and such positions <b>must not</b> change. If the <b>Stream</b> does not support seeking,
<b>MimeMessageRFC822</b> will only save relative positions internally. A <b>Stream</b> returned by
<see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/> must support seeking and is required to translate such
relative positions into the absolute values.
</para>
<para>
If <paramref name="decodedBackingStore"/> is not null, every
<b>MimePart</b> created during the parsing process that is not a <see cref="T:dcwsolutions.MessageView.MimeParts.Multipart.MimeMultipart"/>
will request a <b>Stream</b> from <paramref name="decodedBackingStore"/> by calling
<b>Create</b>. The body of the <b>MimePart</b> is then decoded
on-the-fly and written to the aquired <b>Stream</b>. When the <b>MimePart</b> is finished
it calls <see cref="M:System.IO.Stream.Close"/> on the <b>Stream</b>. Any requests to <b>MimePart</b>
data through <see cref="M:dcwsolutions.MessageView.MimeParts.MimePart.GetStream"/> at a later time will request a <b>Stream</b> from
<paramref name="decodedBackingStore"/> by calling <b>Open</b>.
</para>
<para>
Normally, a <b>Stream</b> returned by <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Create(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is closed before another call to <b>Create</b> or <see cref="M:dcwsolutions.MessageView.Storage.IBackingStore.Open(dcwsolutions.MessageView.MimeParts.MimePart)"/>
is made. This might not be the case when UUEncoded data is detected in a MIME message.
UUEncoded data is nested in text parts of messages. When it is detected, a new <b>MimeApplication</b>
is created to represent the UUEncoded data as an attachment. The <b>Stream</b> created by the
<see cref="T:dcwsolutions.MessageView.MimeParts.MimeText"/> object is still open when the <b>MimeApplication</b> object calls
<b>IBackingStore.Create</b>. If an <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> implementation cannot serve two
open <b>Stream</b> objects at the same time, it must return <b>null</b>
</para>
</remarks>
<summary>
Initializes a new instance of the <b>MimeMessageRFC8222</b> class using input from the specified <see cref="T:System.IO.Stream"/>
with the specified <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/>.
</summary><param name="securityPlugin">The <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/> that is used during message parsing.</param>
Gets a value indicating whether a <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> associated with <paramref name="contentID"/>
can be found in this message.
</summary><param name="contentID">A <see cref="T:System.String"/> containig the <see cref="P:dcwsolutions.MessageView.MimeParts.MimePart.ContentID"/> property of the <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> that is searched.</param><returns>
<b>true</b> if a <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> associated with <paramref name="contentID"/>
could be found in this <b>MimeMessageRFC822</b>, <b>false</b> otherwise
Gets the <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> associated with the specified <paramref name="contentID"/>.
</summary><param name="contentID">A <see cref="T:System.String"/> containig the <see cref="P:dcwsolutions.MessageView.MimeParts.MimePart.ContentID"/> property of the <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> that is searched.</param><value>
A <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> object whose <see cref="P:dcwsolutions.MessageView.MimeParts.MimePart.ContentID"/> property equals <paramref name="contentID"/> if
found in this <b>MimeMessageRFC822</b>, null otherwise.
Gets an <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that contains the addresses from the '<i>From</i>' header value of this message.
</summary><value>
An <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that is a read-only collection of <see cref="T:dcwsolutions.MessageView.Headers.Address"/> objects.
Gets an <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that contains the addresses from the '<i>To</i>' header value of this message.
</summary><value>
An <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that is a read-only collection of <see cref="T:dcwsolutions.MessageView.Headers.Address"/> objects.
Gets an <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that contains the addresses from the '<i>Cc</i>' header value of this message.
</summary><value>
An <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that is a read-only collection of <see cref="T:dcwsolutions.MessageView.Headers.Address"/> objects.
Gets an <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that contains the addresses from the '<i>Bcc</i>' header value of this message.
</summary><value>
An <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that is a read-only collection of <see cref="T:dcwsolutions.MessageView.Headers.Address"/> objects.
Gets an <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that contains the addresses from the '<i>Reply-To</i>' header value of this message.
</summary><value>
An <see cref="T:dcwsolutions.MessageView.Headers.AddressCollection"/> that is a read-only collection of <see cref="T:dcwsolutions.MessageView.Headers.Address"/> objects.
Returns an <see cref="T:dcwsolutions.MessageView.MimeParts.AttachmentCollection"/> containing the attachments if this message.
</summary><remarks>
A <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> is considered an attachment if it has a '<i>content-disposition</i>'
header value other than '<i>inline</i>', or the <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> is of type <see cref="T:dcwsolutions.MessageView.MimeParts.MimeApplication"/>.
</remarks><value>
An <see cref="T:dcwsolutions.MessageView.MimeParts.AttachmentCollection"/> that is a read-only collection of <see cref="T:dcwsolutions.MessageView.MimeParts.MimePart"/> objects
Gets the <see cref="P:dcwsolutions.MessageView.MimeParts.Multipart.MimeMultipartSigned.VerificationState"/> from the signed data inside this multipart entity.
</summary><value>
A <see cref="P:dcwsolutions.MessageView.MimeParts.Multipart.MimeMultipartSigned.VerificationState"/> value.
<!-- No matching elements were found for the following include tag --><include file="EncryptedMimePart.cs.xml" path="Doc/Member[@name="EncryptedMimePart.EncryptedMimePart"]/*"/>
<!-- No matching elements were found for the following include tag --><include file="EncryptedMimePart.cs.xml" path="Doc/Member[@name="EncryptedMimePart.EnclosedMimePart"]/*"/>
<!-- No matching elements were found for the following include tag --><include file="SignedMimePart.cs.xml" path="Doc/Member[@name="SignedMimePart.EnclosedMimePart"]/*"/>
<!-- No matching elements were found for the following include tag --><include file="MimeSecurityPlugin.cs.xml" path="Doc/Member[@name="MimeSecurityPlugin.MimeSecurityPlugin"]/*"/>
Requests a <see cref="T:System.Security.Cryptography.ICryptoTransform"/> from the <see cref="T:dcwsolutions.MessageView.Security.MimeSecurityPlugin"/>.
</summary><remarks>
When encrypted data is discovered within a message, the parsing engine tries to
decrypt the contents by requesting an <see cref="T:System.Security.Cryptography.ICryptoTransform"/> from the
<b>MimeSecurityPlugin</b> implementation. See <a href="MessageViewMimeSecurityPlugin.html">Implementing
Specifies the way the background image is repeated.
</summary><remarks>
To have the background image of MessageView displayed only once, use <see cref="F:dcwsolutions.MessageView.RepeatMode.NoRepeat"/>.
To use the background image as wallpaper, use <see cref="F:dcwsolutions.MessageView.RepeatMode.Repeat"/>.
The <see cref="F:dcwsolutions.MessageView.RepeatMode.RepeatX"/> and <see cref="F:dcwsolutions.MessageView.RepeatMode.RepeatY"/> values causes MessageView to repeat the
background image only in horizontal or vertical direction.
Specifies the mode that is used to cache on-the-fly decoded body parts in Mime messages.
</summary><remarks>
When MessageView parses a Mime Message, an implementation of <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/>
will be passed as <paramref name="decodedBackingStore"/> parameter to the constructor of
<see cref="T:dcwsolutions.MessageView.MimeMessageRFC822"/>. The <b>CacheMode</b> enum specifies the type of backing store.
<list type="bullet">
<item>
<term>CacheMode.Memory:</term>
<descrption>
MessageView will create a <see cref="T:dcwsolutions.MessageView.Storage.MemoryBackingStore"/> for the <paramref name="decodedBackingStore"/>
parameter of the <see cref="T:dcwsolutions.MessageView.MimeMessageRFC822"/> constructor.
</descrption>
</item>
<item>
<term>CacheMode.TempFile:</term>
<description>
MessageView will create a <see cref="T:dcwsolutions.MessageView.Storage.TempFileBackingStore"/> for the
<paramref name="decodedBackingStore"/> parameter of the <see cref="T:dcwsolutions.MessageView.MimeMessageRFC822"/> constructor.
</description>
</item>
<item>
<term>CacheMode.Hybrid:</term>
<description>MessageView will create a <see cref="T:dcwsolutions.MessageView.Storage.HybridBackingStore"/> for the <paramref name="decodedBackingStore"/> parameter of the <see cref="T:dcwsolutions.MessageView.MimeMessageRFC822"/> constructor.</description>
</item>
<item>
<term>CacheMode.None:</term>
<description>No implementation of <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/> will be created. <see cref="T:dcwsolutions.MessageView.MessageView"/> will try to aquire
needed data from the message source.
</description>
</item>
</list>
<para>
In most cases, <b>CacheMode.Hybrid</b> will be the best choice for performance reasons.
The created <see cref="T:dcwsolutions.MessageView.Storage.HybridBackingStore"/> uses the default buffer size of 8192 bytes in memory for
each created <see cref="T:System.IO.Stream"/>. If the capacity is exceeded, the data is written to disk.
</para>
<para>
The use of <b>CacheMode.None</b> is strongly discouraged when reading from unreliable data
sources.
</para>
<para>
To use your own way to cache data, consider creating a <see cref="T:dcwsolutions.MessageView.MimeMessageRFC822"/> directly
with a class that implements <see cref="T:dcwsolutions.MessageView.Storage.IBackingStore"/>.
Gets or sets the <see cref="P:dcwsolutions.MessageView.MessageView.DownloadControlSet"/> instance associated with the <see cref="T:dcwsolutions.MessageView.MessageView"/>
</summary><value>
A <see cref="P:dcwsolutions.MessageView.MessageView.DownloadControlSet"/>.
</value><exception cref="T:System.ArgumentNullException"><paramref name="value"/> is a null reference (<b>Nothing</b> in Visual Basic).</exception><remarks>
When displaying messages with unknown content it is strongly recommended to use at least
the security settings from <see cref="P:dcwsolutions.MessageView.MessageView.DownloadControlSet"/><b>.MediumTemplate</b>.
<para>
<see cref="P:dcwsolutions.MessageView.MessageView.DownloadControlSet"/><b>.MediumTemplate</b> is the default value of the
Gets or sets the <see cref="P:dcwsolutions.MessageView.MessageView.ContextMenuMode"/> associated with the <see cref="T:dcwsolutions.MessageView.MessageView"/>.
</summary><value>
The <see cref="P:dcwsolutions.MessageView.MessageView.ContextMenuMode"/>.
</value><remarks>
The <b>ContextMenuMode</b> value specifies the mode that <b>MessageView</b>
handles right-cliks. See <see cref="P:dcwsolutions.MessageView.MessageView.ContextMenuMode"/> for details.