Item Content
The content of an item is normally used when the end user
double-clicks on an item. If the item's type (or extension) is known to the
system and is associated to an application, the content is requested by CBFS Shell
from the ShellItem instance using the GetContent() method. The
method signature is defined as follows:
public virtual ShellContent GetContent()
ShellContent is a stream-oriented abstract class that provides enough information for the CBFS Shell components to provide the content to any Windows component that is requesting it. CBFS Shell also provides two nonabstract classes to make things easier:
- FileShellContent: uses a physical file as the content.
- MemoryShellContent: uses memory as the content. Memory can be represented by a string, an array of bytes, or a seekable and readable stream.
Note: If the ShellItem instance represents a physical file item, the default implementation of GetContent() will return an instance of the FileShellContent, initialized with the corresponding physical file. In that case, the method does not need to be overridden.