Пример #1
0
		public GetFolderResponse(Folder f)
		{
			this.f = f;
		}
Пример #2
0
		private Folder NodeToFolder( XmlNode parent )
		{
			XmlAttributeCollection attrs = parent.Attributes;

			Folder f;
			if( parent.Name.ToLower().Equals("search") )
			{
				SearchFolder sf = new SearchFolder();
				sf.Query = XmlUtil.AttributeValue( attrs, MailService.A_QUERY );
				sf.Types = XmlUtil.AttributeValue( attrs, MailService.A_TYPES );
				sf.SortBy = XmlUtil.AttributeValue( attrs, MailService.A_SORT_BY );
				f = sf;
			}
			else
			{
				f = new Folder();
			}

			f.Id = XmlUtil.AttributeValue( attrs, MailService.A_ID );
			f.Name = XmlUtil.AttributeValue( attrs, MailService.A_NAME );
			f.ParentFolderId = XmlUtil.AttributeValue( attrs, MailService.A_PARENT_FOLDER_ID );
			f.Color = XmlUtil.AttributeValue( attrs, MailService.A_COLOR );
			f.UnreadCount = XmlUtil.AttributeValue( attrs, MailService.A_UNREAD_COUNT );
			f.NumMessages = XmlUtil.AttributeValue( attrs, MailService.A_ITEM_COUNT );
			f.View = XmlUtil.AttributeValue( attrs, MailService.A_VIEW );

			for( int i = 0; i < parent.ChildNodes.Count; i++ )
			{
				XmlNode child = parent.ChildNodes.Item(i);
				f.Children.Add( NodeToFolder( child ) );
			}

			return f;
		}
Пример #3
0
		public void AddChild( Folder f )
		{
			children.Add( f );
		}