public override Response NewResponse(XmlNode responseNode) { XmlNode n = responseNode; ArrayList tags = new ArrayList(); for( int i = 0; i < n.ChildNodes.Count; i++ ) { XmlNode child = n.ChildNodes.Item(i); if( !child.Name.ToLower().Equals(MailService.E_TAG) ) continue; Tag t = new Tag(); t.Id = XmlUtil.AttributeValue( child.Attributes, MailService.A_ID ); t.Name = XmlUtil.AttributeValue( child.Attributes, MailService.A_NAME ); t.Color = XmlUtil.AttributeValue( child.Attributes, MailService.A_COLOR ); t.UnreadCount = XmlUtil.AttributeValue( child.Attributes, MailService.A_UNREAD_COUNT ); tags.Add( t ); } if( tags.Count == 0 ) return new GetTagResponse(null); return new GetTagResponse( (Tag[])tags.ToArray(tags[0].GetType()) ); }
public GetTagResponse( Tag[] tags ) { this.tags = tags; }