Class MailItemProvider
Provides populated mail envelope rows as an archive
Inheritance
MailItemProvider
Assembly: SoDataBase.dll
Syntax
[ArchiveProvider("Mail", 1073741823)]
public class MailItemProvider : IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities, IPlugin
Constructors
MailItemProvider()
Declaration
public MailItemProvider()
Fields
_colArchived
Declaration
protected ArchiveColumnInfo _colArchived
Field Value
_colAttachment
Declaration
protected ArchiveColumnInfo _colAttachment
Field Value
_colCompany
Declaration
protected ArchiveColumnInfo _colCompany
Field Value
_colFrom
Declaration
protected ArchiveColumnInfo _colFrom
Field Value
_colId
Declaration
protected ArchiveColumnInfo _colId
Field Value
_colPerson
Declaration
protected ArchiveColumnInfo _colPerson
Field Value
_colPriority
Declaration
protected ArchiveColumnInfo _colPriority
Field Value
_colSent
Declaration
protected ArchiveColumnInfo _colSent
Field Value
_colSize
Declaration
protected ArchiveColumnInfo _colSize
Field Value
_colStatus
Declaration
protected ArchiveColumnInfo _colStatus
Field Value
_colSubject
Declaration
protected ArchiveColumnInfo _colSubject
Field Value
_colTo
Declaration
protected ArchiveColumnInfo _colTo
Field Value
Properties
FavorPartialEnvelopes
Should we try to fetch partial envelopes when possible
Saves some bandwidth, but subclasses may need more info
Declaration
protected virtual bool FavorPartialEnvelopes { get; }
Property Value
IsInitialized
Declaration
public bool IsInitialized { get; }
Property Value
Methods
Close()
Declaration
GetAvailableColumns()
Get a list of available columns for this provider
Declaration
public List<ArchiveColumnInfo> GetAvailableColumns()
Returns
GetAvailableEntities()
Get available entities for this provider
Declaration
public List<ArchiveRowTypeInfo> GetAvailableEntities()
Returns
GetReader(String)
Start the provider, returning an IDataReader compatible object to the client for row enumeration and data access
Declaration
public virtual IDataReader GetReader(string options)
Parameters
Type |
Name |
Description |
String |
options |
Options, passed to the internal GetRows method
|
Returns
Type |
Description |
IDataReader |
IDataReader primed to provide results
|
Declaration
public ArchiveResultInformation GetResultInformation()
Returns
GetRows(String)
Iterator over all rows in the archive, suitable for a foreach access. It is typically implemented using the yield keyword.
Declaration
public IEnumerable<ArchiveRow> GetRows(string options)
Parameters
Type |
Name |
Description |
String |
options |
|
Returns
IsEnvelopeWanted(MailEnvelope, Boolean, Boolean, Boolean)
Do the user want to see this envelope
Declaration
protected virtual bool IsEnvelopeWanted(MailEnvelope env, bool toContactsWanted, bool toAssociatesWanted, bool toOthersWanted)
Parameters
Type |
Name |
Description |
SuperOffice.CRM.Mail.MailEnvelope |
env |
Envelope to check
|
Boolean |
toContactsWanted |
Do the user want to see mail from so contacts
|
Boolean |
toAssociatesWanted |
Do the user want to see mail from associates
|
Boolean |
toOthersWanted |
Do the user want to see unrecognized mails
|
Returns
Type |
Description |
Boolean |
True if envelope should be displayed
|
MapColumnToDbId(String)
Map a named column (usually a restriction column) to a database field id.
Declaration
public int MapColumnToDbId(string columnName)
Parameters
Type |
Name |
Description |
String |
columnName |
Name of column to map
|
Returns
Type |
Description |
Int32 |
Database field id if available, otherwise 0
|
Remarks
MapDbIdToColumn(Int32)
Map an integer database field id to a qualified column name
Declaration
public string MapDbIdToColumn(int columnId)
Parameters
Type |
Name |
Description |
Int32 |
columnId |
Field id of column to map
|
Returns
Type |
Description |
String |
Name of column that matches the given field id, or a blank string if there is no match
|
SetDesiredColumns(String[])
Declaration
public void SetDesiredColumns(params string[] columnIds)
Parameters
Type |
Name |
Description |
String[] |
columnIds |
|
SetDesiredEntities(String[])
Declaration
public void SetDesiredEntities(params string[] entities)
Parameters
Type |
Name |
Description |
String[] |
entities |
|
SetOrderBy(ArchiveOrderByInfo[])
Declaration
public void SetOrderBy(params ArchiveOrderByInfo[] orderBy)
Parameters
SetPagingInfo(Int32, Int32)
Declaration
public void SetPagingInfo(int pageSize, int pageNumber)
Parameters
Type |
Name |
Description |
Int32 |
pageSize |
|
Int32 |
pageNumber |
|
SetRestriction(ArchiveRestrictionInfo[])
Set restrictions used to fetch desired columns/entities.
Declaration
public virtual bool SetRestriction(params ArchiveRestrictionInfo[] restrictions)
Parameters
Returns
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)