public MatchedName(IMAP4Response response) { string data = response.Data; int index = data.IndexOf('('); int num2 = data.IndexOf(')'); if (((index == -1) || (num2 == -1)) || (num2 < index)) { throw new IncorrectResponseException("Incorrect Response"); } string str2 = data.Substring(index + 1, (num2 - index) - 1); string[] attributes = new string[0]; if (str2.Length > 0) { attributes = str2.Split(new char[] { ' ' }); } this.atrributes = new NameAttributesCollection(attributes); data = data.Substring(num2 + 2); this.delimeter = GetString(data); this.name = GetString(data.Substring(this.delimeter.Length + 1)); if (this.delimeter[0] == '"') { this.delimeter = this.delimeter.Substring(1, this.delimeter.Length - 2); } if (this.name[0] == '"') { this.name = this.name.Substring(1, this.name.Length - 2); } }
private Mailbox(string name, Mailbox parent, string displayName, NameAttributesCollection attributes) { this.Parent = parent; this._displayName = displayName; this.Name = name; this.HierarchyDelimiter = "/"; this.FullName = (parent == null ? name : parent.FullName + HierarchyDelimiter + name); this.Children = new MailboxCollection(); this.Folder = GetFolder(Name); }
private Mailbox(string name, Mailbox parent, NameAttributesCollection attributes) : this(name, parent, name, attributes) { }
private Mailbox(string name, NameAttributesCollection attributes) : this(name, null, name, attributes) { }