/// <summary>
 ///     the SortByElement TableOption
 /// </summary>
 /// <param name="elementName">the name of Element you want to Sort by it</param>
 /// <param name="sortOrder">the sortOrder you want to Sort by it</param>
 public SortByElement(string elementName, TableSortOrder sortOrder)
 {
     _elementName = string.IsNullOrEmpty(elementName)
         ? throw new GameServiceException("ElementName Cant Be EmptyOrNull").LogException <SortByElement>(
                              DebugLocation.Internal, "Constructor")
         : _elementName = elementName;
     _sortOrder         = sortOrder;
 }
Exemple #2
0
 public void SortMessagesBySize(TableSortOrder order)
 {
     this.Contents.SortRows(cemapi.PropTags.PR_CONTENT_LENGTH, order);
 }
Exemple #3
0
 public void SortMessagesBySenderName(TableSortOrder order)
 {
     this.Contents.SortRows(cemapi.PropTags.PR_SENDER_NAME_W, order);
 }
Exemple #4
0
 public void SortMessagesByDeliveryTime(TableSortOrder order)
 {
     this.Contents.SortRows(cemapi.PropTags.PR_MESSAGE_DELIVERY_TIME, order);
 }
 public void SortRows(PropTags tag, TableSortOrder order)
 {
     int sizeS = Marshal.SizeOf(typeof(SSortOrder));
     IntPtr sortArray = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint)) * 3 + sizeS);
     Marshal.WriteInt32(sortArray, 1);
     Marshal.WriteInt64(sortArray, Marshal.SizeOf(typeof(uint)), 0);
     SSortOrder s;
     s.ulOrder = order;
     s.ulPropTag = tag;
     Marshal.StructureToPtr(s, (IntPtr)(((uint)sortArray) + Marshal.SizeOf(typeof(uint)) * 3), false);
     HRESULT hr = pIMAPITableSortTable(this.ptr, sortArray);
     if (hr != HRESULT.S_OK)
         throw new Exception("pIMAPITableSetColumns failed: " + hr.ToString());
     Marshal.FreeHGlobal(sortArray);
 }