Since this is the place I know with more smart guys I´m going to ask something that is plaguing me. See if you guys can help me out in this one.
I´m building the WOM project (http://womproj.pbwiki.com) and right now I´m building the filter syntax.
Currently it works like this:
Let´s say I have this class:
public class Task : WorkItem {
public int Id{
//accessors
}
public string Name{
//accessors
}
public DateTime DueDate{
//accessors
}
public Status Status{
//accessors
}
}
The filter syntax for getting the due Tasks would be like this:
Filter.Equal("Status",Status.Active) + Filter.Lesser("DueDate", DateTime.Now);
This works great and gets all active tasks that have a duedate lesser than current time (are due).
But Michael Ruminer and Eric W. both pointed me that I was trying hard not to pay attention to: if the point of the project is to stop using untyped workitems (the api ones), then the filter syntax should be:
Filter.Equal(Task.Properties.Status, Status.Active) + Filter.Lesser(Task.Properties.DueDate, DateTime.Now);
And I most certainly aggreed with them. In theory of course, cause the implementation part that´s where everything started to go wrong.
I can´t demand that people building the object models for WorkItems build and keep updated a Properties enum with all the properties in the class, so I thought: "I´ll generate the enum dynamically with Emit" and there I am right now.
I couldn´t find nothing in the web that give me a hint of how to do it.
Hope I can find help among you friends! :)
--
Bernardo Heynemann
Microsoft Certified Solution Developer .Net
[EMAIL PROTECTED]
Equipe de Arquitetura /Architecture Team
Perlink Consultoria & Sistemas
http://www.perlink.com.br
Rua da Assembléia, 10/3419
Centro - Rio de Janeiro - Brazil
OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject.Bernardo Heynemann
Microsoft Certified Solution Developer .Net
[EMAIL PROTECTED]
Equipe de Arquitetura /Architecture Team
Perlink Consultoria & Sistemas
http://www.perlink.com.br
Rua da Assembléia, 10/3419
Centro - Rio de Janeiro - Brazil
Powered by mailenable.com - List managed by www.readify.net
