public override void AddContentTableColumns(NamedTableContext contentsTable) { base.AddContentTableColumns(contentsTable); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidSideEffects, PropertyTypeName.PtypInteger32); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidHeaderItem, PropertyTypeName.PtypInteger32); }
public override void AddContentTableColumns(NamedTableContext contentsTable) { base.AddContentTableColumns(contentsTable); contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagCreationTime, PropertyTypeName.PtypTime); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidRecurring, PropertyTypeName.PtypBoolean); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentEndWhole, PropertyTypeName.PtypTime); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidSideEffects, PropertyTypeName.PtypInteger32); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidHeaderItem, PropertyTypeName.PtypInteger32); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentStateFlags, PropertyTypeName.PtypInteger32); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidFInvited, PropertyTypeName.PtypBoolean); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentColor, PropertyTypeName.PtypInteger32); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidTimeZoneStruct, PropertyTypeName.PtypBinary); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidLocation, PropertyTypeName.PtypString); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidReminderSet, PropertyTypeName.PtypBoolean); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentRecur, PropertyTypeName.PtypBinary); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentSubType, PropertyTypeName.PtypBoolean); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidBusyStatus, PropertyTypeName.PtypInteger32); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentStartWhole, PropertyTypeName.PtypTime); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidMeetingWorkspaceUrl, PropertyTypeName.PtypString); if (this.File.WriterCompatibilityMode >= WriterCompatibilityMode.Outlook2010RTM) { contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidTimeZoneDescription, PropertyTypeName.PtypString); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentTimeZoneDefinitionRecur, PropertyTypeName.PtypBinary); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentTimeZoneDefinitionStartDisplay, PropertyTypeName.PtypBinary); contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentTimeZoneDefinitionEndDisplay, PropertyTypeName.PtypBinary); } }
/// <summary> /// Add columns if not exist /// </summary> public virtual void AddContentTableColumns(NamedTableContext contentsTable) { contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagIconIndex, PropertyTypeName.PtypInteger32); contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagSearchKey, PropertyTypeName.PtypBinary); contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagInternetMessageId, PropertyTypeName.PtypString); contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagFlagStatus, PropertyTypeName.PtypInteger32); contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagReplyTime, PropertyTypeName.PtypTime); }
public NamedTableContext GetContentsTable() { if (m_contentsTable == null) { PSTNode node = GetContentsTableNode(); m_contentsTable = node.NamedTableContext; } return(m_contentsTable); }
public byte[] GetMessageBytesProperty(int rowIndex, PropertyName propertyName) { NamedTableContext tc = GetContentsTable(); int columnIndex = tc.FindColumnIndexByPropertyTag(propertyName, PropertyTypeName.PtypBinary); if (columnIndex >= 0) { return(tc.GetBytesProperty(rowIndex, columnIndex)); } else { return(GetMessage(rowIndex).PC.GetBytesProperty(propertyName)); } }
public string GetMessageStringProperty(int rowIndex, PropertyName propertyName) { NamedTableContext tc = GetContentsTable(); int columnIndex = tc.FindColumnIndexByPropertyTag(propertyName, PropertyTypeName.PtypString); if (columnIndex >= 0) { return(tc.GetStringProperty(rowIndex, columnIndex)); } else { return(GetMessage(rowIndex).PC.GetStringProperty(propertyName)); } }
public Nullable <DateTime> GetMessageDateTimeProperty(int rowIndex, PropertyName propertyName) { NamedTableContext tc = GetContentsTable(); int columnIndex = tc.FindColumnIndexByPropertyTag(propertyName, PropertyTypeName.PtypTime); if (columnIndex >= 0) { return(tc.GetDateTimeProperty(rowIndex, columnIndex)); } else { return(GetMessage(rowIndex).PC.GetDateTimeProperty(propertyName)); } }
public Nullable <bool> GetMessageBooleanProperty(int rowIndex, PropertyID propertyID) { NamedTableContext tc = GetContentsTable(); int columnIndex = tc.FindColumnIndexByPropertyTag(propertyID, PropertyTypeName.PtypBoolean); if (columnIndex >= 0) { return(tc.GetBooleanProperty(rowIndex, columnIndex)); } else { return(GetMessage(rowIndex).PC.GetBooleanProperty(propertyID)); } }
/// <summary> /// Dissociate a message from this folder /// </summary> public void RemoveMessage(MessageObject message) { NamedTableContext contentsTable = GetContentsTable(); int rowIndex = contentsTable.GetRowIndex(message.NodeID.Value); if (rowIndex >= 0) { int contentCount = PC.GetInt32Property(PropertyID.PidTagContentCount).Value; contentCount--; PC.SetInt32Property(PropertyID.PidTagContentCount, contentCount); // Changes to the PC must be saved later // update hierarchy table of parent (will be saved during SaveChanges): m_contentCount = contentCount; // Update contents table (will be saved during SaveChanges) contentsTable.DeleteRow(rowIndex); } }
public void AddMessage(MessageObject message) { int contentCount = PC.GetInt32Property(PropertyID.PidTagContentCount).Value; contentCount++; PC.SetInt32Property(PropertyID.PidTagContentCount, contentCount); // Changes to the PC must be saved later // update hierarchy table of parent (will be saved during SaveChanges): m_contentCount = contentCount; // Update contents table (will be saved during SaveChanges) NamedTableContext contentsTable = GetContentsTable(); AddContentTableColumns(contentsTable); int rowIndex = contentsTable.AddRow(message.NodeID.Value); UpdateMessage(message, contentsTable, rowIndex); this.File.SearchManagementQueue.AddMessage(message.NodeID, this.NodeID); }