private void OnDeserializing(StreamingContext c) { base.Uid = "0"; this._flags = new MessageFlagCollection(); this._partToIndex = new Dictionary <IPart, string>(); this._indexToPart = new Dictionary <string, IPart>(); this._attachmentToPart = new Dictionary <Attachment, IPart>(); }
public ImapMessage() { base.Uid = "0"; this._flags = new MessageFlagCollection(); this._partToIndex = new Dictionary <IPart, string>(); this._indexToPart = new Dictionary <string, IPart>(); this._attachmentToPart = new Dictionary <Attachment, IPart>(); }
internal Message(ImapClient client, Folder folder) : this() { Flags = new MessageFlagCollection(client, this); Labels = new GMailMessageLabelCollection(client, this); _client = client; Folder = folder; }
public MessageFlagCollection ParseMessageFlagCollection(byte[] source) { MessageFlagCollection flags = new MessageFlagCollection(); Regex regex = new Regex(@"\\([^\s]+)"); string input = this.DefaultEncoding.GetString(source, 0, source.Length); foreach (Match match in regex.Matches(input)) { flags.Add(new MessageFlag(match.Groups[1].Value)); } return(flags); }
public MessageFlagCollection ParseFlags(string flags) { MessageFlagCollection messageFlagCollection = new MessageFlagCollection(); if (!string.IsNullOrEmpty(flags) && flags.Contains(@"\")) { string[] flagNames = flags.Split(new char[] { '\\', ' ' }, StringSplitOptions.RemoveEmptyEntries); foreach (string flag in flagNames) { messageFlagCollection.Add(new MessageFlag(flag)); } } return(messageFlagCollection); }
private void ProcessOKPermanentFlags(string flags) { Regex regex = new Regex(@"\((?<flags>[^\)]*)\)"); string str = regex.Match(flags).Groups["flags"].Value; this._permanentFlags = new MessageFlagCollection(); this._permanentFlagsRecieved = true; if (str != "") { string[] strArray = str.Split(new char[] { ' ' }); for (int i = 0; i < strArray.Length; i++) { if (strArray[i][0] == '\\') { this._permanentFlags.Add(new MessageFlag(strArray[i].Substring(1))); } } } }
public UIDSTORECommand(ISequence sequence, MessageFlagCollection flags, EFlagMode mode) { this._sequence = sequence; this._mode = mode; this._flags = flags; }
private string decodeCollection(MessageFlagCollection a) { string b = ""; for (int i = 0; i < a.Count; i++) { b += a[i].ToString(); b += "; "; } return b; }