-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from DiskTools/gan601
邮件缓存
- Loading branch information
Showing
19 changed files
with
437 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System.Collections.Generic; | ||
using Mail.Services.Data; | ||
using Mail.Services.Data.Enums; | ||
|
||
namespace Mail.Extensions; | ||
|
||
/// <summary> | ||
/// comment<br/> | ||
/// <br/> | ||
/// 创建者: GaN<br/> | ||
/// 创建时间: 2023/06/18 | ||
/// </summary> | ||
public static class MailMessageDataExtentions | ||
{ | ||
public static IEnumerable<MailMessageRecipientData> GetRecipientData(this MailMessageData Data) | ||
{ | ||
var msgId = Data.Id; | ||
foreach (var to in Data.To) | ||
{ | ||
to.Id = msgId; | ||
to.RecipientType = RecipientType.To; | ||
yield return to; | ||
} | ||
|
||
foreach (var to in Data.CC) | ||
{ | ||
to.Id = msgId; | ||
to.RecipientType = RecipientType.Cc; | ||
yield return to; | ||
} | ||
|
||
foreach (var to in Data.Bcc) | ||
{ | ||
to.Id = msgId; | ||
to.RecipientType = RecipientType.Bcc; | ||
yield return to; | ||
} | ||
|
||
Data.Sender.Id = msgId; | ||
Data.Sender.RecipientType = RecipientType.Sender; | ||
yield return Data.Sender; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace Mail.Models; | ||
|
||
/// <summary> | ||
/// comment<br/> | ||
/// <br/> | ||
/// 创建者: GaN<br/> | ||
/// 创建时间: 2023/06/20 | ||
/// </summary> | ||
public class LoadMailMessageOption | ||
{ | ||
public LoadMailMessageOption(string FolderId) | ||
{ | ||
this.FolderId = FolderId; | ||
} | ||
|
||
public LoadMailMessageOption(string FolderId, bool IsFocusedTab) | ||
{ | ||
this.FolderId = FolderId; | ||
this.IsFocusedTab = IsFocusedTab; | ||
} | ||
|
||
public string FolderId { get; set; } | ||
public bool IsFocusedTab { get; set; } = true; | ||
public int StartIndex { get; set; } | ||
public int LoadCount { get; set; } = 30; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.